> This page is for version v2.
> For other versions, use one of these documentation indexes:
> - v1 (default): https://doc.youratlas.com/v1/llms.txt
> - v2: https://doc.youratlas.com/v2/llms.txt

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://doc.youratlas.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://doc.youratlas.com/_mcp/server.

# Create a custom action

Use **Custom action** when you want your agent to call your own API and no [template](/v2/integrations/atlas-actions/tool-templates) fits. You set the request, the details the agent collects, and how it signs in.

[Watch on YouTube: Atlas 101 · Set up a webhook](https://www.youtube.com/watch?v=bW0XemIUK9c)

## Open the form

1. Open **Connections** in the sidebar, then the **Actions** tab.
2. Select **New action**.
3. Choose **Custom action** ("Call your own API or webhook."). The window is titled **Create a custom action**.

Two other places open the same form:

* In a job's workflow, the step picker has a **New action** group with **Custom action**.
* On the **External Actions** page, select **Create action**, then **Create from scratch**. That window is titled **Create Custom Action from Scratch** and its button is **Create Custom Action**. See [Tool templates](/v2/integrations/atlas-actions/tool-templates#find-a-template).

## Fill in the basics

Name, URL and Description are required. Without them the form says "Add a name, a URL and a description to create the action."

* **Name.** What you call the action. The agent sees the name with spaces and symbols removed, except `_` and `-`, cut to 64 characters. "Check order status" reaches the agent as `Checkorderstatus`. Pick a name that still reads well that way, such as `CheckOrderStatus`.
* **URL.** The full address of your endpoint, for example `https://example.com/orders`. It must start with `https://`. Atlas rejects IP addresses in private ranges (`10.x.x.x`, `172.16.x.x` to `172.31.x.x`, `192.168.x.x`, `169.254.x.x`) and loopback addresses other than `127.0.0.1`.
* **Description.** Tells the agent when to use the action and what it does. Write it as an instruction: *"Use this to look up the status of an order when the customer gives an order number."*

**Purpose** is optional. Pick a suggestion or type a short label, such as Booking.

## Set how the request goes out

| Setting                     | What it does                                                                                                                                                                                          | Default                                   |
| --------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------- |
| **HTTP Method**             | `GET`, `POST`, `PUT`, `PATCH` or `DELETE`.                                                                                                                                                            | `GET`                                     |
| **Timeout (milliseconds)**  | How long Atlas waits for your system.                                                                                                                                                                 | Field starts at `30`. See the note below. |
| **Async** / **Synchronous** | **Synchronous** (off): the agent waits for your answer. **Async** (on): the agent keeps talking while the request runs. See [Wait or keep talking](/v2/integrations/atlas-actions#wait-or-keep-talking). | **Synchronous**                           |
| **Strict**                  | On: "Enforces strict parameter validation." Off: "Does not enforce strict parameter validation."                                                                                                      | Off                                       |

**Timeout.** The number is milliseconds. Atlas runs any value under `1000` as `30000`, which is 30 seconds. The form limits the field to 1 to 300, so leave the default and the action waits 30 seconds.

### How the details reach your system

The agent sends the parameters it collected. There is no wrapper.

* `GET` puts them in the query string.
* The other methods send a JSON body with one key per parameter.
* If you add a `Content-Type` header of `application/x-www-form-urlencoded`, the body is sent as a form instead. Nested values are sent as JSON text.

### Use a parameter in the URL or a header

Write the parameter name in double curly braces. Atlas fills it in and removes it from the body or query string.

```
https://example.com/orders/{{orderNumber}}
```

Make a parameter named `orderNumber`. Names match without regard to case, and the value is URL-encoded. If the agent has no value for a name in the URL, the call fails before it's sent.

## Parameters

Parameters are the details your agent collects from the conversation. Select **Add Property** for each one.

1. Enter a **Name**. It becomes the key in the request. A name is required: "Parameter name is required".
2. Pick a **Type**: **String**, **Number**, **Boolean**, **Object** or **Array**.
3. Write a **Description**. The agent reads it to decide what to put here. Be specific: *"The customer's order number, digits only."*
4. Turn on **Required** if the agent must have the value before it calls.
5. Optional: set a **Default Value**. When the agent doesn't supply the value, Atlas fills in the default. Use it for fixed settings like a location ID.
6. Optional: for a parameter with no default, turn on **The agent fills this from the conversation**. Use it for details the caller gives during the call, like a name, email or phone number. In agent flows, an optional input that nothing fills is dropped unless this is on. A parameter with a default can't use it, because the server fills the default.
7. For an **Array**, pick the **Array Item Type**.

### Nested parameters

An **Object** can hold other parameters, and so can an **Array** of objects. Select the expand arrow on its row, then **Add nested property**.

Here a `customer` object has `name` and `email`:

```
customer (object, required)
├── name (string, required)
└── email (string, required)
```

The request body:

```json
{
  "customer": {
    "name": "Jane",
    "email": "the email the customer gave"
  }
}
```

## HTTP Headers

Add the headers your endpoint needs, such as an API key or a content type. Select **Add Header**.

* **Key.** The header name. Required. It can't contain spaces, and you can't use the same key twice. `Host`, `Content-Length` and `Transfer-Encoding` are not allowed.
* **Value.** Sent as written on every request. You can use `{{parameterName}}` here too.

For a static API key or bearer token, use a header. For an OAuth connection, use **Authentication** instead.

## Messages

Messages are what your agent says while the action runs, so the caller isn't left in silence. Select **Add Message**, then pick a type:

| Type                    | When the agent says it                          | Extra setting                                                 |
| ----------------------- | ----------------------------------------------- | ------------------------------------------------------------- |
| **On request start**    | When it begins the call to your system.         | None.                                                         |
| **On request complete** | When your system answers.                       | None.                                                         |
| **On response delayed** | When the answer is taking longer than expected. | **Delay before speaking (milliseconds)**, for example `5000`. |
| **On request failed**   | When the call fails.                            | **End the call after this message is spoken**.                |

Each type can be used once. When all four are used the form says "All message types are already in use". **Content** is required. A failed message that ends the call shows an **Ends call** badge.

**Content** is what the agent says. It can be text, or the URL of an audio file such as an `.mp3` to play a recording instead.

If you add no messages, Atlas uses short built-in lines: "One moment." at the start, "A few more seconds." after 5 seconds, and "Sorry, something went wrong." if the call fails.

Message changes reach a live agent once the job is saved.

## Authentication

Under **Authentication**, choose how Atlas signs in to your API:

* **None.** No sign-in. You can still send a static key in **HTTP Headers**.
* **A saved connection.** Pick a saved **OAuth Client Credential Connection** from the list.
* **Create New.** Add a connection and test it without leaving the form.

See [OAuth credentials](/v2/integrations/atlas-actions/oauth-credentials) for the fields and how tokens work.

## Save

Select **Create action**. The action appears on the **Actions** tab under **Connections**, in the **Custom** group. Then put it on a job. See [Put an action on a job](/v2/integrations/atlas-actions/manage-actions#put-an-action-on-a-job).

## Checks Atlas runs

| Check                                                                  | Where it runs        |
| ---------------------------------------------------------------------- | -------------------- |
| Name, URL and Description can't be blank.                              | Form                 |
| The URL must be valid: "Please enter a valid URL".                     | Form                 |
| A header key can't be blank, contain spaces or repeat.                 | Form                 |
| A parameter needs a name.                                              | Form                 |
| A message needs content, and a type can only be used once.             | Form                 |
| The URL must use `https://` and can't point to a private network.      | Atlas, when you save |
| The method must be one of the five listed.                             | Atlas, when you save |
| The timeout can't be negative.                                         | Atlas, when you save |
| Headers can't include `Host`, `Content-Length` or `Transfer-Encoding`. | Atlas, when you save |

## Troubleshooting

* If the save says `CustomTool ServerUrl must use HTTPS protocol for security`, change the URL to start with `https://`.
* If the save says `CustomTool ServerUrl cannot point to private/internal networks`, use a public address. Atlas can't reach private ranges.
* If the save says `CustomTool ServerSettings.Headers cannot include forbidden header: <name>`, remove that header.
* If a call fails with `Tool call missing required path parameter(s) in ServerUrl`, a `{{name}}` in the URL has no matching parameter value. Add a parameter with that name, and mark it **Required**.
* If a call fails with `Tool request failed: <status> <text> - <body>`, your system answered with a non-`2xx` status. The body is your system's reply.
* If a call fails with `Authentication failed`, Atlas couldn't get a token. See [OAuth credentials](/v2/integrations/atlas-actions/oauth-credentials#troubleshooting).
* If the agent never uses the action, check two things: the job's workflow includes it, and the **Description** says when to use it.