Skip to content
gist.link ↗

createSegment

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

The createSegment mutation on the CRM API.

crm:mutation:createSegment

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 {
createSegment(input: SegmentInput!): Segment!
}
Argument Type Required Description
input SegmentInput! 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 CreateSegment($input: SegmentInput!) { createSegment(input: $input) { uuid name description targetType mode isDefault criteria ownerUserUuid } }",
"variables": {
"input": {
"name": "Example",
"description": "example",
"targetType": "example"
}
}
}
JSON