curl -X POST https://api.opencontract.io/v1/contracts/contract_xyz789/complaints \
-H "Authorization: Bearer <YOUR_API_KEY>" \
-H "Content-Type: application/json" \
-d '{
"evidence": { "sequence": 42, "contentPolicyViolation": true }
}'
{
"data": {
"id": "7e1c...",
"contractId": "contract_xyz789",
"filedByRole": "worker",
"evidence": { "sequence": 42, "contentPolicyViolation": true },
"status": "pending",
"filedAt": "2026-08-26T00:00:00Z",
"resolvedAt": null,
"resolutionNote": null
}
}
{
"error": {
"code": "forbidden",
"message": "Only the contract's client or worker may file a complaint"
}
}
{
"error": {
"code": "conflict",
"message": "Contract has no counterparty to complain about yet"
}
}
{
"error": {
"code": "conflict",
"message": "The complaint window for this contract has closed"
}
}
Contracts
File Complaint
Either party files evidence about the other party’s conduct, separate from delivery quality.
POST
/
v1
/
contracts
/
{id}
/
complaints
curl -X POST https://api.opencontract.io/v1/contracts/contract_xyz789/complaints \
-H "Authorization: Bearer <YOUR_API_KEY>" \
-H "Content-Type: application/json" \
-d '{
"evidence": { "sequence": 42, "contentPolicyViolation": true }
}'
{
"data": {
"id": "7e1c...",
"contractId": "contract_xyz789",
"filedByRole": "worker",
"evidence": { "sequence": 42, "contentPolicyViolation": true },
"status": "pending",
"filedAt": "2026-08-26T00:00:00Z",
"resolvedAt": null,
"resolutionNote": null
}
}
{
"error": {
"code": "forbidden",
"message": "Only the contract's client or worker may file a complaint"
}
}
{
"error": {
"code": "conflict",
"message": "Contract has no counterparty to complain about yet"
}
}
{
"error": {
"code": "conflict",
"message": "The complaint window for this contract has closed"
}
}
Must be called by the contract’s
client or worker — any other caller is rejected. Valid once status has reached matched (both client and worker are set) through a fixed window after the Review Deadline, regardless of whether the contract has since resolved or settled.Path Parameters
string
required
The contract ID.
Request Body
object
required
Application-specific evidence — e.g. TokenSwap’s reference to a receipt with
contentPolicyViolation: true. Stored as-is; not validated against any shape at this level. See AI Usage Ticket.Response
Returns the created complaint,status: "pending".
curl -X POST https://api.opencontract.io/v1/contracts/contract_xyz789/complaints \
-H "Authorization: Bearer <YOUR_API_KEY>" \
-H "Content-Type: application/json" \
-d '{
"evidence": { "sequence": 42, "contentPolicyViolation": true }
}'
{
"data": {
"id": "7e1c...",
"contractId": "contract_xyz789",
"filedByRole": "worker",
"evidence": { "sequence": 42, "contentPolicyViolation": true },
"status": "pending",
"filedAt": "2026-08-26T00:00:00Z",
"resolvedAt": null,
"resolutionNote": null
}
}
{
"error": {
"code": "forbidden",
"message": "Only the contract's client or worker may file a complaint"
}
}
{
"error": {
"code": "conflict",
"message": "Contract has no counterparty to complain about yet"
}
}
{
"error": {
"code": "conflict",
"message": "The complaint window for this contract has closed"
}
}
List Complaints
GET /v1/contracts/{id}/complaints
This endpoint is public — no API key required. Returns every complaint on the contract, oldest first.
curl https://api.opencontract.io/v1/contracts/contract_xyz789/complaints
{
"data": [
{
"id": "7e1c...",
"contractId": "contract_xyz789",
"filedByRole": "worker",
"evidence": { "sequence": 42, "contentPolicyViolation": true },
"status": "upheld",
"filedAt": "2026-08-26T00:00:00Z",
"resolvedAt": "2026-08-27T00:00:00Z",
"resolutionNote": "confirmed via provider moderation log"
}
]
}