# Agents API

Source: https://docs.autessa.com/docs/reference/agents

> Run Autessa agents Generated from the Autessa OpenAPI spec.

# Agents API

Run Autessa agents

- **Base URL:** `https://api.autessa.com`
- **Auth:** your API key in the `Authorization` header, with no `Bearer` prefix.
- **Guide:** [Agents](/docs/guide/agentic/agents.md)
- **Status:** all 9 operations are live.

---

## Conversation

**POST** `/clients/agents/conversation`

**Parameters**

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `resourceId` | query | string | Yes | The agent id the key is granted. A body agentId must match it (filled from it when omitted). |

**Request body**

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `agentId` | string |  | ID id. |
| `conversationId` | string |  |  |

**Response**

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `conversation` | AgentConversationDto |  |  |

```bash
curl -X POST "https://api.autessa.com/clients/agents/conversation?resourceId=V1StGXR8Z5" \
  -H "Authorization: $AUTESSA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"agentId":"V1StGXR8Z5"}'
```

---

## A conversation's status

**POST** `/clients/agents/conversation-status`

Needs ?resourceId=<agent id>; a body agentId must match it (filled from it when omitted).

**Parameters**

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `resourceId` | query | string | Yes | The agent id the key is granted. A body agentId must match it (filled from it when omitted). |

**Request body**

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `agentId` | string |  | ID id. |
| `conversationId` | string | Yes |  |

**Response**

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `conversationId` | string |  |  |
| `status` | IN_PROGRESS \| CLOSED \| NOT_FOUND |  |  |

```bash
curl -X POST "https://api.autessa.com/clients/agents/conversation-status?resourceId=V1StGXR8Z5" \
  -H "Authorization: $AUTESSA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"conversationId":"conversation-id"}'
```

---

## Send a turn and get the reply

**POST** `/clients/agents/execute`

Needs ?resourceId=<agent id>; a body agentId must match it (filled from it when omitted). Rate limited per key.

**Parameters**

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `resourceId` | query | string | Yes | The agent id the key is granted. A body agentId must match it (filled from it when omitted). |

**Request body**

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `actingIdentity` | ActingIdentity |  |  |
| `agentId` | string |  | ID id. |
| `callerCanAnswer` | boolean |  |  |
| `combinedInputAsOne` | array of MultimodalInput |  |  |
| `conversationId` | string | Yes |  |
| `conversationLanguage` | string |  |  |
| `environmentVariables` | object |  |  |
| `executionOutputMode` | TEXT \| AUDIO |  |  |
| `input` | array of MultimodalInput | Yes |  |
| `messageType` | VOICE \| MULTIMODAL \| PLAYBACK_COMPLETE |  |  |
| `promptTemplateVariables` | object |  |  |
| `simulation` | boolean |  |  |
| `trustedEnvironmentVariables` | object |  |  |
| `version` | CustomVersion |  |  |

```bash
curl -X POST "https://api.autessa.com/clients/agents/execute?resourceId=V1StGXR8Z5" \
  -H "Authorization: $AUTESSA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"conversationId":"conversation-id","input":[{"inputType":"TEXT"}]}'
```

---

## Close a conversation

**POST** `/clients/agents/execute-close`

Needs ?resourceId=<agent id>; a body agentId must match it (filled from it when omitted).

**Parameters**

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `resourceId` | query | string | Yes | The agent id the key is granted. A body agentId must match it (filled from it when omitted). |

**Request body**

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `agentId` | string |  | ID id. |
| `conversationId` | string | Yes |  |

```bash
curl -X POST "https://api.autessa.com/clients/agents/execute-close?resourceId=V1StGXR8Z5" \
  -H "Authorization: $AUTESSA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"conversationId":"conversation-id"}'
```

---

## Start a conversation

**POST** `/clients/agents/execute-create`

Needs ?resourceId=<agent id>; a body agentId must match it (filled from it when omitted).

**Parameters**

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `resourceId` | query | string | Yes | The agent id the key is granted. A body agentId must match it (filled from it when omitted). |

**Request body**

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `actingCustomAppId` | integer |  |  |
| `actingCustomAppRowId` | integer |  |  |
| `actingIdentity` | ActingIdentity |  |  |
| `actingUserType` | string |  |  |
| `agentId` | string |  | ID id. |
| `apiKeyId` | string |  |  |
| `businessNumber` | string |  |  |
| `channel` | string |  |  |
| `clientMode` | boolean |  |  |
| `companyId` | integer |  |  |
| `otherNumber` | string |  |  |
| `userId` | integer |  |  |
| `version` | CustomVersion |  |  |
| `visitorSessionRef` | string |  |  |

**Response**

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `conversationId` | string |  |  |

```bash
curl -X POST "https://api.autessa.com/clients/agents/execute-create?resourceId=V1StGXR8Z5" \
  -H "Authorization: $AUTESSA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"actingCustomAppId":1}'
```

---

## Generate audio upload link

**POST** `/clients/agents/generate-audio-upload-link`

**Parameters**

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `resourceId` | query | string | Yes | The agent id the key is granted. A body agentId must match it (filled from it when omitted). |

**Response**

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `expiresInSeconds` | integer |  |  |
| `s3Uri` | string |  |  |
| `uploadUrl` | string |  |  |

```bash
curl -X POST "https://api.autessa.com/clients/agents/generate-audio-upload-link?resourceId=V1StGXR8Z5" \
  -H "Authorization: $AUTESSA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '"string"'
```

---

## Generate file upload link

**POST** `/clients/agents/generate-file-upload-link`

**Parameters**

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `resourceId` | query | string | Yes | The agent id the key is granted. A body agentId must match it (filled from it when omitted). |

**Request body**

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `fileExtension` | string |  |  |

**Response**

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `expiresInSeconds` | integer |  |  |
| `mimeType` | string |  |  |
| `s3Uri` | string |  |  |
| `uploadUrl` | string |  |  |

```bash
curl -X POST "https://api.autessa.com/clients/agents/generate-file-upload-link?resourceId=V1StGXR8Z5" \
  -H "Authorization: $AUTESSA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"fileExtension":"string"}'
```

---

## Generate image upload link

**POST** `/clients/agents/generate-image-upload-link`

**Parameters**

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `resourceId` | query | string | Yes | The agent id the key is granted. A body agentId must match it (filled from it when omitted). |

**Request body**

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `fileExtension` | string |  |  |

**Response**

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `expiresInSeconds` | integer |  |  |
| `mimeType` | string |  |  |
| `s3Uri` | string |  |  |
| `uploadUrl` | string |  |  |

```bash
curl -X POST "https://api.autessa.com/clients/agents/generate-image-upload-link?resourceId=V1StGXR8Z5" \
  -H "Authorization: $AUTESSA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"fileExtension":"string"}'
```

---

## Revive conversation

**POST** `/clients/agents/revive-conversation`

**Parameters**

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `resourceId` | query | string | Yes | The agent id the key is granted. A body agentId must match it (filled from it when omitted). |

**Request body**

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `agentId` | string |  | ID id. |
| `conversationId` | string |  |  |

**Response**

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `conversationId` | string |  |  |
| `status` | string |  |  |

```bash
curl -X POST "https://api.autessa.com/clients/agents/revive-conversation?resourceId=V1StGXR8Z5" \
  -H "Authorization: $AUTESSA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"agentId":"V1StGXR8Z5"}'
```

---

## Related

- [API reference overview](/docs/reference.md)
- [Errors and retries](/docs/reference.md#errors)
- [Agents guide](/docs/guide/agentic/agents.md)

