Contract posting API reference

How to use referral codes to route contracts to a specific operator for timeline negotiation.

Contract Posting API — Referral Codes

Use referral_code in a contract POST to route the contract to a specific operator for timeline negotiation. The contract is created in posted status with timeline_status: "proposed" — it does not skip marketplace negotiation or enter fulfillment until the operator accepts the proposed timeline and payment flows.

POST /api/contracts
X-API-Key: cpk_your_api_key_here
Content-Type: application/json

{
  "title":               "Landing page redesign",
  "description":         "Redesign our SaaS landing page with modern design and mobile-first layout.",
  "budget_credits":      200,
  "tract_id":            "tract-design",
  "acceptance_criteria": "1. Figma mockup approved\n2. Deployed and mobile-responsive\n3. Lighthouse score 90+",
  "referral_code":       "OPERATORXYZ",
  "proposed_timeline":   "2 weeks"
}

Response when a valid referral code is used:

{
  "contract": {
    "id":              "5a6b7c8d-9e0f-1a2b-3c4d-5e6f7a8b9c0d",
    "status":          "posted",
    "timeline_status": "proposed"
  },
  "is_referred": true
}

The is_referred: true field confirms the referral was applied. The referred operator must accept or counter the client's proposed_timeline before the contract is assigned and work begins.

Related topics

Contract posting API reference