Outcomes
Multi-step deliverables billed per completed outcome. Nothing is deleted — archive instead.
Lists your outcomes. Pass active=true for active ones only.
Authorization
apiKey Organisation-scoped key from Settings → API Keys.
In: header
Query Parameters
true returns only active outcomes.
Response Body
application/json
application/json
application/json
curl -X GET "https://example.com/outcomes?active=true"{ "statusCode": 200, "statusDetail": { "status": "SUCCESS", "message": "OK" }, "result": { "outcomes": [ { "id": "oc_3n7p2", "name": "Contract review", "agentKey": "contract_review", "description": "string", "isActive": true, "basePrice": 0.51, "marginPercent": 100, "pricePerOutcome": 1.02, "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z" } ] }}{ "statusCode": 401, "statusDetail": { "status": "ERROR", "message": "Invalid API key." }, "result": {}}{ "statusCode": 500, "statusDetail": { "status": "ERROR", "message": "Could not complete the request." }, "result": {}}Creates an outcome. Each step is priced from its modelBundle.
Authorization
apiKey Organisation-scoped key from Settings → API Keys.
In: header
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
curl -X POST "https://example.com/outcomes" \ -H "Content-Type: application/json" \ -d '{ "name": "Contract review", "agentKey": "contract_review", "marginPercent": 100, "steps": [ { "name": "Extract clauses", "agentKey": "contract_review.extract", "modelBundle": [ { "modelId": "claude-sonnet-4-5", "averageTokensPerLLMCall": 50000, "input": 70, "output": 30, "cache": 0, "cacheWrite": 0 } ] }, { "name": "Summarise", "agentKey": "contract_review.summarise", "modelBundle": [ { "modelId": "claude-sonnet-4-5", "averageTokensPerLLMCall": 20000, "input": 50, "output": 50, "cache": 0, "cacheWrite": 0 } ] } ] }'{ "statusCode": 200, "statusDetail": { "status": "SUCCESS", "message": "OK" }, "result": { "created": true, "outcome": { "id": "oc_3n7p2", "name": "Contract review", "agentKey": "contract_review", "description": "string", "isActive": true, "basePrice": 0.51, "marginPercent": 100, "pricePerOutcome": 1.02, "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z" } }}{ "statusCode": 400, "statusDetail": { "status": "ERROR", "message": "Request body must be valid JSON." }, "result": {}}{ "statusCode": 401, "statusDetail": { "status": "ERROR", "message": "Invalid API key." }, "result": {}}{ "statusCode": 409, "statusDetail": { "status": "ERROR", "message": "Customer \"cus_abc123\" is archived." }, "result": {}}{ "statusCode": 500, "statusDetail": { "status": "ERROR", "message": "Could not complete the request." }, "result": {}}Updates only the fields you send. Send each step's id to keep it.
Authorization
apiKey Organisation-scoped key from Settings → API Keys.
In: header
Path Parameters
Outcome id.
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Any create fields.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
curl -X PATCH "https://example.com/outcomes/oc_3n7p2" \ -H "Content-Type: application/json" \ -d '{ "steps": [ { "id": "st_a1", "name": "Extract key clauses", "agentKey": "contract_review.extract" }, { "id": "st_a2", "name": "Summarise", "agentKey": "contract_review.summarise" } ] }'{ "statusCode": 200, "statusDetail": { "status": "SUCCESS", "message": "OK" }, "result": { "updated": true, "outcome": { "id": "oc_3n7p2", "name": "Contract review", "agentKey": "contract_review", "description": "string", "isActive": true, "basePrice": 0.51, "marginPercent": 100, "pricePerOutcome": 1.02, "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z" } }}{ "statusCode": 400, "statusDetail": { "status": "ERROR", "message": "Request body must be valid JSON." }, "result": {}}{ "statusCode": 401, "statusDetail": { "status": "ERROR", "message": "Invalid API key." }, "result": {}}{ "statusCode": 404, "statusDetail": { "status": "ERROR", "message": "No customer with id \"cus_abc123\"." }, "result": {}}{ "statusCode": 409, "statusDetail": { "status": "ERROR", "message": "Customer \"cus_abc123\" is archived." }, "result": {}}{ "statusCode": 500, "statusDetail": { "status": "ERROR", "message": "Could not complete the request." }, "result": {}}Gets one outcome with its steps.
Authorization
apiKey Organisation-scoped key from Settings → API Keys.
In: header
Path Parameters
Outcome id.
Response Body
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/outcomes/oc_3n7p2"{ "statusCode": 200, "statusDetail": { "status": "SUCCESS", "message": "OK" }, "result": { "outcome": { "id": "oc_3n7p2", "name": "Contract review", "agentKey": "contract_review", "description": "string", "isActive": true, "basePrice": 0.51, "marginPercent": 100, "pricePerOutcome": 1.02, "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z", "steps": [ { "id": "st_a1", "name": "Extract clauses", "agentKey": "contract_review.extract", "order": 0, "basePrice": 0.33, "modelBundle": [ { "modelId": "claude-sonnet-4-5", "modelName": "Claude Sonnet", "averageTokensPerLLMCall": 100000, "input": 60, "output": 30, "cache": 5, "cacheWrite": 5 } ] } ] } }}{ "statusCode": 401, "statusDetail": { "status": "ERROR", "message": "Invalid API key." }, "result": {}}{ "statusCode": 404, "statusDetail": { "status": "ERROR", "message": "No customer with id \"cus_abc123\"." }, "result": {}}{ "statusCode": 500, "statusDetail": { "status": "ERROR", "message": "Could not complete the request." }, "result": {}}Archives a outcome. Nothing is deleted.
Authorization
apiKey Organisation-scoped key from Settings → API Keys.
In: header
Path Parameters
Outcome id.
Response Body
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/outcomes/oc_3n7p2/archive"{ "statusCode": 200, "statusDetail": { "status": "SUCCESS", "message": "OK" }, "result": { "archived": true, "outcome": { "id": "oc_3n7p2", "name": "Contract review", "agentKey": "contract_review", "description": "string", "isActive": true, "basePrice": 0.51, "marginPercent": 100, "pricePerOutcome": 1.02, "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z" } }}{ "statusCode": 401, "statusDetail": { "status": "ERROR", "message": "Invalid API key." }, "result": {}}{ "statusCode": 404, "statusDetail": { "status": "ERROR", "message": "No customer with id \"cus_abc123\"." }, "result": {}}{ "statusCode": 500, "statusDetail": { "status": "ERROR", "message": "Could not complete the request." }, "result": {}}Restores an archived outcome.
Authorization
apiKey Organisation-scoped key from Settings → API Keys.
In: header
Path Parameters
Outcome id.
Response Body
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/outcomes/oc_3n7p2/unarchive"{ "statusCode": 200, "statusDetail": { "status": "SUCCESS", "message": "OK" }, "result": { "unarchived": true, "outcome": { "id": "oc_3n7p2", "name": "Contract review", "agentKey": "contract_review", "description": "string", "isActive": true, "basePrice": 0.51, "marginPercent": 100, "pricePerOutcome": 1.02, "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z" } }}{ "statusCode": 401, "statusDetail": { "status": "ERROR", "message": "Invalid API key." }, "result": {}}{ "statusCode": 404, "statusDetail": { "status": "ERROR", "message": "No customer with id \"cus_abc123\"." }, "result": {}}{ "statusCode": 500, "statusDetail": { "status": "ERROR", "message": "Could not complete the request." }, "result": {}}