Creating a user profile in Support for a caller

The telephony system can create a user profile in Zendesk Support using only a caller's phone number. For example, the system can create a user profile for a caller after searching for the caller in Support and not finding them.

Use the Create User endpoint in the Zendesk API to create a user profile in Support.

POST /api/v2/users.json

The endpoint expects a JSON object named "user":

{  "user": {    "name": "caller",    "phone": "+15551234567"    ...  }}

The "phone" property should comply with the E.164 international telephone numbering plan. For example, "+15551234567". E164 numbers are international numbers with a country dial prefix, usually an area code and a subscriber number. A valid E.164 phone number must include a country calling code.

You can configure Support to validate that numbers comply with the E.164 standard so that the API returns an error if a request contains an invalid phone number. In the admin interface in Support, select Admin > Settings > Customers, and enable Validate user phone numbers.

The phone number must be a direct line linked to a single user. Unique numbers in your Zendesk account default to direct line. See Understanding how phone numbers are linked to end-user profiles in Zendesk help.

The "name" property is required for all new users. You can supply a temporary name such as "Caller: 15551234567". The agent can then get more information from the user when on the call, such as their name and email address.

For details about the JSON object, see Users in the developer docs.

Example

curl https://{subdomain}.zendesk.com/api/v2/users.json \  -d '{"user": {"name": "Caller: 15551234567", "phone": "+15551234567"}}' \  -H "Content-Type: application/json" -X POST \  -v -u {email_address}:{password}