Articles

Articles power your knowledge base. Create, publish, and manage help content that customers and agents can search.

The Article object

id string

Unique article identifier (art_ prefix)

title string

Article title

content string

Article body (Markdown)

categoryId string

Category UUID from the Categories API, or null

status string

One of the team's article statuses (GET /settings articleStatuses), e.g. draft or published

isPublic boolean

Whether visible in public knowledge base

tags string[]

Array of tag strings

viewCount integer

Number of times viewed

useCount integer

Number of times used in replies

createdAt datetime

When the article was created

updatedAt datetime

Last modification timestamp

Endpoints

GET /api/v1/teams/{teamId}/articles

List Articles

Try it

Retrieve a paginated list of knowledge base articles with optional filtering.

Query Parameters

category string

Filter by category UUID

status string

Filter by one of the team's article statuses (GET /settings articleStatuses), e.g. draft or published

isPublic boolean

Filter by public visibility

search string

Full-text search in title and content

page integer

Page number (1-indexed)

Default: 1

pageSize integer

Results per page (max 100)

Default: 20

Code Examples

bash
curl -X GET "https://www.cstar.help/api/v1/teams/{teamId}/articles?status=published" \
  -H "Authorization: Bearer sk_live_your_key"

Responses

200 Paginated list of articles
json
{
  "success": true,
  "data": [
    {
      "id": "art_a1b2c3d4e5f67890abcdef1234567890",
      "title": "How to reset your password",
      "categoryId": "3f2b6c1e-8a4d-4f7b-9c2e-1d5a7b9e0f12",
      "status": "published",
      "isPublic": true,
      "viewCount": 342,
      "useCount": 28,
      "createdAt": "2025-11-15T09:00:00Z"
    }
  ],
  "pagination": {
    "total": 142,
    "page": 1,
    "pageSize": 20,
    "hasMore": true
  },
  "meta": {
    "requestId": "req_abc123",
    "timestamp": "2025-12-10T14:30:00Z"
  }
}

401 Authentication failed: missing or invalid API key
json
{
  "success": false,
  "error": {
    "type": "authentication_error",
    "code": "invalid_api_key",
    "message": "The API key provided is invalid or has been revoked",
    "doc_url": "https://www.cstar.help/developers/errors#invalid_api_key",
    "request_id": "req_abc123"
  },
  "meta": {
    "timestamp": "2025-12-10T14:30:00Z"
  }
}

403 Insufficient permissions: wrong key type or team access
json
{
  "success": false,
  "error": {
    "type": "authentication_error",
    "code": "insufficient_permissions",
    "message": "Your API key does not have permission for this operation",
    "doc_url": "https://www.cstar.help/developers/errors#insufficient_permissions",
    "request_id": "req_abc123"
  },
  "meta": {
    "timestamp": "2025-12-10T14:30:00Z"
  }
}

429 Rate limit exceeded
json
{
  "success": false,
  "error": {
    "type": "rate_limit_error",
    "code": "rate_limit_exceeded",
    "message": "Rate limit exceeded. Try again in 60 seconds.",
    "retryAfter": 60,
    "doc_url": "https://www.cstar.help/developers/errors#rate_limit_exceeded",
    "request_id": "req_abc123"
  },
  "meta": {
    "timestamp": "2025-12-10T14:30:00Z"
  }
}

GET /api/v1/teams/{teamId}/articles/{articleId}

Get Article

Try it

Retrieve a single article by ID with full content.

Path Parameters

articleId string required

The article ID (art_ prefix)

Code Examples

bash
curl -X GET "https://www.cstar.help/api/v1/teams/{teamId}/articles/{articleId}" \
  -H "Authorization: Bearer sk_live_your_key"

Responses

200 The article object
json
{
  "success": true,
  "data": {
    "id": "art_a1b2c3d4e5f67890abcdef1234567890",
    "title": "How to reset your password",
    "content": "# Password Reset\n\n1. Go to login page\n2. Click \"Forgot Password\"...",
    "categoryId": "3f2b6c1e-8a4d-4f7b-9c2e-1d5a7b9e0f12",
    "status": "published",
    "isPublic": true,
    "tags": [
      "password",
      "account",
      "security"
    ],
    "viewCount": 342,
    "useCount": 28,
    "createdAt": "2025-11-15T09:00:00Z",
    "updatedAt": "2025-12-01T11:00:00Z"
  },
  "meta": {
    "requestId": "req_abc123",
    "timestamp": "2025-12-10T14:30:00Z"
  }
}

