# Update an internal article

`PUT /internal_articles/{internal_article_id}`

> This is a subset of the full specification, limited to the `PUT /internal_articles/{internal_article_id}` operation.
>
> You can find the full specification here: /_bundle/docs/references/@2.18/rest-api/api.intercom.io.yaml

```yaml
openapi: 3.0.1
info:
  title: Intercom API
  version: '2.18'
  description: This is a subset of the full specification, limited to the `PUT /internal_articles/{internal_article_id}` operation. Components more than 3 `$ref` hops away are not included.
  contact:
    name: Intercom Developer Hub
    url: https://developers.intercom.com
  license:
    name: MIT
    url: https://spdx.org/licenses/MIT
servers:
  - url: https://api.intercom.io
    description: The production API server
  - url: https://api.eu.intercom.io
    description: The european API server
  - url: https://api.au.intercom.io
    description: The australian API server
security:
  - bearerAuth: []
tags:
  - name: Internal Articles
    description: Everything about your Internal Articles
paths:
  /internal_articles/{internal_article_id}:
    put:
      summary: Update an internal article
      parameters:
        - name: Intercom-Version
          in: header
          schema:
            $ref: '#/components/schemas/intercom_version'
        - name: internal_article_id
          in: path
          required: true
          description: The unique identifier for the internal article which is given by Intercom.
          example: 123
          schema:
            type: integer
      tags:
        - Internal Articles
      operationId: updateInternalArticle
      description: |
        You can update the details of a single internal article by making a PUT request to `https://api.intercom.io/internal_articles/<id>`.

        Fields you leave out keep their current values.

        Requires the `read_write_articles_scope` OAuth scope.
      responses:
        '200':
          description: successful
          content:
            application/json:
              examples:
                successful:
                  value:
                    id: 48
                    title: Thanks for everything
                    body: Body of the Article
                    body_markdown: |
                      Body of the Article
                    owner_id: 991266252
                    author_id: 991266252
                    locale: en
                    folder_id: null
                    audience_ids:
                      - 1
                      - 2
                    ai_chatbot_availability: true
                    ai_copilot_availability: true
                    ai_sales_agent_availability: true
                    created_at: 1672928359
                    updated_at: 1672928610
                    tags:
                      type: tag.list
                      tags: []
              schema:
                $ref: '#/components/schemas/internal_article'
        '400':
          description: Bad request. The request body is empty, in which case the response has no body, or `audience_ids` is not an array of integers
          content:
            application/json:
              examples:
                audience_ids is not an array:
                  value:
                    type: error.list
                    request_id: null
                    errors:
                      - code: data_invalid
                        message: audience_ids must be an array
                audience_ids contains a non-integer:
                  value:
                    type: error.list
                    request_id: null
                    errors:
                      - code: data_invalid
                        message: audience_ids must contain only integer values
              schema:
                $ref: '#/components/schemas/error'
        '401':
          description: Unauthorized
          content:
            application/json:
              examples:
                Unauthorized:
                  value:
                    type: error.list
                    request_id: d1ea223d-bb62-42e3-8bcf-30fdcf7dbd99
                    errors:
                      - code: unauthorized
                        message: Access Token Invalid
              schema:
                $ref: '#/components/schemas/error'
        '404':
          description: Internal article, teammate, folder or audience ID not found
          content:
            application/json:
              examples:
                Internal article not found:
                  value:
                    type: error.list
                    request_id: null
                    errors:
                      - code: not_found
                        message: Resource not found
                Teammate not found:
                  value:
                    type: error.list
                    request_id: null
                    errors:
                      - code: parameter_invalid
                        message: Admin with ID 999999 not found
                Folder not found:
                  value:
                    type: error.list
                    request_id: null
                    errors:
                      - code: parameter_invalid
                        message: Folder with ID 123 not found
                Unknown audience IDs:
                  value:
                    type: error.list
                    request_id: null
                    errors:
                      - code: parameter_invalid
                        message: 'audience_ids contains unknown audience IDs: 999'
              schema:
                $ref: '#/components/schemas/error'
        '422':
          description: body_markdown sent with body or json_blocks, an ai_*_availability value that is not a boolean, or the article is in a release running a live experiment
          content:
            application/json:
              examples:
                Body and JSON blocks both provided:
                  value:
                    type: error.list
                    request_id: null
                    errors:
                      - code: parameter_invalid
                        message: body_markdown is mutually exclusive with body and json_blocks - please provide only one
                Non-boolean availability flag:
                  value:
                    type: error.list
                    request_id: null
                    errors:
                      - code: parameter_invalid
                        message: ai_chatbot_availability must be a boolean (true or false)
                Release live experiment conflict:
                  value:
                    type: error.list
                    request_id: null
                    errors:
                      - code: release_live_experiment_conflict
                        message: Can't update this internal article while release "Q3 launch" is running a live experiment on it. Complete or stop the experiment first.
              schema:
                $ref: '#/components/schemas/error'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/update_internal_article_request'
            examples:
              successful:
                summary: successful
                value:
                  title: Christmas is here!
                  body: <p>New gifts in store for the jolly season</p>
              internal_article_not_found:
                summary: Internal article not found
                value:
                  title: Christmas is here!
                  body: <p>New gifts in store for the jolly season</p>
