Developers
Set your API contextPick a region and space ID once. Every sample fills in your base URL.
Where do I find these?

In Coevera: open your space's API application and choose Show Access. It shows the space ID and the base URL, whose host starts with your region.

From the API: if you know the space ID, the discovery endpoint GET /api/discovery/spaces/{space_id} returns its region and base URLs, without credentials.

Only the region and space ID are kept, in this browser. Never paste a key or password here.

More in the quickstart

GraphQLRepositoriesphone

entities.phone

Read phone records with the phone repository, and change them with the phone mutations. Same records as the REST Phones entity.

Queries

Fields of entities { phone { … } }.

KindFieldReturns
QUERYgetById(entityId: ID!)
Returns the record with the given id, or null when there is none. Deleted records are returned as well.
PhoneEntity
QUERYgetByIds(entityIds: [ID!]!)
Returns the records with the given ids; ids without a record are left out. Deleted records are returned as well.
[PhoneEntity!]!
QUERYgetAll(limit: Int, offset: Int, filter: PhoneFilterInput, orderBy: [PhoneOrderByInput!], includeDeleted: Boolean)
Returns the records that match the filter, paged with limit and offset.
[PhoneEntity!]!
QUERYgetByCriteria(filter: PhoneFilterInput, orderBy: [PhoneOrderByInput!], includeDeleted: Boolean, before: String, after: String, first: Int, last: Int)
Returns the records that match the filter as a cursor-paginated connection.
PhoneEntityConnection
QUERYgetChangedFieldsSinceRevision(id: UUID!, revision: Int!)
Returns the ids of the fields of a record that changed after the given revision. Returns an empty list for entities without change tracking.
[UUID!]!
QUERYgetAllForAdmin(limit: Int, offset: Int, filter: PhoneFilterInput, orderBy: [PhoneOrderByInput!], includeDeleted: Boolean)
Returns all phone numbers of the space, including other users' numbers, for administration.
[PhoneEntity!]!
QUERYcheckForUnsubscribed(recipients: [SendTextMessageRecipientParams!]!)
Returns the recipients from the given list who have unsubscribed from text messages, so they can be removed before sending.
[SendTextMessageRecipient!]!

Mutations

KindMutationDoesReturns
MUTATIONcreatePhone(input: CreatePhoneInput!, validationLevel: [ValidationLevel!])Create one recordCreatePhonePayload
MUTATIONupdatePhone(input: UpdatePhoneInput!, validationLevel: [ValidationLevel!], sessionIdToUpdate: String)Update fieldsUpdatePhonePayload
MUTATIONbulkUpdatePhone(input: [CreateOrUpdatePhoneInput!]!, deleteInput: [DeletePhoneInput!], validationLevel: [ValidationLevel!], rollbackMethod: RollbackMethod, match: MatchingInput)Create or update many; per-item resultsBulkUpdatePhonePayload
MUTATIONdeletePhone(input: DeletePhoneInput!)Soft-deleteDeletePhonePayload
MUTATIONupdateMessagingPhone(input: UpdatePhoneInput!, validationLevel: [ValidationLevel!], sessionIdToUpdate: String)Updates a WhatsApp phone. Only WhatsApp phones can be updated this way, and their forwarding settings cannot be set. GraphQL onlyUpdateMessagingPhonePayload
MUTATIONdeleteMessagingPhone(input: DeletePhoneInput!)Deletes a WhatsApp phone and disconnects its WhatsApp account from the space. Only WhatsApp phones can be deleted this way. GraphQL onlyDeleteMessagingPhonePayload
MUTATIONenableMessagingPhone(input: UpdatePhoneInput!)Re-enables a WhatsApp phone that was disabled. Fails when the phone is in an error state. GraphQL onlyEnableMessagingPhonePayload
MUTATIONdisableMessagingPhone(input: UpdatePhoneInput!)Disables a WhatsApp phone without deleting it; enableMessagingPhone turns it back on. Fails when the phone is in an error state. GraphQL onlyDisableMessagingPhonePayload

Types

The types this repository uses, each with its fields and their descriptions. Types several repositories share, such as PageInfo and the filter fields, are in the types index.

PhoneEntity object 17 fields: isDeleteProtected, id, isDeleted, …

Phone number connected to Coevera for calls, text messages or WhatsApp, either personal to a user or shared by the company.

