Skip to content
gist.link ↗

addContactsToSegment

Mutation CRM API — POST https://crm.api.gist.link/graphql

Idempotently add contacts to a static segment.

crm:mutation:addContactsToSegment

The calling IAM key must hold this permission (or a wildcard that covers it: crm:mutation:* or crm:*) and the access token must have been minted with audience=crm. See Permissions.

type Mutation {
addContactsToSegment(segmentUuid: ID!, contactUuids: [ID!]!): Segment!
}
Argument Type Required Description
segmentUuid ID! Yes —
contactUuids [ID!]! Yes —

Segment! — see the CRM types reference.

Terminal window
curl https://crm.api.gist.link/graphql \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H 'Content-Type: application/json' \
-d @- <<'JSON'
{
"query": "mutation AddContactsToSegment($segmentUuid: ID!, $contactUuids: [ID!]!) { addContactsToSegment(segmentUuid: $segmentUuid, contactUuids: $contactUuids) { uuid name description targetType mode isDefault criteria ownerUserUuid } }",
"variables": {
"segmentUuid": "01a01234-abcd-7000-9000-0123456789ab",
"contactUuids": [
"01a01234-abcd-7000-9000-0123456789ab"
]
}
}
JSON