Create a test submission in a sandbox
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
apiKey API key as Bearer token: Authorization: Bearer
In: header
Path Parameters
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": []
}Reject a submission POST
Rejects a submission that is `awaiting_review`, so the expert is not paid for that work and the submission becomes `rejected`. `rejection_category` and `rejection_reason` are optional, but they are the only record of why the work went unpaid. A submission in any other status returns 409.
Get tracked hours for an opportunity GET
Hours each expert worked on this opportunity, one row per person and date. Time spent on your other opportunities, and time clocked in but not spent on work, is not included. The current day is partial and refreshes through the day; `last_updated_at` says when the hours were last refreshed.