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

# Create dataset

> Creates a new dataset.

Creates a new dataset. Dataset names must be unique per user.

**Request body:**

```json theme={null}
{
  "name": "my-contracts"
}
```

| Field  | Required | Description                 |
| :----- | :------- | :-------------------------- |
| `name` | Yes      | Unique name for the dataset |

```bash theme={null}
curl -X POST https://api.allium.so/api/v1/beam/datasets \
  -H "X-API-Key: ${ALLIUM_API_KEY}" \
  -H "Content-Type: application/json" \
  -d '{ "name": "my-contracts" }'
```

**Response:**

```json theme={null}
{
  "id": "a1b2c3d4",
  "name": "my-contracts",
  "type": "postgres",
  "created_at": "2024-01-15T10:00:00Z",
  "updated_at": "2024-01-15T10:00:00Z"
}
```


## OpenAPI

````yaml _openapi/beam-api.json POST /api/v1/beam/datasets
openapi: 3.1.0
info:
  title: Allium Beam API
  description: Allium Beam — managed streaming pipelines on top of Allium Datastreams.
  version: 1.0.0
servers:
  - url: https://api.allium.so
security: []
paths:
  /api/v1/beam/datasets:
    post:
      tags:
        - BEAM
      summary: Create Dataset Handler
      operationId: create_dataset_handler_api_v1_beam_datasets_post
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DatasetCreateRequest'
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Dataset'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - APIKeyBearer: []
components:
  schemas:
    DatasetCreateRequest:
      properties:
        name:
          type: string
          title: Name
      type: object
      required:
        - name
      title: DatasetCreateRequest
    Dataset:
      properties:
        id:
          type: string
          title: Id
        name:
          type: string
          title: Name
        type:
          type: string
          const: postgres
          title: Type
          default: postgres
        created_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Created At
        updated_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Updated At
      type: object
      required:
        - id
        - name
      title: Dataset
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    APIKeyBearer:
      type: apiKey
      in: header
      name: X-API-KEY

````