# Change an agent's job, mailbox or connection

`PATCH /workspace/agents/{id}` · Rivier · agents

Change an agent's job, mailbox or connection.

- Scope: agents:write
- Graphql: Mutation.agentsAgentUpdate
- Sdk: agents.agent.update
- Cli: agents agent update

## Parameters

- `id` (path, required), string

## Request body

`application/json`

```json
{
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "minLength": 1,
      "maxLength": 80
    },
    "job": {
      "type": "string",
      "maxLength": 200
    },
    "remit": {
      "type": "string",
      "maxLength": 2000
    },
    "mailbox": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 320
        },
        {
          "type": "null"
        }
      ]
    },
    "connectionId": {
      "anyOf": [
        {
          "type": "string",
          "format": "uuid"
        },
        {
          "type": "null"
        }
      ]
    },
    "phoneConnectionId": {
      "anyOf": [
        {
          "type": "string",
          "format": "uuid"
        },
        {
          "type": "null"
        }
      ]
    },
    "voice": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 64
        },
        {
          "type": "null"
        }
      ]
    },
    "tone": {
      "type": "string",
      "enum": [
        "warm",
        "plain",
        "formal"
      ]
    },
    "signature": {
      "type": "string",
      "maxLength": 500
    },
    "services": {
      "type": "array",
      "items": {
        "type": "string",
        "maxLength": 64
      },
      "maxItems": 20
    },
    "accent": {
      "anyOf": [
        {
          "type": "string",
          "pattern": "^#[0-9a-fA-F]{6}$"
        },
        {
          "type": "null"
        }
      ]
    }
  },
  "additionalProperties": false
}
```

## Responses

- `200`: Success
- `400`: The request was malformed
- `401`: No valid credential
- `403`: The credential lacks the scope, origin or address
- `429`: Over the key's rate limit; see Retry-After

## Example

```sh
curl -X PATCH 'https://api.rivier.ai/workspace/agents/{id}' \
  -H 'Authorization: Bearer $KEY' \
  -H 'Content-Type: application/json' \
  -d '{
  "name": "string",
  "job": "string",
  "remit": "string",
  "mailbox": "string",
  "connectionId": "string",
  "phoneConnectionId": "string",
  "voice": "string",
  "tone": "warm"
}'
```
