> ## 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.

# Create Service

> Create a new service/component

## Body Parameters

<ParamField body="name" type="string" required>
  Service name
</ParamField>

<ParamField body="description" type="string">
  Service description
</ParamField>

<ParamField body="status" type="string" default="operational">
  Initial status: `operational`, `degraded`, `partial_outage`, `major_outage`, `maintenance`
</ParamField>

## Response

Returns the created service object.

<RequestExample>
  ```bash cURL theme={null}
  curl -X POST "https://kodostatus.com/api/v1/services" \
    -H "X-API-Key: your_api_key" \
    -H "Content-Type: application/json" \
    -d '{
      "name": "Payment Gateway",
      "description": "Handles all payment processing",
      "status": "operational"
    }'
  ```

  ```javascript Node.js theme={null}
  const response = await fetch('https://kodostatus.com/api/v1/services', {
    method: 'POST',
    headers: {
      'X-API-Key': process.env.KODO_API_KEY,
      'Content-Type': 'application/json'
    },
    body: JSON.stringify({
      name: 'Payment Gateway',
      description: 'Handles all payment processing',
      status: 'operational'
    })
  });
  ```
</RequestExample>

<ResponseExample>
  ```json theme={null}
  {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "name": "Payment Gateway",
    "description": "Handles all payment processing",
    "status": "operational",
    "display_order": 0,
    "created_at": "2026-02-20T08:00:00.000Z",
    "updated_at": "2026-02-20T08:00:00.000Z"
  }
  ```
</ResponseExample>