components:
  schemas:
    internal_article:
      title: Internal Article
      type: object
      x-tags:
        - Articles
      description: The Internal Articles API is a central place to gather all information and take actions on your internal articles.
      allOf:
        - $ref: '#/components/schemas/internal_article_list_item'
    internal_article_list_item:
      title: Internal Articles
      type: object
      x-tags:
        - Internal Articles
      description: The data returned about your internal articles when you list them.
      properties:
        id:
          type: integer
          description: The unique identifier for the article which is given by Intercom.
          example: 6871119
        title:
          type: string
          description: The title of the article.
        body:
          type: string
          nullable: true
          description: The body of the article in HTML.
          example: Default language body in html
        body_markdown:
          type: string
          nullable: true
          description: The body of the article in markdown.
          example: |
            # Internal Guide

            Body of the article in markdown
        owner_id:
          type: integer
          description: The id of the owner of the article.
          example: 5017691
        author_id:
          type: integer
          description: The id of the author of the article.
          example: 5017691
        created_at:
          type: integer
          format: date-time
          description: The time when the article was created.
          example: 1672928359
        updated_at:
          type: integer
          format: date-time
          description: The time when the article was last updated.
          example: 1672928610
        locale:
          type: string
          description: The default locale of the article.
        folder_id:
          type: integer
          nullable: true
          description: The ID of the folder this article belongs to, or null if not in a folder.
          example: 6
        audience_ids:
          type: array
          nullable: true
          description: The list of audience IDs this internal article is targeted to for Fin AI Agent. Empty array means no audience targeting is set.
          items:
            type: integer
          example:
            - 1
            - 2
        ai_chatbot_availability:
          type: boolean
          description: Whether the internal article is available for AI Chatbot (Fin).
          example: true
        ai_copilot_availability:
          type: boolean
          description: Whether the internal article is available for AI Copilot.
          example: true
        ai_sales_agent_availability:
          type: boolean
          description: Whether the internal article is available for AI Sales Agent.
          example: true
        tags:
          $ref: '#/components/schemas/tags'
    error:
      type: object
      title: Error
      description: The API will return an Error List for a failed request, which will contain one or more Error objects.
      properties:
        type:
          type: string
          description: The type is error.list
          example: error.list
        request_id:
          type: string
          nullable: true
          format: uuid
          description: ''
          example: f93ecfa8-d08a-4325-8694-89aeb89c8f85
        errors:
          type: array
          description: An array of one or more error objects
          items:
            properties:
              code:
                type: string
                description: A string indicating the kind of error, used to further qualify the HTTP response code.
                example: unauthorized
              message:
                type: string
                nullable: true
                description: Optional. Human readable description of the error.
                example: Access Token Invalid
              data:
                type: object
                nullable: true
                additionalProperties: true
                description: Optional. Extra detail about the error, for example `required_permissions` on a 403 `action_forbidden` error.
                example:
                  required_permissions:
                    - read_conversations
            required:
              - code
      required:
        - type
        - errors
    intercom_version:
      description: Intercom API version.</br>If you omit the header, the API uses the version set in your app package, and 1.0 if none is set.
      type: string
      example: '2.18'
      enum:
        - '1.0'
        - '1.1'
        - '1.2'
        - '1.3'
        - '1.4'
        - '2.0'
        - '2.1'
        - '2.2'
        - '2.3'
        - '2.4'
        - '2.5'
        - '2.6'
        - '2.7'
        - '2.8'
        - '2.9'
        - '2.10'
        - '2.11'
        - '2.12'
        - '2.13'
        - '2.14'
        - '2.15'
        - '2.16'
        - '2.17'
        - '2.18'
    tags:
      title: Tags
      type: object
      description: A list of tags objects associated with a conversation, article or internal article
      properties:
        type:
          type: string
          description: The type of the object
          enum:
            - tag.list
          example: tag.list
        tags:
          type: array
          description: A list of tags objects associated with the object.
          items:
            $ref: '#/components/schemas/tag'
    update_internal_article_request:
      description: You can Update an Internal Article
      type: object
      title: Update Internal Article Request Payload
      nullable: true
      properties:
        title:
          type: string
          description: The title of the article.
          example: Thanks for everything
        body:
          type: string
          description: The content of the article in HTML. Mutually exclusive with `body_markdown`.
        body_markdown:
          type: string
          description: The content of the article in markdown. An alternative to `body` — you can provide content as markdown instead of HTML. Mutually exclusive with `body` and `json_blocks`.
          example: |
            ## Updated

            New content.
        json_blocks:
          type: array
          description: The content of the article as a list of content blocks. Used only when `body` is not provided. Cannot be combined with `body_markdown`. If none of `body`, `body_markdown` and `json_blocks` is provided, the existing content is kept.
          items:
            type: object
        locale:
          type: string
          description: The locale of the article. If omitted, the existing locale is kept.
          example: en
        author_id:
          type: integer
          description: The id of the author of the article.
          example: 1295
        owner_id:
          type: integer
          description: The id of the author of the article.
          example: 1295
        folder_id:
          type: integer
          nullable: true
          description: The ID of the folder to place this article in. Pass `null` to remove it from its folder. If omitted, the folder is unchanged.
          example: 6
        audience_ids:
          type: array
          nullable: true
          description: The list of audience IDs to target this internal article to for Fin AI Agent. Omitting the field leaves existing audience memberships unchanged (PATCH semantics). Pass `[]` to clear all audience memberships. Unknown audience IDs return a `404` error with no partial commit.
          items:
            type: integer
          example:
            - 1
            - 2
        ai_chatbot_availability:
          type: boolean
          description: Whether the internal article should be available for AI Chatbot (Fin).
          example: true
        ai_copilot_availability:
          type: boolean
          description: Whether the internal article should be available for AI Copilot.
          example: true
        ai_sales_agent_availability:
          type: boolean
          description: Whether the internal article should be available for AI Sales Agent.
          example: true
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
```
