Layers
Partner APIAPI referenceApproval

GET /v1/projects/:projectId/approval-policy

Read the per-project approval gate.

View as Markdown
GET/v1/projects/:projectId/approval-policy
Phase 1stable
Auth
Bearer
Scope
content:read

Returns the approval policy on a project: whether new containers need human sign-off before scheduling, how many posts must pass review before the gate lifts, and how long auto-approval should wait. Read this once on project load to decide whether your UI should route new content through a review queue.

The policy is per-project, not per-org. Two projects on the same org can run different gates — one locked down with a five-post warmup, another wide open.

Path parameters

  • projectId
    string (uuid)required
    Project to read the policy for.

Request

terminal
curl https://api.layers.com/v1/projects/{projectId}/approval-policy \
  -H "Authorization: Bearer $LAYERS_API_KEY"
approval-policy.ts
const res = await fetch(
  `https://api.layers.com/v1/projects/${projectId}/approval-policy`,
  { headers: { Authorization: `Bearer ${process.env.LAYERS_API_KEY!}` } },
);
const policy = await res.json();
if (policy.requiresApproval) {
  // route new containers through the review queue
}
approval_policy.py
import os, httpx

r = httpx.get(
    f"https://api.layers.com/v1/projects/{project_id}/approval-policy",
    headers={"Authorization": f"Bearer {os.environ['LAYERS_API_KEY']}"},
)
policy = r.json()

Responses

200Gate is on with a first-5 warmup and 24-hour auto-approve fallback.
{
  "projectId": "01HX9Y7K8M2P4RSTUV56789AB",
  "requiresApproval": true,
  "firstNPostsBlocked": 5,
  "autoApproveAfter": "PT24H",
  "updatedAt": "2026-04-10T12:00:00Z"
}
200No gate on this project.
{
  "projectId": "01HX9Y7K8M2P4RSTUV56789AB",
  "requiresApproval": false,
  "firstNPostsBlocked": 0,
  "autoApproveAfter": null,
  "updatedAt": "2026-04-10T12:00:00Z"
}

Field semantics

  • requiresApproval — master switch. When true, newly generated containers land in approvalStatus: "pending" and schedule refuses them until approved.
  • firstNPostsBlocked — how many approvals a project must land before the gate lifts. Once this many containers are approved, subsequent containers default to not_required even with requiresApproval: true.
  • autoApproveAfter — ISO-8601 duration (e.g. PT24H, P7D). If set, pending containers auto-approve after this duration has elapsed since their createdAt. Omit or pass null to disable auto-approval.

Errors

StatusCodeWhen
401UNAUTHENTICATEDMissing or invalid key.
403FORBIDDEN_SCOPEKey lacks content:read.
404NOT_FOUNDProject id not in this org.
429RATE_LIMITEDRead budget exhausted.

See also

On this page