> ## Documentation Index
> Fetch the complete documentation index at: https://docs.layarva.com/llms.txt
> Use this file to discover all available pages before exploring further.

# POST /schedules

> Workspace-owned resources only. No unsupported query parameters on details or writes. Required permissions: schedules.create, publications.execute. Use Postman or your backend. Keep your API key private; do not enter it in this public documentation page.

Required permissions: `schedules.create`, `publications.execute`.

Send an `Idempotency-Key` for this change. It is an operation ID, not an API key. [Generate a UUID](https://docs.layarva.com/developers/platform-request-keys.md) and reuse it when retrying the same request.

> [!NOTE]
>
> Use your Platform API key in Postman or your backend. Keep it private; do not enter it in this public page. Your workspace permissions and plan limits apply.

See the [quickstart](https://docs.layarva.com/developers/platform-quickstart.md) for request examples. Required fields and responses are listed below.


## OpenAPI

````yaml api/platform-workspace.openapi.json POST /schedules
openapi: 3.1.0
info:
  title: Layarva Platform / Workspace API
  version: 1.1.0
  description: >-
    Manage Library, Playlists, Channels, Locations, Edges, Screens and
    Schedules. Use a Platform key, not a Widget key. See
    https://docs.layarva.com/developers/platform-quickstart. Upload supported
    files, export eligible offline packages and receive signed Platform
    webhooks. Permissions, plan limits and publishing rules apply. If a request
    returns 503, stop that workflow and contact support with its requestId.
servers:
  - url: https://api.layarva.com/api/platform/v1/workspaces/{workspaceId}
    variables:
      workspaceId:
        default: workspace_example
security:
  - PlatformBearer: []
paths:
  /schedules:
    post:
      tags:
        - schedules
      summary: POST /schedules
      description: >-
        Workspace-owned resources only. No unsupported query parameters on
        details or writes. Required permissions: schedules.create,
        publications.execute. Use Postman or your backend. Keep your API key
        private; do not enter it in this public documentation page.
      operationId: post__schedules
      parameters:
        - name: Idempotency-Key
          in: header
          required: true
          schema:
            type: string
            pattern: ^[A-Za-z0-9._:-]{1,128}$
          description: >-
            An operation ID, not your API key. Generate a UUID for each new
            change and reuse it when retrying the same request. See
            https://docs.layarva.com/developers/platform-request-keys for
            Postman, PowerShell and Node.js examples. Upload instructions are
            refreshed when requested again.
      requestBody:
        required: true
        description: >-
          Send application/json using the fields below. JSON requests must be no
          larger than 64 KiB.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ScheduleCreate'
      responses:
        '201':
          description: Safe live-authorized result
          headers:
            X-Request-Id:
              schema:
                type: string
            Cache-Control:
              schema:
                const: private, no-store
            X-RateLimit-Limit:
              schema:
                type: string
            X-RateLimit-Remaining:
              schema:
                type: string
            Idempotency-Replayed:
              schema:
                enum:
                  - 'true'
                  - 'false'
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/Schedule'
                required:
                  - data
                additionalProperties: false
        default:
          description: >-
            Error with code, message and requestId. Follow Retry-After when
            present. Contact support with the requestId if the problem
            continues.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          headers:
            X-Request-Id:
              schema:
                type: string
            Retry-After:
              schema:
                type: string
components:
  schemas:
    ScheduleCreate:
      type: object
      properties:
        name:
          type: string
          minLength: 1
          maxLength: 120
        playlistVersionId:
          type: string
          pattern: ^[A-Za-z0-9_-]{1,100}$
        channelId:
          type: string
          pattern: ^[A-Za-z0-9_-]{1,100}$
        scheduleType:
          type: string
          enum:
            - ALWAYS
            - ONE_TIME
            - WEEKLY
        timezone:
          type: string
          maxLength: 100
        startAtUtc:
          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|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$
            - type: 'null'
        endAtUtc:
          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|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$
            - type: 'null'
        weeklyWindows:
          default: []
          maxItems: 14
          type: array
          items:
            type: object
            properties:
              daysOfWeek:
                minItems: 1
                maxItems: 7
                type: array
                items:
                  type: integer
                  minimum: 0
                  maximum: 6
              startTime:
                type: string
                pattern: ^(?:[01]\d|2[0-3]):[0-5]\d$
              endTime:
                type: string
                pattern: ^(?:[01]\d|2[0-3]):[0-5]\d$
            required:
              - daysOfWeek
              - startTime
              - endTime
            additionalProperties: false
        paused:
          default: false
          type: boolean
      required:
        - name
        - playlistVersionId
        - channelId
        - scheduleType
        - timezone
      additionalProperties: false
      description: >-
        Valid IANA timezone. Exact immutable Ready version plus
        publications.execute scope and publishing policy required. ONE_TIME
        needs startAtUtc; end must be after start. WEEKLY requires windows;
        other types require no windows. Windows have distinct days
        0=Sunday..6=Saturday. Overlaps and same Playlist as Channel default
        rejected. Channel without a default produces DRAFT. PATCH requires
        expectedUpdatedAt and at least one editable field. Server-only
        cross-field/refinement rules are enforced beyond this JSON Schema.
    Schedule:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        playlistId:
          type: string
        playlistVersionId:
          anyOf:
            - type: string
            - type: 'null'
        channelId:
          type: string
        timezone:
          type: string
        scheduleType:
          type: string
        controlState:
          type: string
        lifecycleStatus:
          type: string
        weeklyWindows:
          type: array
          items:
            type: object
        startAtUtc:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
        endAtUtc:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
        priority:
          type: number
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
      required:
        - id
      additionalProperties: false
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
            message:
              type: string
            requestId:
              type: string
          required:
            - code
            - message
            - requestId
          additionalProperties: false
      required:
        - error
      additionalProperties: false
  securitySchemes:
    PlatformBearer:
      type: http
      scheme: bearer
      bearerFormat: lv_platform_<43 base64url characters>
      description: >-
        Platform API key for one workspace. Create it in Settings with an expiry
        date or Never expire. Keep it private; use it from Postman or your
        backend, not browser code. Widget keys are not accepted.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.