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

# Create article

> Create a live article or draft article directly in the workspace.

Use this route when you want to write articles directly instead of generating them from sources.

## Headers

<ParamField header="Authorization" type="string" required>
  Bearer token containing your Fini workspace API key. Format: `Bearer fini_...` The key needs `write` scope.
</ParamField>

<ParamField header="Content-Type" type="string" required>
  `application/json`
</ParamField>

## Body parameters

<ParamField body="title" type="string" required>
  Article title.
</ParamField>

<ParamField body="mainKnowledge" type="string" required>
  Main knowledge body.
</ParamField>

<ParamField body="agentInstruction" type="string" required>
  Instructions the agent should apply when using this article.
</ParamField>

<ParamField body="questions" type="array" required>
  Related questions for the article.
</ParamField>

<ParamField body="keywords" type="array" required>
  Keywords for the article.
</ParamField>

<ParamField body="escalation" type="boolean" required>
  Whether the article is escalation-related.
</ParamField>

<ParamField body="parentFolderId" type="string" required>
  Folder that should contain the article.
</ParamField>

<ParamField body="isDraft" type="boolean" default={false}>
  Whether to create the article as a draft instead of a live article.
</ParamField>

<ParamField body="origin" type="string">
  Optional origin marker to store with the article.
</ParamField>

<Note>
  `POST /v2/hc-articles/public` only uses the fields documented above. Even though the internal DTO also permits `active`, `public`, and `originalArticleId`, the public create controller does not pass them through.
</Note>

<RequestExample>
  ```bash cURL theme={null}
  curl --request POST \
    --url 'https://api-prod.usefini.com/v2/hc-articles/public' \
    --header 'Authorization: Bearer fini_your_api_key' \
    --header 'Content-Type: application/json' \
    --data '{
      "title": "Canceling your subscription",
      "mainKnowledge": "Customers can cancel from Billing in the dashboard.",
      "agentInstruction": "Use this only for self-serve web plans.",
      "questions": ["How do I cancel?", "Can I end my plan today?"],
      "keywords": ["cancel", "subscription", "billing"],
      "escalation": false,
      "parentFolderId": "0f4da4fe-b2ae-4787-8c3b-854f36d9eb1b"
    }'
  ```
</RequestExample>

## Response

Returns the created article object. See [Manage knowledge](/en/api-reference/manage-knowledge) for the shared article fields.

<Note>
  Because the public create route does not expose `active` or `public`, newly created articles currently come back with the service defaults for those fields.
</Note>

## Errors

<AccordionGroup>
  <Accordion title="400 Bad Request" icon="circle-exclamation">
    The request body is malformed or one of the required arrays is empty.
  </Accordion>

  <Accordion title="401 Unauthorized" icon="lock">
    The API key is missing, malformed, revoked, or invalid.
  </Accordion>

  <Accordion title="403 Forbidden" icon="shield-halved">
    The API key does not include the `write` scope.
  </Accordion>
</AccordionGroup>
