> 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.

# Import actions from an OpenAPI spec

If your API has an [OpenAPI](https://www.openapis.org/) (Swagger) spec, Atlas reads it and drafts an action for each endpoint, with the URL, method, parameters and a description filled in. You pick which ones to keep. Use it when you want several endpoints available to your agent without filling in a form for each.

## Import a spec

1. Open the **External Actions** page. The sidebar doesn't list it. Open it from the **Open Global Actions** link below the action list on an action step in a job's workflow.
2. On the **Atlas Actions** tab, select **Create action**, then **Import from OpenAPI spec**.
3. Choose how to give Atlas the spec:
   * **Spec URL.** Enter the address of your `openapi.json` or `openapi.yaml`, for example `https://api.example.com/openapi.json`. Atlas fetches it, and waits up to 30 seconds. The address has to be reachable from the internet.
   * **Paste JSON.** Paste the spec into the **OpenAPI JSON** box. YAML works too.
4. Select **Generate actions**.

The spec needs an `openapi` or `swagger` field and at least one path. Generating takes longer for a large spec.

## Pick what to import

Atlas shows a preview: "N actions generated from spec. Review and confirm to import."

* Each row is one action, with its method, name, description and URL.
* Every row starts selected. Select a row to turn it off or on.
* **Select all** and **Deselect all** flip them together. A counter shows how many are selected, as "N of M selected".
* **Back** returns to the spec box.

Select **Import N actions**. They appear on **Connections**, on the **Actions** tab, in the **Custom** group.

## What Atlas writes for each endpoint

| Part                   | What Atlas drafts                                                                                                                                 |
| ---------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Name**               | A short, readable name such as "Get User by ID", not the raw operation ID.                                                                        |
| **Description**        | What the action does, when to use it and what it returns. Drawn from the spec's summary, description and responses.                               |
| **URL**                | The server address from your spec plus the path.                                                                                                  |
| **HTTP Method**        | `GET`, `POST`, `PUT` or `DELETE`, from the operation.                                                                                             |
| **Parameters**         | Path, query and body parameters with types and descriptions. A whole number becomes a **Number**.                                                 |
| **Authentication**     | If the operation needs sign-in, Atlas may name a connection for it. It does not create the connection. See [After you import](#after-you-import). |
| **Messages**           | Three spoken lines: a start line, a "still working" line after 5 seconds (`5000` ms), and a failure line that doesn't end the call.               |
| **Usage instructions** | Rules for the agent on when and how to use the action. The action form doesn't show them.                                                         |

Atlas handles each path in the spec on its own. If it can't draft an action for one path, it skips that path and the rest still come through.

## After you import

* **Read each description.** Descriptions drawn from a spec often need a rewrite so the agent knows when to use the action. See [Create a custom action](/v2/integrations/atlas-actions/create-a-custom-action#parameters).
* **Set up sign-in.** If an endpoint needs authentication, open the action. Under **Authentication**, pick a saved connection, or add a header yourself. See [OAuth credentials](/v2/integrations/atlas-actions/oauth-credentials).
* **Put the actions on a job.** See [Put an action on a job](/v2/integrations/atlas-actions/manage-actions#put-an-action-on-a-job).

Importing again adds new actions. It doesn't change or replace the ones you already have. To avoid doubles, delete the old ones first.

## Troubleshooting

If the form shows one of these messages, do the fix next to it.

| Message                                                                        | Fix                                                                                                                                                                                                                                                         |
| ------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `Please provide a value.`                                                      | Enter a URL or paste a spec.                                                                                                                                                                                                                                |
| `OpenAPI spec must be valid JSON or YAML format`                               | Check the pasted text parses as JSON or YAML.                                                                                                                                                                                                               |
| `Invalid OpenAPI spec: missing "openapi" or "swagger" field`                   | Add the `openapi` or `swagger` version field at the top.                                                                                                                                                                                                    |
| `Invalid OpenAPI spec: missing or invalid "paths" field` or `no paths defined` | Add at least one path.                                                                                                                                                                                                                                      |
| `Failed to fetch OpenAPI spec from URL: ...`                                   | Open the URL in a browser from outside your network. Atlas must be able to fetch it within 30 seconds. Or paste the spec instead.                                                                                                                           |
| `Failed to create actions:` followed by a list                                 | Atlas drafted the actions but couldn't save them. Each line gives the reason. For example, Atlas refuses a server URL that doesn't start with `https://`. See [Create a custom action](/v2/integrations/atlas-actions/create-a-custom-action#troubleshooting). |

If the list is shorter than you expect, check the spec for the missing endpoint. Atlas skipped that path.

If some actions fail to import, the window closes and keeps the ones that worked. Check the **Actions** tab under **Connections** for what's missing. If every one fails, the window stays open and lists each with its reason.