FieldTypeDescription
isDeleteProtectedBoolean!True when the record is protected against deletion because it must always exist in the space. Deleting a record that is not protected can still fail on other checks. Read-only.
idID!Unique identifier of entity.
isDeletedBooleanSpecifies if the entity is considered deleted.
modifiedDateTimeLast modification time.
createdDateTimeCreation time.
ownerClientEntityUser the phone is assigned to, when the phone belongs to a specific user (personal calling/SMS line).
errorCodeIntError code recorded for the phone, set on integration failures (e.g. provider rejected the last send) or when the user disables the integration; empty when the phone is healthy.
nameString!Name of the entity and its default text representation.
ownerIdIDId of the assigned user, or empty when the phone is a company-level resource.
phoneNumberStringPhone number in E.164 format (e.g. "+12025550123").
twilioCallerSidStringExternal caller identifier from the calling provider (e.g. Twilio caller SID).
typePhoneTypeEnum!Channel and assignment of the phone number: calling only, calling and SMS (unassigned, personal to the owner or shared by the company), or a personal or company WhatsApp account.
revisionIntRevision when entity was lastly changed.
messageForwardingEmailStringEmail address that incoming text messages to this phone are forwarded to. Empty when forwarding is not configured.
callForwardingPhoneStringPhone number that incoming calls/SMS to this phone are forwarded to. Empty when forwarding is not configured.
enabledBoolean!False when the user has disabled the calling/SMS integration on this phone (errorCode is set to indicate user disablement); true otherwise.
instancePermissions[EntityPermsEnum!]! (1 args)Permissions the current user has on this record, out of the requested ones.
PhoneEntityConnection object pageInfo: PageInfo!, edges: [PhoneEntityEdge]!, totalCount: Int

Paginated list of Phone records.

FieldTypeDescription
pageInfoPageInfo!Pagination data for this connection.
edges[PhoneEntityEdge]!Contains the nodes in this connection.
totalCountIntTotal number of items in the connection.
PhoneEntityEdge object node: PhoneEntity, cursor: String!

A Relay edge containing a PhoneEntity and its cursor.

FieldTypeDescription
nodePhoneEntityThe item at the end of the edge
cursorString!A cursor for use in pagination
PhoneFilterInput input AND, OR, NOT, globalSearchQuery, one condition per field

Filter conditions for Phone records. Conditions on different fields are combined with AND; use OR, AND and NOT for other combinations.

Input fieldTypeDescription
OR[PhoneFilterInput!]Matches records that meet at least one of the listed filters.
AND[PhoneFilterInput!]Matches records that meet all of the listed filters.
NOTPhoneFilterInputMatches records that do not meet this filter.
globalSearchQueryStringSearch term matched against the fields that the global search covers for this entity.
idEntityFilterStringFieldUnique identifier of entity.
isDeletedBooleanSpecifies if the entity is considered deleted.
modifiedEntityFilterDateTimeFieldLast modification time.
createdEntityFilterDateTimeFieldCreation time.
errorCodeEntityFilterNumberFieldError code recorded for the phone, set on integration failures (e.g. provider rejected the last send) or when the user disables the integration; empty when the phone is healthy.
nameEntityFilterStringFieldName of the entity and its default text representation.
ownerIdEntityFilterStringFieldId of the assigned user, or empty when the phone is a company-level resource.
phoneNumberEntityFilterStringFieldPhone number in E.164 format (e.g. "+12025550123").
twilioCallerSidEntityFilterStringFieldExternal caller identifier from the calling provider (e.g. Twilio caller SID).
typePhoneTypeEnumFilterInputChannel and assignment of the phone number: calling only, calling and SMS (unassigned, personal to the owner or shared by the company), or a personal or company WhatsApp account.
revisionEntityFilterNumberFieldRevision when entity was lastly changed.
enabledBooleanFalse when the user has disabled the calling/SMS integration on this phone (errorCode is set to indicate user disablement); true otherwise.
ownerClientFilterInputUser the phone is assigned to, when the phone belongs to a specific user (personal calling/SMS line). Matches records where a related record meets these conditions.
PhoneOrderByInput input Asc or Desc per field

Sorting of Phone records. Set exactly one field in each item; list several items to sort by more fields, in order of priority.