404 Article not found
json
{
  "success": false,
  "error": {
    "type": "not_found_error",
    "code": "resource_not_found",
    "message": "Article not found",
    "doc_url": "https://www.cstar.help/developers/errors#resource_not_found",
    "request_id": "req_abc123"
  },
  "meta": {
    "timestamp": "2025-12-10T14:30:00Z"
  }
}

401 Authentication failed: missing or invalid API key
json
{
  "success": false,
  "error": {
    "type": "authentication_error",
    "code": "invalid_api_key",
    "message": "The API key provided is invalid or has been revoked",
    "doc_url": "https://www.cstar.help/developers/errors#invalid_api_key",
    "request_id": "req_abc123"
  },
  "meta": {
    "timestamp": "2025-12-10T14:30:00Z"
  }
}

403 Insufficient permissions: wrong key type or team access
json
{
  "success": false,
  "error": {
    "type": "authentication_error",
    "code": "insufficient_permissions",
    "message": "Your API key does not have permission for this operation",
    "doc_url": "https://www.cstar.help/developers/errors#insufficient_permissions",
    "request_id": "req_abc123"
  },
  "meta": {
    "timestamp": "2025-12-10T14:30:00Z"
  }
}

429 Rate limit exceeded
json
{
  "success": false,
  "error": {
    "type": "rate_limit_error",
    "code": "rate_limit_exceeded",
    "message": "Rate limit exceeded. Try again in 60 seconds.",
    "retryAfter": 60,
    "doc_url": "https://www.cstar.help/developers/errors#rate_limit_exceeded",
    "request_id": "req_abc123"
  },
  "meta": {
    "timestamp": "2025-12-10T14:30:00Z"
  }
}

POST /api/v1/teams/{teamId}/articles

Create Article

Try it

Create a new knowledge base article. Articles start as drafts by default.

Requires a secret API key.

Request Body

title string required

Article title

content string

Article body (Markdown)

categoryId string

Category UUID from the Categories API, or null

status string

One of the team's article statuses (GET /settings articleStatuses), e.g. draft or published

Default: draft

isPublic boolean

Visible to customers. Kept whatever the status; customers see the article only while its status is published and this is true. publishedAt is set the first time it is public. Must be true or false: other values, a string "false" included, return 400 parameter_invalid.

Default: true

tags string[]

Array of tag strings. Each tag is stored lowercase, with spaces and underscores turned into a dash and cut to 50 characters; empty and repeated tags are dropped. 'Invoice_Paid' is stored as 'invoice-paid'.

metadata object

Arbitrary key-value metadata (max 50 keys). Values must be strings (send 5 as "5"); other types return 400 naming the key.

Code Examples

bash
curl -X POST "https://www.cstar.help/api/v1/teams/{teamId}/articles" \
  -H "Authorization: Bearer sk_live_your_key" \
  -H "Content-Type: application/json" \
  -d '{
    "title": "Getting Started Guide",
    "content": "# Welcome\n\nHere is how to get started...",
    "categoryId": "3f2b6c1e-8a4d-4f7b-9c2e-1d5a7b9e0f12",
    "status": "draft"
  }'

Responses

201 Article created
json
{
  "success": true,
  "data": {
    "id": "art_a1b2c3d4e5f67890abcdef1234567890",
    "title": "Getting Started Guide",
    "status": "draft",
    "isPublic": false,
    "createdAt": "2025-12-10T14:30:00Z"
  },
  "meta": {
    "requestId": "req_abc123",
    "timestamp": "2025-12-10T14:30:00Z"
  }
}

409 Idempotency-Key in use: its first request is still running (Retry-After says when to send it again) or it was used on another endpoint
json
{
  "success": false,
  "error": {
    "type": "invalid_request_error",
    "code": "idempotency_key_in_use",
    "message": "A request with this Idempotency-Key is still being processed. Retry after it finishes.",
    "doc_url": "https://www.cstar.help/developers/errors#idempotency_key_in_use",
    "request_id": "req_abc123"
  },
  "meta": {
    "requestId": "req_abc123",
    "timestamp": "2025-12-10T14:30:00Z"
  }
}

