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

# Schemaless ingestion reference

> Field definitions and examples for sending JSON to Sift over REST without pre-registering a schema

<Info>
  **Credentials**

  Before using this method, retrieve your API key and the appropriate Sift URL for your environment. See [Authentication](/documentation/manage/set-up-api-access).
</Info>

Schemaless ingestion lets you send a JSON payload to the `/api/v2/ingest` endpoint without pre-registering an ingestion config. Sift creates the asset and channels automatically if they do not already exist.

## Example request

```bash theme={null}
curl -H "Authorization: Bearer $API_KEY" \
    -H "Content-Type: application/json" \
    -X POST "$SIFT_REST_URL/api/v2/ingest" \
    --data-raw '{
      "asset_name": "test_asset_post_data_0001",
      "data": [
        {
          "timestamp": "2024-11-06T10:27:20-07:00",
          "values": [
            {
              "channel": "numeric_channel",
              "value": 29.18
            },
            {
              "channel": "boolean_channel",
              "value": true
            },
            {
              "channel": "string_channel",
              "value": "Example Schemaless String"
            }
          ]
        }
      ]
    }'
```

You can also let Sift resolve the run for you by providing `run_config` instead of `run_id`:

```bash theme={null}
curl -H "Authorization: Bearer $API_KEY" \
    -H "Content-Type: application/json" \
    -X POST "$SIFT_REST_URL/api/v2/ingest" \
    --data-raw '{
      "asset_name": "test_asset_post_data_0001",
      "run_config": {
        "client_key": "test_run_0001"
      },
      "data": [
        {
          "timestamp": "2024-11-06T10:27:20-07:00",
          "values": [
            {
              "channel": "numeric_channel",
              "value": 29.18
            }
          ]
        }
      ]
    }'
```

## Request fields

<ResponseField name="asset_name">
  The name of the asset. If the asset does not exist, it will be created. Required.
</ResponseField>

<ResponseField name="run_id">
  The `run_id` returned from a previous `CreateRun` call. Optional. Cannot be used together with `run_config`.
</ResponseField>

<ResponseField name="run_config">
  Resolves a run by client key instead of requiring a `run_id`, so the client does not need to look up or track run IDs itself. Optional. Cannot be used together with `run_id`.

  If no run with the given `client_key` exists, Sift creates one and uses it. If a run with that `client_key` already exists, Sift resolves its `run_id` and uses it as-is. `run_config` only creates a run when one does not already exist; it never modifies an existing run's name or any other field.
</ResponseField>

<ResponseField name="run_config.client_key">
  An arbitrary user-chosen key that uniquely identifies the run. Must be 3-128 characters, start and end with an alphanumeric character, and contain only letters, numbers, and `_~.-`. Required when `run_config` is provided.
</ResponseField>

<ResponseField name="run_config.name">
  The name to give the run if it needs to be created. Only used at creation time and has no effect on an existing run. Defaults to `client_key` if omitted. Optional.
</ResponseField>

<ResponseField name="organization_id">
  The organization ID of the organization that owns the asset. Only required if you are a member of multiple organizations. Optional otherwise.
</ResponseField>

<ResponseField name="data">
  The array of data objects to ingest.
</ResponseField>

<ResponseField name="data[].timestamp">
  The timestamp used for every value in the sibling `values` array. Must be in RFC3339 format. Required.
</ResponseField>

<ResponseField name="data[].values">
  The array of channel values. Every value is assigned the timestamp from the sibling `timestamp` field.
</ResponseField>

<ResponseField name="data[].values[].channel">
  The name of the channel. Required.
</ResponseField>

<ResponseField name="data[].values[].value">
  The channel value. Supported types are string, boolean, and number. Required.
</ResponseField>

## Related topics

* [Choose a streaming method](/documentation/ingest/stream/choose-a-streaming-method)
* [Organize streamed data into Assets and Runs](/documentation/ingest/stream/organize-streamed-data-into-assets-and-runs)
