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

NameInTypeRequiredWhat it is
draft_idpathstringYes
projectquerystringYesThe project the call is about. Every route is scoped to one.
Pod-OrganisationheaderstringNoThe 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.

200
{
  "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
}
FieldTypeAlwaysWhat it is
idstringYes
way"watching" | "refusal" | "task"Yeswatching: 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
policystringYes
rulesstring | nullYesThe drafted rules in the simple form; null until ready.
newly_allowsstring[]YesWhat the draft would allow, in plain words, for the person who reviews it.
problemsProblem[]Yes
created_atstringYesRFC 3339 in UTC with milliseconds, for example 2026-11-23T17:04:05.123Z.
created_bystringYesWho made a change. An identity account id for a person, or a key id (key_…) for an API key.
accepted_asstring | nullYesThe 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.