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

# API Creation

> Endpoint to create new API resources.

## Create API Resource

**Endpoint**: `POST /api/v1/resource`

**Purpose**: Allows clients to create a new resource in the Enigma AI platform.

**Request Body** (JSON):

```json theme={null}
{
  "name": "string",
  "type": "string",
  "config": {
    "key": "value"
  }
}
```

**Response**:

* `201 Created` – Resource successfully created.
* Body:

```json theme={null}
{
  "id": "uuid",
  "name": "string",
  "type": "string",
  "createdAt": "ISO8601 timestamp"
}
```

**Error Cases**:

* `400 Bad Request` – Validation failed.
* `401 Unauthorized` – Missing or invalid API key.
* `409 Conflict` – Resource with the same name already exists.

**Authentication**: Uses API key passed in the `Authorization: Bearer <token>` header.

**Permissions**: Requires `resource:create` scope.
