REST API
Over REST you call your own endpoints: jobs your AI did once in your Cloud Browser, saved with Custom API. There are no ready endpoints per app.
Introduction
Every endpoint is one you built with Custom API: in the console builder or by your AI over MCP. It lives under https://cotlet.dev/api/v1/custom, takes a JSON body and answers JSON.
POST https://cotlet.dev/api/v1/custom/{name} call an endpoint
GET https://cotlet.dev/api/v1/custom/runs/{run_id} result of a call that answered 202
GET https://cotlet.dev/api/v1/custom your endpoints with their schemas
GET https://cotlet.dev/api/v1/custom/openapi.json your endpoints as OpenAPI 3.1 A per-app path such as https://cotlet.dev/api/v1/skool/... answers 501 NOT_AVAILABLE and runs nothing. Its body links to the builder (custom_api_url).
Authentication
Send your API key as a bearer token on every call. X-API-Key works too, for tools that cannot set an Authorization header. Without a key every route answers 401 api_key_required.
Authorization: Bearer COTLET_API_KEY
Content-Type: application/json Making a call
Call an endpoint with POST and its input as the JSON body. The body is checked against the endpoint's input schema before anything runs. Other methods answer 405 with Allow: POST.
curl -X POST https://cotlet.dev/api/v1/custom/recent_bookings \
-H "Authorization: Bearer $COTLET_API_KEY" \
-H "Content-Type: application/json" \
-d '{"date": "2026-11-20", "limit": 2}' Names are 2 to 40 lowercase letters, digits or underscores, unique in your workspace; runs and openapi are reserved.
Responses
An answer within 30 seconds comes in the same request: 200 with the run id and data, in the shape of the endpoint's output schema.
{
"run_id": "6f1c2b7e-90d4-4a51-8c3e-2b7d5f0a9e14",
"data": {
"bookings": [
{ "id": "bk_4821", "starts_at": "2026-11-20T09:30:00Z", "client": "Ana Lopez" }
]
}
} A call still running after 30 seconds answers 202 with a status_url, also sent as the Location header. Poll it with GET; Retry-After says how long to wait. A call stops at 90 seconds.
{"run_id": "6f1c2b7e-90d4-4a51-8c3e-2b7d5f0a9e14", "status": "running", "status_url": "https://cotlet.dev/api/v1/custom/runs/6f1c2b7e-90d4-4a51-8c3e-2b7d5f0a9e14"}
GET https://cotlet.dev/api/v1/custom/runs/6f1c2b7e-90d4-4a51-8c3e-2b7d5f0a9e14
{"run_id": "6f1c2b7e-90d4-4a51-8c3e-2b7d5f0a9e14", "status": "succeeded", "data": { ... }} A run's status is running, succeeded, failed (with the error fields below) or expired: input and answer are kept 24 hours, then cleared. Only your workspace's runs answer; any other id is 404.
Listing your endpoints
GET /api/v1/custom returns your endpoints, newest first: name, description, method, URL, input and output schema, status (active, needs_consent, broken or off) and whether it writes. GET /api/v1/custom/openapi.json gives the same as OpenAPI 3.1, for Postman, code generators and your agent.
curl https://cotlet.dev/api/v1/custom/openapi.json -H "Authorization: Bearer $COTLET_API_KEY" Writes and consent
An endpoint that changes data in the app needs your consent first: a dry run shows each request it would send (method, URL, body), and you allow them in the console at https://cotlet.dev/app/custom-api. Until then calls answer 409 NEEDS_CONSENT. Writes have a daily cap per endpoint, 20 by default and up to 200. A read-only key cannot call an endpoint that writes.
Errors
Errors return JSON with error, an upper-case code, a message, next_steps and the link that fixes the problem. A refused or failed call costs nothing.
{
"error": "auth_required",
"code": "AUTH_REQUIRED",
"message": "The owner is not signed in to example.com in their Cotlet Web browser.",
"next_steps": ["Nothing was charged. Ask the owner to sign in to the app at browser_url, then make the same call again."],
"browser_url": "https://cotlet.dev/app/browser/web?url=https%3A%2F%2Fexample.com"
} | Status | Code | What happened | What to do |
|---|---|---|---|
| 400 | INVALID_INPUT | The body does not fit the input schema. | Fix the JSON body; GET /api/v1/custom lists the schema. |
| 401 | api_key_required, invalid_api_key | No key, or the key is unknown, expired or revoked. | Send Authorization: Bearer with a valid key. |
| 402 | INSUFFICIENT_CREDITS | Your credits cannot pay this call: the free trial ended or the credits are used up. | Buy a credit pack in the console (Billing). The answer links pricing_url, the plans page. |
| 403 | AUTH_REQUIRED | You are not signed in to the app in your Cloud Browser. | Sign in at the browser_url, then call again. |
| 403 | SCOPE_DENIED | A read-only key called an endpoint that writes. | Use a key with Read and write (keys_url). |
| 403 | HOST_BLOCKED | Cotlet sends no requests to this site. | Endpoints cannot reach it. |
| 404 | UNKNOWN_ENDPOINT | No endpoint with this name in your workspace. | List them at endpoints_url. |
| 409 | NEEDS_CONSENT, ENDPOINT_OFF | Writes are not allowed yet, or you turned the endpoint off. | Allow the writes or turn it on at custom_api_url. |
| 429 | RATE_LIMITED, WRITE_CAP_REACHED | Over 60 calls a minute or 5 at once per key, or the daily write cap is used up. | Wait, then call again; raise the cap at custom_api_url. |
| 502 | ENDPOINT_FAILED, OUTPUT_MISMATCH | The run failed, or its answer does not fit the output schema. | If the app changed, rebuild the endpoint at custom_api_url. |
| 503 | ENDPOINT_BROKEN | The endpoint failed 3 times in a row and is off. | Save a new version in the builder; calls work again then. |
| 504 | TIMEOUT | The call did not finish in 90 seconds. | For an endpoint that writes, check the app before calling again. |
We never sign in for you or skip two-factor checks. When the app needs you, the error carries a browser_url to your Cloud Browser (also sent as connect_url, the older name).
Reporting a problem
Send bugs, errors and missing features straight to us with your key. Same fields as the MCP tool cotlet_report_issue (MCP docs).
POST https://cotlet.dev/api/v1/reports
Authorization: Bearer COTLET_API_KEY
{
"kind": "error",
"title": "recent_bookings fails with ENDPOINT_FAILED",
"description": "Three calls in a row since 14:00, the page loads fine in my Cloud Browser.",
"tool": "recent_bookings"
} kind is one of bug, error, feature_request, missing_feature or other. The answer is 201 with a report_id.
Rate limits
| What | Limit |
|---|---|
| Calls to your endpoints | 60 a minute and 5 at once per key |
| Listing endpoints, runs and OpenAPI | 120 a minute per IP |
| MCP messages | 120 a minute per key |
| Problem reports | 20 an hour per account |
Over the limit you get 429 with a Retry-After header.
Discovery
These routes need no key. Agents use them to find an app and its MCP operations before the first call.
| Route | Returns |
|---|---|
GET /api/v1/apps | Every app in the catalog with its links. |
GET /api/v1/apps/{app} | One app: what it is and how it connects. |
GET /api/v1/pricing | Credit packs and what uses credits. |
curl https://cotlet.dev/api/v1/apps