# createAccountProject

```graphql
mutation CreateAccountProject($input: CreateAccountProjectInput!) {
  createAccountProject(input: $input) {
    id
    slug
    name
    accountId
    type
    isTemplate
    systemManaged
    createdAt
    updatedAt
  }
}
```

Create account project. Requires account.projects.create.

## Arguments

| Name                      | Type                       | Required | Description                                                                                                                                                                                                                   |
| ------------------------- | -------------------------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `input`                   | CreateAccountProjectInput! | Yes      |                                                                                                                                                                                                                               |
| `input.accountId`         | UUID!                      | Yes      | Account to receive the new project. Project creation and account assignment are atomic. Requires account.projects.create. The caller remains the billing and seat owner. The caller project limit returns 402 when exhausted. |
| `input.name`              | String!                    | Yes      | Project display name.                                                                                                                                                                                                         |
| `input.slug`              | String                     |          | Unique project slug. Omit to generate a slug with a random suffix. An explicit duplicate slug returns 409; creation does not replay an existing project.                                                                      |
| `input.templateSlug`      | String                     |          | Optional template slug. A template project UUID takes precedence. Null means omitted.                                                                                                                                         |
| `input.templateProjectId` | UUID                       |          | Optional template project UUID. Overrides templateSlug. Null means omitted.                                                                                                                                                   |

## Variables

```json
{
  "input": {
    "accountId": "00000000-0000-0000-0000-000000000000",
    "name": "string"
  }
}
```

## Responses

| Status | Description                                       |
| ------ | ------------------------------------------------- |
| 200    | The AccountProject! in data.createAccountProject. |

## 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 CreateAccountProject($input: CreateAccountProjectInput!) {\n  createAccountProject(input: $input) {\n    id\n    slug\n    name\n    accountId\n    type\n    isTemplate\n    systemManaged\n    createdAt\n    updatedAt\n  }\n}",
  "variables": {
    "input": {
      "accountId": "00000000-0000-0000-0000-000000000000",
      "name": "string"
    }
  }
}'
```

## Example response

```json
{
  "data": {
    "createAccountProject": {
      "id": "string",
      "slug": "string",
      "name": "string",
      "accountId": "00000000-0000-0000-0000-000000000000",
      "type": "regular",
      "isTemplate": false,
      "systemManaged": false,
      "createdAt": "string",
      "updatedAt": "string"
    }
  }
}
```
