Make Identity Primary
PUT {{baseUrl}}/api/v2/users/:user_id/identities/:user_identity_id/make_primary
Sets the specified identity as primary. To change other attributes, use the 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
HEADERS
Key | Datatype | Required | Description |
---|---|---|---|
Accept | string |
RESPONSES
status: OK
{"identities":[{"created_at":"2011-07-20T22:55:29Z","id":35436,"primary":true,"type":"email","updated_at":"2011-07-20T22:55:29Z","user_id":135,"value":"someone@example.com","verified":true},{"created_at":"2012-02-12T14:25:21Z","id":77136,"primary":false,"type":"twitter","updated_at":"2012-02-12T14:25:21Z","user_id":135,"value":"didgeridooboy","verified":true},{"created_at":"2012-02-12T14:25:21Z","id":88136,"primary":true,"type":"phone_number","updated_at":"2012-02-12T14:25:21Z","user_id":135,"value":"+1 555-123-4567","verified":true}]}