Input fieldTypeDescription
idOrderByEnumUnique identifier of entity.
isDeletedOrderByEnumSpecifies if the entity is considered deleted.
modifiedOrderByEnumLast modification time.
createdOrderByEnumCreation time.
owner[ClientOrderByNestedInput!]User the phone is assigned to, when the phone belongs to a specific user (personal calling/SMS line). Sorts by fields of the related record, listed in order of priority.
errorCodeOrderByEnumError code recorded for the phone, set on integration failures (e.g. provider rejected the last send) or when the user disables the integration; empty when the phone is healthy.
nameOrderByEnumName of the entity and its default text representation.
ownerIdOrderByEnumId of the assigned user, or empty when the phone is a company-level resource.
phoneNumberOrderByEnumPhone number in E.164 format (e.g. "+12025550123").
twilioCallerSidOrderByEnumExternal caller identifier from the calling provider (e.g. Twilio caller SID).
typeOrderByEnumChannel and assignment of the phone number: calling only, calling and SMS (unassigned, personal to the owner or shared by the company), or a personal or company WhatsApp account.
revisionOrderByEnumRevision when entity was lastly changed.
enabledOrderByEnumFalse when the user has disabled the calling/SMS integration on this phone (errorCode is set to indicate user disablement); true otherwise.
PhoneTypeEnumFilterInput input eq: [PhoneTypeEnum!], NOT: PhoneTypeEnumFilterInput

Conditions on an enumeration field. Several conditions given together must all match.

Input fieldTypeDescription
eq[PhoneTypeEnum!]Matches any of the listed values.
NOTPhoneTypeEnumFilterInputMatches values that do not meet this condition.
CreateOrUpdatePhoneInput input 12 fields: clientMutationId, id, modified, …

Field values of a Phone record to create, or to update when its id is set.

Input fieldTypeDescription
clientMutationIdStringOptional client-supplied identifier passed on a mutation input and echoed back unchanged on its payload, so a client can correlate the response with its request (Relay convention).
idIDUnique identifier of entity.
modifiedDateTimeLast modification time.
createdDateTimeCreation time.
errorCodeIntError code recorded for the phone, set on integration failures (e.g. provider rejected the last send) or when the user disables the integration; empty when the phone is healthy.
nameStringName of the entity and its default text representation.
ownerIdIDId of the assigned user, or empty when the phone is a company-level resource.
phoneNumberStringPhone number in E.164 format (e.g. "+12025550123").
twilioCallerSidStringExternal caller identifier from the calling provider (e.g. Twilio caller SID).
typePhoneTypeEnumChannel and assignment of the phone number: calling only, calling and SMS (unassigned, personal to the owner or shared by the company), or a personal or company WhatsApp account.
revisionIntRevision when entity was lastly changed.
enabledBooleanFalse when the user has disabled the calling/SMS integration on this phone (errorCode is set to indicate user disablement); true otherwise.
CreatePhoneInput input 11 fields: clientMutationId, modified, created, …

Field values of a new Phone record.

Input fieldTypeDescription
clientMutationIdStringOptional client-supplied identifier passed on a mutation input and echoed back unchanged on its payload, so a client can correlate the response with its request (Relay convention).
modifiedDateTimeLast modification time.
createdDateTimeCreation time.
errorCodeIntError code recorded for the phone, set on integration failures (e.g. provider rejected the last send) or when the user disables the integration; empty when the phone is healthy.
nameString!Name of the entity and its default text representation.
ownerIdIDId of the assigned user, or empty when the phone is a company-level resource.
phoneNumberStringPhone number in E.164 format (e.g. "+12025550123").
twilioCallerSidStringExternal caller identifier from the calling provider (e.g. Twilio caller SID).
typePhoneTypeEnum!Channel and assignment of the phone number: calling only, calling and SMS (unassigned, personal to the owner or shared by the company), or a personal or company WhatsApp account.
revisionIntRevision when entity was lastly changed.
enabledBoolean!False when the user has disabled the calling/SMS integration on this phone (errorCode is set to indicate user disablement); true otherwise.
DeletePhoneInput input clientMutationId: String, id: ID!

Id of the Phone record to delete.

Input fieldTypeDescription
clientMutationIdStringOptional client-supplied identifier passed on a mutation input and echoed back unchanged on its payload, so a client can correlate the response with its request (Relay convention).
idID!Unique identifier of entity.
SendTextMessageRecipientParams input 9 fields: primary, opportunityId, contactId, …

Recipient of a text message: the phone number and the records whose data fill its placeholders.

Input fieldTypeDescription
primaryEntityLacotaTypeWhich of the given records, such as the Contact or the Account, the message is primarily addressed to.
opportunityIdUUIDOpportunity whose data fills the opportunity placeholders.
contactIdUUIDContact whose data fills the contact placeholders.
accountIdUUIDAccount whose data fills the account placeholders.
leadIdUUIDLead whose data fills the lead placeholders.
projectIdUUIDProject whose data fills the project placeholders.
quoteIdUUIDQuote whose data fills the quote placeholders.
customEntityIds[CustomEntityIDParams]Custom entity records whose data fill the custom entity placeholders, each given as a CustomEntityID.
phoneNumberString!Phone number the text message is sent to.
UpdatePhoneInput input 11 fields: id, ownerId, created, …

