API reference
Contacts
Create, read, update, and delete contacts for the authenticated tenant.
x-tenant-id and an API key or OAuth token. Channel IDs are copied from Settings → Developer in the app. See Authentication.List contacts
/api/public/v1/contactsReturns a paginated, filterable, sortable list of contacts for the authenticated tenant.
Query parameters
pageintegerDefault
1limitintegerDefault
25sortstringcreatedAtnamephoneemailcountryupdatedAtlastContactedAtsourceDefault
"createdAt"orderstringascdescDefault
"desc"searchstringMatches name, phone, or email.
labelstringComma-separated label/tag filter.
statusstringactivedeletedblockedmergedDefault
"active"countrystringsourcestringmanualimportapiwhatsappwebcreatedAfterstring (date-time)createdBeforestring (date-time)updatedAfterstring (date-time)updatedBeforestring (date-time)fieldsstring
Response 200Paginated list of contacts
successbooleandataobject[]16 child fields
idstringnamestringphonestringemailstring | nullcountrystring | nulltagsstring[]customFieldsobject[]4 child fields
fieldIdstring | nullfieldNamestring | nulltypestring | nullvalueany
sourcestringOne of
manualimportapiwhatsappwebstatusstringOne of
activedeletedblockedmergedisFavoritebooleanisBlockedbooleanmarketingOptInbooleanmarketingOptInAtstring (date-time) | nulllastContactedAtstring (date-time) | nullcreatedAtstring (date-time)updatedAtstring (date-time)
paginationobject8 child fields
pageintegerlimitintegertotalintegertotalPagesintegerhasNextPagebooleanhasPrevPagebooleannextCursorstring | nullprevCursorstring | null
metaobject1 child field
apiVersionstring
requestIdstring | nulltimestampstring (date-time)
Errors
400Malformed request or missing tenant context401Missing or invalid API key403Forbidden — developer platform disabled, key expired/disabled, or tenant mismatch422Validation failed429Too many requests — rate limit exceeded500Unexpected server error
curl -X GET "https://api.inaiy.com/api/public/v1/contacts" \
-H "x-tenant-id: demo" \
-H "x-api-key: wp_live_xxxxxxxxxxxxxxxxxxxx"{
"success": true,
"data": [
{
"id": "6650a1b2c3d4e5f6a7b8c9d0",
"name": "Jane Doe",
"phone": "+14155552671",
"email": "jane@example.com",
"country": "US",
"tags": [
"vip",
"newsletter"
],
"customFields": [
{
"fieldId": "664f...",
"fieldName": "Company",
"type": "text",
"value": "Acme Inc"
}
],
"source": "api",
"status": "active",
"isFavorite": false,
"isBlocked": false,
"marketingOptIn": true,
"marketingOptInAt": "2026-07-12T09:30:00.000Z",
"lastContactedAt": null,
"createdAt": "2026-07-12T09:30:00.000Z",
"updatedAt": "2026-07-12T09:30:00.000Z"
}
],
"pagination": {
"page": 1,
"limit": 25,
"total": 137,
"totalPages": 6,
"hasNextPage": true,
"hasPrevPage": false,
"nextCursor": null,
"prevCursor": null
},
"meta": {
"apiVersion": "v1",
"sort": {
"field": "createdAt",
"direction": "desc"
}
},
"requestId": "a1f4c2e0-9b6d-4a1e-8c3f-2d7e5b9a0c11",
"timestamp": "2026-07-12T09:30:00.000Z"
}Create a contact
/api/public/v1/contactsCreate a new contact. Fails with 409 if a contact with the same phone already exists, and 404 if primaryTeamId or assignedAgentId is not in this workspace.
Request bodyrequired
namestringrequiredphonestringrequiredE.164 format
emailstring (email) | nullcountrystring | nulltagsstring[]customFieldsobject[]sourcestringOne of
manualimportapiwhatsappwebmarketingOptInbooleanprimaryTeamIdstring | nullOwning team id (24-char ObjectId). Must be a team in this workspace; null clears it.
assignedAgentIdstring | nullOwning agent (user) id. Must be a member of this workspace; null clears it.
Response 201Contact created
successbooleandataobject16 child fields
idstringnamestringphonestringemailstring | nullcountrystring | nulltagsstring[]customFieldsobject[]4 child fields
fieldIdstring | nullfieldNamestring | nulltypestring | nullvalueany
sourcestringOne of
manualimportapiwhatsappwebstatusstringOne of
activedeletedblockedmergedisFavoritebooleanisBlockedbooleanmarketingOptInbooleanmarketingOptInAtstring (date-time) | nulllastContactedAtstring (date-time) | nullcreatedAtstring (date-time)updatedAtstring (date-time)
metaobject1 child field
apiVersionstring
requestIdstring | nulltimestampstring (date-time)
Errors
400Malformed request or missing tenant context401Missing or invalid API key403Forbidden — developer platform disabled, key expired/disabled, or tenant mismatch404Contact not found409Duplicate contact (phone already exists)422Validation failed429Too many requests — rate limit exceeded500Unexpected server error
curl -X POST "https://api.inaiy.com/api/public/v1/contacts" \
-H "x-tenant-id: demo" \
-H "x-api-key: wp_live_xxxxxxxxxxxxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{"name":"Jane Doe","phone":"+14155552671","email":"jane@example.com","country":"US","tags":["vip"],"marketingOptIn":true}'{
"name": "Jane Doe",
"phone": "+14155552671",
"email": "jane@example.com",
"country": "US",
"tags": [
"vip"
],
"marketingOptIn": true
}{
"success": true,
"data": {
"id": "6650a1b2c3d4e5f6a7b8c9d0",
"name": "Jane Doe",
"phone": "+14155552671",
"email": "jane@example.com",
"country": "US",
"tags": [
"vip",
"newsletter"
],
"customFields": [
{
"fieldId": "664f...",
"fieldName": "Company",
"type": "text",
"value": "Acme Inc"
}
],
"source": "api",
"status": "active",
"isFavorite": false,
"isBlocked": false,
"marketingOptIn": true,
"marketingOptInAt": "2026-07-12T09:30:00.000Z",
"lastContactedAt": null,
"createdAt": "2026-07-12T09:30:00.000Z",
"updatedAt": "2026-07-12T09:30:00.000Z"
},
"meta": {
"apiVersion": "v1"
},
"requestId": "a1f4c2e0-9b6d-4a1e-8c3f-2d7e5b9a0c11",
"timestamp": "2026-07-12T09:30:00.000Z"
}Look up a contact
/api/public/v1/contacts/lookupFind one contact by exactly one of `phone` (matched with or without the leading +), `igsid` (Instagram), or `psid` (Messenger). Returns 404 when no active contact matches.
Query parameters
phonestringE.164 phone. URL-encode the + as %2B.
igsidstringInstagram scoped id.
psidstringMessenger Page-scoped id.
fieldsstringComma-separated list of fields to return (sparse fieldset).
Response 200The contact
successbooleandataobject16 child fields
idstringnamestringphonestringemailstring | nullcountrystring | nulltagsstring[]customFieldsobject[]4 child fields
fieldIdstring | nullfieldNamestring | nulltypestring | nullvalueany
sourcestringOne of
manualimportapiwhatsappwebstatusstringOne of
activedeletedblockedmergedisFavoritebooleanisBlockedbooleanmarketingOptInbooleanmarketingOptInAtstring (date-time) | nulllastContactedAtstring (date-time) | nullcreatedAtstring (date-time)updatedAtstring (date-time)
metaobject1 child field
apiVersionstring
requestIdstring | nulltimestampstring (date-time)
Errors
400Malformed request or missing tenant context401Missing or invalid API key403Forbidden — developer platform disabled, key expired/disabled, or tenant mismatch404Contact not found422Validation failed429Too many requests — rate limit exceeded500Unexpected server error
curl -X GET "https://api.inaiy.com/api/public/v1/contacts/lookup" \
-H "x-tenant-id: demo" \
-H "x-api-key: wp_live_xxxxxxxxxxxxxxxxxxxx"{
"success": true,
"data": {
"id": "6650a1b2c3d4e5f6a7b8c9d0",
"name": "Jane Doe",
"phone": "+14155552671",
"email": "jane@example.com",
"country": "US",
"tags": [
"vip",
"newsletter"
],
"customFields": [
{
"fieldId": "664f...",
"fieldName": "Company",
"type": "text",
"value": "Acme Inc"
}
],
"source": "api",
"status": "active",
"isFavorite": false,
"isBlocked": false,
"marketingOptIn": true,
"marketingOptInAt": "2026-07-12T09:30:00.000Z",
"lastContactedAt": null,
"createdAt": "2026-07-12T09:30:00.000Z",
"updatedAt": "2026-07-12T09:30:00.000Z"
},
"meta": {
"apiVersion": "v1"
},
"requestId": "a1f4c2e0-9b6d-4a1e-8c3f-2d7e5b9a0c11",
"timestamp": "2026-07-12T09:30:00.000Z"
}Get a contact by id
/api/public/v1/contacts/{id}Fetch a single contact by its public id.
Path parameters
idstringrequired24-char contact ObjectId
Query parameters
fieldsstringComma-separated list of fields to return (sparse fieldset).
Response 200The contact
successbooleandataobject16 child fields
idstringnamestringphonestringemailstring | nullcountrystring | nulltagsstring[]customFieldsobject[]4 child fields
fieldIdstring | nullfieldNamestring | nulltypestring | nullvalueany
sourcestringOne of
manualimportapiwhatsappwebstatusstringOne of
activedeletedblockedmergedisFavoritebooleanisBlockedbooleanmarketingOptInbooleanmarketingOptInAtstring (date-time) | nulllastContactedAtstring (date-time) | nullcreatedAtstring (date-time)updatedAtstring (date-time)
metaobject1 child field
apiVersionstring
requestIdstring | nulltimestampstring (date-time)
Errors
400Malformed request or missing tenant context401Missing or invalid API key403Forbidden — developer platform disabled, key expired/disabled, or tenant mismatch404Contact not found429Too many requests — rate limit exceeded500Unexpected server error
curl -X GET "https://api.inaiy.com/api/public/v1/contacts/6650a1b2c3d4e5f6a7b8c9d0" \
-H "x-tenant-id: demo" \
-H "x-api-key: wp_live_xxxxxxxxxxxxxxxxxxxx"{
"success": true,
"data": {
"id": "6650a1b2c3d4e5f6a7b8c9d0",
"name": "Jane Doe",
"phone": "+14155552671",
"email": "jane@example.com",
"country": "US",
"tags": [
"vip",
"newsletter"
],
"customFields": [
{
"fieldId": "664f...",
"fieldName": "Company",
"type": "text",
"value": "Acme Inc"
}
],
"source": "api",
"status": "active",
"isFavorite": false,
"isBlocked": false,
"marketingOptIn": true,
"marketingOptInAt": "2026-07-12T09:30:00.000Z",
"lastContactedAt": null,
"createdAt": "2026-07-12T09:30:00.000Z",
"updatedAt": "2026-07-12T09:30:00.000Z"
},
"meta": {
"apiVersion": "v1"
},
"requestId": "a1f4c2e0-9b6d-4a1e-8c3f-2d7e5b9a0c11",
"timestamp": "2026-07-12T09:30:00.000Z"
}Update a contact
/api/public/v1/contacts/{id}Partially update a contact. Provide at least one field.
Path parameters
idstringrequired24-char contact ObjectId
Request body
namestringphonestringE.164 format
emailstring (email) | nullcountrystring | nulltagsstring[]customFieldsobject[]sourcestringOne of
manualimportapiwhatsappwebmarketingOptInbooleanprimaryTeamIdstring | nullOwning team id (24-char ObjectId). Must be a team in this workspace; null clears it.
assignedAgentIdstring | nullOwning agent (user) id. Must be a member of this workspace; null clears it.
Response 200Contact updated
successbooleandataobject16 child fields
idstringnamestringphonestringemailstring | nullcountrystring | nulltagsstring[]customFieldsobject[]4 child fields
fieldIdstring | nullfieldNamestring | nulltypestring | nullvalueany
sourcestringOne of
manualimportapiwhatsappwebstatusstringOne of
activedeletedblockedmergedisFavoritebooleanisBlockedbooleanmarketingOptInbooleanmarketingOptInAtstring (date-time) | nulllastContactedAtstring (date-time) | nullcreatedAtstring (date-time)updatedAtstring (date-time)
metaobject1 child field
apiVersionstring
requestIdstring | nulltimestampstring (date-time)
Errors
400Malformed request or missing tenant context401Missing or invalid API key403Forbidden — developer platform disabled, key expired/disabled, or tenant mismatch404Contact not found409Duplicate contact (phone already exists)422Validation failed429Too many requests — rate limit exceeded500Unexpected server error
curl -X PATCH "https://api.inaiy.com/api/public/v1/contacts/6650a1b2c3d4e5f6a7b8c9d0" \
-H "x-tenant-id: demo" \
-H "x-api-key: wp_live_xxxxxxxxxxxxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{"name":"Jane A. Doe","tags":["vip","priority"]}'{
"name": "Jane A. Doe",
"tags": [
"vip",
"priority"
]
}{
"success": true,
"data": {
"id": "6650a1b2c3d4e5f6a7b8c9d0",
"name": "Jane Doe",
"phone": "+14155552671",
"email": "jane@example.com",
"country": "US",
"tags": [
"vip",
"newsletter"
],
"customFields": [
{
"fieldId": "664f...",
"fieldName": "Company",
"type": "text",
"value": "Acme Inc"
}
],
"source": "api",
"status": "active",
"isFavorite": false,
"isBlocked": false,
"marketingOptIn": true,
"marketingOptInAt": "2026-07-12T09:30:00.000Z",
"lastContactedAt": null,
"createdAt": "2026-07-12T09:30:00.000Z",
"updatedAt": "2026-07-12T09:30:00.000Z"
},
"meta": {
"apiVersion": "v1"
},
"requestId": "a1f4c2e0-9b6d-4a1e-8c3f-2d7e5b9a0c11",
"timestamp": "2026-07-12T09:30:00.000Z"
}Delete a contact
/api/public/v1/contacts/{id}Soft-delete a contact. Returns 204 No Content on success.
Path parameters
idstringrequired24-char contact ObjectId
Errors
400Malformed request or missing tenant context401Missing or invalid API key403Forbidden — developer platform disabled, key expired/disabled, or tenant mismatch404Contact not found429Too many requests — rate limit exceeded500Unexpected server error
curl -X DELETE "https://api.inaiy.com/api/public/v1/contacts/6650a1b2c3d4e5f6a7b8c9d0" \
-H "x-tenant-id: demo" \
-H "x-api-key: wp_live_xxxxxxxxxxxxxxxxxxxx"Create or update a contact by phone
/api/public/v1/contacts/upsertMatches an existing contact by `phone` (with or without the leading +). If found, only the fields you send are updated (tags and customFields replace the stored lists) and the response is 200. If not found, the contact is created (name defaults to the phone, source to `api`) and the response is 201. `meta.created` tells you which happened. Returns 404 if primaryTeamId or assignedAgentId is not in this workspace.
Request bodyrequired
namestringphonestringrequiredE.164 format
emailstring (email) | nullcountrystring | nulltagsstring[]customFieldsobject[]sourcestringOne of
manualimportapiwhatsappwebmarketingOptInbooleanprimaryTeamIdstring | nullOwning team id (24-char ObjectId). Must be a team in this workspace; null clears it.
assignedAgentIdstring | nullOwning agent (user) id. Must be a member of this workspace; null clears it.
Response 200Existing contact updated (meta.created = false)
successbooleandataobject16 child fields
idstringnamestringphonestringemailstring | nullcountrystring | nulltagsstring[]customFieldsobject[]4 child fields
fieldIdstring | nullfieldNamestring | nulltypestring | nullvalueany
sourcestringOne of
manualimportapiwhatsappwebstatusstringOne of
activedeletedblockedmergedisFavoritebooleanisBlockedbooleanmarketingOptInbooleanmarketingOptInAtstring (date-time) | nulllastContactedAtstring (date-time) | nullcreatedAtstring (date-time)updatedAtstring (date-time)
metaobject1 child field
apiVersionstring
requestIdstring | nulltimestampstring (date-time)
Errors
400Malformed request or missing tenant context401Missing or invalid API key403Forbidden — developer platform disabled, key expired/disabled, or tenant mismatch404Contact not found422Validation failed429Too many requests — rate limit exceeded500Unexpected server error
curl -X POST "https://api.inaiy.com/api/public/v1/contacts/upsert" \
-H "x-tenant-id: demo" \
-H "x-api-key: wp_live_xxxxxxxxxxxxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{"phone":"+14155552671","name":"Jane Doe","tags":["vip"]}'{
"phone": "+14155552671",
"name": "Jane Doe",
"tags": [
"vip"
]
}{
"success": true,
"data": {
"id": "6650a1b2c3d4e5f6a7b8c9d0",
"name": "Jane Doe",
"phone": "+14155552671",
"email": "jane@example.com",
"country": "US",
"tags": [
"vip",
"newsletter"
],
"customFields": [
{
"fieldId": "664f...",
"fieldName": "Company",
"type": "text",
"value": "Acme Inc"
}
],
"source": "api",
"status": "active",
"isFavorite": false,
"isBlocked": false,
"marketingOptIn": true,
"marketingOptInAt": "2026-07-12T09:30:00.000Z",
"lastContactedAt": null,
"createdAt": "2026-07-12T09:30:00.000Z",
"updatedAt": "2026-07-12T09:30:00.000Z"
},
"meta": {
"apiVersion": "v1"
},
"requestId": "a1f4c2e0-9b6d-4a1e-8c3f-2d7e5b9a0c11",
"timestamp": "2026-07-12T09:30:00.000Z"
}