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

# Ingest Legacy

> Legacy queue-item posting endpoint for direct post-video ingestion.

# Ingest Legacy

`POST /ingest` is a TikTok-only compatibility endpoint for direct `post_video` queue-item ingestion.

```http theme={null}
POST /ingest
```

New integrations should generally use the process-first public API. Use this endpoint only when you specifically need TikTok queue-item posting semantics keyed by `account_id + content_id`. Instagram posting does not use this legacy endpoint; use `POST /capability-requests/enqueue` with `platform: "instagram"` instead.

## Request Example

```bash theme={null}
curl -X POST "$PHONEFARM_BASE_URL/ingest" \
  -H "Authorization: Bearer $PHONEFARM_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "content_id": "content-2026-03-22-001",
    "account_id": "account_user095916355",
    "video_path": "https://assets.example.com/videos/content-2026-03-22-001.mp4",
    "caption": "Check out this recipe",
    "hashtags": ["cooking", "mealprep"],
    "sound_id": null,
    "cover_image_path": "https://assets.example.com/covers/content-2026-03-22-001.jpg",
    "callback_url": "https://ugc-tracker.example.com/phonefarm/post-result",
    "scheduling_hint": "2026-03-22T16:00:00-07:00",
    "metadata": {
      "source": "ugc-tracker"
    }
  }'
```

## Accepted Response

```json theme={null}
{
  "status": "accepted",
  "queue_item_id": "7c1a07f6-1d55-4f79-a403-8a8420f1b62b",
  "content_id": "content-2026-03-22-001",
  "account_id": "account_user095916355",
  "queue_status": "QUEUED"
}
```

## Duplicate Response

```json theme={null}
{
  "status": "duplicate",
  "queue_item_id": "7c1a07f6-1d55-4f79-a403-8a8420f1b62b",
  "content_id": "content-2026-03-22-001",
  "account_id": "account_user095916355",
  "queue_status": "SCHEDULED"
}
```

## Request Fields

| Field              | Type           | Required | Notes                                              |
| ------------------ | -------------- | -------- | -------------------------------------------------- |
| `content_id`       | string         | yes      | Caller content identifier.                         |
| `account_id`       | string         | yes      | Active target account id.                          |
| `video_path`       | string         | yes      | Must be a valid `http(s)` asset URL.               |
| `caption`          | string         | yes      | Max length `4000`.                                 |
| `hashtags`         | string\[]      | no       | Optional hashtags list.                            |
| `sound_id`         | string or null | no       | Optional sound id.                                 |
| `cover_image_path` | string or null | no       | Must be a valid `http(s)` asset URL when provided. |
| `callback_url`     | string or null | no       | Optional per-item callback URL.                    |
| `scheduling_hint`  | string or null | no       | Must parse as ISO-8601 when provided.              |
| `metadata`         | object         | no       | Free-form metadata. Defaults to `{}`.              |

## Validation Rules

* `video_path` must be valid `http(s)`.
* `cover_image_path` must be valid `http(s)` when present.
* assets are `HEAD`-checked before enqueue
* `caption` must be non-empty and at most `4000` characters
* `account_id` must resolve to an active account

## Idempotency

Idempotency key:

```text theme={null}
(account_id, content_id)
```

## Failure Modes

| Status code | Meaning                                                            |
| ----------- | ------------------------------------------------------------------ |
| `401`       | Missing or invalid bearer token.                                   |
| `404`       | Account not found or inactive.                                     |
| `422`       | Invalid payload, invalid URL, missing asset, or invalid timestamp. |
| `500`       | Unexpected enqueue failure.                                        |

## Read Next

* [Legacy Cancel](./cancel-legacy)
* [Process APIs](./capability-requests)
* [Errors and Idempotency](../reference/errors-and-idempotency)
