Skip to main content
POST
/
jobs
/
{org_id}
/
{endpoint_name}
/
answer
curl -X POST "https://agent.usedari.com/jobs/my-org/contact_form/answer?job_id=550e8400-e29b-41d4-a716-446655440000" \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "question_id": "aae818ac-6f33-4a3e-8981-e6e5c303d1f1",
    "answer": "Yes, proceed with the search"
  }'
{
  "success": true,
  "message": "Answer submitted",
  "job_id": "550e8400-e29b-41d4-a716-446655440000"
}
Submits an answer to a question asked by the agent during a human-in-the-loop job. The agent resumes execution using the provided answer.

Path Parameters

org_id
string
required
Organization ID
endpoint_name
string
required
Portal endpoint name

Query Parameters

job_id
string
required
UUID of the job

Headers

X-API-Key
string
required
Organization API key
Content-Type
string
required
Must be application/json

Request Body

question_id
string
required
UUID of the question being answered. Found in the question event’s data.question_id field from Get Job Status.
answer
string
required
The answer text. If the question provided options, this should be one of those options, but free-form text is also accepted.

Response Fields

success
boolean
Whether the answer was submitted successfully
message
string
Status message
job_id
string
UUID of the job
curl -X POST "https://agent.usedari.com/jobs/my-org/contact_form/answer?job_id=550e8400-e29b-41d4-a716-446655440000" \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "question_id": "aae818ac-6f33-4a3e-8981-e6e5c303d1f1",
    "answer": "Yes, proceed with the search"
  }'
{
  "success": true,
  "message": "Answer submitted",
  "job_id": "550e8400-e29b-41d4-a716-446655440000"
}

Usage Notes

  • The job must be in waiting_for_input status. Returns 409 if the job is in any other state.
  • The question_id must match a pending question event. Returns 409 if the question ID is invalid or stale.
  • After submitting an answer, the job status changes back to running and the agent continues.
  • The agent can ask multiple questions during a single job. Each question has a unique question_id.