# Update A Company AI Task

GraphQL endpoint: `/company`

Updates a task. Existing answers are left as they are; each one keeps the prompt that produced it, so an answer from before the change stays readable. Nothing is run again — use `runCompanyAiTask` for that.

## Query

```graphql
mutation ($id: ID!, $prompt: String, $name: String, $runOnRoot: Boolean, $folderIds: [ID!], $outputShape: JSON) {
  updateCompanyAiTask(id: $id, prompt: $prompt, name: $name, runOnRoot: $runOnRoot, folderIds: $folderIds, outputShape: $outputShape) {
    id
    name
    prompt
    runOnRoot
    folders { id name }
    outputShape
  }
}

```

## Variables

```json
{
  "id": "00000000-0000-4000-8000-000000000001",
  "prompt": "Extract the vendor too."
}
```

## Response

```json
{
  "data": {
    "updateCompanyAiTask": {
      "folders": [],
      "id": "00000000-0000-4000-8000-000000000001",
      "name": "task-0",
      "outputShape": {
        "total": "number"
      },
      "prompt": "Extract the vendor too.",
      "runOnRoot": true
    }
  }
}
```
