# Set an agent online, away or offline

`POST /contact-centre/agents/{id}/presence` · Rivier · inbox

Set an agent online, away or offline. Coming online takes waiting conversations in order.

- Scope: inbox:write
- Mcp: rivier_cc_presence
- Graphql: Mutation.inboxContactCentrePresenceSet
- Sdk: desk.presence
- Cli: desk presence

## Parameters

- `id` (path, required), string

## Request body

`application/json`

```json
{
  "type": "object",
  "properties": {
    "presence": {
      "type": "string",
      "enum": [
        "online",
        "away",
        "offline"
      ]
    }
  },
  "required": [
    "presence"
  ],
  "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 POST 'https://api.rivier.ai/contact-centre/agents/{id}/presence' \
  -H 'Authorization: Bearer $KEY' \
  -H 'Content-Type: application/json' \
  -d '{
  "presence": "online"
}'
```
