Three lines

Uber

Developers

Send message to driver

POSThttps://api.uber.com/v1/guests/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

Use this endpoint to send 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.

If the request is from a third party (3P) app, please add x-uber-organizationuuid header and the Organization UUID as the value or the request will be denied.

Authorization

OAuth 2.0 Bearer token with the guests.trips scope.

Request
Example request
curl -X POST \
  -H 'authorization: Bearer <access_token>' \
  -H 'content-type: application/json' \
  -d '{
        "message": "Please come to the door on the right"
      }' \
  'https://api.uber.com/v1/guests/trips/<request_id>/message'
Request URL path parameters
URL path parameter Type Description
request_id string A unique identifier of a trip’s request returned when creating a trip (required).
Request body parameters
Field Type Description
message string The message to deliver to the driver app of the current driver of the given trip (required).
Response
Example response
HTTP 200 OK
Endpoint errors

Example error 1:

{
    "code": "bad_request",
    "message": "can only send messsage for active rides"
}

Example error 2:

{
    "code": "bad_request",
    "message": "cannot send message for ride without assigned driver"
}

Example error 3:

{
    "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 Authentication failed. The client lacks valid authentication 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 or in the database.
500 internal_server_error An unexpected error occurred on the server while processing the request.

Uber

Developers
© 2023 Uber Technologies Inc.