Skip to main content
GET
/
api
/
public
/
v1
/
contracts
/
{contractId}
curl -sS https://app.opentrain.ai/api/public/v1/contracts/<CONTRACT_ID> \
  -H "Authorization: Bearer $OT_API_TOKEN"
{
  "contract": {
    "id": "<CONTRACT_ID>",
    "status": "active",
    "title": "Spanish Sentiment Labeling Contract",
    "jobId": "<JOB_ID>",
    "proposalId": "<PROPOSAL_ID>",
    "paymentType": "FIXED_PRICE",
    "rateUsd": 300,
    "estimatedTotalUsd": 300,
    "estimatedVolume": null,
    "hasActiveMilestone": true,
    "startDate": "2026-06-12T09:30:00.000Z",
    "endDate": null,
    "createdAt": "2026-06-12T09:30:00.000Z",
    "updatedAt": "2026-06-12T09:30:00.000Z",
    "freelancer": {
      "userId": "<FREELANCER_ID>",
      "displayName": "Maria G.",
      "country": "Spain",
      "profilePath": "/profile/maria-g"
    },
    "milestones": [
      {
        "id": "<MILESTONE_ID>",
        "name": "First labeling batch",
        "description": "Label the first 5,000 posts per the guidelines",
        "status": "ACTIVE_FUNDED",
        "amountUsd": 300,
        "volume": null,
        "milestoneNumber": 1,
        "dueDate": "2026-07-01T00:00:00.000Z",
        "pendingApproval": false,
        "needsReview": false,
        "invoiceId": "<INVOICE_ID>",
        "createdAt": "2026-06-12T09:30:00.000Z"
      }
    ],
    "jobDmConversationId": "<CONVERSATION_ID>",
    "budget": {
      "contractId": "<CONTRACT_ID>",
      "paymentType": "FIXED_PRICE",
      "state": "OK",
      "fundedVolume": 0,
      "fundedAmountUsd": 300,
      "consumed": { "seconds": 0, "hours": 0, "labels": 0, "tasks": 0 },
      "consumedVolume": 0,
      "remainingVolume": 0,
      "consumedFraction": 0,
      "activeMilestone": {
        "id": "<MILESTONE_ID>",
        "name": "First labeling batch",
        "amountUsd": 300,
        "volume": null,
        "status": "ACTIVE_FUNDED"
      },
      "lastUsageAt": null
    }
  }
}
Reads one contract in full, in the same shape as the entries on GET /contracts plus two detail-only fields: jobDmConversationId — the post-hire 1:1 thread with the hired AI trainer, usable with GET /messages and POST /messages — and budget, the funded-vs-consumed budget snapshot. Unknown contract IDs and contracts on other accounts both return 404, so contract IDs cannot be probed. Requirements: payments:read scope. Works pre-claim.

Request

contractId
string
required
The contract to read.

Response

contract
object

Errors

StatuscodeMeaning
401UNAUTHORIZEDMissing or invalid token
403FORBIDDENMissing payments:read scope
404NOT_FOUNDNo such contract, or the contract is on another account (details: {resource: "contracts", contractId})
curl -sS https://app.opentrain.ai/api/public/v1/contracts/<CONTRACT_ID> \
  -H "Authorization: Bearer $OT_API_TOKEN"
{
  "contract": {
    "id": "<CONTRACT_ID>",
    "status": "active",
    "title": "Spanish Sentiment Labeling Contract",
    "jobId": "<JOB_ID>",
    "proposalId": "<PROPOSAL_ID>",
    "paymentType": "FIXED_PRICE",
    "rateUsd": 300,
    "estimatedTotalUsd": 300,
    "estimatedVolume": null,
    "hasActiveMilestone": true,
    "startDate": "2026-06-12T09:30:00.000Z",
    "endDate": null,
    "createdAt": "2026-06-12T09:30:00.000Z",
    "updatedAt": "2026-06-12T09:30:00.000Z",
    "freelancer": {
      "userId": "<FREELANCER_ID>",
      "displayName": "Maria G.",
      "country": "Spain",
      "profilePath": "/profile/maria-g"
    },
    "milestones": [
      {
        "id": "<MILESTONE_ID>",
        "name": "First labeling batch",
        "description": "Label the first 5,000 posts per the guidelines",
        "status": "ACTIVE_FUNDED",
        "amountUsd": 300,
        "volume": null,
        "milestoneNumber": 1,
        "dueDate": "2026-07-01T00:00:00.000Z",
        "pendingApproval": false,
        "needsReview": false,
        "invoiceId": "<INVOICE_ID>",
        "createdAt": "2026-06-12T09:30:00.000Z"
      }
    ],
    "jobDmConversationId": "<CONVERSATION_ID>",
    "budget": {
      "contractId": "<CONTRACT_ID>",
      "paymentType": "FIXED_PRICE",
      "state": "OK",
      "fundedVolume": 0,
      "fundedAmountUsd": 300,
      "consumed": { "seconds": 0, "hours": 0, "labels": 0, "tasks": 0 },
      "consumedVolume": 0,
      "remainingVolume": 0,
      "consumedFraction": 0,
      "activeMilestone": {
        "id": "<MILESTONE_ID>",
        "name": "First labeling batch",
        "amountUsd": 300,
        "volume": null,
        "status": "ACTIVE_FUNDED"
      },
      "lastUsageAt": null
    }
  }
}