Skip to main content
Using TypeScript? Check out our GraphQL SDK for a fully typed client.
When upserting a tenant you need to specify an externalId which matches the id of the tenant in your own backend. For example if your product is structured in teams, then when creating a tenant for a team you’d use the team’s id as the externalId. To upsert a tenant you need the following permissions:
  • tenant:read
  • tenant:create
Mutation
mutation upsertTenant($input: UpsertTenantInput!) {
  upsertTenant(input: $input) {
    tenant {
      id
      externalId
      name
      url
    }
    error {
      message
      type
      code
      fields {
        field
        message
        type
      }
    }
  }
}
Variables
{
  "input": {
    "identifier": {
      "externalId": "team_123"
    },
    "name": "Acme",
    "externalId": "team_123",
    "url": {
      "value": "acme.com"
    }
  }
}