Import data from any REST API into Mammoth
The REST API connector brings data from any REST API into Mammoth: you describe the data, and Mammoth's agent reads the API's documentation, connects with your key and lists the endpoints it can read. You pick the columns and save them as a dataset. Start it from Data Library > New dataset > Connectors. Use it for SaaS tools without a built-in connector, internal services and public APIs. Project Admins create the connection; Project Editors can start datasets from a connection the project already has.
What you can bring in from a REST API
You can bring in records from any endpoint your key can read, with nested JSON flattened into columns. That covers the API sources the agent already knows, which the launcher lists by category, including APIs and Education (each is built the same way), and any API Mammoth doesn't list, from its name or URL. The dataset can refresh daily or only when you ask.
Before you start, you need the name or base URL of the API (for example https://api.example.com) and, if the API requires them, credentials: an API key, a bearer token, a username and password, or an OAuth 2.0 app's client ID and secret.
Start a REST API connector with the agent
- In the Data Library, click New dataset, then choose Connectors.
- Start the connector in one of these ways:
- Click APIs in the left menu and pick the service, if it's listed.
- Type the service name or what you need (for example, "open GitHub issues for our repo") and pick the Build ... with the agent result, such as Build Open-Meteo weather with the agent.
- Paste the API's URL and pick It's an API: build it with the agent.
- The connector workspace opens with the chat (see Connect a database or app).

Connect to the API in the chat
- In the chat, describe what you want in the table, or answer the agent's questions about the API.
- When the agent needs a key, it shows a card that asks for it. Fill it in and connect. For an API that uses an OAuth sign-in, the card has a button that takes you to the provider to approve access.
- The agent tests the key and shows what it can see.
Pick API endpoints and columns
- The Tables list fills with the API's endpoints as the agent finds them. Each shows whether Mammoth could read it, for example Returned rows or 403: this key can't read it (see table statuses).
- Click an endpoint to see its columns and sample rows, and tick the columns you want. They gather in Your table.
- Ask the chat for anything missing, for example a field from another endpoint.
- Click Preview 100 rows to check the result.
Save REST API data as a dataset
- Click Save as dataset.
- Enter a Dataset name and choose a folder under Save in.
- Under Keep it up to date, choose Daily or Manual.
- Click Save.
Choosing Daily creates a Dataset Refresh automation.
Reference: the classic REST API form
The field-based REST API - New Connection form belongs to the older connector dialog. New connectors are built in the connector workspace, so you only meet this form where the older dialog still opens: for example, after returning from some sign-ins, Classic form switches the older AI chat to it.
Basic settings
| Field | What it does | Example |
|---|---|---|
| Base URL | The root URL for all requests; endpoint paths are added to it | https://api.example.com/v2 |
| Display Name | A label for this connection. Defaults to the Base URL if left blank | Example API |
Choose an API authentication type
| Auth type | When to use it | Fields required |
|---|---|---|
| No Authentication | Public APIs with no sign-in | None |
| API Key | APIs that accept a key in a header or query parameter | Key Name and Key Value (Param Name and Param Value for a query parameter); choose Header or Query Parameter |
| Bearer Token | APIs that use Authorization: Bearer <token> | Bearer Token |
| Basic Auth | APIs that use HTTP Basic authentication | Username and Password |
| OAuth 2.0 Authorization Code | APIs that need a full OAuth 2.0 login | Client ID, Client Secret, Authorization URL, Token URL, and optional Scopes |
| OAuth 2.0 Client Credentials | Server-to-server APIs that issue a client ID and secret | Client ID, Client Secret, Token URL, and optional Scopes |
For an API key, Header sends it as a request header (for example X-API-Key: your-key-here); Query Parameter adds it to the URL (for example ?api_key=your-key-here).
OAuth 2.0 Authorization Code adds three fields under Advanced Settings: Redirect URI (defaults to https://redirect.mammoth.io/redirect/oauth2 if left blank), Client Auth Method (Client Secret POST or Client Secret Basic), and Use PKCE (Proof Key for Code Exchange), a toggle for providers that require or support PKCE. With this auth type, Connect sends you to the provider's login page in the same browser tab, not straight to saving. OAuth 2.0 Client Credentials has no browser sign-in: Mammoth requests the access token from the Token URL.
Advanced settings
| Setting | What it does | Default |
|---|---|---|
| Timeout (sec) | How long Mammoth waits for a response before timing out | 30 |
| Rate Limit (req/s) | The most requests per second to send, to stay under API rate limits | Unlimited |
| Verify SSL Certificate | Checks the server's SSL certificate | On |
Click Connect to save the connection, or to start the OAuth redirect for OAuth 2.0 Authorization Code. If saving fails, the error appears at the bottom of the dialog.
Configure the endpoint
In the classic form, the Endpoint Configuration screen sets the endpoint to import from.
| Field | What it does | Example |
|---|---|---|
| Endpoint Path | The path added to your base URL | /users or /reports/daily |
| HTTP Method | The request method | GET (default) or POST |
| Request Body | JSON body for POST requests | {"start": "2024-01-01"} |
As you type the endpoint path, a callout shows the full URL (base URL plus endpoint path).
Set the data root path
The Data Root Path tells Mammoth where the array of records sits in the JSON response; most APIs wrap their data in an outer object.
| Response structure | Data Root Path |
|---|---|
Top-level array: [{...}, {...}] | $ (default) |
Nested: {"data": [{...}, {...}]} | $.data |
Deeply nested: {"result": {"items": [...]}} | $.result.items |
After you test the endpoint, Mammoth suggests root paths from the real response. Click a suggestion to apply it.
The Flatten Nested JSON toggle (on by default) turns nested objects into flat columns with dot notation. For example, {"address": {"city": "NYC"}} becomes a column named address.city.
Set up API pagination
If the API returns data across several pages, set pagination so Mammoth fetches every record:
| Type | Use when | Required settings |
|---|---|---|
| No Pagination | The API returns all data in one response | None |
| Offset | The API uses limit and offset query parameters | Page Size (default 100) |
| Cursor | The API returns a cursor token for the next page | Cursor Path (where the next cursor sits in the response) |
| Page # | The API uses a page query parameter | Page Size (default 100) |
| Link | The API returns pagination links in the Link HTTP header (RFC 5988) | None |
Advanced options sets Limit Param and Offset Param (for non-standard names, such as count instead of limit), Cursor Param and Page Param (the query parameter names for the cursor and page number), and Max Pages (stop after this many pages, which helps while testing; leave it empty to fetch all pages).
Test and save in the classic form
- Click Test to run a sample request. Mammoth shows the HTTP status code, a success or error message, and Suggested data paths you can click to use as the Data Root Path.
- Name the dataset and choose its update method.
- Click Save as dataset.
REST API configuration examples
| Setting | Public API, no authentication | SaaS API, bearer token, cursor pagination | Internal API, API key header, offset pagination |
|---|---|---|---|
| Base URL | https://api.open-meteo.com | https://api.example.com/v2 | https://internal.mycompany.com/api |
| Auth | None | Bearer: your-token-here | API Key → Header → X-API-Key: secret-key |
| Endpoint Path | /v1/forecast?latitude=40.71&longitude=-74.01&hourly=temperature_2m | /events | /records |
| Data Root Path | $.hourly | $.data | $.results |
| Pagination | No Pagination | Cursor, cursor path: $.next_cursor | Offset, page size: 500 |
Troubleshoot REST API connections
An endpoint shows 403 or 404 in the Tables list
403: this key can't read it means your key has no access to that endpoint: give the key access in the API's own settings, or ask the agent to try another endpoint. 404: not found means the address is wrong. Click Refresh list. If an admin must grant access, click Copy a note for your admin.
An endpoint needs more information
A status such as Needs your repository name to read it means the endpoint needs a value, such as an ID, before it returns rows. Tell the agent in the chat, or answer its question.
Other REST API problems
| Symptom | Likely cause | Fix |
|---|---|---|
| Test returns 401 or 403 | Wrong auth type or credentials | Check the authentication type and credentials. For API Key, check whether the key goes in a Header or Query Parameter in the API's documentation. |
| The request times out | The API is slow, or not reachable from the internet | Increase Timeout (sec) in Advanced Settings. Check the Base URL is reachable; some internal APIs need a VPN or IP whitelisting. |
| Data root path not found | The path doesn't match the response | Use the suggested paths shown after a successful test, or check the raw JSON in the API documentation or a tool like Postman |
| Only part of the data is imported | Pagination parameter names don't match | Under Pagination, click Advanced options and match the parameter names. Set Max Pages to a small number, such as 5, to check pagination before a full import. |
| SSL certificate error | An internal API uses a self-signed certificate | Turn off Verify SSL Certificate in Advanced Settings |
Related
- Connect a database or app: the shared connector workspace steps.
- Receive data by webhook: let a system push data to Mammoth instead.
- Allow Mammoth through your firewall: open an internal API to Mammoth.
- Manage saved connections: reuse, edit or delete this connection.
Something wrong? support@mammoth.io