API Docs
Subaccount Management
Create New Subaccount

Create New Subaccount

Creates a new user with the required permissions given a username

Example

mutation provisionNewUser {
  provisionNewUser(input: { inputUsername: "newsubaccount_name" }) {
    user {
      username
    }
  }
}

Response

{
  "data": {
    "provisionNewUser": {
      "user": {
        "username": "newsubaccount_name"
      }
    }
  }
}

Arguments

  • input (ProvisionNewUserInput!)

The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields.

type ProvisionNewUserInput {
  clientMutationId: String
  inputUsername: String!
}
  • clientMutationId (String) An arbitrary string value with no semantic meaning. Will be included in the payload verbatim. May be used to track mutations by the client.

  • inputUsername (String!)

Type

ProvisionNewUserPayload

The output of our provisionNewUser mutation.

type ProvisionNewUserPayload {
  clientMutationId: String
  user: User
  query: Query
  userEdge(orderBy: [UsersOrderBy!] = [PRIMARY_KEY_ASC]): UsersEdge
}
Fields
  • clientMutationId (String) The exact same clientMutationId that was provided in the mutation input, unchanged and unused. May be used by a client to track mutations.

  • user (User)

  • query (Query)

  • userEdge (UsersEdge) An edge for our User. May be used by Relay 1.

    type UsersEdge {
      cursor: Cursor
      node: User!
    }
    • cursor (Cursor) A cursor for use in pagination.

    • node (User!) The User at the end of the edge.

  • orderBy (UsersOrderBy!) The method to use when ordering User.

    enum UsersOrderBy {
      NATURAL
      ID_ASC
      ID_DESC
      USERNAME_ASC
      USERNAME_DESC
      CREATED_AT_ASC
      CREATED_AT_DESC
      UPDATED_AT_ASC
      UPDATED_AT_DESC
      PRIMARY_KEY_ASC
      PRIMARY_KEY_DESC
    }