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

# Legacy ingest

> Compatibility endpoint for direct post_video queue-item ingestion.



## OpenAPI

````yaml /openapi.json post /ingest
openapi: 3.1.0
info:
  title: Phonefarm Public API
  description: >-
    Process-first public API for externally triggered Phonefarm execution across
    TikTok and Instagram.
  version: '2026-05-09'
servers:
  - url: https://phonefarm.withmithras.com
security:
  - bearerAuth: []
paths:
  /ingest:
    post:
      tags:
        - Legacy
      summary: Legacy ingest
      description: Compatibility endpoint for direct post_video queue-item ingestion.
      operationId: legacyIngest
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/LegacyIngestRequest'
      responses:
        '200':
          description: Duplicate queue item.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LegacyIngestResponse'
        '202':
          description: Queue item accepted.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LegacyIngestResponse'
        '401':
          description: Missing or invalid bearer token.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Requested process, account, or queue item was not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Invalid request payload.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Unexpected runtime, environment, or database failure.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    LegacyIngestRequest:
      type: object
      properties:
        content_id:
          type: string
          minLength: 1
        account_id:
          type: string
          minLength: 1
        video_path:
          type: string
          format: uri
        caption:
          type: string
          minLength: 1
          maxLength: 4000
        hashtags:
          type: array
          items:
            type: string
        sound_id:
          type:
            - string
            - 'null'
        cover_image_path:
          type:
            - string
            - 'null'
          format: uri
        callback_url:
          type:
            - string
            - 'null'
          format: uri
        scheduling_hint:
          type:
            - string
            - 'null'
          format: date-time
        metadata:
          type: object
          additionalProperties: true
      required:
        - content_id
        - account_id
        - video_path
        - caption
    LegacyIngestResponse:
      type: object
      properties:
        status:
          type: string
          enum:
            - accepted
            - duplicate
        queue_item_id:
          type: string
          format: uuid
        content_id:
          type: string
        account_id:
          type: string
        queue_status:
          type: string
      required:
        - status
        - queue_item_id
        - content_id
        - account_id
        - queue_status
    ErrorResponse:
      type: object
      properties:
        error:
          type: string
        details:
          type: object
          additionalProperties: true
      required:
        - error
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      x-default: PHONEFARM_API_KEY

````