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

# List articles

> The portal's articles — drafts and archived included, unlike the public help center — most recently updated first, paginated without a total count (`has_next`).

Filters combine with AND. `query` is full-text: it matches word prefixes across title, description and content. `category_slug` filters by the category's slug (not id); `status` accepts exactly `draft`, `published` or `archived` — anything else is a 400 whose `details` names the parameter. Like every article endpoint, it requires being an administrator of the account or a member of the portal — the listing returns drafts with their full content, so it carries the same gate as reading one article.

export const CloudChatYourValues = () => {
  const STORAGE_KEY = "cloudchat-api-selected-account";
  const CREDENTIALS_HREF = "/api-reference/cloudchat/credentials";
  const [saved, setSaved] = useState(null);
  const [ready, setReady] = useState(false);
  useEffect(() => {
    let value = null;
    try {
      const raw = window.localStorage.getItem(STORAGE_KEY);
      if (raw) {
        const parsed = JSON.parse(raw);
        if (parsed && parsed.instance && parsed.account) {
          value = {
            instance: String(parsed.instance),
            account: String(parsed.account),
            name: typeof parsed.name === "string" && parsed.name ? parsed.name : null
          };
        }
      }
    } catch (error) {
      value = null;
    }
    setSaved(value);
    setReady(true);
  }, []);
  const shell = "not-prose rounded-xl border border-gray-200 dark:border-white/10 bg-gray-50 dark:bg-white/5 px-4 py-3 mb-6";
  if (!ready || !saved) {
    return <div className={shell}>
        <p className="text-sm text-gray-600 dark:text-gray-400">
          Every request below needs your <code>cloudchat-instance</code> header and your account
          id.{" "}
          <a href={CREDENTIALS_HREF} className="underline underline-offset-2">
            Paste your token
          </a>{" "}
          and they will show up here, ready to copy.
        </p>
      </div>;
  }
  return <div className={shell}>
      <div className="flex flex-wrap items-baseline gap-x-6 gap-y-2">
        <div>
          <span className="text-xs uppercase tracking-wide text-gray-500 dark:text-gray-400">
            cloudchat-instance
          </span>
          <span className="ml-2 font-mono text-sm text-gray-900 dark:text-gray-100">
            {saved.instance}
          </span>
        </div>
        <div>
          <span className="text-xs uppercase tracking-wide text-gray-500 dark:text-gray-400">
            accountId
          </span>
          <span className="ml-2 font-mono text-sm text-gray-900 dark:text-gray-100">
            {saved.account}
          </span>
        </div>
        {saved.name && <span className="text-sm text-gray-600 dark:text-gray-400">{saved.name}</span>}
        <a href={CREDENTIALS_HREF} className="text-sm text-gray-500 dark:text-gray-400 underline underline-offset-2">
          Change
        </a>
      </div>
    </div>;
};

<CloudChatYourValues />


## OpenAPI

````yaml api-reference/specs/cloudchat/v1.json GET /v1/accounts/{accountId}/portals/{portalSlug}/articles
openapi: 3.0.1
info:
  title: Cloud Chat API
  version: v1
  description: >-
    The curated public surface of Cloud Chat. Every call needs two things: the
    Bearer token from `POST /auth/v1/signin`, and the `cloudchat-instance`
    header that says which Cloud Chat instance your company lives on.


    If you don't know your instance value, the [Find your
    credentials](/api-reference/cloudchat/credentials) page reads it out of your
    own token in the browser.
servers:
  - url: https://api.cloudhumans.com/cloudchat
    description: Production
security:
  - bearerAuth: []
