Send message to driver
POSThttps://api.uber.com/v1/health/trips/{request_id}/message
¶ Use Case
Delivers a message to the driver app of the current driver for the given trip. This will fail if there’s no driver currently assigned to the trip.
¶ Authorization
OAuth 2.0 Bearer token with the health
scope.
¶ Path Parameters
Name | Type | Description |
---|---|---|
request_id |
string |
A unique identifier of a trip’s request returned when creating a trip (required). |
¶ Request Parameters
Name | Type | Description |
---|---|---|
message |
string |
The message to deliver to the driver app of the current driver of the given trip (required). |
¶ Example Request
Try It Replace the token and request id from a current trip in the below request to use it in a terminal to see the details.
curl -X POST \
-H 'authorization: Bearer $UBER_TOKEN' \
-H 'content-type: application/json' \
-d '{
"message": "Please come to the door on the right"
}' \
'https://sandbox-api.uber.com/v1/health/trips/REPLACEREQUESTID/message'
¶ Example Response
HTTP 200 OK
¶ Example Errors
{
"code": "bad_request",
"message": "can only send messsage for active rides"
}
{
"code": "bad_request",
"message": "cannot send message for ride without assigned driver"
}
{
"code": "bad_request",
"message": "cannot find ride"
}