Mutation
mutation LeadCreate($input: LeadCreateInputInput!) {
leadCreate(input: $input) {
lead {
attribution
company
completedCallCount
consent {
agreed
at
disclosure
grantedAt
id
kind
}
createdAt
daysSinceCreated
}
userErrors {
code
field
message
}
}
}Variables
{
"input": {
"email": "string"
}
}Response
{
"data": {
"leadCreate": {
"lead": {
"attribution": "value",
"company": "string",
"completedCallCount": "value",
"consent": [
{
"agreed": true,
"at": "string",
"disclosure": "string",
"grantedAt": "string",
"id": "string",
"kind": "aura_sms"
}
],
"createdAt": "string",
"daysSinceCreated": "value"
},
"userErrors": [
{
"code": "string",
"field": [
"string"
],
"message": "string"
}
]
}
}
}Mutations
leadCreate
Create a new lead
Follows Shopify pattern: leadCreate (not createLead)
@example ```graphql
mutation {
leadCreate(input: { email: "john@example.com", name: "John Doe" }) {
lead {
id
name
email
status
}
userErrors {
message
field
code
}
}
}
```
MUTATION
leadCreate(input: LeadCreateInputInput!): LeadCreatePayload!Arguments
input
required
Returns
lead
userErrors
[UserError!]!
Mutation
mutation LeadCreate($input: LeadCreateInputInput!) {
leadCreate(input: $input) {
lead {
attribution
company
completedCallCount
consent {
agreed
at
disclosure
grantedAt
id
kind
}
createdAt
daysSinceCreated
}
userErrors {
code
field
message
}
}
}Variables
{
"input": {
"email": "string"
}
}Response
{
"data": {
"leadCreate": {
"lead": {
"attribution": "value",
"company": "string",
"completedCallCount": "value",
"consent": [
{
"agreed": true,
"at": "string",
"disclosure": "string",
"grantedAt": "string",
"id": "string",
"kind": "aura_sms"
}
],
"createdAt": "string",
"daysSinceCreated": "value"
},
"userErrors": [
{
"code": "string",
"field": [
"string"
],
"message": "string"
}
]
}
}
}