Export Mammoth data to a REST API or any API
The REST API Export pushes a View's data to any HTTP endpoint after every pipeline run, as a POST, PUT, or PATCH request. For an API Mammoth has no built-in destination for, Somewhere else… has the AI Agent set the export up. Both are cards on Export → External Destinations: REST API needs Team or Pro, and Somewhere else… is available on Enterprise plans.
Push data to a REST API
| Field | What to enter |
|---|---|
| Base URL | For example https://api.example.com/v1 |
| Authentication | None; API Key (Key Name, the header name such as X-API-Key, and Key Value); Bearer (Bearer Token); Basic (Username and Password); or OAuth 2.0 (Client ID, Client Secret, Authorization URL and Token URL) |
| Endpoint path | For example /v1/records |
| HTTP method | POST, PUT, or PATCH |
| Wrap path (optional) | Wraps the row data under this key in the request body; pre-filled with records |
| Batch size | Rows per request (default: 1,000, maximum 10,000) |
| Advanced Settings | Timeout (sec) (default: 30) and Verify SSL Certificate (on by default; turn off only for endpoints with self-signed certificates) |
How Mammoth sends:
- It refuses a URL that resolves to a private or reserved IP address, so the endpoint must be publicly reachable.
- It retries up to 3 times on a 5xx error, and up to 5 times on a 429 (rate limited) response.
- OAuth 2.0 uses the authorization-code flow.
Fill the REST API form from the API's docs
The Fill from API docs box at the top of the form reads an API's documentation and fills the form. It never fills in keys or passwords: you add those.
- Paste a link in Link to the API docs, such as
https://developer.example.com/api. - Optionally fill in What are you sending? (optional), for example "orders, one per row".
- Click Fill the form. Reading the docs can take a minute.
- Check the result. It says how many fields it filled and from which site, lists them, what You'll need (such as a key) and anything to Check before you apply, and links the pages it Read:.
- Add your credentials, then click Apply. Undo puts the form back as it was.
Send data anywhere with the AI Agent (Somewhere else…)
The last card on External Destinations, Somewhere else… ("Describe it, and the agent sets it up"), opens the AI Agent in the export panel under Send this view anywhere.
- Describe where the View should go, or paste a link to the API's docs. Suggestions such as "Post rows to a webhook as NDJSON" help you start.
- The Agent reads the docs and shows exactly what it will send.
- Approve it. It saves an export step: "Saved as an export step on this view. It runs now and whenever the view updates."
The task card shows the destination's name, format, URL and last run, for example "Last run: 12,480 delivered" or "Stopped at batch 2 of 25: 500 delivered, 20 rejected, 480 not sent". To change a saved one, open it and describe the change under Fix or change this export.
The card hides while the workspace has agents turned off, or has blocked sending data out of Mammoth. See AI Agent access.
Limit which hosts custom destinations can reach
A workspace can limit where Somewhere else… destinations send data; other export types aren't affected. Workspace Owners can change it, or anyone whose workspace role includes Modify name, logo, etc.. The section is hidden for everyone else.
- Open Settings, then Workspace.
- In Export destinations, turn on Only allow approved hosts.
- Type a hostname such as
api.example.comand click Add. Repeat for each host. - Click Save.
| Setting | What it does |
|---|---|
| Only allow approved hosts off (default) | A custom destination can send to any host the person approves on the Agent's card |
| Only allow approved hosts on | A custom destination that reaches any other host can't be saved, and a saved one stops at its next run |
Use exact hostnames only: no wildcards, ports or paths. They are stored in lowercase. If saved exports already send to a host missing from the list, the page names those hosts and warns that they stop at their next run.
Limits
| Item | Limit |
|---|---|
| REST API batch size | 1,000 rows by default, 10,000 maximum |
| REST API retries | 3 for a 5xx error, 5 for a 429 |
| Approved hosts | 100 |
Troubleshooting API exports
| Symptom or message | Cause | Fix |
|---|---|---|
| "Couldn't read those docs. Check the link, or fill the form in." | Mammoth couldn't read the docs link | Check the link, or fill the form in by hand |
| "The REST API export can't send to this API:" and a reason | The API needs something a fixed REST export can't do (for example, something different per record) | Click Fill the form anyway, Try another link, or (Enterprise) Set it up with Somewhere else… |
| The export can't reach the endpoint | The URL resolves to a private or reserved IP address | Use a publicly reachable endpoint |
| "With no approved hosts, every custom destination in this workspace stops sending at its next run." | The switch is on with no hosts | Add hosts, or turn the switch off |
| A custom destination stopped at its next run | Only allow approved hosts is on and its host isn't listed | Add the host in Settings → Workspace → Export destinations |
Related
- Set up an export: plans, when it runs and send only new rows.
- Export to files and apps: file and app destinations.
- See when an export runs: run history and failure emails.
- AI Agent access: turning agents off for a workspace.
Something wrong? support@mammoth.io