Layers Inc. Approval API
Approval policy + approve/reject flows.
Approval policy + approve/reject flows.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/layers-com:layers-com-approval-api"
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: Layers Partner Approval API
version: v1
description: The Layers Partner API — one contract for programmatic access to projects, content generation, publishing, and webhooks. See https://layers.com/docs for conventions (auth, pagination, idempotency, errors). Auto-generated from the Zod schemas at `packages/shared-types/src/http/partner/**`; do not edit by hand.
contact:
name: Layers Partner Support
url: https://layers.com/docs/api/operational/status-and-support
servers:
- url: https://api.layers.com
description: Production
security:
- Bearer: []
tags:
- name: Approval
description: Approval policy + approve/reject flows.
paths:
/v1/content/{containerId}/approve:
post:
summary: Approve a content container
operationId: approveContent
tags:
- Approval
parameters:
- in: path
name: containerId
schema:
$ref: '#/components/schemas/ContentContainerId'
required: true
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/ApproveRequestSchema'
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/ApproveResponseSchema'
4XX:
description: Client error (see operational/errors)
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorEnvelopeSchema'
5XX:
description: Server error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorEnvelopeSchema'
/v1/content/{containerId}/reject:
post:
summary: Reject a content container
operationId: rejectContent
tags:
- Approval
parameters:
- in: path
name: containerId
schema:
$ref: '#/components/schemas/ContentContainerId'
required: true
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/RejectRequestSchema'
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/RejectResponseSchema'
4XX:
description: Client error (see operational/errors)
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorEnvelopeSchema'
5XX:
description: Server error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorEnvelopeSchema'
/v1/projects/{projectId}/content-review-policy:
get:
summary: Get the content-review policy for a project
operationId: getContentReviewPolicy
tags:
- Approval
parameters:
- in: path
name: projectId
schema:
$ref: '#/components/schemas/ProjectId'
required: true
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/ContentReviewPolicySchema'
4XX:
description: Client error (see operational/errors)
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorEnvelopeSchema'
5XX:
description: Server error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorEnvelopeSchema'
patch:
summary: Patch the content-review policy
operationId: updateContentReviewPolicy
tags:
- Approval
parameters:
- in: path
name: projectId
schema:
$ref: '#/components/schemas/ProjectId'
required: true
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/ContentReviewPolicyPatchRequestSchema'
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/ContentReviewPolicySchema'
4XX:
description: Client error (see operational/errors)
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorEnvelopeSchema'
5XX:
description: Server error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorEnvelopeSchema'
components:
schemas:
ContentReviewPolicyPatchRequestSchema:
type: object
properties:
policy:
$ref: '#/components/schemas/ContentReviewPolicyEnum'
firstN:
description: Number of items requiring approval before auto-approval begins; required when policy is 'review_first_n'.
type: integer
minimum: 1
maximum: 50
required:
- policy
additionalProperties: false
ValidationIssueSchemaOutput:
type: object
properties:
path:
type: string
description: Dotted path to the request field that failed validation.
message:
type: string
description: Human-readable explanation of the validation failure.
required:
- path
- message
additionalProperties: false
ContentReviewPolicySchema:
type: object
properties:
policy:
$ref: '#/components/schemas/ContentReviewPolicyEnum'
firstN:
description: Number of items requiring approval before auto-approval begins; required when policy is 'review_first_n'.
type: integer
minimum: 1
maximum: 50
pendingCount:
type: integer
minimum: 0
maximum: 9007199254740991
description: Number of items currently awaiting review.
updatedAt:
description: When the review policy was last changed (ISO-8601 UTC).
$ref: '#/components/schemas/IsoTimestampSchema'
required:
- policy
- pendingCount
additionalProperties: false
RejectRequestSchema:
type: object
properties:
reason:
type: string
minLength: 1
maxLength: 1024
description: Reason the content item is being rejected.
required:
- reason
additionalProperties: false
RejectResponseSchema:
type: object
properties:
id:
description: Unique identifier of the rejected content item.
$ref: '#/components/schemas/ContentContainerId'
approvalStatus:
type: string
const: rejected
description: Approval state of the content item; always 'rejected' here.
rejectedAt:
description: When the item was rejected (ISO-8601 UTC).
$ref: '#/components/schemas/IsoTimestampSchema'
rejectedBy:
description: Identifier of who rejected the item, if known.
type:
- string
- 'null'
reason:
type: string
description: Reason the content item was rejected.
required:
- id
- approvalStatus
- rejectedAt
- reason
additionalProperties: false
ProjectId:
type: string
minLength: 5
maxLength: 64
pattern: ^prj_[A-Za-z0-9-]+$
KillSwitchScopeEnum:
type: string
enum:
- key
- organization
- global
description: Breadth of the kill switch that blocked the request.
PlatformErrorPlatformEnum:
type: string
enum:
- tiktok
- meta
- apple
- instagram
- appstore
description: Upstream platform that rejected or could not service the request.
ErrorEnvelopeSchema:
type: object
properties:
error:
description: Error payload describing why the request failed.
$ref: '#/components/schemas/ErrorBodySchemaOutput'
required:
- error
additionalProperties: false
ContentContainerId:
type: string
minLength: 5
maxLength: 64
pattern: ^cnt_[A-Za-z0-9-]+$
ErrorDetailsSchemaOutput:
type: object
properties:
reason:
description: Short reason code or phrase narrowing the error.
type: string
originalRequestHash:
description: Body hash of the original idempotent request, on a CONFLICT replay.
type: string
currentRequestHash:
description: Body hash of the current request, on a CONFLICT replay.
type: string
issues:
description: Per-field validation failures, present on VALIDATION errors.
type: array
items:
$ref: '#/components/schemas/ValidationIssueSchemaOutput'
requiredScope:
description: Scope the API key lacks, present on FORBIDDEN_SCOPE errors.
type: string
scope:
description: Breadth of the kill switch that tripped.
$ref: '#/components/schemas/KillSwitchScopeEnum'
resource:
description: Exhausted billing resource, present on BILLING_EXHAUSTED errors.
type: string
platform:
description: Platform whose stored credential is invalid.
$ref: '#/components/schemas/PlatformErrorPlatformEnum'
socialAccountId:
description: Social account whose credential is invalid.
type: string
retryAfterSeconds:
description: Seconds to wait before retrying.
type: number
minimum: 0
retryAfterMs:
description: Milliseconds to wait before retrying.
anyOf:
- type: number
minimum: 0
- type: 'null'
platformCode:
description: Raw error code returned by the upstream platform.
type: string
platformMessage:
description: Raw error message returned by the upstream platform.
type: string
endpointClass:
description: Rate-limit bucket the throttled request belongs to.
type: string
stage:
description: Job stage at which the failure occurred.
type: string
flag:
description: Moderation flag that blocked the request.
type: string
safetyCategory:
description: Safety category triggered by moderation.
type: string
containerId:
description: Content container the error relates to.
type: string
approvalStatus:
description: Current approval status of the content.
type: string
additionalProperties: {}
IsoTimestampSchema:
anyOf:
- type: string
format: date-time
pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$
- type: string
pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?:Z))$
description: ISO-8601 UTC timestamp with the 'Z' suffix (e.g. `2026-04-18T12:04:11Z`). Offset forms like `+00:00` are rejected with 422 VALIDATION — convert to UTC before sending. Outputs always emit `Z` so input shape matches output shape.
RequestId:
type: string
minLength: 5
maxLength: 64
pattern: ^req_[A-Za-z0-9-]+$
ErrorBodySchemaOutput:
type: object
properties:
code:
$ref: '#/components/schemas/ErrorCodeEnum'
message:
type: string
description: Human-readable description of the error.
requestId:
$ref: '#/components/schemas/RequestId'
details:
description: Code-specific structured context for the error.
$ref: '#/components/schemas/ErrorDetailsSchemaOutput'
required:
- code
- message
- requestId
additionalProperties: false
ApproveRequestSchema:
type: object
properties:
note:
description: Optional reviewer note recorded with the approval.
type: string
maxLength: 1024
additionalProperties: false
ContentReviewPolicyEnum:
type: string
enum:
- auto_approve
- review_first_n
- review_all
description: 'How new content is reviewed: ''auto_approve'' publishes immediately, ''review_first_n'' requires approval for the first N items then auto-approves, ''review_all'' requires approval for every item.'
ErrorCodeEnum:
type: string
enum:
- UNAUTHENTICATED
- FORBIDDEN_SCOPE
- FORBIDDEN_FENCE
- NOT_FOUND
- CONFLICT
- FEATURE_RETIRED
- VALIDATION
- APPROVAL_REQUIRED
- CONTENT_REJECTED
- RETURN_URL_NOT_ALLOWED
- KILL_SWITCH
- BILLING_EXHAUSTED
- MODERATION_BLOCKED
- CREDENTIAL_INVALID
- CIRCUIT_OPEN
- SOCIAL_ACCOUNT_NOT_PUBLISH_READY
- APP_REVOKED
- RATE_LIMITED
- INTERNAL
- PLATFORM_ERROR
- UPLOAD_INCOMPLETE
- UPLOAD_EXPIRED
- PAYLOAD_TOO_LARGE
- SCRAPE_FAILED
- UPLOAD_QUOTA_EXCEEDED
description: Stable machine-readable error code identifying what went wrong.
ApproveResponseSchema:
type: object
properties:
id:
description: Unique identifier of the approved content item.
$ref: '#/components/schemas/ContentContainerId'
approvalStatus:
type: string
const: approved
description: Approval state of the content item; always 'approved' here.
approvedAt:
description: When the item was approved (ISO-8601 UTC).
$ref: '#/components/schemas/IsoTimestampSchema'
approvedBy:
description: Identifier of who approved the item, if known.
type:
- string
- 'null'
required:
- id
- approvalStatus
- approvedAt
additionalProperties: false
securitySchemes:
Bearer:
type: http
scheme: bearer
description: 'Partner API key sent as `Authorization: Bearer <key>`. Issued per org; rotatable via the dashboard. This is the only accepted auth form.'