# Hire an agent

`POST /workspace/agents` · Rivier · agents

Hire an agent.

- Scope: agents:write
- Graphql: Mutation.agentsAgentCreate
- Sdk: agents.agent.create
- Cli: agents agent create
- Events: agents.agent.created

## 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"
        }
      ]
    }
  },
  "required": [
    "name"
  ],
  "additionalProperties": false
}
```

## Responses

- `201`: 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 POST 'https://api.rivier.ai/workspace/agents' \
  -H 'Authorization: Bearer $KEY' \
  -H 'Content-Type: application/json' \
  -d '{
  "name": "string"
}'
```
