API reference
Contacts
Keep the people you message, with their consent, tags and custom attributes, and group them in lists and segments.
Download OpenAPICreate a contact#
/v1/contactsScopecontacts:writeCreates a contact. At least one of phone, email or a channel identifier is required. The phone number is validated and stored in E.164; a number without a country prefix is read as a national number of the account country.
A phone number can belong to one contact only: creating a second contact with it fails with 409 contact_exists. Use the upsert endpoint when you do not know whether the contact exists.
Headers
Idempotency-KeystringOptionalUnique string of up to 255 characters, such as a UUID. Repeating a request with the same key and body within 24 hours returns the stored response instead of performing the operation again.
Request body
first_namestring or nullOptionalGiven name, up to 100 characters.
Up to 100 characters
last_namestring or nullOptionalFamily name, up to 100 characters.
Up to 100 characters
phonestring or nullOptionalPhone number. International format (
+971501234567) or a national number of the account country; it is stored in E.164.Up to 40 characters
emailstring or nullOptionalEmail address.
Up to 254 characters
channel_identifiersobjectOptionalIdentifiers for Telegram, Messenger, Instagram and TikTok.
nullremoves one.Show child attributesHide child attributes
telegramstring or nullOptionalIdentifier on telegram.
Up to 255 characters
messengerstring or nullOptionalIdentifier on messenger.
Up to 255 characters
instagramstring or nullOptionalIdentifier on instagram.
Up to 255 characters
tiktokstring or nullOptionalIdentifier on tiktok.
Up to 255 characters
localestring or nullOptionalLanguage tag such as
enorpt-BR.timezonestring or nullOptionalIANA time zone such as
Asia/Dubai. Campaigns can apply their send window in it.attributesobjectOptionalCustom attributes by key. Keys must be defined in the console first; a value is checked against the type of its definition.
nullremoves an attribute.tagsarray of stringsOptionalUp to 50 tags. Replaces the current tags on update.
consentobjectOptionalConsent per channel type.
opted_outis an unsubscribe: campaigns skip the contact on that channel type.unknownclears the entry.blockedbooleanOptionalA blocked contact is never messaged by a campaign, on any channel.
blocked_reasonstring or nullOptionalWhy the contact is blocked.
Up to 255 characters
Responses
- 201
The contact was created.
- 400
- 401
The API key is missing, invalid, revoked or expired.
api_key_missingapi_key_invalidapi_key_revokedapi_key_expired
- 403
The API key is not allowed to make this request.
- 409
- 429
Too many requests. Wait for
Retry-Afterseconds. - 500
Unexpected error on our side. Safe to retry with the same
Idempotency-Key.
/v1/contactscurl https://api.omnimessage.co/v1/contacts \
-H "Authorization: Bearer om_live_xxxxxxxxxxxxxxxxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{
"first_name": "Layla",
"last_name": "Haddad",
"phone": "+971501234567",
"email": "layla@example.com",
"locale": "ar",
"timezone": "Asia/Dubai",
"tags": [
"vip",
"newsletter"
],
"consent": {
"whatsapp": "opted_in"
}
}'{
"id": "ct_8Jk3mP6qR9sT2vW5xY1z",
"object": "contact",
"first_name": "Layla",
"last_name": "Haddad",
"phone": "+971501234567",
"email": "layla@example.com",
"channel_identifiers": {
"telegram": "482910375"
},
"locale": "ar",
"timezone": "Asia/Dubai",
"attributes": {
"city": "Dubai",
"orders": 12
},
"tags": [
"vip",
"newsletter"
],
"consent": {
"whatsapp": {
"state": "opted_in",
"source": "api",
"updated_at": "2026-10-01T08:00:00.000Z"
}
},
"blocked": false,
"blocked_reason": null,
"last_messaged_at": "2026-10-05T09:30:00.000Z",
"created_at": "2026-10-01T08:00:00.000Z",
"updated_at": "2026-10-05T09:30:00.000Z"
}List contacts#
/v1/contactsScopecontacts:readReturns the contacts of the account, newest first. Filters can be combined. Contacts belong to the account, so live and test keys return the same contacts.
Query parameters
qstringOptionalSearch in names and email addresses; a value made of digits searches phone numbers.
phonestringOptionalOnly the contact with this phone number.
emailstringOptionalOnly contacts with this email address.
tagstringOptionalOnly contacts carrying this tag.
list_idstringOptionalOnly contacts on this list.
segment_idstringOptionalOnly contacts matching this segment.
consentstringOptionalOnly contacts with this consent state on a channel type, written
<channel type>:<state>.blockedstringOptionalOnly blocked (
true) or only unblocked (false) contacts.Possible values
truefalselimitintegerOptionalNumber of objects to return, 1 to 100. Default
20.starting_afterstringOptionalCursor for the next page: the
next_cursorof the previous response (the ID of its last object).
Responses
- 200
A page of contacts.
- 400
Bad request.
- 401
The API key is missing, invalid, revoked or expired.
api_key_missingapi_key_invalidapi_key_revokedapi_key_expired
- 403
The API key is not allowed to make this request.
- 404
The segment named by
segment_iddoes not exist. - 429
Too many requests. Wait for
Retry-Afterseconds. - 500
Unexpected error on our side. Safe to retry with the same
Idempotency-Key.
/v1/contactscurl "https://api.omnimessage.co/v1/contacts?phone=%2B971501234567&consent=whatsapp%3Aopted_in" \
-H "Authorization: Bearer om_live_xxxxxxxxxxxxxxxxxxxxxxxx"{
"object": "list",
"data": [
{
"id": "ct_8Jk3mP6qR9sT2vW5xY1z",
"object": "contact",
"first_name": "Layla",
"last_name": "Haddad",
"phone": "+971501234567",
"email": "layla@example.com",
"channel_identifiers": {
"telegram": "482910375"
},
"locale": "ar",
"timezone": "Asia/Dubai",
"attributes": {
"city": "Dubai",
"orders": 12
},
"tags": [
"vip",
"newsletter"
],
"consent": {
"whatsapp": {
"state": "opted_in",
"source": "api",
"updated_at": "2026-10-01T08:00:00.000Z"
}
},
"blocked": false,
"blocked_reason": null,
"last_messaged_at": "2026-10-05T09:30:00.000Z",
"created_at": "2026-10-01T08:00:00.000Z",
"updated_at": "2026-10-05T09:30:00.000Z"
}
],
"has_more": true,
"next_cursor": "ct_8Jk3mP6qR9sT2vW5xY1z"
}Create or update a contact by phone number#
/v1/contacts/upsertScopecontacts:writeCreates the contact, or updates the one that already has this phone number. On update only the fields you send change and tags are added to the existing tags. An existing opted_out consent is only changed when you send consent for that channel type explicitly.
Headers
Idempotency-KeystringOptionalUnique string of up to 255 characters, such as a UUID. Repeating a request with the same key and body within 24 hours returns the stored response instead of performing the operation again.
Request body
first_namestring or nullOptionalGiven name, up to 100 characters.
Up to 100 characters
last_namestring or nullOptionalFamily name, up to 100 characters.
Up to 100 characters
phonestringRequiredPhone number that identifies the contact.
Up to 40 characters
emailstring or nullOptionalEmail address.
Up to 254 characters
channel_identifiersobjectOptionalIdentifiers for Telegram, Messenger, Instagram and TikTok.
nullremoves one.Show child attributesHide child attributes
telegramstring or nullOptionalIdentifier on telegram.
Up to 255 characters
messengerstring or nullOptionalIdentifier on messenger.
Up to 255 characters
instagramstring or nullOptionalIdentifier on instagram.
Up to 255 characters
tiktokstring or nullOptionalIdentifier on tiktok.
Up to 255 characters
localestring or nullOptionalLanguage tag such as
enorpt-BR.timezonestring or nullOptionalIANA time zone such as
Asia/Dubai. Campaigns can apply their send window in it.attributesobjectOptionalCustom attributes by key. Keys must be defined in the console first; a value is checked against the type of its definition.
nullremoves an attribute.tagsarray of stringsOptionalUp to 50 tags. Replaces the current tags on update.
consentobjectOptionalConsent per channel type.
opted_outis an unsubscribe: campaigns skip the contact on that channel type.unknownclears the entry.blockedbooleanOptionalA blocked contact is never messaged by a campaign, on any channel.
blocked_reasonstring or nullOptionalWhy the contact is blocked.
Up to 255 characters
Responses
- 200
The contact as it is after the request.
- 400
- 401
The API key is missing, invalid, revoked or expired.
api_key_missingapi_key_invalidapi_key_revokedapi_key_expired
- 403
The API key is not allowed to make this request.
- 409
- 429
Too many requests. Wait for
Retry-Afterseconds. - 500
Unexpected error on our side. Safe to retry with the same
Idempotency-Key.
/v1/contacts/upsertcurl https://api.omnimessage.co/v1/contacts/upsert \
-H "Authorization: Bearer om_live_xxxxxxxxxxxxxxxxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{
"first_name": "Layla",
"last_name": "Haddad",
"phone": "+971501234567",
"email": "layla@example.com",
"locale": "ar",
"timezone": "Asia/Dubai",
"tags": [
"vip",
"newsletter"
],
"consent": {
"whatsapp": "opted_in"
}
}'{
"id": "ct_8Jk3mP6qR9sT2vW5xY1z",
"object": "contact",
"first_name": "Layla",
"last_name": "Haddad",
"phone": "+971501234567",
"email": "layla@example.com",
"channel_identifiers": {
"telegram": "482910375"
},
"locale": "ar",
"timezone": "Asia/Dubai",
"attributes": {
"city": "Dubai",
"orders": 12
},
"tags": [
"vip",
"newsletter"
],
"consent": {
"whatsapp": {
"state": "opted_in",
"source": "api",
"updated_at": "2026-10-01T08:00:00.000Z"
}
},
"blocked": false,
"blocked_reason": null,
"last_messaged_at": "2026-10-05T09:30:00.000Z",
"created_at": "2026-10-01T08:00:00.000Z",
"updated_at": "2026-10-05T09:30:00.000Z"
}Add and remove tags in bulk#
/v1/contacts/tagsScopecontacts:writeAdds and removes tags on up to 1,000 contacts with one request. A contact that would end up with more than 50 tags is left unchanged.
Headers
Idempotency-KeystringOptionalUnique string of up to 255 characters, such as a UUID. Repeating a request with the same key and body within 24 hours returns the stored response instead of performing the operation again.
Request body
contact_idsarray of stringsRequiredContacts to change, up to 1,000. Unknown IDs are ignored.
1 to 1000 items
addarray of stringsOptionalTags to add.
removearray of stringsOptionalTags to remove.
Responses
- 200
How many contacts were changed.
- 400
Bad request.
- 401
The API key is missing, invalid, revoked or expired.
api_key_missingapi_key_invalidapi_key_revokedapi_key_expired
- 403
The API key is not allowed to make this request.
- 409
- 429
Too many requests. Wait for
Retry-Afterseconds. - 500
Unexpected error on our side. Safe to retry with the same
Idempotency-Key.
/v1/contacts/tagscurl https://api.omnimessage.co/v1/contacts/tags \
-H "Authorization: Bearer om_live_xxxxxxxxxxxxxxxxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{
"contact_ids": [
"ct_8Jk3mP6qR9sT2vW5xY1z"
],
"add": [
"october-launch"
],
"remove": [
"prospect"
]
}'{
"object": "bulk_result",
"affected": 2
}Retrieve a contact#
/v1/contacts/{id}Scopecontacts:readReturns one contact.
Path parameters
idstringRequiredContact ID.
Responses
- 200
The contact.
- 401
The API key is missing, invalid, revoked or expired.
api_key_missingapi_key_invalidapi_key_revokedapi_key_expired
- 403
The API key is not allowed to make this request.
- 404
The resource does not exist in this account and mode.
- 429
Too many requests. Wait for
Retry-Afterseconds. - 500
Unexpected error on our side. Safe to retry with the same
Idempotency-Key.
/v1/contacts/{id}curl https://api.omnimessage.co/v1/contacts/ct_8Jk3mP6qR9sT2vW5xY1z \
-H "Authorization: Bearer om_live_xxxxxxxxxxxxxxxxxxxxxxxx"{
"id": "ct_8Jk3mP6qR9sT2vW5xY1z",
"object": "contact",
"first_name": "Layla",
"last_name": "Haddad",
"phone": "+971501234567",
"email": "layla@example.com",
"channel_identifiers": {
"telegram": "482910375"
},
"locale": "ar",
"timezone": "Asia/Dubai",
"attributes": {
"city": "Dubai",
"orders": 12
},
"tags": [
"vip",
"newsletter"
],
"consent": {
"whatsapp": {
"state": "opted_in",
"source": "api",
"updated_at": "2026-10-01T08:00:00.000Z"
}
},
"blocked": false,
"blocked_reason": null,
"last_messaged_at": "2026-10-05T09:30:00.000Z",
"created_at": "2026-10-01T08:00:00.000Z",
"updated_at": "2026-10-05T09:30:00.000Z"
}Update a contact#
/v1/contacts/{id}Scopecontacts:writeChanges the fields you send. tags replaces the current tags; attributes and channel identifiers are merged key by key, and null removes a key. Setting consent for a channel type to opted_out unsubscribes the contact there.
Path parameters
idstringRequiredContact ID.
Request body
first_namestring or nullOptionalGiven name, up to 100 characters.
Up to 100 characters
last_namestring or nullOptionalFamily name, up to 100 characters.
Up to 100 characters
phonestring or nullOptionalPhone number. International format (
+971501234567) or a national number of the account country; it is stored in E.164.Up to 40 characters
emailstring or nullOptionalEmail address.
Up to 254 characters
channel_identifiersobjectOptionalIdentifiers for Telegram, Messenger, Instagram and TikTok.
nullremoves one.Show child attributesHide child attributes
telegramstring or nullOptionalIdentifier on telegram.
Up to 255 characters
messengerstring or nullOptionalIdentifier on messenger.
Up to 255 characters
instagramstring or nullOptionalIdentifier on instagram.
Up to 255 characters
tiktokstring or nullOptionalIdentifier on tiktok.
Up to 255 characters
localestring or nullOptionalLanguage tag such as
enorpt-BR.timezonestring or nullOptionalIANA time zone such as
Asia/Dubai. Campaigns can apply their send window in it.attributesobjectOptionalCustom attributes by key. Keys must be defined in the console first; a value is checked against the type of its definition.
nullremoves an attribute.tagsarray of stringsOptionalUp to 50 tags. Replaces the current tags on update.
consentobjectOptionalConsent per channel type.
opted_outis an unsubscribe: campaigns skip the contact on that channel type.unknownclears the entry.blockedbooleanOptionalA blocked contact is never messaged by a campaign, on any channel.
blocked_reasonstring or nullOptionalWhy the contact is blocked.
Up to 255 characters
Responses
- 200
The updated contact.
- 400
Bad request.
- 401
The API key is missing, invalid, revoked or expired.
api_key_missingapi_key_invalidapi_key_revokedapi_key_expired
- 403
The API key is not allowed to make this request.
- 404
The resource does not exist in this account and mode.
- 409
Another contact already has the new phone number.
- 429
Too many requests. Wait for
Retry-Afterseconds. - 500
Unexpected error on our side. Safe to retry with the same
Idempotency-Key.
/v1/contacts/{id}curl -X PATCH https://api.omnimessage.co/v1/contacts/ct_8Jk3mP6qR9sT2vW5xY1z \
-H "Authorization: Bearer om_live_xxxxxxxxxxxxxxxxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{
"tags": [
"vip"
],
"consent": {
"whatsapp": "opted_out"
}
}'{
"id": "ct_8Jk3mP6qR9sT2vW5xY1z",
"object": "contact",
"first_name": "Layla",
"last_name": "Haddad",
"phone": "+971501234567",
"email": "layla@example.com",
"channel_identifiers": {
"telegram": "482910375"
},
"locale": "ar",
"timezone": "Asia/Dubai",
"attributes": {
"city": "Dubai",
"orders": 12
},
"tags": [
"vip",
"newsletter"
],
"consent": {
"whatsapp": {
"state": "opted_in",
"source": "api",
"updated_at": "2026-10-01T08:00:00.000Z"
}
},
"blocked": false,
"blocked_reason": null,
"last_messaged_at": "2026-10-05T09:30:00.000Z",
"created_at": "2026-10-01T08:00:00.000Z",
"updated_at": "2026-10-05T09:30:00.000Z"
}Delete a contact#
/v1/contacts/{id}Scopecontacts:writeRemoves the contact and its list memberships. Messages and campaign results that mention the contact are kept. The phone number becomes free for a new contact.
Path parameters
idstringRequiredContact ID.
Responses
- 200
The contact was deleted.
- 401
The API key is missing, invalid, revoked or expired.
api_key_missingapi_key_invalidapi_key_revokedapi_key_expired
- 403
The API key is not allowed to make this request.
- 404
The resource does not exist in this account and mode.
- 429
Too many requests. Wait for
Retry-Afterseconds. - 500
Unexpected error on our side. Safe to retry with the same
Idempotency-Key.
/v1/contacts/{id}curl -X DELETE https://api.omnimessage.co/v1/contacts/ct_8Jk3mP6qR9sT2vW5xY1z \
-H "Authorization: Bearer om_live_xxxxxxxxxxxxxxxxxxxxxxxx"{
"id": "ct_8Jk3mP6qR9sT2vW5xY1z",
"object": "contact",
"deleted": true
}List tags#
/v1/contact_tagsScopecontacts:readReturns every tag in use with the number of contacts carrying it, most used first. The list is not paginated.
Responses
- 200
Tags in use.
- 401
The API key is missing, invalid, revoked or expired.
api_key_missingapi_key_invalidapi_key_revokedapi_key_expired
- 403
The API key is not allowed to make this request.
- 429
Too many requests. Wait for
Retry-Afterseconds. - 500
Unexpected error on our side. Safe to retry with the same
Idempotency-Key.
/v1/contact_tagscurl https://api.omnimessage.co/v1/contact_tags \
-H "Authorization: Bearer om_live_xxxxxxxxxxxxxxxxxxxxxxxx"{
"object": "list",
"data": [
{
"object": "contact_tag",
"name": "vip",
"contact_count": 412
}
],
"has_more": false,
"next_cursor": null
}Create a contact list#
/v1/contact_listsScopecontacts:writeCreates an empty list. Add contacts with the members endpoint.
Headers
Idempotency-KeystringOptionalUnique string of up to 255 characters, such as a UUID. Repeating a request with the same key and body within 24 hours returns the stored response instead of performing the operation again.
Request body
namestringRequiredName of the list.
1 to 100 characters
descriptionstring or nullOptionalOptional note, up to 500 characters.
Up to 500 characters
Responses
- 201
The list was created.
- 400
Bad request.
- 401
The API key is missing, invalid, revoked or expired.
api_key_missingapi_key_invalidapi_key_revokedapi_key_expired
- 403
The API key is not allowed to make this request.
- 409
- 429
Too many requests. Wait for
Retry-Afterseconds. - 500
Unexpected error on our side. Safe to retry with the same
Idempotency-Key.
/v1/contact_listscurl https://api.omnimessage.co/v1/contact_lists \
-H "Authorization: Bearer om_live_xxxxxxxxxxxxxxxxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{
"name": "October launch",
"description": "Customers invited to the launch"
}'{
"id": "lst_4Bd7fH0jL3nQ6sU9wZ2c",
"object": "contact_list",
"name": "October launch",
"description": "Customers invited to the launch",
"contact_count": 0,
"created_at": "2026-10-01T08:00:00.000Z",
"updated_at": "2026-10-04T16:20:00.000Z"
}List contact lists#
/v1/contact_listsScopecontacts:readReturns the static contact lists of the account, newest first.
Query parameters
limitintegerOptionalNumber of objects to return, 1 to 100. Default
20.starting_afterstringOptionalCursor for the next page: the
next_cursorof the previous response (the ID of its last object).
Responses
- 200
A page of contact lists.
- 400
Bad request.
- 401
The API key is missing, invalid, revoked or expired.
api_key_missingapi_key_invalidapi_key_revokedapi_key_expired
- 403
The API key is not allowed to make this request.
- 429
Too many requests. Wait for
Retry-Afterseconds. - 500
Unexpected error on our side. Safe to retry with the same
Idempotency-Key.
/v1/contact_listscurl https://api.omnimessage.co/v1/contact_lists \
-H "Authorization: Bearer om_live_xxxxxxxxxxxxxxxxxxxxxxxx"{
"object": "list",
"data": [
{
"id": "lst_4Bd7fH0jL3nQ6sU9wZ2c",
"object": "contact_list",
"name": "October launch",
"description": "Customers invited to the launch",
"contact_count": 1280,
"created_at": "2026-10-01T08:00:00.000Z",
"updated_at": "2026-10-04T16:20:00.000Z"
}
],
"has_more": false,
"next_cursor": null
}Retrieve a contact list#
/v1/contact_lists/{id}Scopecontacts:readReturns one list with its current number of contacts.
Path parameters
idstringRequiredContact list ID.
Responses
- 200
The list.
- 401
The API key is missing, invalid, revoked or expired.
api_key_missingapi_key_invalidapi_key_revokedapi_key_expired
- 403
The API key is not allowed to make this request.
- 404
The resource does not exist in this account and mode.
- 429
Too many requests. Wait for
Retry-Afterseconds. - 500
Unexpected error on our side. Safe to retry with the same
Idempotency-Key.
/v1/contact_lists/{id}curl https://api.omnimessage.co/v1/contact_lists/lst_4Bd7fH0jL3nQ6sU9wZ2c \
-H "Authorization: Bearer om_live_xxxxxxxxxxxxxxxxxxxxxxxx"{
"id": "lst_4Bd7fH0jL3nQ6sU9wZ2c",
"object": "contact_list",
"name": "October launch",
"description": "Customers invited to the launch",
"contact_count": 1280,
"created_at": "2026-10-01T08:00:00.000Z",
"updated_at": "2026-10-04T16:20:00.000Z"
}Update a contact list#
/v1/contact_lists/{id}Scopecontacts:writeRenames a list or changes its note.
Path parameters
idstringRequiredContact list ID.
Request body
namestringOptionalNew name.
1 to 100 characters
descriptionstring or nullOptionalNew note;
nullclears it.Up to 500 characters
Responses
- 200
The updated list.
- 400
Bad request.
- 401
The API key is missing, invalid, revoked or expired.
api_key_missingapi_key_invalidapi_key_revokedapi_key_expired
- 403
The API key is not allowed to make this request.
- 404
The resource does not exist in this account and mode.
- 429
Too many requests. Wait for
Retry-Afterseconds. - 500
Unexpected error on our side. Safe to retry with the same
Idempotency-Key.
/v1/contact_lists/{id}curl -X PATCH https://api.omnimessage.co/v1/contact_lists/lst_4Bd7fH0jL3nQ6sU9wZ2c \
-H "Authorization: Bearer om_live_xxxxxxxxxxxxxxxxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{
"name": "October launch (wave 2)"
}'{
"id": "lst_4Bd7fH0jL3nQ6sU9wZ2c",
"object": "contact_list",
"name": "October launch (wave 2)",
"description": "Customers invited to the launch",
"contact_count": 1280,
"created_at": "2026-10-01T08:00:00.000Z",
"updated_at": "2026-10-04T16:20:00.000Z"
}Delete a contact list#
/v1/contact_lists/{id}Scopecontacts:writeRemoves the list. The contacts on it are kept.
Path parameters
idstringRequiredContact list ID.
Responses
- 200
The list was deleted.
- 401
The API key is missing, invalid, revoked or expired.
api_key_missingapi_key_invalidapi_key_revokedapi_key_expired
- 403
The API key is not allowed to make this request.
- 404
The resource does not exist in this account and mode.
- 429
Too many requests. Wait for
Retry-Afterseconds. - 500
Unexpected error on our side. Safe to retry with the same
Idempotency-Key.
/v1/contact_lists/{id}curl -X DELETE https://api.omnimessage.co/v1/contact_lists/lst_4Bd7fH0jL3nQ6sU9wZ2c \
-H "Authorization: Bearer om_live_xxxxxxxxxxxxxxxxxxxxxxxx"{
"id": "lst_4Bd7fH0jL3nQ6sU9wZ2c",
"object": "contact_list",
"deleted": true
}Add contacts to a list#
/v1/contact_lists/{id}/membersScopecontacts:writeAdds up to 1,000 contacts to the list. Contacts that are already on it, and IDs that do not exist, are ignored. Answers with the list and its new count.
Path parameters
idstringRequiredContact list ID.
Headers
Idempotency-KeystringOptionalUnique string of up to 255 characters, such as a UUID. Repeating a request with the same key and body within 24 hours returns the stored response instead of performing the operation again.
Request body
contact_idsarray of stringsRequiredContact IDs, up to 1,000 per request. Unknown IDs are ignored.
1 to 1000 items
Responses
- 200
The list after the change.
- 400
Bad request.
- 401
The API key is missing, invalid, revoked or expired.
api_key_missingapi_key_invalidapi_key_revokedapi_key_expired
- 403
The API key is not allowed to make this request.
- 404
The resource does not exist in this account and mode.
- 409
- 429
Too many requests. Wait for
Retry-Afterseconds. - 500
Unexpected error on our side. Safe to retry with the same
Idempotency-Key.
/v1/contact_lists/{id}/memberscurl https://api.omnimessage.co/v1/contact_lists/lst_4Bd7fH0jL3nQ6sU9wZ2c/members \
-H "Authorization: Bearer om_live_xxxxxxxxxxxxxxxxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{
"contact_ids": [
"ct_8Jk3mP6qR9sT2vW5xY1z"
]
}'{
"id": "lst_4Bd7fH0jL3nQ6sU9wZ2c",
"object": "contact_list",
"name": "October launch",
"description": "Customers invited to the launch",
"contact_count": 1280,
"created_at": "2026-10-01T08:00:00.000Z",
"updated_at": "2026-10-04T16:20:00.000Z"
}Remove contacts from a list#
/v1/contact_lists/{id}/members/removeScopecontacts:writeTakes up to 1,000 contacts off the list. The contacts themselves are kept. Answers with the list and its new count.
Path parameters
idstringRequiredContact list ID.
Headers
Idempotency-KeystringOptionalUnique string of up to 255 characters, such as a UUID. Repeating a request with the same key and body within 24 hours returns the stored response instead of performing the operation again.
Request body
contact_idsarray of stringsRequiredContact IDs, up to 1,000 per request. Unknown IDs are ignored.
1 to 1000 items
Responses
- 200
The list after the change.
- 400
Bad request.
- 401
The API key is missing, invalid, revoked or expired.
api_key_missingapi_key_invalidapi_key_revokedapi_key_expired
- 403
The API key is not allowed to make this request.
- 404
The resource does not exist in this account and mode.
- 409
- 429
Too many requests. Wait for
Retry-Afterseconds. - 500
Unexpected error on our side. Safe to retry with the same
Idempotency-Key.
/v1/contact_lists/{id}/members/removecurl https://api.omnimessage.co/v1/contact_lists/lst_4Bd7fH0jL3nQ6sU9wZ2c/members/remove \
-H "Authorization: Bearer om_live_xxxxxxxxxxxxxxxxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{
"contact_ids": [
"ct_8Jk3mP6qR9sT2vW5xY1z"
]
}'{
"id": "lst_4Bd7fH0jL3nQ6sU9wZ2c",
"object": "contact_list",
"name": "October launch",
"description": "Customers invited to the launch",
"contact_count": 1279,
"created_at": "2026-10-01T08:00:00.000Z",
"updated_at": "2026-10-04T16:20:00.000Z"
}List segments#
/v1/segmentsScopecontacts:readReturns the saved segments of the account, newest first. Segments are created and edited in the console.
Query parameters
limitintegerOptionalNumber of objects to return, 1 to 100. Default
20.starting_afterstringOptionalCursor for the next page: the
next_cursorof the previous response (the ID of its last object).
Responses
- 200
A page of segments.
- 400
Bad request.
- 401
The API key is missing, invalid, revoked or expired.
api_key_missingapi_key_invalidapi_key_revokedapi_key_expired
- 403
The API key is not allowed to make this request.
- 429
Too many requests. Wait for
Retry-Afterseconds. - 500
Unexpected error on our side. Safe to retry with the same
Idempotency-Key.
/v1/segmentscurl https://api.omnimessage.co/v1/segments \
-H "Authorization: Bearer om_live_xxxxxxxxxxxxxxxxxxxxxxxx"{
"object": "list",
"data": [
{
"id": "seg_1Ae4gI7kM0oR3tV6xB9d",
"object": "segment",
"name": "VIP customers not messaged this month",
"description": null,
"rules": {
"op": "and",
"rules": [
{
"field": "tags",
"operator": "has_any",
"value": [
"vip"
]
},
{
"field": "consent.whatsapp",
"operator": "is",
"value": "opted_in"
},
{
"field": "last_messaged_at",
"operator": "not_in_last_days",
"value": 30
}
]
},
"created_at": "2026-10-01T08:00:00.000Z",
"updated_at": "2026-10-01T08:00:00.000Z"
}
],
"has_more": false,
"next_cursor": null
}Retrieve a segment#
/v1/segments/{id}Scopecontacts:readReturns one segment with its rules.
Path parameters
idstringRequiredSegment ID.
Responses
- 200
The segment.
- 401
The API key is missing, invalid, revoked or expired.
api_key_missingapi_key_invalidapi_key_revokedapi_key_expired
- 403
The API key is not allowed to make this request.
- 404
The resource does not exist in this account and mode.
- 429
Too many requests. Wait for
Retry-Afterseconds. - 500
Unexpected error on our side. Safe to retry with the same
Idempotency-Key.
/v1/segments/{id}curl https://api.omnimessage.co/v1/segments/seg_1Ae4gI7kM0oR3tV6xB9d \
-H "Authorization: Bearer om_live_xxxxxxxxxxxxxxxxxxxxxxxx"{
"id": "seg_1Ae4gI7kM0oR3tV6xB9d",
"object": "segment",
"name": "VIP customers not messaged this month",
"description": null,
"rules": {
"op": "and",
"rules": [
{
"field": "tags",
"operator": "has_any",
"value": [
"vip"
]
},
{
"field": "consent.whatsapp",
"operator": "is",
"value": "opted_in"
},
{
"field": "last_messaged_at",
"operator": "not_in_last_days",
"value": 30
}
]
},
"created_at": "2026-10-01T08:00:00.000Z",
"updated_at": "2026-10-01T08:00:00.000Z"
}Count the contacts of a segment#
/v1/segments/{id}/previewScopecontacts:readEvaluates the segment now and returns how many contacts match, with up to five of them as a sample.
Path parameters
idstringRequiredSegment ID.
Responses
- 200
Current size of the segment.
- 401
The API key is missing, invalid, revoked or expired.
api_key_missingapi_key_invalidapi_key_revokedapi_key_expired
- 403
The API key is not allowed to make this request.
- 404
The resource does not exist in this account and mode.
- 429
Too many requests. Wait for
Retry-Afterseconds. - 500
Unexpected error on our side. Safe to retry with the same
Idempotency-Key.
/v1/segments/{id}/previewcurl https://api.omnimessage.co/v1/segments/seg_1Ae4gI7kM0oR3tV6xB9d/preview \
-H "Authorization: Bearer om_live_xxxxxxxxxxxxxxxxxxxxxxxx"{
"object": "segment_preview",
"segment_id": "seg_1Ae4gI7kM0oR3tV6xB9d",
"count": 412,
"sample": [
{
"id": "ct_8Jk3mP6qR9sT2vW5xY1z",
"object": "contact",
"first_name": "Layla",
"last_name": "Haddad",
"phone": "+971501234567",
"email": "layla@example.com",
"channel_identifiers": {
"telegram": "482910375"
},
"locale": "ar",
"timezone": "Asia/Dubai",
"attributes": {
"city": "Dubai",
"orders": 12
},
"tags": [
"vip",
"newsletter"
],
"consent": {
"whatsapp": {
"state": "opted_in",
"source": "api",
"updated_at": "2026-10-01T08:00:00.000Z"
}
},
"blocked": false,
"blocked_reason": null,
"last_messaged_at": "2026-10-05T09:30:00.000Z",
"created_at": "2026-10-01T08:00:00.000Z",
"updated_at": "2026-10-05T09:30:00.000Z"
}
]
}