# Create an internal article

`POST /internal_articles`

> This is a subset of the full specification, limited to the `POST /internal_articles` 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 `POST /internal_articles` 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:
    post:
      summary: Create an internal article
      parameters:
        - name: Intercom-Version
          in: header
          schema:
            $ref: '#/components/schemas/intercom_version'
      tags:
        - Internal Articles
      operationId: createInternalArticle
      description: |
        You can create a new internal article by making a POST request to `https://api.intercom.io/internal_articles`.

        Requires the `read_write_articles_scope` OAuth scope.
      responses:
        '200':
          description: internal article created
          content:
            application/json:
              examples:
                internal article created:
                  value:
                    id: 42
                    title: Thanks for everything
                    body: Body of the Article
                    owner_id: 991266252
                    author_id: 991266252
                    locale: en
              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: 85e91429-72df-4e69-8a12-b55793dff59f
                    errors:
                      - code: unauthorized
                        message: Access Token Invalid
              schema:
                $ref: '#/components/schemas/error'
        '404':
          description: Teammate, folder or audience ID not found
          content:
            application/json:
              examples:
                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: Missing required parameters, body_markdown sent with body or json_blocks, or an ai_*_availability value that is not a boolean
          content:
            application/json:
              examples:
                Missing required parameters:
                  value:
                    type: error.list
                    request_id: null
                    errors:
                      - code: parameter_invalid
                        message: 'Missing required parameters: owner_id, author_id'
                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)
              schema:
                $ref: '#/components/schemas/error'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/create_internal_article_request'
            examples:
              internal_article_created:
                summary: internal article created
                value:
                  title: Thanks for everything
                  body: Body of the Article
                  owner_id: 991266252
                  author_id: 991266252
                  locale: en
              missing_required_parameters:
                summary: Missing required parameters
                value:
                  title: Thanks for everything
                  body: Body of the Internal Article
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'
    create_internal_article_request:
      description: You can create an Internal Article
      type: object
      title: Create 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`.
          example: <p>This is the body in html</p>
        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: |
            # Internal Guide

            Some instructions.
        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`.
          items:
            type: object
        locale:
          type: string
          description: The locale of the article. Defaults to `en`.
          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 owner 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 leave it without a folder.
          example: 6
        audience_ids:
          type: array
          nullable: true
          description: The list of audience IDs to target this internal article to for Fin AI Agent. Pass an empty array or omit the field for no audience targeting. 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). Defaults to false.
          default: false
          example: true
        ai_copilot_availability:
          type: boolean
          description: Whether the internal article should be available for AI Copilot. Defaults to false.
          default: false
          example: true
        ai_sales_agent_availability:
          type: boolean
          description: Whether the internal article should be available for AI Sales Agent. Defaults to false.
          default: false
          example: true
      required:
        - title
        - owner_id
        - author_id
    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'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
```
