Three lines

Uber

Developers

Send message to driver

POSThttps://api.uber.com/v1/health/trips/{request_id}/message

Privileged and Confidential This endpoint design has been confidentially shared with you. It is still under development and is subject to change without notice. Please do not share this document or API endpoint details with anyone who is not authorized to have access. For more information read about scopes.

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"
}
Endpoint Possible Errors
HTTP Status Code Description
400 validation_failed This error occurs when an incorrect or invalid request_id is provided in the request path. Please use a valid request_id to avoid this error.
400 bad_request This error occurs when an attempt is made to send a message to the driver for an inactive ride. Ensure that the ride is active before attempting to send a message to avoid this error.
401 unauthorized Authorization failed. The client lacks valid auth credentials for the requested resource.
403 forbidden The client does not have permission to access the requested resource.
404 not_found The requested resource or entity could not be found on the server.
500 internal_server_error An unexpected error occurred on the server while processing the request.

Uber

Developers
© 2023 Uber Technologies Inc.