# deleteAgent

```graphql
mutation DeleteAgent($input: DeleteProjectAgentInput!) {
  deleteAgent(input: $input) {
    ok
  }
}
```

Delete agent. Requires project.agents.write; API keys also need delete scope.

## Arguments

| Name                     | Type                     | Required | Description |
| ------------------------ | ------------------------ | -------- | ----------- |
| `input`                  | DeleteProjectAgentInput! | Yes      |             |
| `input.projectReference` | String                   |          |             |
| `input.agentId`          | String!                  | Yes      |             |
| `input.sourceTargetKind` | String                   |          |             |
| `input.targetBranchId`   | ID                       |          |             |

## Variables

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

## Responses

| Status | Description                                   |
| ------ | --------------------------------------------- |
| 200    | The AgentDeletionResult! in data.deleteAgent. |

## 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 DeleteAgent($input: DeleteProjectAgentInput!) {\n  deleteAgent(input: $input) {\n    ok\n  }\n}",
  "variables": {
    "input": {
      "agentId": "string"
    }
  }
}'
```

## Example response

```json
{
  "data": {
    "deleteAgent": {
      "ok": false
    }
  }
}
```
