> ## 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.

# Update articles in bulk

> This API changes up to 100 articles at once. Send `article_ids` and exactly one of `category_id`, `state` or `status`. It is all-or-nothing. For CLI sessions, this needs the Modify articles permission. Setting `state` also needs the Manage articles permission. The `put` method works too.


> [!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 PATCH /articles/bulk_update
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/bulk_update:
    patch:
      summary: Update articles in bulk
      description: >
        This API changes up to 100 articles at once. Send `article_ids` and
        exactly one of `category_id`, `state` or `status`. It is all-or-nothing.
        For CLI sessions, this needs the Modify articles permission. Setting
        `state` also needs the Manage articles permission. The `put` method
        works too.
      parameters:
        - $ref: '#/components/parameters/api_key_header'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/bulk_update_articles_request'
      responses:
        '200':
          description: OK - Articles updated
          content:
            application/json:
              schema:
                type: object
                properties:
                  updated_articles:
                    type: array
                    items:
                      $ref: '#/components/schemas/article_id_slug'
        '401':
          $ref: '#/components/responses/unauthorized_response'
        '403':
          description: >-
            Forbidden - The CLI session lacks the permission this change needs,
            or `state` or `status` was sent for a synced article
        '404':
          $ref: '#/components/responses/not_found_response'
        '422':
          description: >-
            Unprocessable Entity - `article_ids` is empty or has more than 100
            entries, none of `category_id`, `state` and `status` was sent, more
            than one of them was sent, `state` or `status` is not an allowed
            value, or the category is unknown. Nothing is changed.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: Pass only one of category_id, state or status.
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
  schemas:
    bulk_update_articles_request:
      type: object
      description: >-
        Send `article_ids` and exactly one of `category_id`, `state` or
        `status`. Sending none, or more than one, returns 422.
      required:
        - article_ids
      properties:
        article_ids:
          $ref: '#/components/schemas/bulk_article_ids'
        category_id:
          type: string
          format: uuid
          description: Moves the articles to this category.
        state:
          type: string
          enum:
            - draft
            - published
          description: Sets the state of the articles.
        status:
          type: string
          enum:
            - archive
            - active
          description: Archives or unarchives the articles.
    article_id_slug:
      type: object
      properties:
        id:
          type: string
          format: uuid
        slug:
          type: string
          example: getting-started
    bulk_article_ids:
      type: array
      minItems: 1
      maxItems: 100
      items:
        type: string
      description: >-
        Between 1 and 100 articles, each given by slug, permalink identifier or
        UUID.
      example:
        - getting-started
        - a-84af178b
  responses:
    unauthorized_response:
      description: Unauthorized - API key is missing or invalid
    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.