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

# Schedule article

> This API schedules the article to be published or unpublished at a future time. An article holds at most one schedule of each kind. When it has both, the unpublish time must not come after the publish time. For CLI sessions, this needs the Modify articles permission. A `publish` schedule also needs the Manage articles permission. A synced article cannot be scheduled.


> [!NOTE]
>
> Replace `{your-subdomain}` with your workspace's subdomain. \
> Learn how to find your subdomain in [Workspace subdomain](https://apidocs.neetokb.com/api/workspace-subdomain.md).


## OpenAPI

````yaml bundled/articles.yaml POST /articles/{article_id}/schedules
openapi: 3.0.3
info:
  title: NeetoKB Articles API
  version: 1.0.0
servers:
  - description: NeetoKB API
    url: https://{your-subdomain}.neetokb.com/api/external/v2
    variables:
      your-subdomain:
        default: spinkart
        description: >-
          Replace **spinkart** with your [workspace's
          subdomain](/api/workspace-subdomain).
security: []
paths:
  /articles/{article_id}/schedules:
    post:
      summary: Schedule article
      description: >
        This API schedules the article to be published or unpublished at a
        future time. An article holds at most one schedule of each kind. When it
        has both, the unpublish time must not come after the publish time. For
        CLI sessions, this needs the Modify articles permission. A `publish`
        schedule also needs the Manage articles permission. A synced article
        cannot be scheduled.
      parameters:
        - $ref: '#/components/parameters/api_key_header'
        - $ref: '#/components/parameters/article_id_param'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/create_schedule_request'
      responses:
        '201':
          description: Created - Schedule created
          content:
            application/json:
              schema:
                type: object
                properties:
                  schedule:
                    $ref: '#/components/schemas/schedule'
        '401':
          $ref: '#/components/responses/unauthorized_response'
        '403':
          $ref: '#/components/responses/forbidden_response'
        '404':
          $ref: '#/components/responses/not_found_response'
        '422':
          description: >-
            Unprocessable Entity - `kind`, `datetime` or `time_zone` is missing
            or invalid, the date is in the past, the article already has a
            schedule of that kind, or the unpublish time comes after the publish
            time
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error_body'
components:
  parameters:
    api_key_header:
      in: header
      name: X-Api-Key
      description: >-
        Use the X-Api-Key header to provide your workspace API key. Refer to
        [Authentication](/api/authentication) for more information.
      required: true
      schema:
        type: string
        default: your-api-key
    article_id_param:
      in: path
      name: article_id
      description: >-
        Unique identifier of the article. Can be the article's slug, permalink,
        or ID. Refer to [Getting the Article ID](/api/getting-article-id)
        section for detailed instructions.
      required: true
      schema:
        type: string
  schemas:
    create_schedule_request:
      type: object
      required:
        - kind
        - datetime
        - time_zone
      properties:
        kind:
          type: string
          enum:
            - publish
            - unpublish
          description: Whether the schedule publishes or unpublishes the article.
          example: publish
        datetime:
          type: string
          description: >-
            ISO 8601 date and time in the future. When it has no offset, it is
            read in `time_zone`.
          example: '2999-01-01T10:00:00'
        time_zone:
          type: string
          description: IANA time zone name.
          example: Asia/Kolkata
        publish_note:
          type: string
          description: Optional note saved with the schedule.
    schedule:
      type: object
      properties:
        id:
          type: string
          format: uuid
        kind:
          type: string
          enum:
            - publish
            - unpublish
        datetime:
          type: string
          example: '2999-01-01T10:00:00+05:30'
        time_zone:
          type: string
          example: Asia/Kolkata
        publish_note:
          type: string
          nullable: true
    error_body:
      type: object
      properties:
        error:
          type: string
  responses:
    unauthorized_response:
      description: Unauthorized - API key is missing or invalid
    forbidden_response:
      description: >-
        Forbidden - The CLI session does not have the permission this change
        needs
    not_found_response:
      description: Not Found - The record does not exist in this workspace
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: string
                example: Not found.

````

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