Id of a Phone record and the field values to change.

Input fieldTypeDescription
idID!Id of the phone.
ownerIdIDId of the user the phone is assigned to.
createdDateTimeTime the phone was created.
modifiedDateTimeTime the phone was last modified.
nameStringDisplay name of the phone.
phoneNumberStringPhone number in E.164 format (e.g. "+12025550123").
twilioCallerSidStringIdentifier of the phone at the calling provider.
typePhoneTypeEnumKind of phone: calling only, calling and text messaging (personal, company or unassigned), or WhatsApp (personal or company).
forwardCallsToPhoneStringPhone number that incoming calls and text messages are forwarded to.
forwardMessagesToEmailStringEmail address that incoming text messages are forwarded to.
isDeletedBooleanTrue to remove the phone. Only used when phones are synchronized from the subscription's calling settings.
BulkUpdatePhonePayload object result: BulkUpdateResults!

Result of the bulkUpdatePhone mutation.

FieldTypeDescription
resultBulkUpdateResults!Ids of the created, updated and deleted records, and the items that failed.
CreatePhonePayload object phone: PhoneEntity, clientMutationId: String

Result of the createPhone mutation.

FieldTypeDescription
phonePhoneEntityThe created record.
clientMutationIdStringOptional client-supplied identifier passed on a mutation input and echoed back unchanged on its payload, so a client can correlate the response with its request (Relay convention).
DeleteMessagingPhonePayload object phone: PhoneEntity, clientMutationId: String

Result of the deleteMessagingPhone mutation.

FieldTypeDescription
phonePhoneEntityThe deleted phone.
clientMutationIdStringOptional client-supplied identifier passed on a mutation input and echoed back unchanged on its payload, so a client can correlate the response with its request (Relay convention).
DeletePhonePayload object phone: PhoneEntity, clientMutationId: String

Result of the deletePhone mutation.

FieldTypeDescription
phonePhoneEntityThe deleted record.
clientMutationIdStringOptional client-supplied identifier passed on a mutation input and echoed back unchanged on its payload, so a client can correlate the response with its request (Relay convention).
DisableMessagingPhonePayload object phone: PhoneEntity

Result of the disableMessagingPhone mutation.

FieldTypeDescription
phonePhoneEntityThe updated phone.
EnableMessagingPhonePayload object phone: PhoneEntity

Result of the enableMessagingPhone mutation.

FieldTypeDescription
phonePhoneEntityThe updated phone.
UpdateMessagingPhonePayload object phone: PhoneEntity

Result of the updateMessagingPhone mutation.

FieldTypeDescription
phonePhoneEntityThe updated phone.
UpdatePhonePayload object phone: PhoneEntity

Result of the updatePhone mutation.

FieldTypeDescription
phonePhoneEntityThe updated record.
PhoneTypeEnum enum Calling, CallingSmsUnassigned, CallingSmsPersonal, CallingSmsCompany, WhatsAppPersonal, WhatsAppCompany

Purpose and assignment of a phone number connected to the space.

ValueDescription
CallingNumber used for voice calls only.
CallingSmsUnassignedCalling and SMS number not assigned to any user or to the company.
CallingSmsPersonalCalling and SMS number assigned to a single user.
CallingSmsCompanyShared company calling and SMS number.
WhatsAppPersonalWhatsApp account of a single user.
WhatsAppCompanyShared company WhatsApp account.
SendTextMessageRecipient object 9 fields: primary, opportunityId, contactId, …

Recipient of a text message: the phone number and the records whose data fill its placeholders.

FieldTypeDescription
primaryEntityLacotaTypeWhich of the given records, such as the Contact or the Account, the message is primarily addressed to.
opportunityIdUUIDOpportunity whose data fills the opportunity placeholders.
contactIdUUIDContact whose data fills the contact placeholders.
accountIdUUIDAccount whose data fills the account placeholders.
leadIdUUIDLead whose data fills the lead placeholders.
projectIdUUIDProject whose data fills the project placeholders.
quoteIdUUIDQuote whose data fills the quote placeholders.
customEntityIds[CustomEntityID]Custom entity records whose data fill the custom entity placeholders, each given as a CustomEntityID.
phoneNumberString!Phone number the text message is sent to.