422 Idempotency-Key already used within 24 hours for a request with a different body
json
{
  "success": false,
  "error": {
    "type": "invalid_request_error",
    "code": "idempotency_key_reused",
    "message": "The Idempotency-Key was already used for a request with a different body. Generate a new key for this request.",
    "doc_url": "https://www.cstar.help/developers/errors#idempotency_key_reused",
    "request_id": "req_abc123"
  },
  "meta": {
    "requestId": "req_abc123",
    "timestamp": "2025-12-10T14:30:00Z"
  }
}

401 Authentication failed: missing or invalid API key
json
{
  "success": false,
  "error": {
    "type": "authentication_error",
    "code": "invalid_api_key",
    "message": "The API key provided is invalid or has been revoked",
    "doc_url": "https://www.cstar.help/developers/errors#invalid_api_key",
    "request_id": "req_abc123"
  },
  "meta": {
    "timestamp": "2025-12-10T14:30:00Z"
  }
}

403 Insufficient permissions: wrong key type or team access
json
{
  "success": false,
  "error": {
    "type": "authentication_error",
    "code": "insufficient_permissions",
    "message": "Your API key does not have permission for this operation",
    "doc_url": "https://www.cstar.help/developers/errors#insufficient_permissions",
    "request_id": "req_abc123"
  },
  "meta": {
    "timestamp": "2025-12-10T14:30:00Z"
  }
}

429 Rate limit exceeded
json
{
  "success": false,
  "error": {
    "type": "rate_limit_error",
    "code": "rate_limit_exceeded",
    "message": "Rate limit exceeded. Try again in 60 seconds.",
    "retryAfter": 60,
    "doc_url": "https://www.cstar.help/developers/errors#rate_limit_exceeded",
    "request_id": "req_abc123"
  },
  "meta": {
    "timestamp": "2025-12-10T14:30:00Z"
  }
}

PATCH /api/v1/teams/{teamId}/articles/{articleId}

Update Article

Try it

Update one or more fields on an existing article.

Requires a secret API key.

Path Parameters

articleId string required

The article ID (art_ prefix)

Request Body

title string

Article title

content string

Article body (Markdown)

categoryId string

Category UUID from the Categories API, or null

status string

One of the team's article statuses (GET /settings articleStatuses), e.g. draft or published

isPublic boolean

Visible to customers. Changed only when sent; a status change keeps it. Customers see the article only while its status is published and this is true; publishedAt is set the first time it is public, and article.published fires each time it becomes public. Must be true or false: other values return 400 parameter_invalid.

tags string[]

Array of tag strings. Each tag is stored lowercase, with spaces and underscores turned into a dash and cut to 50 characters; empty and repeated tags are dropped. 'Invoice_Paid' is stored as 'invoice-paid'.

metadata object

Key-value metadata to merge. Existing keys preserved, new keys added. Set a key to null to remove it. Values must be strings (send 5 as "5"); other types return 400 naming the key.

Code Examples

bash
curl -X PATCH "https://www.cstar.help/api/v1/teams/{teamId}/articles/{articleId}" \
  -H "Authorization: Bearer sk_live_your_key" \
  -H "Content-Type: application/json" \
  -d '{ "status": "published", "isPublic": true }'

Responses

200 Updated article
json
{
  "success": true,
  "data": {
    "id": "art_a1b2c3d4e5f67890abcdef1234567890",
    "title": "Getting Started Guide",
    "status": "published",
    "updatedAt": "2025-12-10T16:00:00Z"
  },
  "meta": {
    "requestId": "req_abc123",
    "timestamp": "2025-12-10T16:00:00Z"
  }
}

404 Article not found
json
{
  "success": false,
  "error": {
    "type": "not_found_error",
    "code": "resource_not_found",
    "message": "Article not found",
    "doc_url": "https://www.cstar.help/developers/errors#resource_not_found",
    "request_id": "req_abc123"
  },
  "meta": {
    "timestamp": "2025-12-10T14:30:00Z"
  }
}

409 Idempotency-Key in use: its first request is still running (Retry-After says when to send it again) or it was used on another endpoint
json
{
  "success": false,
  "error": {
    "type": "invalid_request_error",
    "code": "idempotency_key_in_use",
    "message": "A request with this Idempotency-Key is still being processed. Retry after it finishes.",
    "doc_url": "https://www.cstar.help/developers/errors#idempotency_key_in_use",
    "request_id": "req_abc123"
  },
  "meta": {
    "requestId": "req_abc123",
    "timestamp": "2025-12-10T14:30:00Z"
  }
}

