> ## Documentation Index
> Fetch the complete documentation index at: https://docs.clarityq.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Connecting an API

> Connect any system that has a REST API to ClarityQ as an app, using its OpenAPI spec.

If a system has a REST API, an Admin can connect it to ClarityQ as an **App**, even when it has no MCP server. ClarityQ reads the system's OpenAPI spec and can then call the actions the spec lists: look things up, and create or change things if you allow it.

Apps connected this way show up for your team next to MCP apps. See [Using Apps](https://docs.clarityq.ai/integrations/mcp/using-mcp-servers.md).

## Before You Start

* Admin rights in your ClarityQ organization.
* The system's **OpenAPI spec** (OpenAPI or Swagger), as a `.json`, `.yaml` or `.yml` file up to 5 MB, or a URL to it.
* The address of the API. It must be a public address. ClarityQ can't call a private or local address.
* A way to sign in: an API key, a token, a username and password, or an OAuth app registered in that system.

## Add an API App

Open **Organization Settings → Apps → API** and click **Add app**. The form has three parts.

### Details

* **Name.** What your team sees in chat and in Apps. It must be unique in your organization.
* **Address.** Where the system's API lives, for example `https://api.example.com`. ClarityQ sends every call here and nowhere else. The app's picture comes from this address.
* **Description.** Optional. ClarityQ reads it to decide when to use the app, so say what the system holds and what it is for.
* **OpenAPI spec.** Choose **Upload a file** or **From a URL**. After ClarityQ checks it, the form shows how many actions it found. Each operation in the spec becomes one action.

### Access

Choose how ClarityQ signs in under **Authentication**:

| Authentication | What you fill in | Who ClarityQ acts as |
| - | - | - |
| **API key** | Where the key is sent (**In a header** or **In a URL parameter**), the header or parameter name, and the key | The organization |
| **Bearer token** | The token | The organization |
| **Username and password** | A username and a password | The organization |
| **OAuth app** | Client ID, Client secret, Token URL, and optional scopes. ClarityQ gets a token with the app's own credentials. No one signs in | The organization |
| **OAuth sign-in** | Client ID, Client secret, Authorize URL, Token URL, and optional scopes. Copy the **Redirect address** from the form into the OAuth app in the other system | Each user |

With **OAuth sign-in**, each user clicks **Connect** in Apps and approves in the other system, and ClarityQ acts as that person. With every other type, one credential is shared and everyone in your organization acts through it.

For a shared credential you can set **Expires on**. ClarityQ stops using the credential on that date, and users see the app as **Not available** until an Admin updates it.

### Test

**Test request** is a read call ClarityQ makes to check the connection, written as a path such as `/v1/items?limit=1`. Leave it empty and ClarityQ picks one from the spec.

* With a shared credential, click **Test and turn on**. ClarityQ makes the call now. If the system refuses the credential or can't be reached, the form tells you and nothing is saved.
* With **OAuth sign-in**, click **Save and turn on**. The test runs with each user's own account when they connect.

After the app is saved, the **What ClarityQ may do** dialog opens. A new app runs reads without asking, and asks the user before every change. See [What ClarityQ May Do](https://docs.clarityq.ai/integrations/apps/what-clarityq-may-do.md).

## Reads and Changes

ClarityQ sorts the actions of an API by their HTTP method:

* `GET` and `HEAD` are **Read**. They look things up. Nothing changes in your system.
* `POST`, `PUT`, `PATCH` and `DELETE` are **Change**.

ClarityQ reads up to 500 actions from a spec.

## Manage an API App

Each app in the list has an on/off switch and a **⋯** menu:

* **Edit.** Change the details, the spec, or the sign-in. Saved secrets show masked. Leave one as it is to keep it, or click the edit icon to type a new one.
* **What ClarityQ may do.** Change what the app may read and change.
* **Remove.** Removes the app for everyone and deletes its stored credentials.

If the system starts refusing a shared credential, the app's row says so and shows **Update token**.

> [!NOTE]
>
> API apps can be used in chats and by [workflow agents](https://docs.clarityq.ai/automations/workflows-and-agents.md). They can't be added to [scheduled tasks](https://docs.clarityq.ai/automations/creating-and-scheduling-tasks.md#apps-in-tasks).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.