Skip to content

Create an individual

POST
/audience/management/v1/individuals
curl --request POST \
--url https://api.ebitex.io/audience/management/v1/individuals \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "name": "example", "identities": [ { "type": "example", "value": "example", "system": "example", "verified": { "method": "example" }, "mergeOnConflict": false } ], "attributes": {}, "channelPermissions": [ { "channel": "example", "status": "example", "basis": "example", "note": "example" } ], "displayName": "example", "locale": "example" }'

Creates a person. Send a name, at least one identity in identities, or both: a person with neither is refused. attributes carries custom-field values, checked against the organization’s schema (see GET /schema); channelPermissions records what the person agreed to, each { "channel", "status", "basis", "note" }.

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).

Media typeapplication/json
object
name
null | string
identities
Array<object> | null
object
type
required
null | string
value
required
null | string
system
null | string
verified
One of:
null
mergeOnConflict
boolean
attributes
One of:
null
channelPermissions
Array<object> | null
object
channel
required
null | string
status
required
null | string
basis
required
null | string
note
null | string
displayName
null | string
locale
null | string

{ "id", "name", "displayName", "source": { "kind", "key", "label" }, "identities": [ … ], "channelPermissions": [ … ], "visitorLinks": [ … ], "attributes": { … }, "mergedInto", "interactionCount", "createdAtUtc", "updatedAtUtc", "rowVersion" }. name is the display name, else the primary email, else the primary phone, else the first external key, else “Unnamed”.

validation_failed: a field is invalid; errors is keyed by field, and a custom field as attributes.<key>. individual_needs_name_or_identity: neither a name nor an identity was sent.

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.

quota_exceeded: the plan’s individual limit (audience.max_individuals) is reached; quotaKey names it. Nothing is created and everyone already held stays as they are.

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.

not_found: no such route.

identity_verified_elsewhere: a verified identity is already held by another person; 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.