Add contacts to a listMenu

Add contacts to a list

POST/v1/lists/{id}/contacts

Requires an API key with the lists:write scope. About keys and scopes

Works with integration and partner keys, not agent keys.

Safe to retry: a repeat sets the same values again. About idempotency

Adds up to 500 contacts to a list in one batch, named by exactly one of contactIds, externalIds or emails. Contacts already in the list are skipped rather than rejected, so the call is safe to repeat; the response reports how many were actually added, and lists in notFound the identifiers that name no contact in this workspace (no contact is created). Each contact added records a contact.added_to_list event, which starts the journeys triggered by joining the list: adding 500 people to a list with a welcome journey starts 500 welcome journeys. Because that sends without a person confirming it, agent keys are refused with 403 AGENT_KEY_REFUSED.

Path parameters

idstringrequired

The list's id.

uuid

Header parameters

Kirora-Workspacestringoptional

Partner keys only: the child workspace to act in, by the external id the partner gave it. Without it, a partner key acts in its own workspace. Any other key that sends it is refused with 403, and an unknown workspace is 404.

pattern ^[A-Za-z0-9._:-]{1,128}$

Idempotency-Keystringoptional

Makes a retry safe: a repeat with the same key and body within 24 hours gets the first response again, with Idempotency-Replay: true. The same key with another request is 409 IDEMPOTENCY_KEY_REUSED; while the first is still running, 409 IDEMPOTENCY_KEY_IN_USE; after an unsafe first request failed or never returned, 409 IDEMPOTENCY_KEY_OUTCOME_UNKNOWN. Use a new key, such as a UUID, for each new request.

8–255 characters

Request body

Any of 3 shapes:

By contact ids
1 child attribute
contactIdsstring[]required

Kirora's ids for the contacts.

at least 1 item · at most 500 items

By external ids
1 child attribute
externalIdsstring[]required

Your own ids for the contacts, as set with identify.

at least 1 item · at most 500 items

By emails
1 child attribute
emailsstring[]required

Email addresses, matched trimmed and without case.

at least 1 item · at most 500 items

Returns

Returns 200 OK with an AddedListContacts in data. It can also return 409 Conflict, 413 Payload Too Large or 415 Unsupported Media Type; see the statuses below. Otherwise returns an error; Errors lists every code and which to retry.

  • 200 OKHow many contacts were added, and the identifiers that matched none.
  • 409 ConflictThe request conflicts with current state — a duplicate unique value, or a resource whose status does not allow this operation.
  • 413 Payload Too LargeThe body is larger than this operation accepts (PAYLOAD_TOO_LARGE).
  • 415 Unsupported Media TypeThe body is not JSON, or not the upload the operation takes (UNSUPPORTED_MEDIA_TYPE).
addedCountintegerrequired

Contacts newly added to the list.

min 0

notFoundstring[]required

Identifiers as sent (emails normalised) that name no contact in the workspace.

Headers on 200 OK

Idempotency-Replaystringoptional

true when this is the stored response to an earlier request with the same key.

one of true