422 Idempotency-Key already used within 24 hours for a request with a different body
json
{
  "success": false,
  "error": {
    "type": "invalid_request_error",
    "code": "idempotency_key_reused",
    "message": "The Idempotency-Key was already used for a request with a different body. Generate a new key for this request.",
    "doc_url": "https://www.cstar.help/developers/errors#idempotency_key_reused",
    "request_id": "req_abc123"
  },
  "meta": {
    "requestId": "req_abc123",
    "timestamp": "2025-12-10T14:30:00Z"
  }
}

401 Authentication failed: missing or invalid API key
json
{
  "success": false,
  "error": {
    "type": "authentication_error",
    "code": "invalid_api_key",
    "message": "The API key provided is invalid or has been revoked",
    "doc_url": "https://www.cstar.help/developers/errors#invalid_api_key",
    "request_id": "req_abc123"
  },
  "meta": {
    "timestamp": "2025-12-10T14:30:00Z"
  }
}

403 Insufficient permissions: wrong key type or team access
json
{
  "success": false,
  "error": {
    "type": "authentication_error",
    "code": "insufficient_permissions",
    "message": "Your API key does not have permission for this operation",
    "doc_url": "https://www.cstar.help/developers/errors#insufficient_permissions",
    "request_id": "req_abc123"
  },
  "meta": {
    "timestamp": "2025-12-10T14:30:00Z"
  }
}

429 Rate limit exceeded
json
{
  "success": false,
  "error": {
    "type": "rate_limit_error",
    "code": "rate_limit_exceeded",
    "message": "Rate limit exceeded. Try again in 60 seconds.",
    "retryAfter": 60,
    "doc_url": "https://www.cstar.help/developers/errors#rate_limit_exceeded",
    "request_id": "req_abc123"
  },
  "meta": {
    "timestamp": "2025-12-10T14:30:00Z"
  }
}

DELETE /api/v1/teams/{teamId}/articles/{articleId}

Delete Article

Try it

Permanently delete an article from the knowledge base.

Requires a secret API key. This is a destructive operation.

Path Parameters

articleId string required

The article ID (art_ prefix)

Code Examples

bash
curl -X DELETE "https://www.cstar.help/api/v1/teams/{teamId}/articles/{articleId}" \
  -H "Authorization: Bearer sk_live_your_key"

Responses

200 Article deleted
json
{
  "success": true,
  "data": {
    "deleted": true
  },
  "meta": {
    "requestId": "req_abc123",
    "timestamp": "2025-12-10T14:30:00Z"
  }
}

404 Article not found
json
{
  "success": false,
  "error": {
    "type": "not_found_error",
    "code": "resource_not_found",
    "message": "Article not found",
    "doc_url": "https://www.cstar.help/developers/errors#resource_not_found",
    "request_id": "req_abc123"
  },
  "meta": {
    "timestamp": "2025-12-10T14:30:00Z"
  }
}

401 Authentication failed: missing or invalid API key
json
{
  "success": false,
  "error": {
    "type": "authentication_error",
    "code": "invalid_api_key",
    "message": "The API key provided is invalid or has been revoked",
    "doc_url": "https://www.cstar.help/developers/errors#invalid_api_key",
    "request_id": "req_abc123"
  },
  "meta": {
    "timestamp": "2025-12-10T14:30:00Z"
  }
}

403 Insufficient permissions: wrong key type or team access
json
{
  "success": false,
  "error": {
    "type": "authentication_error",
    "code": "insufficient_permissions",
    "message": "Your API key does not have permission for this operation",
    "doc_url": "https://www.cstar.help/developers/errors#insufficient_permissions",
    "request_id": "req_abc123"
  },
  "meta": {
    "timestamp": "2025-12-10T14:30:00Z"
  }
}

429 Rate limit exceeded
json
{
  "success": false,
  "error": {
    "type": "rate_limit_error",
    "code": "rate_limit_exceeded",
    "message": "Rate limit exceeded. Try again in 60 seconds.",
    "retryAfter": 60,
    "doc_url": "https://www.cstar.help/developers/errors#rate_limit_exceeded",
    "request_id": "req_abc123"
  },
  "meta": {
    "timestamp": "2025-12-10T14:30:00Z"
  }
}