{"openapi":"3.1.0","info":{"title":"Nirvedha CoachOS API","version":"1.0.0","description":"Your practice's operating record (contacts, engagements, sessions, invoices, payments, bookings) for your own systems, Zapier, Make and the like. Coaching content (notes, transcripts, goals, reports, assessments, anything a coachee writes) never leaves through the API or webhooks. Make a key in Settings → API & integrations. Up to 120 requests a minute per key."},"servers":[{"url":"https://coachos.nirvedha.com/api/v1"}],"security":[{"bearer":[]}],"tags":[{"name":"Practice"},{"name":"Contacts"},{"name":"Engagements"},{"name":"Sessions"},{"name":"Invoices"},{"name":"Payments"},{"name":"Bookings"},{"name":"Webhooks"}],"paths":{"/me":{"get":{"tags":["Practice"],"summary":"The practice this key belongs to","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"const":"practice"},"id":{"type":"string"},"name":{"type":"string"},"key_scope":{"enum":["read","write"]}}}}}},"401":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"}}}},"/contacts":{"get":{"tags":["Contacts"],"summary":"List contacts","parameters":[{"name":"email","in":"query","description":"Only the contact with this email","schema":{"type":"string"}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":50}},{"name":"starting_after","in":"query","description":"The last id of the previous page (next_starting_after).","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"const":"list"},"data":{"type":"array","items":{"$ref":"#/components/schemas/Contact"}},"has_more":{"type":"boolean"},"next_starting_after":{"type":["string","null"]}}}}}},"401":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"}}},"post":{"tags":["Contacts"],"summary":"Add a contact (a lead from a form or a CRM). One with the same email comes back unchanged, with 200.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["name"],"properties":{"name":{"type":"string"},"email":{"type":"string"},"phone":{"type":"string"},"title":{"type":"string"},"linkedin_url":{"type":"string"},"country":{"type":"string","description":"Two letters, default IN"}}}}}},"responses":{"200":{"description":"Already there","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Contact"}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Contact"}}}},"400":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"}}}},"/contacts/{id}":{"get":{"tags":["Contacts"],"summary":"One contact","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Contact"}}}},"401":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"}}}},"/engagements":{"get":{"tags":["Engagements"],"summary":"List engagements","parameters":[{"name":"status","in":"query","description":"active, paused, completed, cancelled","schema":{"type":"string"}},{"name":"coachee_id","in":"query","description":"Only this coachee's","schema":{"type":"string","format":"uuid"}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":50}},{"name":"starting_after","in":"query","description":"The last id of the previous page (next_starting_after).","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"const":"list"},"data":{"type":"array","items":{"$ref":"#/components/schemas/Engagement"}},"has_more":{"type":"boolean"},"next_starting_after":{"type":["string","null"]}}}}}},"401":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"}}}},"/engagements/{id}":{"get":{"tags":["Engagements"],"summary":"One engagement","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Engagement"}}}},"401":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"}}}},"/sessions":{"get":{"tags":["Sessions"],"summary":"List sessions","parameters":[{"name":"engagement_id","in":"query","description":"Only this engagement's","schema":{"type":"string","format":"uuid"}},{"name":"from","in":"query","description":"Scheduled at or after","schema":{"type":"string","format":"date-time"}},{"name":"to","in":"query","description":"Scheduled at or before","schema":{"type":"string","format":"date-time"}},{"name":"status","in":"query","description":"scheduled, completed, cancelled_client, late_cancel, cancelled_coach, no_show","schema":{"type":"string"}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":50}},{"name":"starting_after","in":"query","description":"The last id of the previous page (next_starting_after).","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"const":"list"},"data":{"type":"array","items":{"$ref":"#/components/schemas/Session"}},"has_more":{"type":"boolean"},"next_starting_after":{"type":["string","null"]}}}}}},"401":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"}}}},"/sessions/{id}":{"get":{"tags":["Sessions"],"summary":"One session","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Session"}}}},"401":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"}}}},"/invoices":{"get":{"tags":["Invoices"],"summary":"List issued invoices and credit notes","parameters":[{"name":"status","in":"query","description":"issued, part_paid, paid, cancelled","schema":{"type":"string"}},{"name":"engagement_id","in":"query","description":"Only this engagement's","schema":{"type":"string","format":"uuid"}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":50}},{"name":"starting_after","in":"query","description":"The last id of the previous page (next_starting_after).","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"const":"list"},"data":{"type":"array","items":{"$ref":"#/components/schemas/Invoice"}},"has_more":{"type":"boolean"},"next_starting_after":{"type":["string","null"]}}}}}},"401":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"}}}},"/invoices/{id}":{"get":{"tags":["Invoices"],"summary":"One invoice","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Invoice"}}}},"401":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"}}}},"/payments":{"get":{"tags":["Payments"],"summary":"List payments received","parameters":[{"name":"invoice_id","in":"query","description":"Only this invoice's","schema":{"type":"string","format":"uuid"}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":50}},{"name":"starting_after","in":"query","description":"The last id of the previous page (next_starting_after).","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"const":"list"},"data":{"type":"array","items":{"$ref":"#/components/schemas/Payment"}},"has_more":{"type":"boolean"},"next_starting_after":{"type":["string","null"]}}}}}},"401":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"}}}},"/bookings":{"get":{"tags":["Bookings"],"summary":"List calls booked on your booking page","parameters":[{"name":"status","in":"query","description":"booked or cancelled","schema":{"type":"string"}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":50}},{"name":"starting_after","in":"query","description":"The last id of the previous page (next_starting_after).","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"const":"list"},"data":{"type":"array","items":{"$ref":"#/components/schemas/Booking"}},"has_more":{"type":"boolean"},"next_starting_after":{"type":["string","null"]}}}}}},"401":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"}}}},"/webhooks":{"get":{"tags":["Webhooks"],"summary":"List webhook endpoints","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"const":"list"},"data":{"type":"array","items":{"$ref":"#/components/schemas/WebhookEndpoint"}},"has_more":{"type":"boolean"},"next_starting_after":{"type":["string","null"]}}}}}},"401":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"}}},"post":{"tags":["Webhooks"],"summary":"Subscribe a URL to events (REST hook). The signing secret is returned once.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["url"],"properties":{"url":{"type":"string","format":"uri"},"events":{"type":"array","items":{"enum":["contact.created","engagement.created","engagement.status_changed","session.scheduled","session.rescheduled","session.completed","session.cancelled","invoice.issued","invoice.paid","invoice.cancelled","payment.received","booking.created","booking.cancelled","*"]}}}}}}},"responses":{"201":{"description":"Subscribed","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/WebhookEndpoint"},{"type":"object","properties":{"secret":{"type":"string"}}}]}}}},"400":{"$ref":"#/components/responses/Error"}}}},"/webhooks/{id}":{"delete":{"tags":["Webhooks"],"summary":"Unsubscribe","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Deleted"},"404":{"$ref":"#/components/responses/Error"}}}}},"webhooks":{"contact.created":{"post":{"summary":"contact.created","description":"Signed with X-CoachOS-Signature: t=<unix seconds>,v1=<hex HMAC-SHA256 of \"t.body\" with your endpoint's secret>. Reply 2xx; anything else is retried for about two days. Reply 410 to unsubscribe.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"event"},"type":{"const":"contact.created"},"created_at":{"type":"string","format":"date-time"},"data":{"type":"object","properties":{"object":{"type":"object"}}}}}}}},"responses":{"200":{"description":"Received"}}}},"engagement.created":{"post":{"summary":"engagement.created","description":"Signed with X-CoachOS-Signature: t=<unix seconds>,v1=<hex HMAC-SHA256 of \"t.body\" with your endpoint's secret>. Reply 2xx; anything else is retried for about two days. Reply 410 to unsubscribe.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"event"},"type":{"const":"engagement.created"},"created_at":{"type":"string","format":"date-time"},"data":{"type":"object","properties":{"object":{"type":"object"}}}}}}}},"responses":{"200":{"description":"Received"}}}},"engagement.status_changed":{"post":{"summary":"engagement.status_changed","description":"Signed with X-CoachOS-Signature: t=<unix seconds>,v1=<hex HMAC-SHA256 of \"t.body\" with your endpoint's secret>. Reply 2xx; anything else is retried for about two days. Reply 410 to unsubscribe.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"event"},"type":{"const":"engagement.status_changed"},"created_at":{"type":"string","format":"date-time"},"data":{"type":"object","properties":{"object":{"type":"object"}}}}}}}},"responses":{"200":{"description":"Received"}}}},"session.scheduled":{"post":{"summary":"session.scheduled","description":"Signed with X-CoachOS-Signature: t=<unix seconds>,v1=<hex HMAC-SHA256 of \"t.body\" with your endpoint's secret>. Reply 2xx; anything else is retried for about two days. Reply 410 to unsubscribe.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"event"},"type":{"const":"session.scheduled"},"created_at":{"type":"string","format":"date-time"},"data":{"type":"object","properties":{"object":{"type":"object"}}}}}}}},"responses":{"200":{"description":"Received"}}}},"session.rescheduled":{"post":{"summary":"session.rescheduled","description":"Signed with X-CoachOS-Signature: t=<unix seconds>,v1=<hex HMAC-SHA256 of \"t.body\" with your endpoint's secret>. Reply 2xx; anything else is retried for about two days. Reply 410 to unsubscribe.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"event"},"type":{"const":"session.rescheduled"},"created_at":{"type":"string","format":"date-time"},"data":{"type":"object","properties":{"object":{"type":"object"}}}}}}}},"responses":{"200":{"description":"Received"}}}},"session.completed":{"post":{"summary":"session.completed","description":"Signed with X-CoachOS-Signature: t=<unix seconds>,v1=<hex HMAC-SHA256 of \"t.body\" with your endpoint's secret>. Reply 2xx; anything else is retried for about two days. Reply 410 to unsubscribe.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"event"},"type":{"const":"session.completed"},"created_at":{"type":"string","format":"date-time"},"data":{"type":"object","properties":{"object":{"type":"object"}}}}}}}},"responses":{"200":{"description":"Received"}}}},"session.cancelled":{"post":{"summary":"session.cancelled","description":"Signed with X-CoachOS-Signature: t=<unix seconds>,v1=<hex HMAC-SHA256 of \"t.body\" with your endpoint's secret>. Reply 2xx; anything else is retried for about two days. Reply 410 to unsubscribe.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"event"},"type":{"const":"session.cancelled"},"created_at":{"type":"string","format":"date-time"},"data":{"type":"object","properties":{"object":{"type":"object"}}}}}}}},"responses":{"200":{"description":"Received"}}}},"invoice.issued":{"post":{"summary":"invoice.issued","description":"Signed with X-CoachOS-Signature: t=<unix seconds>,v1=<hex HMAC-SHA256 of \"t.body\" with your endpoint's secret>. Reply 2xx; anything else is retried for about two days. Reply 410 to unsubscribe.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"event"},"type":{"const":"invoice.issued"},"created_at":{"type":"string","format":"date-time"},"data":{"type":"object","properties":{"object":{"type":"object"}}}}}}}},"responses":{"200":{"description":"Received"}}}},"invoice.paid":{"post":{"summary":"invoice.paid","description":"Signed with X-CoachOS-Signature: t=<unix seconds>,v1=<hex HMAC-SHA256 of \"t.body\" with your endpoint's secret>. Reply 2xx; anything else is retried for about two days. Reply 410 to unsubscribe.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"event"},"type":{"const":"invoice.paid"},"created_at":{"type":"string","format":"date-time"},"data":{"type":"object","properties":{"object":{"type":"object"}}}}}}}},"responses":{"200":{"description":"Received"}}}},"invoice.cancelled":{"post":{"summary":"invoice.cancelled","description":"Signed with X-CoachOS-Signature: t=<unix seconds>,v1=<hex HMAC-SHA256 of \"t.body\" with your endpoint's secret>. Reply 2xx; anything else is retried for about two days. Reply 410 to unsubscribe.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"event"},"type":{"const":"invoice.cancelled"},"created_at":{"type":"string","format":"date-time"},"data":{"type":"object","properties":{"object":{"type":"object"}}}}}}}},"responses":{"200":{"description":"Received"}}}},"payment.received":{"post":{"summary":"payment.received","description":"Signed with X-CoachOS-Signature: t=<unix seconds>,v1=<hex HMAC-SHA256 of \"t.body\" with your endpoint's secret>. Reply 2xx; anything else is retried for about two days. Reply 410 to unsubscribe.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"event"},"type":{"const":"payment.received"},"created_at":{"type":"string","format":"date-time"},"data":{"type":"object","properties":{"object":{"type":"object"}}}}}}}},"responses":{"200":{"description":"Received"}}}},"booking.created":{"post":{"summary":"booking.created","description":"Signed with X-CoachOS-Signature: t=<unix seconds>,v1=<hex HMAC-SHA256 of \"t.body\" with your endpoint's secret>. Reply 2xx; anything else is retried for about two days. Reply 410 to unsubscribe.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"event"},"type":{"const":"booking.created"},"created_at":{"type":"string","format":"date-time"},"data":{"type":"object","properties":{"object":{"type":"object"}}}}}}}},"responses":{"200":{"description":"Received"}}}},"booking.cancelled":{"post":{"summary":"booking.cancelled","description":"Signed with X-CoachOS-Signature: t=<unix seconds>,v1=<hex HMAC-SHA256 of \"t.body\" with your endpoint's secret>. Reply 2xx; anything else is retried for about two days. Reply 410 to unsubscribe.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"event"},"type":{"const":"booking.cancelled"},"created_at":{"type":"string","format":"date-time"},"data":{"type":"object","properties":{"object":{"type":"object"}}}}}}}},"responses":{"200":{"description":"Received"}}}}},"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","description":"cos_live_… from Settings → API & integrations"}},"responses":{"Error":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string"},"message":{"type":"string"}}}}}}}}},"schemas":{"Contact":{"type":"object","properties":{"object":{"const":"contact"},"id":{"type":"string"},"name":{"type":"string"},"email":{"type":["string","null"]},"phone":{"type":["string","null"]},"title":{"type":["string","null"]},"organisation_id":{"type":["string","null"]},"timezone":{"type":"string"},"country":{"type":"string"},"created_at":{"type":["string","null"],"format":"date-time"}}},"Engagement":{"type":"object","properties":{"object":{"const":"engagement"},"id":{"type":"string"},"title":{"type":"string"},"coachee_id":{"type":"string"},"client_organisation_id":{"type":["string","null"]},"status":{"type":"string"},"start_date":{"type":["string","null"],"format":"date"},"end_date":{"type":["string","null"],"format":"date"},"sessions_planned":{"type":"integer"},"sponsor_type":{"type":"string"},"created_at":{"type":["string","null"],"format":"date-time"}}},"Session":{"type":"object","properties":{"object":{"const":"session"},"id":{"type":"string"},"engagement_id":{"type":"string"},"number":{"type":"integer"},"scheduled_at":{"type":["string","null"],"format":"date-time"},"duration_minutes":{"type":"integer"},"status":{"type":"string"},"platform":{"type":"string"}}},"Invoice":{"type":"object","properties":{"object":{"const":"invoice"},"id":{"type":"string"},"number":{"type":"string"},"kind":{"enum":["invoice","credit_note"]},"status":{"type":"string"},"issue_date":{"type":["string","null"],"format":"date"},"due_date":{"type":["string","null"],"format":"date"},"engagement_id":{"type":["string","null"]},"billed_name":{"type":"string"},"billed_organisation_id":{"type":["string","null"]},"billed_contact_id":{"type":["string","null"]},"currency":{"type":"string"},"taxable":{"type":["number","null"]},"total":{"type":["number","null"]},"balance":{"type":["number","null"]},"created_at":{"type":["string","null"],"format":"date-time"}}},"Payment":{"type":"object","properties":{"object":{"const":"payment"},"id":{"type":"string"},"invoice_id":{"type":"string"},"received_on":{"type":["string","null"],"format":"date"},"amount":{"type":["number","null"]},"tds":{"type":["number","null"]},"mode":{"type":"string"},"reference":{"type":["string","null"]},"created_at":{"type":["string","null"],"format":"date-time"}}},"Booking":{"type":"object","properties":{"object":{"const":"booking"},"id":{"type":"string"},"start_at":{"type":["string","null"],"format":"date-time"},"minutes":{"type":"integer"},"name":{"type":"string"},"email":{"type":"string"},"phone":{"type":["string","null"]},"organisation":{"type":["string","null"]},"role":{"type":["string","null"]},"topic":{"type":["string","null"]},"contact_id":{"type":["string","null"]},"status":{"type":"string"},"created_at":{"type":["string","null"],"format":"date-time"}}},"WebhookEndpoint":{"type":"object","properties":{"object":{"const":"webhook_endpoint"},"id":{"type":"string"},"url":{"type":"string"},"events":{"type":"array","items":{"type":"string"}},"source":{"enum":["settings","api"]},"status":{"enum":["active","disabled"]},"last_success_at":{"type":["string","null"],"format":"date-time"},"last_error":{"type":["string","null"]},"created_at":{"type":["string","null"],"format":"date-time"}}}}}}