Get tracked hours for an opportunity

GET
/opportunities/{opportunityId}/hours

Hours each expert worked on this opportunity, one row per person and date. The hours are what the opportunity's pay rule counts, which can be less than the tracker recorded: a rule that counts only productive and neutral activity leaves out idle time and time in apps rated unproductive. 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.

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.

Query Parameters

from*string

Start of the window, inclusive: an ISO 8601 UTC timestamp such as 2026-09-08T00:00:00Z, or a bare 2026-09-08 read as midnight UTC. A person's day counts when the instant it opened in their own tracker timezone falls in the window, so a day is never returned in halves.

to*string

End of the window, exclusive, in the same UTC form: a day that opened exactly at to belongs to the next window, so consecutive requests neither double count nor skip. At most 92 days after from.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://terac.com/api/external/v2/opportunities/string/hours?from=string&to=string"
{
  "last_updated_at": "string",
  "total_seconds": -9007199254740991,
  "total_hours": 0,
  "data": [
    {
      "participant_id": "string",
      "submission_id": "string",
      "email": "string",
      "date": "string",
      "timezone": "string",
      "seconds": -9007199254740991,
      "hours": 0
    }
  ]
}
{
  "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": []
}

Create a test submission in a sandbox POST

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

Get tracked hours for one submission GET

Hours this submission's participant worked on its opportunity, one row per date. The hours are what the opportunity's pay rule counts, which can be less than the tracker recorded: a rule that counts only productive and neutral activity leaves out idle time and time in apps rated unproductive. 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. Returns exactly this submission's participant's rows from the opportunity response for the same range.