# API Reference

Use Liberty APIs to connect external systems with messages, call recordings, and To Dos in your account.

This page covers shared setup, integration context, and where each API fits operationally.

Use the endpoint pages for request bodies, response schemas, examples, and field-level details.

### Base URL

Send requests to your Liberty subdomain.

```http
https://{subdomain}.kauneonga.com
```

If you are unsure of your subdomain, contact support.

### Authentication

Liberty uses bearer token authentication.

Generate API tokens from your user profile under **Application Keys**.

Use API tokens for internal integrations, reporting workflows, and system-to-system access.

You can create new tokens, review active tokens, and revoke tokens that are no longer needed.

If you manage more than one integration, use separate tokens so rotation and revocation stay easier to manage.

#### Request headers

```http
Accept: application/json
Content-Type: application/json
Authorization: Bearer {AUTH_TOKEN}
```

### What the APIs cover

#### Messages

Use the Messages API when another system needs message history, message status, or message-level actions.

This is the main API for retrieving message records and syncing message state.

Related pages:

* [Messages](/docs/api-reference/user-portal-apis/messages.md)
* [List Messages](/docs/api-reference/user-portal-apis/messages/list-messages.md)
* [Get a Message](/docs/api-reference/user-portal-apis/messages/get-a-message.md)
* [Update a Message](/docs/api-reference/user-portal-apis/messages/update-a-message.md)

#### Call Recordings

Use the Call Recordings API when you need audio files and call detail data for QA, compliance review, dispute research, or archival workflows.

Call recordings are retained for up to 31 days.

Related pages:

* [Call Recordings](/docs/api-reference/user-portal-apis/call-recordings.md)
* [List Call Recordings](/docs/api-reference/user-portal-apis/call-recordings/list-call-recordings.md)
* [Get a Call Recording](/docs/api-reference/user-portal-apis/call-recordings/get-a-call-recording.md)

#### To Dos

Use the To Dos API to create and retrieve scheduled outbound tasks across SMS, email, and call workflows.

This supports reminder programs, follow-up workflows, and recurring outbound communication.

Related pages:

* [List To Dos](/docs/api-reference/user-portal-apis/to-dos/list-to-dos.md)
* [Create a To Do](/docs/api-reference/user-portal-apis/to-dos/create-a-to-do.md)

### Shared API behavior

Liberty APIs use REST endpoints and return JSON responses.

Requests are stateless and authenticated with bearer tokens.

Most integrations follow this pattern:

1. generate a token in Liberty
2. send authenticated requests to your Liberty subdomain
3. store or process the returned data in your internal system

### Endpoints at a glance

#### Messages

```http
GET /api/v2/messages
GET /api/v2/messages/{id}
```

#### Call Recordings

```http
GET /api/v2/call-recordings
GET /api/v2/call-recordings/{id}
```

#### To Dos

```http
GET /api/v2/to-dos
POST /api/v2/to-dos
```

Supported delivery types:

* `sms`
* `email`
* `call`

### Error responses

| Code  | Description                  |
| ----- | ---------------------------- |
| `401` | Unauthorized                 |
| `422` | Missing or invalid parameter |
| `400` | Processing error             |

Log both the status code and response body in your integration.

That makes token, validation, and payload issues much easier to troubleshoot.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://www.kauneonga.com/docs/api-reference/user-portal-apis/api-reference.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
