Get a draft with what it would allow
Get a draft with what it would allow
GET/v1/drafts/{draft_id}
A key with the permissions:read scope.
Request
curl "https://api.pod.mapier.ai/v1/drafts/example?project=example" \
-H "Authorization: Bearer $POD_API_KEY"Parameters
| Name | In | Type | Required | What it is |
|---|---|---|---|---|
draft_id | path | string | Yes | |
project | query | string | Yes | The project the call is about. Every route is scoped to one. |
Pod-Organisation | header | string | No | The organization, for a person who belongs to several. An API key's organization is its own, and a different one here is forbidden. |
Answer
200. The draft.
{
"id": "example",
"way": "watching",
"state": "drafting",
"policy": "example",
"rules": null,
"newly_allows": ["example"],
"problems": [
{
"line": null,
"message": "example"
}
],
"created_at": "2026-11-23T12:00:00.000Z",
"created_by": "example",
"accepted_as": null
}| Field | Type | Always | What it is |
|---|---|---|---|
id | string | Yes | |
way | "watching" | "refusal" | "task" | Yes | watching: rules recommended from a first run in log-only mode. refusal: one narrow rule for a refusal. task: a policy drafted from the task by a model (metered). |
state | "drafting" | "ready" | "failed" | "accepted" | "discarded" | Yes | |
policy | string | Yes | |
rules | string | null | Yes | The drafted rules in the simple form; null until ready. |
newly_allows | string[] | Yes | What the draft would allow, in plain words, for the person who reviews it. |
problems | Problem[] | Yes | |
created_at | string | Yes | RFC 3339 in UTC with milliseconds, for example 2026-11-23T17:04:05.123Z. |
created_by | string | Yes | Who made a change. An identity account id for a person, or a key id (key_…) for an API key. |
accepted_as | string | null | Yes | The named policy the draft became. |
Errors
The refusals this call is known for: unauthorized, forbidden, not_found. Any call can also answer unauthorized, rate_limited, unavailable or internal; the error list says what each means and when to send the call again.