POST
/
api
/
v1
/
accounts
/
{account_id}
/
portals
/
{id}
/
articles
Add a new article
curl --request POST \
  --url https://app.chatwoot.com/api/v1/accounts/{account_id}/portals/{id}/articles \
  --header 'Content-Type: application/json' \
  --header 'api_access_token: <api-key>' \
  --data '{
  "title": "Article Title",
  "slug": "article-title",
  "position": 1,
  "content": "This is the content of the article",
  "description": "This is the description of the article",
  "category_id": 1,
  "author_id": 1,
  "associated_article_id": 2,
  "status": 1,
  "locale": "en",
  "meta": {
    "tags": [
      "article_name"
    ],
    "title": "article title",
    "description": "article description"
  }
}'
{
  "id": 123,
  "content": "<string>",
  "meta": {},
  "position": 123,
  "title": "<string>",
  "slug": "<string>",
  "views": 123,
  "portal_id": 123,
  "account_id": 123,
  "author_id": 123,
  "category_id": 123,
  "folder_id": 123,
  "associated_article_id": 123
}

Authorizations

api_access_token
string
header
required

This token can be obtained by visiting the profile page or via rails console. Provides access to endpoints based on the user permissions levels. This token can be saved by an external system when user is created via API, to perform activities on behalf of the user.

Path Parameters

account_id
integer
required

The numeric ID of the account

id
string
required

The slug identifier of the portal

Body

application/json
title
string

The title of the article

Example:

"Article Title"

slug
string

The slug of the article

Example:

"article-title"

position
integer

article position in category

Example:

1

content
string

The text content.

Example:

"This is the content of the article"

description
string

The description of the article

Example:

"This is the description of the article"

category_id
integer

The category id of the article

Example:

1

author_id
integer

The author agent id of the article

Example:

1

associated_article_id
integer

To associate similar articles to each other, e.g to provide the link for the reference.

Example:

2

status
integer

The status of the article. 0 for draft, 1 for published, 2 for archived

Example:

1

locale
string

The locale of the article

Example:

"en"

meta
object

Use for search

Example:
{
"tags": ["article_name"],
"title": "article title",
"description": "article description"
}

Response

Success

id
integer
content
string

The text content.

meta
object
position
integer
status
enum<integer>
title
string
slug
string
views
integer
portal_id
integer
account_id
integer
author_id
integer
category_id
integer
folder_id
integer
associated_article_id
integer

To associate similar articles to each other, e.g to provide the link for the reference.