REST API
Get started with the Coder API:
Quickstart
Generate a token on your Coder deployment by visiting:
https://coder.example.com/settings/tokens
List your workspaces
# CLI
curl https://coder.example.com/api/v2/workspaces?q=owner:me \
-H "Coder-Session-Token: <your-token>"
Use cases
See some common use cases for the REST API.
Request size limits
An endpoint that accepts a request body reads at most 4 MiB of it, unless it
sets a limit of its own. Those limits go in both directions:
POST /api/v2/files accepts 100 MiB, while
POST /api/v2/workspaceagents/me/tasks/{task}/log-snapshot accepts 64 KiB.
An endpoint that sets its own limit declares 413 in this reference and
names the limit in the description, so the per-endpoint page is where to look
one up. A few endpoints answer 413 for a reason other than the size of
the request body, and their descriptions say so.
A body that exceeds the limit that applies to it is answered with
413 Payload Too Large, and the response names the limit it exceeded:
{
"message": "Request body too large.",
"detail": "Maximum request body size is 4194304 bytes."
}
The limits are fixed. There is no deployment option that raises them.

