TENANT API · V1
Create decisions Review/branch choice, reason/evidence, current version.
POST /api/v1/tenant/work-items/{id}/decisions
Authorization Use a server-side API key with the listed grants and permitted resource access.
Path parameters
idstring · required Opaque identifier in the authorized resource scope. Nested identifiers must belong to their parent resource. Request body
outcomestring · required An allowed outcome on the current work item.
reasonstring · required A clear reason for this action, retained in the audit history.
actorReferencestring · optional Your staff-user reference. Audit metadata, not an authorization grant. Response 201 Created
Returns the authorized resource or result for this operation. List results use items, nextCursor, and hasMore.
Errors Authentication failures return 401 or 403. Inaccessible resources return 404. Business and idempotency conflicts return 409. Rate limits return 429 with retry guidance.
Error handling guide REQUEST API key
curl --request POST 'https://api.wincora.com/api/v1/tenant/work-items/id_example/decisions' \
--header 'X-Api-Key: YOUR_API_KEY' \
--header 'Idempotency-Key: request-example-001' \
--header 'If-Match: "resource-version"' \
--header 'Content-Type: application/json' \
--data '{
"outcome": "approve",
"reason": "All required evidence has been reviewed.",
"actorReference": "agent-17"
}' const response = await fetch ( 'https://api.wincora.com/api/v1/tenant/work-items/id_example/decisions' , {
method: 'POST' ,
headers: {
"X-Api-Key" : process.env. WINCORA_API_KEY ,
"Idempotency-Key" : "request-example-001" ,
"If-Match" : " \" resource-version \" " ,
"Content-Type" : "application/json"
},
body: JSON . stringify ({
"outcome" : "approve" ,
"reason" : "All required evidence has been reviewed." ,
"actorReference" : "agent-17"
})
});
if ( ! response.ok) throw new Error ( await response. text ());
const result = await response. json (); import os
import requests
response = requests.request(
'POST' ,
'https://api.wincora.com/api/v1/tenant/work-items/id_example/decisions' ,
headers = {
"X-Api-Key" : os.environ[ "WINCORA_API_KEY" ],
"Idempotency-Key" : "request-example-001" ,
"If-Match" : " \" resource-version \" " ,
"Content-Type" : "application/json"
},
json = {
"outcome" : "approve" ,
"reason" : "All required evidence has been reviewed." ,
"actorReference" : "agent-17"
},
timeout = 30 ,
)
response.raise_for_status()
result = response.json() Keep this API key on your server. Never embed it in browser or mobile code.