# createAccount

```graphql
mutation CreateAccount($input: CreateAccountInput!) {
  createAccount(input: $input) {
    id
    slug
    name
    kind
    createdAt
    updatedAt
    membership {
      role
      capabilities
    }
  }
}
```

Create a team account that the caller owns.

## Arguments

| Name         | Type                | Required | Description                                                                                                                                                                                                          |
| ------------ | ------------------- | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `input`      | CreateAccountInput! | Yes      |                                                                                                                                                                                                                      |
| `input.name` | String!             | Yes      |                                                                                                                                                                                                                      |
| `input.slug` | String              |          | Unique account slug. Omit to derive it deterministically from the name. A duplicate slug is rejected as already existing; creation does not replay the existing account. Filter the account list by slug to find it. |

## Variables

```json
{
  "input": {
    "name": "string"
  }
}
```

## Responses

| Status | Description                         |
| ------ | ----------------------------------- |
| 200    | The Account! in data.createAccount. |

## Call it

```bash
curl -X POST "https://api.veryfront.com/graphql" \
  -H "Authorization: Bearer $VERYFRONT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "query": "mutation CreateAccount($input: CreateAccountInput!) {\n  createAccount(input: $input) {\n    id\n    slug\n    name\n    kind\n    createdAt\n    updatedAt\n    membership {\n      role\n      capabilities\n    }\n  }\n}",
  "variables": {
    "input": {
      "name": "string"
    }
  }
}'
```

## Example response

```json
{
  "data": {
    "createAccount": {
      "id": "string",
      "slug": "string",
      "name": "string",
      "kind": "string",
      "createdAt": "string",
      "updatedAt": "string",
      "membership": {
        "role": "string",
        "capabilities": [
          "string"
        ]
      }
    }
  }
}
```
