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 { … } }.
| Kind | Field | Returns |
|---|---|---|
| QUERY | getById(entityId: ID!)Returns the record with the given id, or null when there is none. Deleted records are returned as well. | PhoneEntity |
| QUERY | getByIds(entityIds: [ID!]!)Returns the records with the given ids; ids without a record are left out. Deleted records are returned as well. | [PhoneEntity!]! |
| QUERY | getAll(limit: Int, offset: Int, filter: PhoneFilterInput, orderBy: [PhoneOrderByInput!], includeDeleted: Boolean)Returns the records that match the filter, paged with limit and offset. | [PhoneEntity!]! |
| QUERY | getByCriteria(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 |
| QUERY | getChangedFieldsSinceRevision(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!]! |
| QUERY | getAllForAdmin(limit: Int, offset: Int, filter: PhoneFilterInput, orderBy: [PhoneOrderByInput!], includeDeleted: Boolean)Returns all phone numbers of the space, including other users' numbers, for administration. | [PhoneEntity!]! |
| QUERY | checkForUnsubscribed(recipients: [SendTextMessageRecipientParams!]!)Returns the recipients from the given list who have unsubscribed from text messages, so they can be removed before sending. | [SendTextMessageRecipient!]! |
Mutations
| Kind | Mutation | Does | Returns |
|---|---|---|---|
| MUTATION | createPhone(input: CreatePhoneInput!, validationLevel: [ValidationLevel!]) | Create one record | CreatePhonePayload |
| MUTATION | updatePhone(input: UpdatePhoneInput!, validationLevel: [ValidationLevel!], sessionIdToUpdate: String) | Update fields | UpdatePhonePayload |
| MUTATION | bulkUpdatePhone(input: [CreateOrUpdatePhoneInput!]!, deleteInput: [DeletePhoneInput!], validationLevel: [ValidationLevel!], rollbackMethod: RollbackMethod, match: MatchingInput) | Create or update many; per-item results | BulkUpdatePhonePayload |
| MUTATION | deletePhone(input: DeletePhoneInput!) | Soft-delete | DeletePhonePayload |
| MUTATION | updateMessagingPhone(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 only | UpdateMessagingPhonePayload |
| MUTATION | deleteMessagingPhone(input: DeletePhoneInput!) | Deletes a WhatsApp phone and disconnects its WhatsApp account from the space. Only WhatsApp phones can be deleted this way. GraphQL only | DeleteMessagingPhonePayload |
| MUTATION | enableMessagingPhone(input: UpdatePhoneInput!) | Re-enables a WhatsApp phone that was disabled. Fails when the phone is in an error state. GraphQL only | EnableMessagingPhonePayload |
| MUTATION | disableMessagingPhone(input: UpdatePhoneInput!) | Disables a WhatsApp phone without deleting it; enableMessagingPhone turns it back on. Fails when the phone is in an error state. GraphQL only | DisableMessagingPhonePayload |
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.
| Field | Type | Description |
|---|---|---|
isDeleteProtected | Boolean! | 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. |
id | ID! | Unique identifier of entity. |
isDeleted | Boolean | Specifies if the entity is considered deleted. |
modified | DateTime | Last modification time. |
created | DateTime | Creation time. |
owner | ClientEntity | User the phone is assigned to, when the phone belongs to a specific user (personal calling/SMS line). |
errorCode | Int | Error 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. |
name | String! | Name of the entity and its default text representation. |
ownerId | ID | Id of the assigned user, or empty when the phone is a company-level resource. |
phoneNumber | String | Phone number in E.164 format (e.g. "+12025550123"). |
twilioCallerSid | String | External caller identifier from the calling provider (e.g. Twilio caller SID). |
type | PhoneTypeEnum! | 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. |
revision | Int | Revision when entity was lastly changed. |
messageForwardingEmail | String | Email address that incoming text messages to this phone are forwarded to. Empty when forwarding is not configured. |
callForwardingPhone | String | Phone number that incoming calls/SMS to this phone are forwarded to. Empty when forwarding is not configured. |
enabled | Boolean! | 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.
| Field | Type | Description |
|---|---|---|
pageInfo | PageInfo! | Pagination data for this connection. |
edges | [PhoneEntityEdge]! | Contains the nodes in this connection. |
totalCount | Int | Total number of items in the connection. |
PhoneEntityEdge object node: PhoneEntity, cursor: String!
A Relay edge containing a PhoneEntity and its cursor.
| Field | Type | Description |
|---|---|---|
node | PhoneEntity | The item at the end of the edge |
cursor | String! | 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 field | Type | Description |
|---|---|---|
OR | [PhoneFilterInput!] | Matches records that meet at least one of the listed filters. |
AND | [PhoneFilterInput!] | Matches records that meet all of the listed filters. |
NOT | PhoneFilterInput | Matches records that do not meet this filter. |
globalSearchQuery | String | Search term matched against the fields that the global search covers for this entity. |
id | EntityFilterStringField | Unique identifier of entity. |
isDeleted | Boolean | Specifies if the entity is considered deleted. |
modified | EntityFilterDateTimeField | Last modification time. |
created | EntityFilterDateTimeField | Creation time. |
errorCode | EntityFilterNumberField | Error 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. |
name | EntityFilterStringField | Name of the entity and its default text representation. |
ownerId | EntityFilterStringField | Id of the assigned user, or empty when the phone is a company-level resource. |
phoneNumber | EntityFilterStringField | Phone number in E.164 format (e.g. "+12025550123"). |
twilioCallerSid | EntityFilterStringField | External caller identifier from the calling provider (e.g. Twilio caller SID). |
type | PhoneTypeEnumFilterInput | 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. |
revision | EntityFilterNumberField | Revision when entity was lastly changed. |
enabled | Boolean | False when the user has disabled the calling/SMS integration on this phone (errorCode is set to indicate user disablement); true otherwise. |
owner | ClientFilterInput | User 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 field | Type | Description |
|---|---|---|
id | OrderByEnum | Unique identifier of entity. |
isDeleted | OrderByEnum | Specifies if the entity is considered deleted. |
modified | OrderByEnum | Last modification time. |
created | OrderByEnum | Creation 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. |
errorCode | OrderByEnum | Error 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. |
name | OrderByEnum | Name of the entity and its default text representation. |
ownerId | OrderByEnum | Id of the assigned user, or empty when the phone is a company-level resource. |
phoneNumber | OrderByEnum | Phone number in E.164 format (e.g. "+12025550123"). |
twilioCallerSid | OrderByEnum | External caller identifier from the calling provider (e.g. Twilio caller SID). |
type | OrderByEnum | 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. |
revision | OrderByEnum | Revision when entity was lastly changed. |
enabled | OrderByEnum | False 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 field | Type | Description |
|---|---|---|
eq | [PhoneTypeEnum!] | Matches any of the listed values. |
NOT | PhoneTypeEnumFilterInput | Matches 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 field | Type | Description |
|---|---|---|
clientMutationId | String | Optional 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). |
id | ID | Unique identifier of entity. |
modified | DateTime | Last modification time. |
created | DateTime | Creation time. |
errorCode | Int | Error 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. |
name | String | Name of the entity and its default text representation. |
ownerId | ID | Id of the assigned user, or empty when the phone is a company-level resource. |
phoneNumber | String | Phone number in E.164 format (e.g. "+12025550123"). |
twilioCallerSid | String | External caller identifier from the calling provider (e.g. Twilio caller SID). |
type | PhoneTypeEnum | 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. |
revision | Int | Revision when entity was lastly changed. |
enabled | Boolean | False 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 field | Type | Description |
|---|---|---|
clientMutationId | String | Optional 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). |
modified | DateTime | Last modification time. |
created | DateTime | Creation time. |
errorCode | Int | Error 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. |
name | String! | Name of the entity and its default text representation. |
ownerId | ID | Id of the assigned user, or empty when the phone is a company-level resource. |
phoneNumber | String | Phone number in E.164 format (e.g. "+12025550123"). |
twilioCallerSid | String | External caller identifier from the calling provider (e.g. Twilio caller SID). |
type | PhoneTypeEnum! | 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. |
revision | Int | Revision when entity was lastly changed. |
enabled | Boolean! | 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 field | Type | Description |
|---|---|---|
clientMutationId | String | Optional 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). |
id | ID! | 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 field | Type | Description |
|---|---|---|
primary | EntityLacotaType | Which of the given records, such as the Contact or the Account, the message is primarily addressed to. |
opportunityId | UUID | Opportunity whose data fills the opportunity placeholders. |
contactId | UUID | Contact whose data fills the contact placeholders. |
accountId | UUID | Account whose data fills the account placeholders. |
leadId | UUID | Lead whose data fills the lead placeholders. |
projectId | UUID | Project whose data fills the project placeholders. |
quoteId | UUID | Quote whose data fills the quote placeholders. |
customEntityIds | [CustomEntityIDParams] | Custom entity records whose data fill the custom entity placeholders, each given as a CustomEntityID. |
phoneNumber | String! | 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 field | Type | Description |
|---|---|---|
id | ID! | Id of the phone. |
ownerId | ID | Id of the user the phone is assigned to. |
created | DateTime | Time the phone was created. |
modified | DateTime | Time the phone was last modified. |
name | String | Display name of the phone. |
phoneNumber | String | Phone number in E.164 format (e.g. "+12025550123"). |
twilioCallerSid | String | Identifier of the phone at the calling provider. |
type | PhoneTypeEnum | Kind of phone: calling only, calling and text messaging (personal, company or unassigned), or WhatsApp (personal or company). |
forwardCallsToPhone | String | Phone number that incoming calls and text messages are forwarded to. |
forwardMessagesToEmail | String | Email address that incoming text messages are forwarded to. |
isDeleted | Boolean | True 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.
| Field | Type | Description |
|---|---|---|
result | BulkUpdateResults! | Ids of the created, updated and deleted records, and the items that failed. |
CreatePhonePayload object phone: PhoneEntity, clientMutationId: String
Result of the createPhone mutation.
| Field | Type | Description |
|---|---|---|
phone | PhoneEntity | The created record. |
clientMutationId | String | Optional 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.
| Field | Type | Description |
|---|---|---|
phone | PhoneEntity | The deleted phone. |
clientMutationId | String | Optional 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.
| Field | Type | Description |
|---|---|---|
phone | PhoneEntity | The deleted record. |
clientMutationId | String | Optional 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.
| Field | Type | Description |
|---|---|---|
phone | PhoneEntity | The updated phone. |
EnableMessagingPhonePayload object phone: PhoneEntity
Result of the enableMessagingPhone mutation.
| Field | Type | Description |
|---|---|---|
phone | PhoneEntity | The updated phone. |
UpdateMessagingPhonePayload object phone: PhoneEntity
Result of the updateMessagingPhone mutation.
| Field | Type | Description |
|---|---|---|
phone | PhoneEntity | The updated phone. |
UpdatePhonePayload object phone: PhoneEntity
Result of the updatePhone mutation.
| Field | Type | Description |
|---|---|---|
phone | PhoneEntity | The updated record. |
PhoneTypeEnum enum Calling, CallingSmsUnassigned, CallingSmsPersonal, CallingSmsCompany, WhatsAppPersonal, WhatsAppCompany
Purpose and assignment of a phone number connected to the space.
| Value | Description |
|---|---|
Calling | Number used for voice calls only. |
CallingSmsUnassigned | Calling and SMS number not assigned to any user or to the company. |
CallingSmsPersonal | Calling and SMS number assigned to a single user. |
CallingSmsCompany | Shared company calling and SMS number. |
WhatsAppPersonal | WhatsApp account of a single user. |
WhatsAppCompany | Shared 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.
| Field | Type | Description |
|---|---|---|
primary | EntityLacotaType | Which of the given records, such as the Contact or the Account, the message is primarily addressed to. |
opportunityId | UUID | Opportunity whose data fills the opportunity placeholders. |
contactId | UUID | Contact whose data fills the contact placeholders. |
accountId | UUID | Account whose data fills the account placeholders. |
leadId | UUID | Lead whose data fills the lead placeholders. |
projectId | UUID | Project whose data fills the project placeholders. |
quoteId | UUID | Quote whose data fills the quote placeholders. |
customEntityIds | [CustomEntityID] | Custom entity records whose data fill the custom entity placeholders, each given as a CustomEntityID. |
phoneNumber | String! | Phone number the text message is sent to. |