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

# Publish Incident

> Publish a draft incident to make it visible on the public status page

Publishes a draft incident, making it visible on the public status page. This also triggers the `incident_published` workflow and updates the edge cache.

## Path Parameters

<ParamField path="id" type="string" required>
  The incident ID to publish
</ParamField>

## Response

<ResponseField name="success" type="boolean">
  Whether the incident was published successfully
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl -X POST "https://kodostatus.com/api/v1/incidents/550e8400-e29b-41d4-a716-446655440000/publish" \
    -H "X-API-Key: your_api_key"
  ```

  ```javascript Node.js theme={null}
  const response = await fetch(
    'https://kodostatus.com/api/v1/incidents/550e8400-e29b-41d4-a716-446655440000/publish',
    {
      method: 'POST',
      headers: { 'X-API-Key': 'your_api_key' }
    }
  );
  ```
</RequestExample>

<ResponseExample>
  ```json theme={null}
  {
    "success": true
  }
  ```
</ResponseExample>

## Errors

| Status | Error                        | Description                             |
| ------ | ---------------------------- | --------------------------------------- |
| 400    | `Incident is already public` | The incident has already been published |
| 404    | `Incident not found`         | No incident exists with this ID         |

<Note>
  Publishing an incident triggers the `incident_published` workflow and sends notifications to subscribers. This action cannot be undone.
</Note>
