Skip to content
gist.link ↗

createCrmCustomer

Mutation Pay API — POST https://pay.api.gist.link/graphql

Create a CRM company (optional) + contact on the fly for a new billing customer, directly from the invoice builder. A company is created from a business email domain automatically, or explicitly when companyName is set. ROLE_ADMIN or ROLE_PAY_MANAGER.

pay:mutation:createCrmCustomer

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

type Mutation {
createCrmCustomer(input: CreateCrmCustomerInput!): CrmCustomer!
}
Argument Type Required Description
input CreateCrmCustomerInput! Yes —

CrmCustomer! — see the Pay types reference.

Terminal window
curl https://pay.api.gist.link/graphql \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H 'Content-Type: application/json' \
-d @- <<'JSON'
{
"query": "mutation CreateCrmCustomer($input: CreateCrmCustomerInput!) { createCrmCustomer(input: $input) { company { uuid name domains website industry size } contact { uuid displayName primaryEmail title } } }",
"variables": {
"input": {
"email": "ada@example.com"
}
}
}
JSON