Layers Inc. Jobs API

Async job polling + cancellation.

GitHub OpenAPI

Operations 2

GET /v1/jobs/{jobId} Get job status #
POST /v1/jobs/{jobId}/cancel Cancel a running job #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • 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.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/layers-com:layers-com-jobs-api"
All apis
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.

Get an API 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 Specification

layers-com-jobs-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Layers Partner Jobs 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: Jobs
  description: Async job polling + cancellation.
paths:
  /v1/jobs/{jobId}:
    get:
      summary: Get job status
      operationId: getJob
      tags:
      - Jobs
      parameters:
      - in: path
        name: jobId
        schema:
          $ref: '#/components/schemas/JobId'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JobSchema'
        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/jobs/{jobId}/cancel:
    post:
      summary: Cancel a running job
      operationId: cancelJob
      tags:
      - Jobs
      parameters:
      - in: path
        name: jobId
        schema:
          $ref: '#/components/schemas/JobId'
        required: true
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/JobCancelRequestSchema'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JobCancelResponseSchema'
        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:
    JobCancelRequestSchema:
      type: object
      properties:
        reason:
          description: Optional free-text note explaining the cancellation.
          type: string
          maxLength: 1024
      additionalProperties: false
    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
    JobCanceledSchemaOutput:
      type: object
      properties:
        jobId:
          description: Identifier of the job.
          $ref: '#/components/schemas/JobId'
        kind:
          $ref: '#/components/schemas/JobKindEnum'
        status:
          type: string
          const: canceled
          description: Indicates the job was canceled before completing.
        startedAt:
          description: When the job started.
          $ref: '#/components/schemas/IsoTimestampSchema'
        finishedAt:
          description: When the job was canceled.
          $ref: '#/components/schemas/IsoTimestampSchema'
        canceledBy:
          description: Who or what initiated the cancellation.
          type:
          - string
          - 'null'
        reason:
          description: Free-text reason for the cancellation.
          type:
          - string
          - 'null'
      required:
      - jobId
      - kind
      - status
      - startedAt
      - finishedAt
      additionalProperties: false
    JobErrorSchemaOutput:
      type: object
      properties:
        code:
          $ref: '#/components/schemas/ErrorCodeEnum'
        message:
          type: string
          description: Human-readable description of why the job failed.
        requestId:
          $ref: '#/components/schemas/RequestId'
        data:
          description: Code-specific structured context for the failure.
          $ref: '#/components/schemas/ErrorDetailsSchemaOutput'
        details:
          description: Code-specific structured context for the failure (alias of `data`).
          $ref: '#/components/schemas/ErrorDetailsSchemaOutput'
      required:
      - code
      - message
      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
    JobId:
      type: string
      minLength: 5
      maxLength: 64
      pattern: ^job_[A-Za-z0-9-]+$
    CancelReasonEnum:
      type: string
      enum:
      - ALREADY_COMPLETED
      - ALREADY_FAILED
      - ALREADY_CANCELED
      - STAGE_NOT_CANCELABLE
      description: Why a cancel request was not accepted.
    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.
    JobCancelRejectedSchemaOutput:
      type: object
      properties:
        jobId:
          description: Identifier of the job whose cancellation was rejected.
          $ref: '#/components/schemas/JobId'
        accepted:
          type: boolean
          const: false
          description: Always `false`; the job could not be canceled.
        reason:
          $ref: '#/components/schemas/CancelReasonEnum'
        stage:
          description: Job stage at the time cancellation was rejected.
          type: string
      required:
      - jobId
      - accepted
      - reason
      additionalProperties: false
    JobFailedSchemaOutput:
      type: object
      properties:
        jobId:
          description: Identifier of the job.
          $ref: '#/components/schemas/JobId'
        kind:
          $ref: '#/components/schemas/JobKindEnum'
        status:
          type: string
          const: failed
          description: Indicates the job ended in failure.
        startedAt:
          description: When the job started.
          $ref: '#/components/schemas/IsoTimestampSchema'
        finishedAt:
          description: When the job failed.
          $ref: '#/components/schemas/IsoTimestampSchema'
        error:
          description: Details of why the job failed.
          $ref: '#/components/schemas/JobErrorSchemaOutput'
      required:
      - jobId
      - kind
      - status
      - startedAt
      - finishedAt
      - error
      additionalProperties: false
    JobSchema:
      oneOf:
      - $ref: '#/components/schemas/JobRunningSchemaOutput'
      - $ref: '#/components/schemas/JobCompletedSchemaOutput'
      - $ref: '#/components/schemas/JobFailedSchemaOutput'
      - $ref: '#/components/schemas/JobCanceledSchemaOutput'
      type: object
      discriminator:
        propertyName: status
        mapping:
          running: '#/components/schemas/JobRunningSchemaOutput'
          completed: '#/components/schemas/JobCompletedSchemaOutput'
          failed: '#/components/schemas/JobFailedSchemaOutput'
          canceled: '#/components/schemas/JobCanceledSchemaOutput'
    JobRunningSchemaOutput:
      type: object
      properties:
        jobId:
          description: Identifier of the job.
          $ref: '#/components/schemas/JobId'
        kind:
          $ref: '#/components/schemas/JobKindEnum'
        status:
          type: string
          const: running
          description: Indicates the job is still in progress.
        stage:
          type: string
          description: Current processing stage; advisory and may change.
        progress:
          description: Overall completion as a fraction from 0 to 1; advisory.
          type: number
          minimum: 0
          maximum: 1
        stageProgress:
          description: Completion of the current stage as a fraction from 0 to 1; advisory.
          type: number
          minimum: 0
          maximum: 1
        etaSeconds:
          description: Estimated seconds until completion; advisory and may be null.
          anyOf:
          - type: number
            minimum: 0
          - type: 'null'
        startedAt:
          description: When the job started.
          $ref: '#/components/schemas/IsoTimestampSchema'
        updatedAt:
          description: When the job's progress was last updated.
          $ref: '#/components/schemas/IsoTimestampSchema'
      required:
      - jobId
      - kind
      - status
      - stage
      - startedAt
      additionalProperties: false
    JobResultUnknownSchema:
      type: object
      properties: {}
      additionalProperties: {}
    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
    JobCompletedSchemaOutput:
      type: object
      properties:
        jobId:
          description: Identifier of the job.
          $ref: '#/components/schemas/JobId'
        kind:
          $ref: '#/components/schemas/JobKindEnum'
        status:
          type: string
          const: completed
          description: Indicates the job finished successfully.
        startedAt:
          description: When the job started.
          $ref: '#/components/schemas/IsoTimestampSchema'
        finishedAt:
          description: When the job completed.
          $ref: '#/components/schemas/IsoTimestampSchema'
        result:
          description: Kind-specific result payload produced by the job.
          $ref: '#/components/schemas/JobResultUnknownSchema'
      required:
      - jobId
      - kind
      - status
      - startedAt
      - finishedAt
      - result
      additionalProperties: false
    JobCancelAcceptedSchemaOutput:
      type: object
      properties:
        jobId:
          description: Identifier of the job whose cancellation was accepted.
          $ref: '#/components/schemas/JobId'
        accepted:
          type: boolean
          const: true
          description: Always `true`; the cancel signal was delivered.
        reason:
          description: Always null when the cancel was accepted.
          type: 'null'
      required:
      - jobId
      - accepted
      additionalProperties: false
    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.
    RequestId:
      type: string
      minLength: 5
      maxLength: 64
      pattern: ^req_[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: {}
    JobCancelResponseSchema:
      oneOf:
      - $ref: '#/components/schemas/JobCancelAcceptedSchemaOutput'
      - $ref: '#/components/schemas/JobCancelRejectedSchemaOutput'
      type: object
      discriminator:
        propertyName: accepted
        mapping:
          'true': '#/components/schemas/JobCancelAcceptedSchemaOutput'
          'false': '#/components/schemas/JobCancelRejectedSchemaOutput'
    JobKindEnum:
      type: string
      enum:
      - project_ingest_github
      - project_ingest_website
      - content_generate
      - content_clone_from_post
      - influencer_create
      - appstore_ingest
      - marketing_bootstrap
      - ad_optimizer_run
      - project_keywords_refresh
      description: The kind of async operation this job is running.
  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.'