Skip to main content

Start here

Use the public Deals API to create, update, verify, and delete Deal records.

Prepare data

Required fields:
  • Deal external ID (example: DEAL-2026-0001)
  • Deal name (example: Enterprise expansion)
  • Optional company or contact reference (companyExternalId, contactExternalId)
  • Optional stage or status fields (status, caseStatus)

Create a Deal

curl -X POST "https://api.sanka.com/v1/public/deals" \
  -H "Authorization: Bearer <access_token>" \
  -H "Content-Type: application/json" \
  -d '{
    "externalId": "DEAL-2026-0001",
    "name": "Enterprise expansion",
    "status": "open",
    "caseStatus": "Qualified",
    "currency": "USD",
    "companyExternalId": "ACME-001",
    "contactExternalId": "CONTACT-100"
  }'
On success, the response includes case_id, external_id, status, and ctx_id.

Update the Deal

Use the returned case_id to update the record.
curl -X PUT "https://api.sanka.com/v1/public/deals/<case_id>" \
  -H "Authorization: Bearer <access_token>" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Enterprise expansion - renewal",
    "caseStatus": "Proposal",
    "companyExternalId": "ACME-001"
  }'
Verify the result with:
curl -X GET "https://api.sanka.com/v1/public/deals/<case_id>" \
  -H "Authorization: Bearer <access_token>"

Delete the Deal

Delete the record when it is no longer needed:
curl -X DELETE "https://api.sanka.com/v1/public/deals/<case_id>" \
  -H "Authorization: Bearer <access_token>"
Useful follow-up endpoints:
  • List deals: GET /v1/public/deals
  • Get one deal: GET /v1/public/deals/{case_id}
  • List deal pipelines: GET /v1/public/deals/pipelines