# createExternalFolder

```graphql
mutation CreateExternalFolder($input: ExternalStorageFolderInput!) {
  createExternalFolder(input: $input) {
    id
    provider
    name
    path
    mimeType
    sizeBytes
    kind
    parentId
    modifiedAt
    etag
    thumbnailUrl
    webUrl
  }
}
```

Create external folder. Requires project.integrations.connect.

## Arguments

| Name                     | Type                        | Required | Description                                                                                                                                                  |
| ------------------------ | --------------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `input`                  | ExternalStorageFolderInput! | Yes      |                                                                                                                                                              |
| `input.provider`         | String!                     | Yes      | Storage provider accessed through the caller's own personal connection. A human caller is required; agent, run, and service-account credentials are refused. |
| `input.projectReference` | String                      |          | Project ID or slug. Requires project.integrations.connect through the caller's own personal provider connection.                                             |
| `input.folderId`         | String                      |          | Parent folder item ID or root.                                                                                                                               |
| `input.parentId`         | String                      |          |                                                                                                                                                              |
| `input.name`             | String!                     | Yes      |                                                                                                                                                              |
| `input.idempotencyKey`   | String                      |          | 1-128 characters without whitespace. A retry with the same key and input within 24 hours returns the first folder.                                           |

## Variables

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

## Responses

| Status | Description                                            |
| ------ | ------------------------------------------------------ |
| 200    | The ExternalStorageFile! in data.createExternalFolder. |

## 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 CreateExternalFolder($input: ExternalStorageFolderInput!) {\n  createExternalFolder(input: $input) {\n    id\n    provider\n    name\n    path\n    mimeType\n    sizeBytes\n    kind\n    parentId\n    modifiedAt\n    etag\n    thumbnailUrl\n    webUrl\n  }\n}",
  "variables": {
    "input": {
      "provider": "string",
      "name": "string"
    }
  }
}'
```

## Example response

```json
{
  "data": {
    "createExternalFolder": {
      "id": "string",
      "provider": "string",
      "name": "string",
      "path": "string",
      "mimeType": "string",
      "sizeBytes": 0,
      "kind": "string",
      "parentId": "string",
      "modifiedAt": "string",
      "etag": "string",
      "thumbnailUrl": "https://example.com",
      "webUrl": "https://example.com"
    }
  }
}
```
