Mutation
mutation CreateAccount($input: CreateAccountInput!) {
createAccount(input: $input) {
account {
id
name
externalId
url
source
tier {
id
name
externalId
color
isDefault
defaultPriority
}
}
error {
message
type
code
fields {
field
message
type
}
}
}
}Variables
{
"input": {
"name": "string",
"externalId": "string"
}
}Response
{
"data": {
"createAccount": {
"account": {
"id": "id",
"name": "string",
"externalId": "string",
"url": "string",
"source": "API",
"tier": {
"id": "id",
"name": "string",
"externalId": "string",
"color": "string",
"isDefault": true,
"defaultPriority": 1
}
},
"error": {
"message": "string",
"type": "VALIDATION",
"code": "string",
"fields": [
{
"field": "string",
"message": "string",
"type": "VALIDATION"
}
]
}
}
}
}Mutations
createAccount
Creates a new account. Fails with a validation error if an account already exists with the provided externalId.
Use upsertAccount instead if you want to create or update an account idempotently.
Requires the tenant:create permission.
MUTATION
createAccount(input: CreateAccountInput!): CreateAccountOutput!Arguments
input
required
Returns
account
error
Mutation
mutation CreateAccount($input: CreateAccountInput!) {
createAccount(input: $input) {
account {
id
name
externalId
url
source
tier {
id
name
externalId
color
isDefault
defaultPriority
}
}
error {
message
type
code
fields {
field
message
type
}
}
}
}Variables
{
"input": {
"name": "string",
"externalId": "string"
}
}Response
{
"data": {
"createAccount": {
"account": {
"id": "id",
"name": "string",
"externalId": "string",
"url": "string",
"source": "API",
"tier": {
"id": "id",
"name": "string",
"externalId": "string",
"color": "string",
"isDefault": true,
"defaultPriority": 1
}
},
"error": {
"message": "string",
"type": "VALIDATION",
"code": "string",
"fields": [
{
"field": "string",
"message": "string",
"type": "VALIDATION"
}
]
}
}
}
}Was this page helpful?

