# Connect a Custom API to Type.com

> Connect an API that has no ready-made Type.com connector so AI can use it. You need the HTTPS base URL and an API key or OAuth client credentials.

Canonical page: https://docs.type.com/connectors-and-skills/custom-apis/

A Custom API connection lets AI call a service that does not have a ready-made Type.com connector. You need the API's HTTPS base URL and either an API key or OAuth client credentials.

## Before you start

You need:

- **The API's base URL**, such as `https://api.example.com`.
- **A credential:** an API key or access token, or an OAuth client ID, client secret, and token URL.
- **Optional documentation:** a link to the API docs, short notes, or up to 20 `.md` or `.txt` files. Each file must be 1 MB or less.

Only enter credentials in the connection form. Do not put them in Space instructions, skills, or messages.

## Connect a Custom API

1. Open **Connections** in the sidebar, or open **Space settings → Connections**. A connection added from a Space is also added to that Space.
2. Select **Add connection**.
3. Search for **Custom API** ("Connect any API with a key.") and select it. Custom API isn't listed under **Popular** or any category, so search for it.
4. Replace **Custom API** in **Name** with a clear name, such as `Warehouse API`.
5. Enter the **Base URL**. If you omit the scheme, Type.com adds `https://`. An `http://` URL is changed to `https://`.
6. Optional: under **Documentation (optional)**, enter a **Documents URL (optional)**, add an **API description (optional)**, or select **Upload docs** to add `.md` or `.txt` files.
7. Under **Auth method**, choose **API key** or **OAuth**, then complete the fields shown.
8. Under **Who can use this connection?**, choose **Team** ("Share this connection with your team.") or **Personal** ("Only you can use this connection.").
9. Select **Connect Custom API**.

Type.com saves the credential and documentation without testing the API. To check the connection, ask AI for a small piece of data in a Space that can use it.

## Choose an auth method

| Auth method | What you enter | How Type.com authenticates |
| --- | --- | --- |
| **API key** | **API key** | Sends `Authorization: Bearer <key>`. |
| **OAuth** | **Client ID**, **Client secret**, and **Token URL** | Uses the OAuth client credentials flow to request an access token. There is no user sign-in or consent screen. |

The token URL must use HTTPS and be publicly reachable.

If an API needs a user to sign in and approve access, search for that provider under **Add connection**. Some catalog providers offer their own OAuth setup.

## Full and Read-only access

With **Read-only** access, a Custom API connection can make only `GET` requests. Other HTTP methods need **Full** access.

Some APIs use `POST` for read operations. Those requests also need **Full** access because Type.com applies this rule by HTTP method.

## Connect a catalog provider

The connection catalog includes known APIs whose setup fields may already be filled in. Search for the provider under **Add connection**, select it, and complete the form shown.

A catalog provider can ask for:

- one or more credential fields;
- an account-specific value, such as a subdomain or account ID;
- a choice between supported authentication methods under **Auth method**.

The available fields and authentication methods depend on the provider. After you connect, AI can ask for more details it needs, such as an account ID or region. The thread then shows an **Input needed** card; select **Provide details** to fill them in.

### Use your own OAuth app

Some catalog providers let you connect an OAuth app you own. This setup is available in the web app. If you open it in the desktop app, Type.com asks you to open the workspace in a browser.

1. In your provider's developer settings, register the **OAuth redirect URL** shown in the form. Use the copy button to copy it exactly.
2. Enter your app's **Client ID** and **Client secret**. Some providers use different names for these fields.
3. Check **API base URL**, **Authorization URL**, **Token URL**, and **Scopes (optional)**. Values the catalog already knows are filled in for you.
4. Select **Connect [provider]**, then approve access on the provider's consent screen.

## Give AI the right API docs

Use any combination of:

- **Documents URL (optional)** when you create the connection. When editing, this field is named **Docs URL**.
- **API description (optional)** for short instructions, such as which endpoints to use.
- **Upload docs** to add up to 20 `.md` or `.txt` files of 1 MB or less each.

Catalog provider forms that ask only for an API key don't show documentation fields. On other catalog provider forms, the **Documentation (optional)** section starts collapsed. Expand it to add documentation.

## Edit a Custom API connection

If you can manage the connection, open it from **Connections**, select **Edit details**, make your changes, and select **Save details**.

To replace the saved credential, enter it in **New secret key (optional)**. Leave the field empty to keep the current credential. If the connection has several credential fields, each field is shown separately: enter every field, or leave all of them empty.

### Switch between Personal and Team

If **Who can use this connection?** is editable, you can switch the connection between **Personal** and **Team**:

- Only the owner of a Personal connection can switch it to **Team**.
- Workspace owners, workspace admins, and the person who created a Team connection can switch it to **Personal**.

Switching isn't possible when:

- the connection holds more than one credential, such as personal credentials from several people;
- the connection was set up in a way that doesn't support switching. Type.com then says "Create a new connection to choose a different account scope.";
- another matching connection already uses the target type.

If you can't switch, create a new connection and choose the type you need.

## Connect from the type.com CLI

The Type CLI can prepare a Custom API connection, then open a Type.com form to collect its credential. It can also read a credential from a password manager through a pipe.

After creating the connection, run the verification command returned by the CLI. Its form is:

```sh
type-cli integrations verify <attempt-id>
```

See [Connect and use a Custom API](https://docs.type.com/reference/type-cli/index.md#connect-and-use-a-custom-api).

## Troubleshoot a Custom API

| What you see | What to do |
| --- | --- |
| **Connect Custom API** stays disabled | Fill in **Name**, **Base URL**, and every required credential field. |
| "Base URL must use HTTPS", "Base URL must include a host", or "Enter a valid API base URL" | Use a public address such as `https://api.example.com`. |
| "The base URL points to a private network. Use a publicly accessible address." (or the same message about the token URL or documentation URL) | Use the API's public address. Local and private-network addresses are not supported. |
| "Replace placeholders in the Base URL before saving." | Replace values such as `{subdomain}` before you save. |
| "Use an HTTPS docs URL." | Use an `https://` documentation link or leave the field empty. |
| A documentation upload is rejected | Upload only `.md` or `.txt` files, keep each file at or below 1 MB, and upload no more than 20 files. |
| "Enter every credential field, or leave them all blank to keep the saved credential." | When editing a multi-field credential, complete every credential field or leave all of them empty. |
| A message says catalog OAuth setup is available only in the web app | Open the workspace in a browser and try again. |
| AI says it needs Full access | Ask a workspace admin or someone who manages the connection to grant **Full** access. |
| "A connection manager needs to finish setting up this team connection." | Ask someone who manages the connection to finish its setup. |

## Frequently asked questions

**Does Type.com test a Custom API when I save it?**
No. It saves the credential and documentation without calling the API.

**How does Type.com send an API key?**
A Custom API created with the connection form sends it as `Authorization: Bearer <key>`. Catalog providers and CLI-created connections can use other authentication headers.

**Can I connect an API that requires a sign-in and consent screen?**
Not with the plain Custom API form. Search the catalog for a provider-specific OAuth option.

**Can automations use a Custom API?**
Yes. Code automations can call Custom API connections when the connection is available in the automation's Space. Requests other than `GET` need **Full** access. See [Call integrations](https://docs.type.com/automations/call-integrations/index.md).
