Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.offloadapi.com/llms.txt

Use this file to discover all available pages before exploring further.

Endpoint

POST /cases/{id}/input

Purpose

Queues human input for a case that is currently paused in INPUT_NEEDED.

Authentication

x-api-key: your-api-key

Path Parameters

ParameterTypeRequiredNotes
idstringYesCase ID

Request Body

FieldTypeRequiredNotes
inputRequestIdstringYesMust match the active request on the case
providedContextstringYesYour answer or missing context
Both fields are trimmed and must be non-empty strings.

Example Request

curl -X POST "$OFFLOAD_BASE_URL/cases/4fc5904d-0e44-4ed3-aa57-c4a47ad0ae4f/input" \
  -H "Content-Type: application/json" \
  -H "x-api-key: $OFFLOAD_API_KEY" \
  -d '{
    "inputRequestId": "c8c6a7ca-a913-4d13-8cd8-5887efb0531c",
    "providedContext": "Yes. A signed PDF is acceptable. Ask them to send it by Friday."
  }'

Successful Response

{
  "ok": true,
  "data": {
    "caseId": "4fc5904d-0e44-4ed3-aa57-c4a47ad0ae4f",
    "inputRequestId": "c8c6a7ca-a913-4d13-8cd8-5887efb0531c",
    "accepted": true
  }
}

What 202 Accepted Means

202 means:
  • the input passed validation
  • the case was found and owned by the caller
  • the internal queue accepted the follow-up work
It does not mean:
  • the worker already processed your answer
  • the case has already left INPUT_NEEDED
  • a reply was already sent

Transient State To Expect

Immediately after 202:
  • the API updates inputRequestStatus to RESOLVED
  • the case can still be INPUT_NEEDED until the worker finishes
Your app should wait for the next webhook or poll the case.

Conflict Errors

This endpoint returns 409 when:
  • the case is not currently waiting for input
  • the active request is no longer pending
  • the inputRequestId does not match the currently active request

Errors

StatusCodeMeaning
400INVALID_REQUESTMissing case ID, malformed JSON, or invalid body
401UNAUTHORIZEDMissing or invalid API key
403FORBIDDENInactive API key or case belongs to another user
404CASE_NOT_FOUNDNo case exists for that ID
409CASE_NOT_WAITING_FOR_INPUTCase is not paused for input
409INPUT_REQUEST_NOT_PENDINGInput request is already resolved
409INPUT_REQUEST_MISMATCHInput request ID is stale or wrong
500INTERNAL_ERRORQueueing the input failed