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

<AgentInstructions>

## Submitting Feedback

If you encounter incorrect, outdated, or confusing documentation on this page, submit feedback:

POST https://axiom.co/docs/feedback

```json
{
  "path": "/restapi/endpoints/ingestIntoDataset",
  "feedback": "Description of the issue"
}
```

Only submit feedback when you have something specific and actionable to report.

</AgentInstructions>

# Ingest data

> Ingest

<Warning>
  Use this endpoint to ingest data into the US East 1 (AWS) edge deployment. For more information, see [Ingest data](/restapi/ingest) and [Edge deployments](/reference/edge-deployments).

  The base domain for this endpoint is `https://api.axiom.co`, irrespective of your edge deployment.

  To ingest data to a specific edge deployment, use the [Ingest data to edge deployment](/restapi/endpoints/ingestToDataset) endpoint.
</Warning>


## OpenAPI

````yaml v1 post /datasets/{dataset_name}/ingest
openapi: 3.0.1
info:
  title: Axiom Public API
  description: A public and stable API for interacting with Axiom services
  termsOfService: http://axiom.co/terms
  contact:
    name: Axiom support team
    url: https://axiom.co
    email: hello@axiom.co
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0.html
  version: 1.0.0
servers:
  - url: https://api.axiom.co/v1/
security:
  - Auth: []
paths:
  /datasets/{dataset_name}/ingest:
    post:
      tags:
        - Datasets
      description: Ingest
      operationId: ingestIntoDataset
      parameters:
        - name: dataset_name
          in: path
          description: Unique name of the dataset.
          required: true
          schema:
            type: string
        - name: timestamp-field
          in: query
          description: >-
            The name of the field to use as the timestamp. If not specified, the
            timestamp will be the time the event was received by Axiom.
          schema:
            type: string
        - name: timestamp-format
          in: query
          description: >-
            The date-time format of the timestamp field. The reference time is
            `Mon Jan 2 15:04:05 -0700 MST 2006`, as specified in
            https://pkg.go.dev/time/?tab=doc#Parse
          schema:
            type: string
        - name: csv-delimiter
          in: query
          description: >-
            The delimiter to use when parsing CSV data. If not specified, the
            default delimiter is `,`.
          schema:
            type: string
        - name: X-Axiom-CSV-Fields
          in: header
          description: >-
            A list of optional comma separated fields to use for CSV ingestion.
            If not specified, the first line of the CSV will be used as the
            field names.
          style: simple
          explode: false
          schema:
            type: array
            items:
              type: string
        - name: X-Axiom-Event-Labels
          in: header
          description: >-
            An optional JSON encoded object with additional labels to add to all
            events in the request
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: string
              format: binary
              description: >-
                Data you want to send to Axiom.

                Supported formats: JSON, NDJSON, CSV.

                Upload the data in a file or send it in the payload of the
                request.
          text/csv:
            schema:
              type: string
              format: binary
              description: >-
                Data you want to send to Axiom.

                Supported formats: JSON, NDJSON, CSV.

                Upload the data in a file or send it in the payload of the
                request.
          application/x-ndjson:
            schema:
              type: string
              format: binary
              description: >-
                Data you want to send to Axiom.

                Supported formats: JSON, NDJSON, CSV.

                Upload the data in a file or send it in the payload of the
                request.
        required: true
      responses:
        '200':
          description: ingest status
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IngestStatus'
        '401':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenError'
      security:
        - Auth:
            - CanIngest
components:
  schemas:
    IngestStatus:
      required:
        - failed
        - ingested
        - processedBytes
      type: object
      properties:
        blocksCreated:
          type: integer
          description: Number of blocks created
          format: uint32
        failed:
          type: integer
          description: Number of failures that occurred during ingest
          format: uint64
        failures:
          type: array
          description: List of failures that occurred during ingest
          items:
            $ref: '#/components/schemas/IngestFailure'
        ingested:
          type: integer
          description: Number of events ingested
          format: uint64
        processedBytes:
          type: integer
          description: Number of bytes processed
          format: uint64
        walLength:
          type: integer
          description: Length of the WAL
          format: uint32
      example:
        ingested: 2
        failed: 0
        failures: []
        processedBytes: 16
    ForbiddenError:
      type: object
      properties:
        code:
          type: string
        message:
          type: string
      example:
        code: 403
        message: Forbidden
    IngestFailure:
      required:
        - error
        - timestamp
      type: object
      properties:
        error:
          type: string
        timestamp:
          type: string
          format: date-time
      example:
        error: string
        timestamp: '2022-07-26T02:48:46.931Z'
  securitySchemes:
    Auth:
      type: http
      scheme: bearer
      description: >-
        Authenticate using an API token or personal access token (PAT). Include
        the token as a Bearer token: `Authorization: Bearer <token>`. For more
        information, see [Tokens](/reference/tokens).

````