Layers Inc. Audit Log API

Partner-readable audit trail.

GitHub OpenAPI

Operations 1

GET /v1/audit-log List partner audit events for the calling organization #

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-audit-log-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-audit-log-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Layers Partner Audit Log 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: Audit Log
  description: Partner-readable audit trail.
paths:
  /v1/audit-log:
    get:
      summary: List partner audit events for the calling organization
      operationId: listAuditLog
      tags:
      - Audit Log
      parameters:
      - in: query
        name: eventType
        schema:
          description: Return only events of this type.
          $ref: '#/components/schemas/AuditEventTypeEnum'
        description: Return only events of this type.
      - in: query
        name: projectId
        schema:
          description: Return only events for this project.
          type: string
          pattern: ^(prj_)?[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$
        description: Return only events for this project.
      - in: query
        name: apiKeyId
        schema:
          description: Return only events performed by this API key.
          type: string
          pattern: ^(key_)?[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$
        description: Return only events performed by this API key.
      - in: query
        name: since
        schema:
          description: Return only events at or after this ISO-8601 UTC timestamp.
          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: Return only events at or after this ISO-8601 UTC timestamp.
      - in: query
        name: until
        schema:
          description: Return only events before this ISO-8601 UTC timestamp.
          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: Return only events before this ISO-8601 UTC timestamp.
      - in: query
        name: cursor
        schema:
          description: Pagination cursor from a prior response's nextCursor.
          type: string
        description: Pagination cursor from a prior response's nextCursor.
      - in: query
        name: limit
        schema:
          default: 50
          description: Maximum number of events to return (1-200).
          type: integer
          minimum: 1
          maximum: 200
        description: Maximum number of events to return (1-200).
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AuditLogListResponseSchema'
        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:
    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
    AuditLogEventSchemaOutput:
      type: object
      properties:
        eventId:
          type: string
          format: uuid
          pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
          description: Unique identifier for this audit event.
        eventType:
          description: The kind of action this event records.
          $ref: '#/components/schemas/AuditEventTypeEnum'
        occurredAt:
          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))$
          description: When the event happened, as an ISO-8601 UTC timestamp.
        requestId:
          description: The API request that produced this event, or null if not request-driven.
          type:
          - string
          - 'null'
        organizationId:
          description: The organization the event belongs to.
          $ref: '#/components/schemas/OrganizationId'
        projectId:
          anyOf:
          - $ref: '#/components/schemas/ProjectId'
          - type: 'null'
          description: The project the event applies to, or null if organization-wide.
        apiKeyId:
          anyOf:
          - $ref: '#/components/schemas/ApiKeyId'
          - type: 'null'
          description: The API key that performed the action, or null if not key-driven.
        actor:
          description: Who or what performed the action.
          $ref: '#/components/schemas/AuditActor'
        data:
          type: object
          propertyNames:
            type: string
          additionalProperties: {}
          description: Event-specific details, varying by event type.
        piiRedacted:
          type: boolean
          description: Whether personal data has been removed from this event.
        schemaVersion:
          type: integer
          minimum: -9007199254740991
          maximum: 9007199254740991
          description: Version of the event payload structure.
      required:
      - eventId
      - eventType
      - occurredAt
      - requestId
      - organizationId
      - projectId
      - apiKeyId
      - actor
      - data
      - piiRedacted
      - schemaVersion
      additionalProperties: false
    OrganizationId:
      type: string
      minLength: 5
      maxLength: 64
      pattern: ^org_[A-Za-z0-9-]+$
    ProjectId:
      type: string
      minLength: 5
      maxLength: 64
      pattern: ^prj_[A-Za-z0-9-]+$
    AuditLogListResponseSchema:
      type: object
      properties:
        items:
          type: array
          items:
            $ref: '#/components/schemas/AuditLogEventSchemaOutput'
          description: The page of audit events, newest first.
        nextCursor:
          description: Cursor for the next page, or null when there are no more events.
          type:
          - string
          - 'null'
      required:
      - items
      - nextCursor
      additionalProperties: false
    ApiKeyId:
      type: string
      minLength: 5
      maxLength: 64
      pattern: ^key_[A-Za-z0-9-]+$
    AuditEventTypeEnum:
      type: string
      enum:
      - api.request
      - auth.key_rejected
      - auth.kill_switch_tripped
      - auth.rate_limit_exceeded
      - auth.scope_denied
      - auth.project_access_denied
      - api_key.created
      - api_key.killed
      - api_key.rotated
      - api_key.deleted
      - job.started
      - job.progress
      - job.completed
      - job.failed
      - job.cancelled
      - content.generated
      - content.cloned
      - content.approved
      - content.rejected
      - content.scheduled
      - content.published
      - content.deleted
      - influencer.created
      - influencer.updated
      - influencer.cloned
      - project.created
      - project.updated
      - project.deleted
      - ingest.github.started
      - ingest.website.started
      - ingest.appstore.started
      - social.oauth_started
      - social.oauth_completed
      - social.reauth_started
      - social.account_removed
      - scheduled_post.created
      - scheduled_post.rescheduled
      - scheduled_post.cancelled
      - scheduled_post.rejected_not_publish_ready
      - content_review_policy.updated
      - media.upload_presigned
      - media.upload_finalized
      - organization.credit_config_updated
      - organization.projects_migrated
      - credit.skipped
      description: Dotted event type identifying which audited action occurred.
    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
    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: {}
    RequestId:
      type: string
      minLength: 5
      maxLength: 64
      pattern: ^req_[A-Za-z0-9-]+$
    AuditActor:
      type: string
      enum:
      - partner_api
      - system
      - admin
      description: Origin of the action that produced the audit event.
    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
    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.
  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.'