Skip to content

Add an identity

POST
/audience/management/v1/individuals/{id}/identities
curl --request POST \
--url https://api.ebitex.io/audience/management/v1/individuals/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/identities \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "type": "example", "value": "example", "system": "example", "verified": { "method": "example" }, "mergeOnConflict": false }'

Adds an email, phone number or external key to a person: { "type", "value", "system", "verified": { "method" }, "mergeOnConflict" }.

An identity is an email, a phone number or an external key. Emails are trimmed and lower-cased; a phone number must be international (+ then 8 to 15 digits, spaces, dashes, dots and brackets allowed and removed), because no country is ever guessed; an external key names the foreign system (stripe, crm) and keeps its case. An external key is always verified. An email or phone number is verified only when the request says how, with verified: { "method": … }; nothing is ever verified by inference.

A verified identity belongs to one person in an organization. Adding one that another person already holds verified is refused with 409 identity_verified_elsewhere and the holder’s id, unless the request sets mergeOnConflict: true: then the person you were writing to is merged into the holder, who survives. The merge is recorded and can be reverted by a person in the dashboard.

Key: an Audience management key with audience.management.write (write also needs read; erase needs both).

id
required
string format: uuid
Media typeapplication/json
object
type
required
null | string
value
required
null | string
system
null | string
verified
One of:
null
mergeOnConflict
boolean

The identity as stored, with its normalizedValue, isVerified, verificationMethod and isPrimary.

validation_failed: the type, value or system is invalid.

missing_api_key or invalid_api_key: no key was sent, or it is unknown, revoked or expired, or it was not created from the Audience settings page.

payment_required: the organization’s subscription needs attention.

scope_denied: the key lacks this route’s scope. ip_denied: the caller’s address is outside the key’s allowed ranges. app_not_available: Audience is not enabled for the organization.

individual_not_found: no such person in this organization.

not_found: no such route.

identity_verified_elsewhere: another person holds this verified identity; holder names them.

rate_limited: the key spent its requests-per-minute budget; Retry-After says how long to wait. too_many_failed_authentications: too many bad keys from this address.