GET /v1/projects/:projectId/approval-policy
Read the per-project approval gate.
GET
/v1/projects/:projectId/approval-policyPhase 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
projectIdstring (uuid)requiredProject to read the policy for.
Request
curl https://api.layers.com/v1/projects/{projectId}/approval-policy \
-H "Authorization: Bearer $LAYERS_API_KEY"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
}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. Whentrue, newly generated containers land inapprovalStatus: "pending"andschedulerefuses them until approved.firstNPostsBlocked— how many approvals a project must land before the gate lifts. Once this many containers are approved, subsequent containers default tonot_requiredeven withrequiresApproval: true.autoApproveAfter— ISO-8601 duration (e.g.PT24H,P7D). If set, pending containers auto-approve after this duration has elapsed since theircreatedAt. Omit or passnullto disable auto-approval.
Errors
| Status | Code | When |
|---|---|---|
| 401 | UNAUTHENTICATED | Missing or invalid key. |
| 403 | FORBIDDEN_SCOPE | Key lacks content:read. |
| 404 | NOT_FOUND | Project id not in this org. |
| 429 | RATE_LIMITED | Read budget exhausted. |