Reference

Contacts

Read and write contacts, custom fields, and GDPR erasure

Erasure is irreversible and needs its own scope. See Contacts.

contactApi

Query

ScopeCONTACTS_READ

One contact by id (API key: contacts:read). Null if absent.

Arguments

idID!Required

Returns

idID!
displayNameString
avatarUrlString
phoneString
emailString
channels[String!]!
erasedBoolean!
externalIdString
query {
  contactApi(id: "…") { id displayName avatarUrl phone email }
}

contactApiByExternalId

Query

ScopeCONTACTS_READ

One contact by your own externalId (API key: contacts:read). Null if absent.

Arguments

externalIdString!Required

Returns

idID!
displayNameString
avatarUrlString
phoneString
emailString
channels[String!]!
erasedBoolean!
externalIdString
query {
  contactApiByExternalId(externalId: "…") { id displayName avatarUrl phone email }
}

contactsApi

Query

ScopeCONTACTS_READ

List/search contacts (API key: contacts:read).

Arguments

Defaults to \{\}.
Defaults to \{\}.

ContactApiFilterInput

searchString
externalIdString
phoneString
createdAfterDateTime
createdBeforeDateTime

ContactApiPaginationInput

firstInt
afterID

Returns

nextCursorString
totalCountInt
query {
  contactsApi(filter: { … }, pagination: { … }, sortDir: ASC) { items nextCursor totalCount }
}

createContactApi

Mutation

ScopeCONTACTS_MANAGE

Create a contact (API key: contacts:manage).

Arguments

ContactApiWriteInput

externalIdString
displayNameString
firstNameString
lastNameString
phoneString
languageString

Returns

idID!
displayNameString
avatarUrlString
phoneString
emailString
channels[String!]!
erasedBoolean!
externalIdString
mutation {
  createContactApi(input: { … }) { id displayName avatarUrl phone email }
}

createPeopleFieldDefinition

Mutation

ScopeCONTACTS_MANAGE

Arguments

CreateFieldDefinitionDto

keyString!Required
nameString!Required
typeString!Required
visibilityString
Display section in the chat profile view (defaults to USER_DATA).
isRequiredBoolean
displayOrderFloat
pinnedToChatViewBoolean
Show this field in the compact chat panel (vs behind "See all"). Independent of group and visibility. Defaults to false.
descriptionString
options[String!]
defaultValueJSON
isSystemFieldBoolean
isReadOnlyBoolean
Whether this field is read-only. Read-only fields cannot be edited by users. This is typically set by the system for auto-calculated fields.

Returns

_idString!
organisationIdString!
keyString!
nameString!
descriptionString
isRequiredBoolean!
isSystemFieldBoolean!
isReadOnlyBoolean!
Whether this field is read-only and cannot be edited by users. Read-only fields are auto-calculated or set by the system.
options[String!]
defaultValueJSON
displayOrderFloat!
pinnedToChatViewBoolean
createdAtDateTime!
updatedAtDateTime!
mutation {
  createPeopleFieldDefinition(input: { … }) { _id organisationId key name type }
}

deletePeopleFieldDefinition

Mutation

ScopeCONTACTS_MANAGE

Arguments

idString!Required

Returns

Boolean!
mutation {
  deletePeopleFieldDefinition(id: "…")
}

deletePeopleFieldValue

Mutation

ScopeCONTACTS_MANAGE

Arguments

peopleIdString!Required
fieldIdString!Required

Returns

Boolean!
mutation {
  deletePeopleFieldValue(peopleId: "…", fieldId: "…")
}

eraseContact

Mutationirreversible

ScopeCONTACTS_ERASE

Irreversibly erase a Contact's PII (GDPR right to erasure). Org-scoped. Member (role) OR an API key with the CONTACTS_ERASE scope.

Arguments

inputEraseInput!Required

EraseInput

contactIdID!Required
The Contact to erase (or preview erasing).
organisationIdID!Required
The organisation the contact must belong to.
reasonString
Optional free-text reason/ticket reference for the erasure. Operator-supplied free text, passed through as-is.

Returns

contactIdID!
The Contact that was erased.
erasedAtDateTime!
When the erasure completed.
affectedCounts[EraseCount!]!
Per-collection counts of documents affected by the erasure.
erasureLogIdID!
The ErasureLog._id this erasure was recorded under.
mutation {
  eraseContact(input: { … }) { contactId erasedAt affectedCounts erasureLogId }
}

getPeopleFieldDefinitions

Query

ScopeCONTACTS_READ

Arguments

PeopleFieldsFilterDto

peopleIdString
keys[String!]
typeString
visibilityString
Return only fields in these display groups - lets the chat view load the primary sections up front and the rest behind "Details".
onlyPinnedBoolean
Return only fields pinned to the compact chat panel - the fast query the chat view uses before the operator opens full "Details".
includeSystemFieldsBoolean
includeCustomFieldsBoolean
applyPrivacyMaskingBoolean

Returns

