Create a test submission in a sandbox

POST
/opportunities/{opportunityId}/test-submissions

Creates a test submission in a sandbox organization, so your webhook endpoint receives the events a real participant would trigger.

Terac adds a test participant and moves it through the opportunity a few seconds at a time: it answers the screener, starts the task and finishes it. Each step sends the same submission.status.change webhook a real participant's step sends, signed and retried the same way. Nobody is contacted and nobody is paid. Only a subscription created with a key from the same sandbox organization receives these webhooks.

The participant stops wherever the next move is yours: inviting or declining an applicant, approving or rejecting the work, or your own completion redirect when task_completion is redirect. Your call sends the next webhook. After you invite an applicant, the participant carries on with the task.

The test submission shows in the sandbox dashboard under the name "Test Participant" and counts in the opportunity's numbers. It does not count toward a quota, and it cannot be removed.

Returns 403 outside a sandbox organization, and 409 when the opportunity is not active. Returns 422 when Terac cannot create the test submission you asked for on this opportunity, and the message says why: for example failed with no screener, passed with screening questions that no answer passes, or redirect when the first task has no task_url.

Authorization<token>

API key as Bearer token: Authorization: Bearer

In: header

Path Parameters

opportunityId*string

ID of the opportunity, as returned by POST /opportunities or GET /opportunities.

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://terac.com/api/external/v2/opportunities/string/test-submissions" \  -H "Content-Type: application/json" \  -d '{}'
{
  "id": "string",
  "opportunity_id": "string",
  "task_url": "string",
  "dashboard_url": "string"
}
{
  "code": "BAD_REQUEST",
  "message": "Invalid input data",
  "issues": []
}

{
  "error": {
    "code": "UNAUTHORIZED",
    "message": "API key required. Include Authorization: Bearer <key> header."
  }
}

{
  "error": {
    "code": "FORBIDDEN",
    "message": "This account is not permitted to use the API."
  }
}

{
  "code": "NOT_FOUND",
  "message": "Not found",
  "issues": []
}
{
  "error": {
    "code": "RATE_LIMITED",
    "message": "Rate limit exceeded. Retry after 61 seconds."
  }
}
{
  "code": "INTERNAL_SERVER_ERROR",
  "message": "Internal server error",
  "issues": []
}