Three lines

Uber

Developers

Create Trip Communication Session

PUThttps://api.uber.com/v1/health/trips/communication

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.

Authorization

OAuth 2.0 Bearer token with the health scope.

Description

Upserts a communication session for a given trip. Returns a phone number that will proxy voice and sms communications between the driver of the input trip and the input phone number.

The provisioned phone number is valid until the trip completes. If the output number is contacted after the trip completes, the communication (a call or sms) will not be forwarded to the driver.

Only one session can exist for a trip. If this endpoint is called twice with two different input phone numbers, the first session will be invalidated after the second request and only the second input phone number will be able to contact the output phone number.

Request parameters
Name Type Description
request_id string The unique id of the the trip request
phone_number string The phone number in E.164 format that will be used to communicate with the driver of the trip with identifier request_id
Response parameters
Name Type Description
phone_number string A phone number in E.164 format that will proxy voice and sms communications between the input number and the driver of the given trip id
Example Request and Response
Request

Try It Replace the token and request id from an active or completed 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 '{
        "request_id": "REPLACEREQUESTID",
        "phone_number": "+11234567890"
      }' \
  'https://sandbox-api.uber.com/v1/health/trips/communication'
Response
{
  "phone_number": "+14155554321"
}

Expected Errors
{
  "message": "Participant creation rejected due to possible duplication across sessions",
  "data": {
    "statusCode": "400"
  },
  "errCode": "bad_request"
}

Uber

Developers
© 2023 Uber Technologies Inc.