tags:
  - name: Canned Responses
    description: >-
      Canned responses — the shortcuts agents expand while replying. Each one
      belongs to a single account and is identified by its short code.
  - name: Conversations
    description: >-
      Read-only access to the conversations of an account. What you can see
      follows the same rule as the dashboard: an administrator token sees every
      inbox, an agent token only the inboxes it is a member of.
  - name: Help Center
    description: >-
      Portals, categories and articles of the help center — the public FAQ your
      customers read.
  - name: Uploads
    description: Store the images help center articles embed.
  - name: Labels
    description: >-
      Read-only access to the labels an account has defined. A label is a tag
      conversations and contacts carry; this endpoint only lists the label
      definitions themselves.
  - name: Inboxes
    description: >-
      Read-only access to the inboxes a token can see — every inbox of the
      account for an administrator, only its memberships for an agent. Never
      includes the channel's credentials.
  - name: Agents
    description: >-
      Read-only access to the human and AI agents of an account. A hidden admin
      (the platform's own support user) never appears, on the list or by id.
  - name: Teams
    description: >-
      Teams group agents for assignment. Listing and reading are open to any
      member; creating and updating a team, and managing its membership, require
      an administrator token. A system-managed team (provisioned by the
      platform) can be read like any other but never updated.
  - name: Macros
    description: >-
      Macros bundle a sequence of actions an agent runs against a conversation
      from the dashboard. This surface lets you list, read and write macro
      definitions — running one is not part of the v1 contract. A macro is
      either `global` (visible to the whole account) or `personal` (visible only
      to its author); an agent token can only create personal macros.
  - name: Automation Rules
    description: >-
      Read-only access to the account's automation rules — administrator only.
      An agent token gets a 403 on every operation in this group.
  - name: Availability Reasons
    description: >-
      The reasons an agent can go `busy` for, configured per account. Listing is
      open to any member; creating, updating and deleting require an
      administrator token. Deleting is a soft delete — the reason disappears
      from listings but agents' past availability history keeps referencing it.
paths:
  /v1/accounts/{accountId}/portals/{portalSlug}/articles:
    get:
      tags:
        - Help Center
      summary: List articles
      description: >-
        The portal's articles — drafts and archived included, unlike the public
        help center — most recently updated first, paginated without a total
        count (`has_next`).


        Filters combine with AND. `query` is full-text: it matches word prefixes
        across title, description and content. `category_slug` filters by the
        category's slug (not id); `status` accepts exactly `draft`, `published`
        or `archived` — anything else is a 400 whose `details` names the
        parameter. Like every article endpoint, it requires being an
        administrator of the account or a member of the portal — the listing
        returns drafts with their full content, so it carries the same gate as
        reading one article.
      operationId: listHelpCenterArticles
      parameters:
        - $ref: '#/components/parameters/AccountId'
        - $ref: '#/components/parameters/CloudChatInstance'
        - $ref: '#/components/parameters/PortalSlug'
        - name: locale
          in: query
          required: false
          description: Keep only articles of this locale.
          schema:
            type: string
            example: en
        - name: status
          in: query
          required: false
          description: Keep only articles in this status.
          schema:
            type: string
            enum:
              - draft
              - published
              - archived
        - name: category_slug
          in: query
          required: false
          description: >-
            Keep only articles filed under this category, addressed by the
            category's slug. Prefer `category_id` when you have it: a slug can
            be rewritten by [updating the
            category](/api-reference/cloudchat/endpoints/update-a-category), and
            a filter holding an old slug matches nothing and reports no error.
          schema:
            type: string
            example: getting-started
        - name: category_id
          in: query
          required: false
          description: >-
            Keep only articles filed under this category, addressed by its
            numeric `id`. [List
            categories](/api-reference/cloudchat/endpoints/list-categories)
            returns the ids, and every article carries its own in `category_id`.
            The stable way to name a category: unlike the slug, the id never
            changes. An id that is not in this portal is not an error — the page
            just comes back empty. Sent together with `category_slug`, both
            narrow, so an article has to match the two. A value that is not a
            positive integer is a 400 naming `category_id`.
          schema:
            type: integer
            example: 12
        - name: query
          in: query
          required: false
          description: >-
            Full-text search over title, description and content. Matches word
            prefixes: `pass` finds “password”.
          schema:
            type: string
            example: password
        - name: page
          in: query
          required: false
          description: >-
            1-based page number. Anything below 1 — including a non-numeric
            value — is read as 1.
          schema:
            type: integer
            minimum: 1
            default: 1
            example: 1
        - name: per_page
          in: query
          required: false
          description: >-
            Results per page. Clamped, never rejected: above 100 you get 100,
            below 1 you get the default 25.
          schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 25
            example: 25
      responses:
        '200':
          description: >-
            A page of articles. `data` is empty when nothing matches — an empty
            page is not a 404.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ArticleList'
              example:
                data:
                  - id: 118
                    title: How to reset your password
                    slug: how-to-reset-your-password
                    content: Open **Settings → Security** and click *Reset password*.
                    description: Self-service password reset, step by step.
                    status: draft
                    locale: en
                    category_id: 12
                    associated_article_id: null
                    author_id: 7
                    portal_slug: acme-help
                    public_url: >-
                      https://help.acme.com/hc/acme-help/articles/how-to-reset-your-password
                    created_at: '2026-08-10T14:32:05.123Z'
                    updated_at: '2026-08-10T14:32:05.123Z'
                meta:
                  current_page: 1
                  per_page: 25
                  has_next: false
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          description: >-
            Two situations answer with this code: the account is suspended (the
            reason the other endpoints share), or — on every article endpoint,
            listing included — your user is neither an administrator of the
            account nor a member of this portal. Ask an administrator to add you
            to the portal's members.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error:
                  code: forbidden
                  message: You are not allowed to perform this action.
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/InternalError'
components:
  parameters:
    AccountId:
      name: accountId
      in: path
      required: true
      description: >-
        Your Cloud Chat account. It has to be an account your token grants
        membership on, and it has to live on the instance in the
        `cloudchat-instance` header — the two travel together. Account numbers
        are only unique **within** an instance, so the same number is a
        different company on another instance. Usually a mismatched pair fails
        closed with a 401, because your user does not exist on the other
        instance — but if your identity happens to exist on both, the call
        succeeds against the other company's data, silently. Read it and you are
        looking at the wrong help center; write it and you have stored into the
        wrong account. Send the two values that were given to you together, and
        never try a number to see what answers.
      schema:
        type: integer
        example: 1
    CloudChatInstance:
      name: cloudchat-instance
      in: header
      required: true
      description: >-
        Your Cloud Chat instance ID — an integer, fixed for your company, told
        at onboarding. [The API
        overview](/api-reference/cloudchat/overview#two-headers-every-call)
        explains how instances work, how to find yours, and the errors a wrong
        or missing value produces.
      schema:
        type: integer
        example: 1
    PortalSlug:
      name: portalSlug
      in: path
      required: true
      description: >-
        The portal's slug — the URL-safe handle you see in its public address
        (`/hc/<slug>/...`), not a numeric id. [List
        portals](/api-reference/cloudchat/endpoints/list-portals) returns every
        slug on the account. Note the asymmetry: portals are addressed by slug,
        articles by numeric id.
      schema:
        type: string
        example: acme-help
  schemas:
    ArticleList:
      type: object
      description: One page of articles.
      required:
        - data
        - meta
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/Article'
        meta:
          $ref: '#/components/schemas/HelpCenterPageMeta'
    Error:
      type: object
      description: The error envelope every Cloud Chat API response uses.
      required:
        - error
      properties:
        error:
          type: object
          required:
            - code
            - message
          properties:
            code:
              type: string
              description: >-
                The stable, machine-readable reason. Branch on this, never on
                `message`.
              enum:
                - unauthorized
                - forbidden
                - not_found
                - validation_failed
                - bad_request
                - internal_error
              example: not_found
            message:
              type: string
              description: >-
                The reason in words, localized to your account's language
                (English, Spanish or Brazilian Portuguese; English when the
                account is set to anything else). Wording changes with the
                account and between releases, so never match on it.


                Two cases stay in English whatever the account is set to:
                `unauthorized`, decided before any account is known, and the
                account-level `not_found`, which must not reveal the account's
                language.
              example: Resource could not be found.
            details:
              type: array
              description: >-
                Present on some rejections — a 400 for a refused query parameter
                or upload mode, for example. One entry per offending field,
                localized to the account's language like `message` — match on
                `code` and `field`, never on the text.
              items:
                type: object
                required:
                  - field
                  - code
                  - message
                properties:
                  field:
                    type: string
                    description: Which request field the rule was about.
                  code:
                    type: string
                    description: Stable, machine-readable reason.
                  message:
                    type: string
                    description: The rule in words.
    Article:
      type: object
      description: A help center article, drafts included.
      required:
        - id
        - title
        - slug
        - content
        - status
        - locale
        - author_id
        - portal_slug
        - public_url
        - created_at
        - updated_at
      properties:
        id:
          type: integer
          example: 118
          description: What the single-article endpoints take as `articleId`.
        title:
          type: string
          example: How to reset your password
        slug:
          type: string
          example: how-to-reset-your-password
          description: URL-safe handle generated from the title; forms the public URL.
        content:
          type: string
          description: >-
            The body, in Markdown. Images are ordinary Markdown image links —
            [upload the
            file](/api-reference/cloudchat/endpoints/upload-an-image) and embed
            the returned `file_url`.
        description:
          type: string
          nullable: true
          description: Short summary shown in listings and search results.
        status:
          type: string
          enum:
            - draft
            - published
            - archived
          example: draft
          description: >-
            Only `published` articles appear on the public help center. New
            articles start as `draft` unless created with an explicit status.
        locale:
          type: string
          example: en
          description: >-
            Inherited at creation from the category (or the portal default when
            there is none). Not directly writable — move the article to a
            category of the right locale instead.
        category_id:
          type: integer
          nullable: true
          example: 12
          description: >-
            Category the article is filed under. Decides where it renders — and
            its locale.
        associated_article_id:
          type: integer
          nullable: true
          example: null
          description: >-
            Root article linking the translations of the same article across
            locales. When writing, any article of the family is accepted — the
            server normalizes it to the root.
        author_id:
          type: integer
          nullable: true
          example: 7
          description: >-
            Always the authenticated user behind the token. There is no way to
            write an article as someone else. Null when the author was deleted:
            the account keeps the article and drops the reference, so an orphan
            article still reads normally with no author to show.
        portal_slug:
          type: string
          example: acme-help
        public_url:
          type: string
          example: >-
            https://help.acme.com/hc/acme-help/articles/how-to-reset-your-password
          description: >-
            Where the article is served once `published` — on the portal's
            custom domain when one is configured, on the default help center
            host otherwise.
        created_at:
          type: string
          format: date-time
          example: '2026-08-10T14:32:05.123Z'
        updated_at:
          type: string
          format: date-time
          example: '2026-08-10T14:32:05.123Z'
    HelpCenterPageMeta:
      type: object
      description: Where you are in the result set.
      required:
        - current_page
        - per_page
        - has_next
      properties:
        current_page:
          type: integer
          example: 1
        per_page:
          type: integer
          description: The page size actually applied, after clamping.
          example: 25
        has_next:
          type: boolean
          example: false
          description: >-
            Whether another page exists. There is no total count — walk forward
            while this is `true`.
    GatewayError:
      type: object
      description: >-
        Rejected by the gateway before Cloud Chat saw it, so it does not use the
        `error` envelope.
      required:
        - message
      properties:
        message:
          type: string
          example: API rate limit exceeded
        request_id:
          type: string
          description: Gateway request id. Quote it when reporting a problem.
          example: f3f7567638d4b65a8003057d0c77d275
  responses:
    BadRequest:
      description: >-
        The request itself is malformed, before any value is validated:


        - a body that isn't valid JSON, or one with no `canned_response`
        wrapper,

        - a `canned_response` that isn't an object (`{"canned_response":
        "text"}`),

        - `page`, `per_page`, `search` or `sort` sent as an array or a nested
        object (`?page[]=1`, `?sort[x]=y`) instead of a plain value,

        - **the `cloudchat-instance` header missing or holding a value we don't
        route,**

        - an `accountId` that is not a number — including the literal
        `{accountId}` that some API clients send when the argument is left
        unset. This one answers with the normal envelope and `error.details`
        naming `accountId`, and it is deliberately **not** a 404: a 404 would
        mean the account cannot be reached, while this means the value was never
        an account id at all, so re-read the argument instead of trying other
        numbers.


        **Two different shapes answer with 400, and the difference will bite you
        on day one.** That last case is rejected before the request reaches the
        API, so `error` is a plain **string** instead of the usual object:


        ```json

        { "error": "<human-readable message>" }

        ```


        Every other 400 uses the normal envelope, where `error` is an object
        with `code` and `message`. Reading `error.code` without checking the
        type first throws on the missing-header case — which is the most likely
        400 of your first integration. Check `typeof error === "string"` first,
        or read `error?.code` defensively.


        A 400 always means fix the request shape; it never means a value was
        rejected. Rejected values are 422.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: bad_request
              message: The request is malformed.
    Unauthorized:
      description: >-
        No Bearer token, or one that is expired, malformed, or not a Cognito
        token. Sign in again for a fresh `id_token`.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: unauthorized
              message: >-
                Authentication is required. Send a valid Bearer token in the
                Authorization header.
    NotFound:
      description: >-
        The resource is not there for you. Three situations answer with this
        code, and the first two apply to **every** endpoint — the account is
        resolved before anything else runs, so a list or a create fails this way
        too:


        - the account does not exist on this instance,

        - the account exists but your token has no membership on it,

        - on an endpoint that names one, the resource it names (a canned
        response, a portal, an article) does not exist where the path says it
        does.


        The first two are deliberately indistinguishable — same status, same
        body, and the message stays in English in both, since translating it
        would reveal the account's configured language. So you cannot use this
        endpoint to find out which account ids exist. The third case is
        localized like every other error, which is safe because you only reach
        it once membership is established.


        Either way a 404 is not worth retrying. Check the `accountId`, the
        `cloudchat-instance` value, and that your user is a member of the
        account.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: not_found
              message: Resource could not be found.
    TooManyRequests:
      description: >-
        Rate limited per source IP. Note the envelope: this one is `{ "message":
        ... }`, because the request never reached the API.


        Don't hardcode the limit — read it from the response. `Retry-After` says
        how many seconds to wait, and every response (not just this one) carries
        `ratelimit-limit`, `ratelimit-remaining` and `ratelimit-reset`, the last
        in seconds.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/GatewayError'
          example:
            message: API rate limit exceeded
    InternalError:
      description: >-
        Something failed on our side. The response never carries the underlying
        error, but it is reported to our monitoring automatically — no need to
        file anything for a one-off.


        Retrying is reasonable, with one caveat on `POST`: a 500 does not prove
        the write did not happen, so a retry can come back `422` with
        `short_code` already taken. That 422 means the first attempt succeeded —
        list the account and confirm before treating it as a failure.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: internal_error
              message: An unexpected error occurred. Please try again later.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        The `id_token` from `POST /auth/v1/signin`, sent as `Authorization:
        Bearer <id_token>`. Not the `access_token` — that one does not carry the
        identity Cloud Chat authorizes on.

````