_idString!
organisationIdString!
keyString!
nameString!
descriptionString
isRequiredBoolean!
isSystemFieldBoolean!
isReadOnlyBoolean!
Whether this field is read-only and cannot be edited by users. Read-only fields are auto-calculated or set by the system.
options[String!]
defaultValueJSON
displayOrderFloat!
pinnedToChatViewBoolean
createdAtDateTime!
updatedAtDateTime!
query {
  getPeopleFieldDefinitions(filter: { … }) { _id organisationId key name type }
}

getPeopleFieldValue

Query

ScopeCONTACTS_READ

Arguments

idString!Required

Returns

_idString!
peopleIdString!
organisationIdString!
valueJSON
createdAtDateTime!
updatedAtDateTime!
fieldKeyString
query {
  getPeopleFieldValue(id: "…") { _id peopleId organisationId field value }
}

getPeopleFieldValues

Query

ScopeCONTACTS_READ

Arguments

peopleIdString!Required

PeopleFieldsFilterDto

peopleIdString
keys[String!]
typeString
visibilityString
Return only fields in these display groups - lets the chat view load the primary sections up front and the rest behind "Details".
onlyPinnedBoolean
Return only fields pinned to the compact chat panel - the fast query the chat view uses before the operator opens full "Details".
includeSystemFieldsBoolean
includeCustomFieldsBoolean
applyPrivacyMaskingBoolean

Returns

_idString!
peopleIdString!
organisationIdString!
valueJSON
createdAtDateTime!
updatedAtDateTime!
fieldKeyString
query {
  getPeopleFieldValues(peopleId: "…", filter: { … }) { _id peopleId organisationId field value }
}

isWhatsAppIdEditable

Query

ScopeCONTACTS_READ

Check if WhatsApp ID field is editable for a contact

Arguments

peopleIdString!Required

Returns

Boolean!
query {
  isWhatsAppIdEditable(peopleId: "…")
}

previewErase

Query

ScopeCONTACTS_ERASE

Read-only preview of what an eraseContact call would affect for a Contact, without mutating anything. Org-scoped. Member (role) OR an API key with the CONTACTS_ERASE scope.

Arguments

inputEraseInput!Required

EraseInput

contactIdID!Required
The Contact to erase (or preview erasing).
organisationIdID!Required
The organisation the contact must belong to.
reasonString
Optional free-text reason/ticket reference for the erasure. Operator-supplied free text, passed through as-is.

Returns

contactIdID!
The Contact this preview was computed for.
Per-collection counts of documents an eraseContact call would affect.
warnings[String!]!
Human-readable, PII-free warning lines (e.g. 'contact already erased', 'N messages will be anonymized').
query {
  previewErase(input: { … }) { contactId willErase warnings }
}

setPeopleFieldValue

Mutation

ScopeCONTACTS_MANAGE

Arguments

inputSetFieldValueDto!Required

SetFieldValueDto

peopleIdString!Required
fieldIdString!Required
valueJSON

Returns

_idString!
peopleIdString!
organisationIdString!
valueJSON
createdAtDateTime!
updatedAtDateTime!
fieldKeyString
mutation {
  setPeopleFieldValue(input: { … }) { _id peopleId organisationId field value }
}

updateContactApi

Mutation

ScopeCONTACTS_MANAGE

Update a contact's fields (API key: contacts:manage). NotFound if absent or in another org.

Arguments

idID!Required

ContactApiWriteInput

externalIdString
displayNameString
firstNameString
lastNameString
phoneString
languageString

Returns

idID!
displayNameString
avatarUrlString
phoneString
emailString
channels[String!]!
erasedBoolean!
externalIdString
mutation {
  updateContactApi(id: "…", input: { … }) { id displayName avatarUrl phone email }
}

updatePeopleFieldDefinition

Mutation

ScopeCONTACTS_MANAGE

Arguments

idString!Required

UpdateFieldDefinitionDto

keyString
nameString
typeString
visibilityString
isRequiredBoolean
displayOrderFloat
Move this field to another display section. Allowed on system fields (it is presentation, not data).
pinnedToChatViewBoolean
Pin/unpin this field in the compact chat panel. Allowed on system fields (presentation, not data).
descriptionString
options[String!]
defaultValueJSON

Returns

_idString!
organisationIdString!
keyString!
nameString!
descriptionString
isRequiredBoolean!
isSystemFieldBoolean!
isReadOnlyBoolean!
Whether this field is read-only and cannot be edited by users. Read-only fields are auto-calculated or set by the system.
options[String!]
defaultValueJSON
displayOrderFloat!
pinnedToChatViewBoolean
createdAtDateTime!
updatedAtDateTime!
mutation {
  updatePeopleFieldDefinition(id: "…", input: { … }) { _id organisationId key name type }
}

upsertContactApi

Mutation

ScopeCONTACTS_MANAGE

Create or update a contact idempotently by your own externalId (API key: contacts:manage).

Arguments

ContactApiWriteInput

externalIdString
displayNameString
firstNameString
lastNameString
phoneString
languageString

Returns

idID!
displayNameString
avatarUrlString
phoneString
emailString
channels[String!]!
erasedBoolean!
externalIdString
mutation {
  upsertContactApi(input: { … }) { id displayName avatarUrl phone email }
}

On this page