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

# Add entries by name

> Adds values to a dataset identified by name. Duplicates are ignored.

Adds values to a dataset identified by name instead of ID. Duplicates are ignored. Changes are reflected immediately in `beam.contains("DATASET_NAME", [input.field1, input.field2])` lookups inside JavaScript transforms — no redeploy needed. See the [Datasets overview](/beam/api-reference/datasets/overview) for the full usage pattern.

**Request body:**

```json theme={null}
{
  "name": "my-dataset",
  "values": ["0x3c499c542cef5e3811e1192ce70d8cc03d5c3359", "0xc2132d05d31c914a87c6611c10748aeb04b58e8f"]
}
```

| Field    | Required | Description                                                    |
| :------- | :------- | :------------------------------------------------------------- |
| `name`   | Yes      | Name of the dataset (must belong to the authenticated API key) |
| `values` | Yes      | Array of string values to add                                  |

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

**Response:**

```json theme={null}
{ "count": 1 }
```

Returns 404 if no dataset with the given name exists for the authenticated API key.

## Uploading large datasets

Each request supports up to **250,000 values**. For larger datasets, split into chunks and upload in parallel. We recommend a maximum of **5 concurrent requests** to avoid overloading the database:

```python theme={null}
import asyncio
import httpx

CHUNK_SIZE = 250_000

async def upload_dataset(name: str, values: list[str], api_key: str):
    chunks = [values[i:i + CHUNK_SIZE] for i in range(0, len(values), CHUNK_SIZE)]
    semaphore = asyncio.Semaphore(5)  # max 5 concurrent requests

    async def upload_chunk(chunk: list[str]):
        async with semaphore:
            await client.post(
                "https://api.allium.so/api/v1/beam/datasets/entries",
                json={"name": name, "values": chunk},
                headers={"X-API-Key": api_key},
            )

    async with httpx.AsyncClient() as client:
        await asyncio.gather(*[upload_chunk(chunk) for chunk in chunks])
```

<Warning>
  Use **lowercase** values when filtering by addresses — this is how values are normalized in the system.
</Warning>


## OpenAPI

````yaml _openapi/beam-api.json POST /api/v1/beam/datasets/entries
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/entries:
    post:
      tags:
        - BEAM
      summary: Add Entries By Name Handler
      operationId: add_entries_by_name_handler_api_v1_beam_datasets_entries_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DatasetEntriesAddByNameRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DatasetEntryCountResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - APIKeyBearer: []
components:
  schemas:
    DatasetEntriesAddByNameRequest:
      properties:
        name:
          type: string
          title: Name
        values:
          items:
            type: string
          type: array
          maxItems: 250000
          title: Values
      type: object
      required:
        - name
        - values
      title: DatasetEntriesAddByNameRequest
    DatasetEntryCountResponse:
      properties:
        count:
          type: integer
          title: Count
      type: object
      required:
        - count
      title: DatasetEntryCountResponse
    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

````