# writeSandboxFiles

```graphql
mutation WriteSandboxFiles($sandboxId: ID!, $input: SandboxFilesWriteInput!) {
  writeSandboxFiles(sandboxId: $sandboxId, input: $input) {
    results {
      path
      status
    }
  }
}
```

Write sandbox files. Requires project.sandboxes.manage.

## Arguments

| Name          | Type                    | Required | Description |
| ------------- | ----------------------- | -------- | ----------- |
| `sandboxId`   | ID!                     | Yes      |             |
| `input`       | SandboxFilesWriteInput! | Yes      |             |
| `input.files` | \[SandboxFileInput!]!   | Yes      |             |

## Variables

```json
{
  "sandboxId": "string",
  "input": {
    "files": [
      {
        "path": "string",
        "content": "string"
      }
    ]
  }
}
```

## Responses

| Status | Description                                             |
| ------ | ------------------------------------------------------- |
| 200    | The SandboxFilesWriteResult! in data.writeSandboxFiles. |

## 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 WriteSandboxFiles($sandboxId: ID!, $input: SandboxFilesWriteInput!) {\n  writeSandboxFiles(sandboxId: $sandboxId, input: $input) {\n    results {\n      path\n      status\n    }\n  }\n}",
  "variables": {
    "sandboxId": "string",
    "input": {
      "files": [
        {
          "path": "string",
          "content": "string"
        }
      ]
    }
  }
}'
```

## Example response

```json
{
  "data": {
    "writeSandboxFiles": {
      "results": [
        {
          "path": "string",
          "status": "written"
        }
      ]
    }
  }
}
```
