Skip to content

Knowledge

Create an article

Adds an article that the answer endpoint can search. Only owners and admins signed in to the app can add articles.

POST/api/v1/knowledge
  • Console only: owner or admin
  • Workspace: X-Tenant-ID

Headers

  • Cookiestringrequired

    The whatsappx_session cookie the app sets when you sign in. Browsers send it automatically; API keys are not accepted on this endpoint.

    Example
    whatsappx_session=…
  • X-Tenant-IDuuidrequired

    Workspace id. Required for session requests. You can pass ?tenant=<id> instead.

    Example
    8d0f6c2e-3b1a-4c55-9a7e-2f4b6d1e9c30

Body

application/json
  • titlestringrequired

    Article title.

    Constraints
    2–120 characters.
    Example
    Returns policy
  • bodystringrequired

    Article text.

    Constraints
    10–20000 characters.
    Example
    Items can be returned within 30 days with the receipt. Refunds go back to the original payment method.

Response

201 Createdapplication/json

  • iduuid

    Article id.

  • titlestring

    Article title.

  • bodystring

    Article text.

  • created_atinteger

    Creation time in Unix seconds.

Status codes

  • 201Created. The new article.
  • 400Bad request. A length rule failed, or the body is not JSON (invalid body).
  • 401Unauthorized. No signed-in session (unauthorized).
  • 403Forbidden. API keys can never call this endpoint (API keys cannot administer workspaces). A signed-in user who is not an owner or admin gets admin required; a user who is not a member of the workspace gets forbidden.