Every path sits under /api/v1
The production base URL ishttps://api.pinework.ai/api/v1. A route listed as /api/v1/tasks lives at https://api.pinework.ai/api/v1/tasks.
The API has one version today, 2026-03. You can send it in a Pine-Version header. Any other value returns 400 unsupported_api_version.
Each response carries a Request-Id header. Quote it when you report a problem.
You sign in with a bearer token
Send your token in theAuthorization header:
A person can belong to several workspaces. With a dashboard session, the
Pinework-Workspace-Id header picks one. Its value is the workspace UUID. A login token works only in its own workspace. Naming another workspace returns 403 not_permitted.
Some routes refuse an agent token, such as revealing a secret or answering an approval. Those return 403.
Errors
Errors from current routes have this shape:
These codes can come from any route:
Some older routes still return a plain
{ "error": "<message>" } or an error object with no type. Branch on the HTTP status first, then on code when it is there.
Lists return pages
A list returnsobject: "list", a data array and hasMore. Most lists default to 25 items and allow up to 100 with limit. List routes use one of three cursor styles:
Each reference page says which style its list uses. Stop when
hasMore is false.
Batch gets take up to 100 ids
Some list routes takeids, a comma-separated list of ids. They answer in the order you asked, with null for an id that is missing or hidden. These include /api/v1/tasks, /api/v1/agents, /api/v1/runs, /api/v1/files, /api/v1/conversations and /api/v1/wiki/pages.
- More than 100 ids returns 400
too_many_ids. idswith a filter or paging parameter returns 400ids_exclusive.
Idempotency keys make a retry safe
Send anIdempotency-Key header on a write you might retry. Some routes require it, such as creating or revoking a grant. A missing key there returns 400 idempotency_invalid_key.
- A key is 1 to 255 characters, with no spaces or control characters.
- Pinework keeps a key for 24 hours.
- A key is scoped to you, the workspace, the method and the path.
- A retry with the same key and body replays the first successful answer. The response carries
Idempotent-Replayed: true. - After a 4xx answer, the key is free again, so a retry runs anew.
Bodies have size limits
A larger body returns 413
payload_too_large.
Some routes are rate limited
Sign-in routes count requests per minute from each IP address. An automation webhook takes 60 calls per hour. Over the limit returns 429rate_limit_exceeded. The Retry-After header and details.retryAfter give the wait in seconds. If the limiter itself is down, the request fails closed with 503 rate_limiter_unavailable.
Sending a conversation message can return 429 rate_limited when the agent cannot take a turn yet. Retry later.
The OpenAPI document needs sign-in
Pinework serves an OpenAPI document athttps://api.pinework.ai/api/openapi.json. It needs the same bearer token as any route. Some routes describe their responses only in part. When it and a reference page disagree, trust the reference page.
CLI conventions
The CLI wraps these routes and prints JSON.
Task
A worked reference page with routes and codes.
Secret
Routes a person must call, not an agent.
Connect your agent
Sign in from Claude Code, Codex or Cursor.