openapi: 3.1.0 info: version: '1.0' title: Zendesk Account Account Settings User Identities API description: Needs a description. tags: - name: User Identities paths: /api/v2/users/{user_id}/identities: parameters: - $ref: '#/components/parameters/UserId' - name: type[] in: query description: Filters results by one or more identity types using the format `?type[]={type}&type[]={type}` explode: true schema: type: string enum: - email - facebook - phone_number - sdk - twitter - messaging - microsoft get: operationId: ListUserIdentities tags: - User Identities summary: Zendesk Get Api V2 Users User_id Identities description: 'Returns a list of identities for the given user. Use the first endpoint if authenticating as an agent. Use the second if authenticating as an end user. End users can only list email and phone number identities. #### Pagination * Cursor pagination (recommended) * Offset pagination See [Pagination](/api-reference/introduction/pagination/). Returns a maximum of 100 records per page for cursor pagination. #### Allowed For * Agents * Verified end users ' responses: '200': description: Success response content: application/json: schema: $ref: '#/components/schemas/UserIdentitiesResponse' examples: default: $ref: '#/components/examples/UserIdentitiesResponseExample' post: operationId: CreateUserIdentity tags: - User Identities summary: Zendesk Post Api V2 Users User_id Identities description: 'Adds an identity to a user''s profile. An agent can add an identity to any user profile. Supported identity types: | Type | Example | | ---------------- | ------- | | email | `{ "type" : "email", "value" : "someone@example.com" }` | | twitter | `{ "type" : "twitter", "value" : "screen_name" }` | | facebook | `{ "type" : "facebook", "value" : "855769377321" }` | | google | `{ "type" : "google", "value" : "example@gmail.com" }` | | agent_forwarding | `{ "type" : "agent_forwarding", "value" : "+1 555-123-4567" }` | | phone_number | `{ "type" : "phone_number", "value" : "+1 555-123-4567" }` | To create an identity without sending out a verification email, include a `"skip_verify_email": true` property. The `"skip_verify_email": true` property does not apply when updating your own agent profile. A welcome or verification email will be sent regardless of this setting. #### Allowed For * Agents ' responses: '201': description: Created response content: application/json: schema: $ref: '#/components/schemas/UserIdentityResponse' examples: default: $ref: '#/components/examples/UserIdentityCreateResponseExample' /api/v2/users/{user_id}/identities/{user_identity_id}: parameters: - $ref: '#/components/parameters/UserId' - $ref: '#/components/parameters/UserIdentityId' get: operationId: ShowUserIdentity tags: - User Identities summary: Zendesk Get Api V2 Users User_id Identities User_identity_id description: 'Shows the identity with the given id for a given user. Use the first endpoint if authenticating as an agent. Use the second if authenticating as an end user. End users can only view email or phone number identity. #### Allowed For * Agents * Verified end users ' responses: '200': description: Success response content: application/json: schema: $ref: '#/components/schemas/UserIdentityResponse' examples: default: $ref: '#/components/examples/UserIdentityResponseExample' put: operationId: UpdateUserIdentity tags: - User Identities summary: Zendesk Put Api V2 Users User_id Identities User_identity_id description: 'This endpoint allows you to: * Set the specified identity as verified (by setting `verified` to "true" or `verification_method` to "low") * Unverify a verified identity (by setting `verified` to "false" or `verification_method` to "none") * Update the `value` property of the specified identity You can''t change an identity''s `primary` attribute with this endpoint. You must use the [Make Identity Primary](#make-identity-primary) endpoint instead. #### Allowed For * Agents ' responses: '200': description: Success response content: application/json: schema: $ref: '#/components/schemas/UserIdentityResponse' examples: default: $ref: '#/components/examples/UserIdentityUpdateResponseExample' delete: operationId: DeleteUserIdentity tags: - User Identities summary: Zendesk Delete Api V2 Users User_id Identities User_identity_id description: 'Deletes the identity for a given user. In certain cases, a phone number associated with an identity is still visible on the user profile after the identity has been deleted via API. You can remove the phone number from the user profile by updating the `phone` attribute of the user to an empty string. See [Update User via API](/api-reference/ticketing/users/users/#update-user) for details and examples. Deleting identities with type `messaging` could break messaging functionality. For example, an agent may stop being able to send messages via the messaging channel. #### Allowed For * Agents ' responses: '204': description: No Content response /api/v2/users/{user_id}/identities/{user_identity_id}/make_primary: parameters: - $ref: '#/components/parameters/UserId' - $ref: '#/components/parameters/UserIdentityId' put: operationId: MakeUserIdentityPrimary tags: - User Identities summary: Zendesk Put Api V2 Users User_id Identities User_identity_id Make_primary description: 'Sets the specified identity as primary. To change other attributes, use the [Update Identity](#update-identity) endpoint. This is a collection-level operation and the correct behavior for an API client is to subsequently reload the entire collection. The first endpoint is the preferred option if authenticating as an agent. If authenticating as an end user, you can only use the second endpoint. In addition, an end user can only make an email identity primary if the email is verified. #### Allowed For * Agents * Verified end users ' responses: '200': description: Success response content: application/json: schema: $ref: '#/components/schemas/UserIdentitiesResponse' examples: default: $ref: '#/components/examples/UserIdentitiesResponseExample' /api/v2/users/{user_id}/identities/{user_identity_id}/request_verification: parameters: - $ref: '#/components/parameters/UserId' - $ref: '#/components/parameters/UserIdentityId' put: operationId: RequestUserVerfication tags: - User Identities summary: Zendesk Put Api V2 Users User_id Identities User_identity_id Request_verification description: 'Sends the user a verification email with a link to verify ownership of the email address. #### Allowed For * Agents ' responses: '200': description: Success description content: application/json: schema: type: string description: Empty response example: '' example: '' /api/v2/users/{user_id}/identities/{user_identity_id}/verify: parameters: - $ref: '#/components/parameters/UserId' - $ref: '#/components/parameters/UserIdentityId' put: operationId: VerifyUserIdentity tags: - User Identities summary: Zendesk Put Api V2 Users User_id Identities User_identity_id Verify description: 'Sets the specified identity as verified. For security reasons, you can''t use this endpoint to update the email identity of the account owner. To verify the person''s identity, send a verification email. See [Verifying the account owner''s email address](https://support.zendesk.com/hc/en-us/articles/4408828975130) in Zendesk help. If [automatic mapping of users to organizations using the email domain](https://support.zendesk.com/hc/en-us/articles/4408882246298-Creating-organizations#topic_nxl_vdt_bc) is enabled and the user is not already a member of an organization, they will be automatically added to the organization associated with the email domain once the email identity is verified. #### Allowed For * Agents ' responses: '200': description: Success response content: application/json: schema: $ref: '#/components/schemas/UserIdentityResponse' examples: default: $ref: '#/components/examples/UserIdentityResponseExample' components: schemas: UserIdentityResponse: type: object properties: identity: $ref: '#/components/schemas/UserIdentityObject' UserIdentitiesResponse: type: object properties: identities: type: array items: $ref: '#/components/schemas/UserIdentityObject'