Skip to content
gist.link ↗

convertLead

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

Creates (or matches) a contact — and optionally a company + deal — from the lead.

crm:mutation:convertLead

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 {
convertLead(uuid: ID!, input: ConvertLeadInput): ConvertLeadResult!
}
Argument Type Required Description
uuid ID! Yes —
input ConvertLeadInput No —

ConvertLeadResult! — 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 ConvertLead($uuid: ID!, $input: ConvertLeadInput) { convertLead(uuid: $uuid, input: $input) { lead { uuid name email status } contact { uuid firstName lastName displayName primaryEmail emails phones title } } }",
"variables": {
"uuid": "01a01234-abcd-7000-9000-0123456789ab",
"input": {
"companyUuid": "01a01234-abcd-7000-9000-0123456789ab",
"createDeal": true,
"dealTitle": "Example"
}
}
}
JSON