Endpoints
Every endpoint with its parameters, scopes, request body, responses and an example you can copy.
Generated from openapi.json (version 2026-11-19) at each release. Base address: https://ssjougrsaecdwfuxeasd.supabase.co/functions/v1/api-gateway. Every request sends Authorization: Bearer avk_…; the rules every call follows apply to all of them.
Keys#
Events#
/v1/event-typesThe event catalog: every event name with its group and meaningGET/v1/eventsThe event history of the last 30 days, newest firstGET/v1/events/{id}One event by its ID (evt_ and 32 characters)Cases#
/v1/casesCases, soonest response date first, 50 at a time (200 at most)GET/v1/cases/{id}One casePOST/v1/disputesOpen cases from your claims systemPOST/v1/cases/{id}/actionsRun a governed step on a casePATCH/v1/cases/{id}/fieldsChange case fieldsDocuments#
/v1/cases/{id}/documentsAttach a file to a case: PDF, PNG, JPEG, TIFF, DOCX, XLSX, text or CSV, 15 MB at mostGET/v1/documents/{id}One document with its text and signing stateMessages#
/v1/inbound/{source}Bring a message into the Inbox from another system, such as zendesk or frontRemittances#
Metrics#
Timesheets#
/v1/timesheetsHours for one pay period: each person's days, each work week's total and overtime, and who approved itGET/v1/timesheets/periodsThe recent pay periods, newest first, each with its dates, whether it has ended and whether all of its time is approvedMembers#
/v1/membersMembers on your clients' rosters, each with the plans covering them and whenPOST/v1/membersAdd or update members and their coverage, up to 5,000 at a timePOST/v1/rostersSend a whole roster file: CSV (any column names Avertyn can match) or an X12 834 (Content-Type application/edi-x12)GET/v1/rosters/{id}What a roster file or members batch did: members added, coverage lines, coverage ended, and rows not loadedEmail#
/v1/emailSend an email from one of your own mailboxes on your own domain (Enterprise)GET/v1/email/{id}One email sent through the API or from Avertyn: its mailbox, recipient, status (queued, held, sent, delivered, delayed, bounced, complaint, failed) and each eventWebhooks#
/v1/webhooksAdd a webhook endpointGET/v1/webhooksEvery webhook endpoint with its healthGET/v1/webhooks/{id}One webhook endpoint with its health and the number of held eventsPATCH/v1/webhooks/{id}Pause or resume an endpointDELETE/v1/webhooks/{id}Remove a webhook endpoint and its delivery historyGET/v1/me#
The workspace this key belongs to, its scopes, its limit and when it expires. Use it to check a key.
curl "https://ssjougrsaecdwfuxeasd.supabase.co/functions/v1/api-gateway/v1/me" \
-H "Authorization: Bearer $AVERTYN_KEY"Responses#
GET/v1/event-types#
The event catalog: every event name with its group and meaning.
curl "https://ssjougrsaecdwfuxeasd.supabase.co/functions/v1/api-gateway/v1/event-types" \
-H "Authorization: Bearer $AVERTYN_KEY"Responses#
GET/v1/cases#
Cases, soonest response date first, 50 at a time (200 at most). Follow next_cursor for the next page.
Scope: cases:read:basic or cases:read or cases:read:phi
Parameters#
| Name | In | Type | About |
|---|---|---|---|
limit | query | integerDefault 50 | How many to return: 1 to 200, 50 if left out. |
cursor | query | string | The next_cursor of the page before. |
stage | query | string | Only cases at this step, for example triage. |
phase | query | string | Only cases in this phase: open_negotiation or idr. |
disposition | query | string | Only cases with this outcome, for example open or settled. |
external_ref | query | string | The case with exactly this case number. |
updated_since | query | string | Only cases changed at or after this time (ISO 8601). |
respond_by_before | query | string | Only cases whose response date is before this time (ISO 8601). |
curl "https://ssjougrsaecdwfuxeasd.supabase.co/functions/v1/api-gateway/v1/cases" \
-H "Authorization: Bearer $AVERTYN_KEY"Responses#
| Status | Means | Body |
|---|---|---|
200 | OK | List of Case |
400 | limit, cursor or a date filter is not valid. | Problem |
401 | The key is missing, wrong, revoked or expired, or the request came from an address the key does not allow. | Problem |
403 | The key does not have a scope this route needs. | Problem |
429 | Over the key's limit for this minute. | Problem |
500 | Avertyn could not complete the request. | Problem |
GET/v1/cases/{id}#
One case. The fields returned depend on the key's read scope.
Scope: cases:read:basic or cases:read or cases:read:phi
Parameters#
| Name | In | Type | About |
|---|---|---|---|
idRequired | path | string | The ID (a UUID). |
curl "https://ssjougrsaecdwfuxeasd.supabase.co/functions/v1/api-gateway/v1/cases/{id}" \
-H "Authorization: Bearer $AVERTYN_KEY"Responses#
| Status | Means | Body |
|---|---|---|
200 | OK | data: Case |
401 | The key is missing, wrong, revoked or expired, or the request came from an address the key does not allow. | Problem |
403 | The key does not have a scope this route needs. | Problem |
404 | Nothing with this ID in your workspace. | Problem |
429 | Over the key's limit for this minute. | Problem |
500 | Avertyn could not complete the request. | Problem |
POST/v1/disputes#
Open cases from your claims system.
Scope: cases:write
Parameters#
| Name | In | Type | About |
|---|---|---|---|
Idempotency-Key | header | string | Makes a repeat of this request safe for 24 hours. |
Request body#
{
"disputes": [
{
"external_ref": "CLM-10442",
"cpt_code": "99285",
"billed_amount": 4200,
"qpa_amount": 1150,
"notice_received_on": "2026-11-10"
}
]
}curl -X POST "https://ssjougrsaecdwfuxeasd.supabase.co/functions/v1/api-gateway/v1/disputes" \
-H "Authorization: Bearer $AVERTYN_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{"disputes":[{"external_ref":"CLM-10442","cpt_code":"99285","billed_amount":4200,"qpa_amount":1150,"notice_received_on":"2026-11-10"}]}'Responses#
| Status | Means | Body |
|---|---|---|
201 | OK | JSON |
401 | The key is missing, wrong, revoked or expired, or the request came from an address the key does not allow. | Problem |
403 | The key does not have a scope this route needs. | Problem |
409 | The Idempotency-Key was used with a different request, or the first request is still running. | Problem |
422 | The request was understood and refused; detail says why. | Problem |
429 | Over the key's limit for this minute. | Problem |
500 | Avertyn could not complete the request. | Problem |
POST/v1/cases/{id}/actions#
Run a governed step on a case. A step that moves money or needs a second person is staged for approval and answers 202.
Scope: cases:write
Parameters#
| Name | In | Type | About |
|---|---|---|---|
idRequired | path | string | The ID (a UUID). |
Idempotency-Key | header | string | Makes a repeat of this request safe for 24 hours. |
Request body#
{
"action": "add_note",
"params": {
"text": "Called the provider's billing office."
},
"rationale": "Follow-up"
}curl -X POST "https://ssjougrsaecdwfuxeasd.supabase.co/functions/v1/api-gateway/v1/cases/{id}/actions" \
-H "Authorization: Bearer $AVERTYN_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{"action":"add_note","params":{"text":"Called the provider's billing office."},"rationale":"Follow-up"}'Responses#
| Status | Means | Body |
|---|---|---|
200 | OK | JSON |
202 | Staged for approval by a person. | JSON |
401 | The key is missing, wrong, revoked or expired, or the request came from an address the key does not allow. | Problem |
403 | The key does not have a scope this route needs. | Problem |
404 | Nothing with this ID in your workspace. | Problem |
409 | The Idempotency-Key was used with a different request, or the first request is still running. | Problem |
422 | The request was understood and refused; detail says why. | Problem |
429 | Over the key's limit for this minute. | Problem |
500 | Avertyn could not complete the request. | Problem |
POST/v1/cases/{id}/documents#
Attach a file to a case: PDF, PNG, JPEG, TIFF, DOCX, XLSX, text or CSV, 15 MB at most.
Scope: documents:write or cases:write
Parameters#
| Name | In | Type | About |
|---|---|---|---|
idRequired | path | string | The ID (a UUID). |
Idempotency-Key | header | string | Makes a repeat of this request safe for 24 hours. |
Request body#
{
"filename": "eob.pdf",
"mime": "application/pdf",
"content_base64": "JVBERi0xLjcK…",
"category": "eob"
}curl -X POST "https://ssjougrsaecdwfuxeasd.supabase.co/functions/v1/api-gateway/v1/cases/{id}/documents" \
-H "Authorization: Bearer $AVERTYN_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{"filename":"eob.pdf","mime":"application/pdf","content_base64":"JVBERi0xLjcK…","category":"eob"}'Responses#
| Status | Means | Body |
|---|---|---|
201 | OK | JSON |
401 | The key is missing, wrong, revoked or expired, or the request came from an address the key does not allow. | Problem |
403 | The key does not have a scope this route needs. | Problem |
404 | Nothing with this ID in your workspace. | Problem |
409 | The Idempotency-Key was used with a different request, or the first request is still running. | Problem |
422 | The request was understood and refused; detail says why. | Problem |
429 | Over the key's limit for this minute. | Problem |
500 | Avertyn could not complete the request. | Problem |
PATCH/v1/cases/{id}/fields#
Change case fields. All of the changes are saved or none; the old and new values go in the ledger.
Scope: cases:fields or cases:write
Parameters#
| Name | In | Type | About |
|---|---|---|---|
idRequired | path | string | The ID (a UUID). |
Idempotency-Key | header | string | Makes a repeat of this request safe for 24 hours. |
Request body#
{
"fields": {
"claim_number": "CLM-10442"
}
}curl -X PATCH "https://ssjougrsaecdwfuxeasd.supabase.co/functions/v1/api-gateway/v1/cases/{id}/fields" \
-H "Authorization: Bearer $AVERTYN_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{"fields":{"claim_number":"CLM-10442"}}'Responses#
| Status | Means | Body |
|---|---|---|
200 | OK | JSON |
401 | The key is missing, wrong, revoked or expired, or the request came from an address the key does not allow. | Problem |
403 | The key does not have a scope this route needs. | Problem |
404 | Nothing with this ID in your workspace. | Problem |
409 | The Idempotency-Key was used with a different request, or the first request is still running. | Problem |
422 | The request was understood and refused; detail says why. | Problem |
429 | Over the key's limit for this minute. | Problem |
500 | Avertyn could not complete the request. | Problem |
POST/v1/inbound/{source}#
Bring a message into the Inbox from another system, such as zendesk or front. It never changes a deadline or opens a case by itself.
Scope: inbound:write
Parameters#
| Name | In | Type | About |
|---|---|---|---|
sourceRequired | path | string | Where the message comes from, for example zendesk or front. |
Idempotency-Key | header | string | Makes a repeat of this request safe for 24 hours. |
Request body#
{
"subject": "Open negotiation notice",
"body": "Text of the message",
"from": "billing@provider.example",
"case": "IDR-2026-5203",
"external_id": "48213"
}curl -X POST "https://ssjougrsaecdwfuxeasd.supabase.co/functions/v1/api-gateway/v1/inbound/{source}" \
-H "Authorization: Bearer $AVERTYN_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{"subject":"Open negotiation notice","body":"Text of the message","from":"billing@provider.example","case":"IDR-2026-5203","external_id":"48213"}'Responses#
| Status | Means | Body |
|---|---|---|
202 | OK | JSON |
401 | The key is missing, wrong, revoked or expired, or the request came from an address the key does not allow. | Problem |
403 | The key does not have a scope this route needs. | Problem |
409 | The Idempotency-Key was used with a different request, or the first request is still running. | Problem |
422 | The request was understood and refused; detail says why. | Problem |
429 | Over the key's limit for this minute. | Problem |
500 | Avertyn could not complete the request. | Problem |
POST/v1/remittances#
Send an X12 835 from your claims system or payment vendor, as the raw file (Content-Type application/edi-x12) or as JSON. Avertyn reads it, checks every line against the No Surprises Act remark-code rules and links it to its cases. direction is outbound (your own remittance, the default) or inbound (one a provider sent). Needs a workspace that may hold patient information.
Scope: remittances:write
Parameters#
| Name | In | Type | About |
|---|---|---|---|
Idempotency-Key | header | string | Makes a repeat of this request safe for 24 hours. |
Request body#
{
"x12": "ISA*00*…~ST*835*0001~…~SE*12*0001~GE*1*1~IEA*1*000000001~",
"direction": "outbound"
}curl -X POST "https://ssjougrsaecdwfuxeasd.supabase.co/functions/v1/api-gateway/v1/remittances" \
-H "Authorization: Bearer $AVERTYN_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{"x12":"ISA*00*…~ST*835*0001~…~SE*12*0001~GE*1*1~IEA*1*000000001~","direction":"outbound"}'Responses#
| Status | Means | Body |
|---|---|---|
201 | OK | JSON |
401 | The key is missing, wrong, revoked or expired, or the request came from an address the key does not allow. | Problem |
403 | The key does not have a scope this route needs. | Problem |
409 | The Idempotency-Key was used with a different request, or the first request is still running. | Problem |
422 | The request was understood and refused; detail says why. | Problem |
429 | Over the key's limit for this minute. | Problem |
500 | Avertyn could not complete the request. | Problem |
GET/v1/metrics/scorecard#
The workspace scorecard.
Scope: metrics:read
curl "https://ssjougrsaecdwfuxeasd.supabase.co/functions/v1/api-gateway/v1/metrics/scorecard" \
-H "Authorization: Bearer $AVERTYN_KEY"Responses#
GET/v1/metrics/exposure#
Open exposure by plan sponsor.
Scope: metrics:read
curl "https://ssjougrsaecdwfuxeasd.supabase.co/functions/v1/api-gateway/v1/metrics/exposure" \
-H "Authorization: Bearer $AVERTYN_KEY"Responses#
GET/v1/documents/{id}#
One document with its text and signing state.
Scope: documents:read
Parameters#
| Name | In | Type | About |
|---|---|---|---|
idRequired | path | string | The ID (a UUID). |
curl "https://ssjougrsaecdwfuxeasd.supabase.co/functions/v1/api-gateway/v1/documents/{id}" \
-H "Authorization: Bearer $AVERTYN_KEY"Responses#
| Status | Means | Body |
|---|---|---|
200 | OK | JSON |
401 | The key is missing, wrong, revoked or expired, or the request came from an address the key does not allow. | Problem |
403 | The key does not have a scope this route needs. | Problem |
404 | Nothing with this ID in your workspace. | Problem |
429 | Over the key's limit for this minute. | Problem |
500 | Avertyn could not complete the request. | Problem |
GET/v1/timesheets#
Hours for one pay period: each person's days, each work week's total and overtime, and who approved it. Only approved time unless status is all; anyone whose weeks still wait for approval is named in waiting. Overtime is counted for each work week and listed in the pay period where the week ends.
Scope: time:read
Parameters#
| Name | In | Type | About |
|---|---|---|---|
period | query | string (date) | Any day in the pay period you want, as YYYY-MM-DD. Left out, the last pay period that has ended. |
status | query | stringDefault approved | approved (the default) for approved time only, or all to include time still waiting for approval. |
curl "https://ssjougrsaecdwfuxeasd.supabase.co/functions/v1/api-gateway/v1/timesheets" \
-H "Authorization: Bearer $AVERTYN_KEY"Responses#
| Status | Means | Body |
|---|---|---|
200 | OK | data: Timesheet |
401 | The key is missing, wrong, revoked or expired, or the request came from an address the key does not allow. | Problem |
403 | The key does not have a scope this route needs. | Problem |
422 | period is not a date, or status is not approved or all. | Problem |
429 | Over the key's limit for this minute. | Problem |
500 | Avertyn could not complete the request. | Problem |
GET/v1/timesheets/periods#
The recent pay periods, newest first, each with its dates, whether it has ended and whether all of its time is approved.
Scope: time:read
Parameters#
| Name | In | Type | About |
|---|---|---|---|
limit | query | integerDefault 6 | How many pay periods: 1 to 26, 6 if left out. |
curl "https://ssjougrsaecdwfuxeasd.supabase.co/functions/v1/api-gateway/v1/timesheets/periods" \
-H "Authorization: Bearer $AVERTYN_KEY"Responses#
| Status | Means | Body |
|---|---|---|
200 | OK | List of PayPeriod |
401 | The key is missing, wrong, revoked or expired, or the request came from an address the key does not allow. | Problem |
403 | The key does not have a scope this route needs. | Problem |
422 | limit is not a whole number from 1 to 26. | Problem |
429 | Over the key's limit for this minute. | Problem |
500 | Avertyn could not complete the request. | Problem |
GET/v1/members#
Members on your clients' rosters, each with the plans covering them and when. Find one by member ID, or list a plan's members covered on a date.
Scope: members:read
Parameters#
| Name | In | Type | About |
|---|---|---|---|
member_id | query | string | The member with this member ID (spaces and dashes don't matter). |
plan | query | string | A plan: its ID, plan number, name, or the group number a roster file uses for it. |
active_on | query | string (date) | Only members covered on this date (YYYY-MM-DD), for example a date of service. |
limit | query | integerDefault 100 | How many: 1 to 500, 100 if left out. |
offset | query | integerDefault 0 | How many to skip, for the next page. |
curl "https://ssjougrsaecdwfuxeasd.supabase.co/functions/v1/api-gateway/v1/members" \
-H "Authorization: Bearer $AVERTYN_KEY"Responses#
| Status | Means | Body |
|---|---|---|
200 | OK | List of Member |
401 | The key is missing, wrong, revoked or expired, or the request came from an address the key does not allow. | Problem |
403 | The key does not have a scope this route needs. | Problem |
422 | limit, offset or active_on is not valid, or plan doesn't match one of your plans. | Problem |
429 | Over the key's limit for this minute. | Problem |
500 | Avertyn could not complete the request. | Problem |
POST/v1/members#
Add or update members and their coverage, up to 5,000 at a time. mode change (the default) changes only the members sent; full also ends, the day before today, the coverage of members on those plans who aren't sent (send confirm_ends true).
Scope: members:write
Parameters#
| Name | In | Type | About |
|---|---|---|---|
Idempotency-Key | header | string | Makes a repeat of this request safe for 24 hours. |
Request body#
{
"mode": "change",
"plan": "GRP-7781",
"members": [
{
"member_id": "M100",
"first_name": "Nora",
"last_name": "Quill",
"dob": "1984-03-12",
"sex": "F",
"relationship": "self",
"coverage_start": "2026-01-01",
"coverage_end": null
}
]
}curl -X POST "https://ssjougrsaecdwfuxeasd.supabase.co/functions/v1/api-gateway/v1/members" \
-H "Authorization: Bearer $AVERTYN_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{"mode":"change","plan":"GRP-7781","members":[{"member_id":"M100","first_name":"Nora","last_name":"Quill","dob":"1984-03-12","sex":"F","relationship":"self","coverage_start":"2026-01-01","coverage_end":null}]}'Responses#
| Status | Means | Body |
|---|---|---|
201 | OK | data: RosterResult |
401 | The key is missing, wrong, revoked or expired, or the request came from an address the key does not allow. | Problem |
403 | The key does not have a scope this route needs. | Problem |
409 | The Idempotency-Key was used with a different request, or the first request is still running. | Problem |
422 | The request was understood and refused; detail says why. | Problem |
429 | Over the key's limit for this minute. | Problem |
500 | Avertyn could not complete the request. | Problem |
POST/v1/rosters#
Send a whole roster file: CSV (any column names Avertyn can match) or an X12 834 (Content-Type application/edi-x12). An 834 replace or verify file is read as every member. Social Security numbers are never kept.
Scope: members:write
Parameters#
| Name | In | Type | About |
|---|---|---|---|
mode | query | stringDefault change | change (the default) or full: every member of the plans in the file. |
plan | query | string | A plan: its ID, plan number, name, or the group number a roster file uses for it. |
confirm_ends | query | booleanDefault false | true to go ahead when a full file would end the coverage of members not in it. |
file_name | query | string | The file's name, shown in Avertyn's roster history. |
Idempotency-Key | header | string | Makes a repeat of this request safe for 24 hours. |
Request body#
{
"content": "Member ID,Last Name,First Name,DOB,Group Number,Effective Date\nM100,Quill,Nora,03/12/1984,GRP-7781,01/01/2026\n",
"mode": "change"
}curl -X POST "https://ssjougrsaecdwfuxeasd.supabase.co/functions/v1/api-gateway/v1/rosters" \
-H "Authorization: Bearer $AVERTYN_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{"content":"Member ID,Last Name,First Name,DOB,Group Number,Effective Date\nM100,Quill,Nora,03/12/1984,GRP-7781,01/01/2026\n","mode":"change"}'Responses#
| Status | Means | Body |
|---|---|---|
201 | OK | data: RosterResult |
401 | The key is missing, wrong, revoked or expired, or the request came from an address the key does not allow. | Problem |
403 | The key does not have a scope this route needs. | Problem |
409 | The Idempotency-Key was used with a different request, or the first request is still running. | Problem |
422 | The request was understood and refused; detail says why. | Problem |
429 | Over the key's limit for this minute. | Problem |
500 | Avertyn could not complete the request. | Problem |
GET/v1/rosters/{id}#
What a roster file or members batch did: members added, coverage lines, coverage ended, and rows not loaded.
Scope: members:read or members:write
Parameters#
| Name | In | Type | About |
|---|---|---|---|
idRequired | path | string | The ID (a UUID). |
curl "https://ssjougrsaecdwfuxeasd.supabase.co/functions/v1/api-gateway/v1/rosters/{id}" \
-H "Authorization: Bearer $AVERTYN_KEY"Responses#
| Status | Means | Body |
|---|---|---|
200 | OK | data: Roster |
401 | The key is missing, wrong, revoked or expired, or the request came from an address the key does not allow. | Problem |
403 | The key does not have a scope this route needs. | Problem |
404 | Nothing with this ID in your workspace. | Problem |
429 | Over the key's limit for this minute. | Problem |
500 | Avertyn could not complete the request. | Problem |
GET/v1/events#
The event history of the last 30 days, newest first. Read it to catch up after an outage instead of waiting for retries.
Scope: cases:read:basic or cases:read or cases:read:phi
Parameters#
| Name | In | Type | About |
|---|---|---|---|
limit | query | integerDefault 50 | How many to return: 1 to 200, 50 if left out. |
cursor | query | string | The next_cursor of the page before. |
type | query | string | Only events with this name, for example dispute.state_changed. |
curl "https://ssjougrsaecdwfuxeasd.supabase.co/functions/v1/api-gateway/v1/events" \
-H "Authorization: Bearer $AVERTYN_KEY"Responses#
| Status | Means | Body |
|---|---|---|
200 | OK | List of Event |
400 | limit, cursor or a date filter is not valid. | Problem |
401 | The key is missing, wrong, revoked or expired, or the request came from an address the key does not allow. | Problem |
403 | The key does not have a scope this route needs. | Problem |
429 | Over the key's limit for this minute. | Problem |
500 | Avertyn could not complete the request. | Problem |
GET/v1/events/{id}#
One event by its ID (evt_ and 32 characters).
Scope: cases:read:basic or cases:read or cases:read:phi
Parameters#
| Name | In | Type | About |
|---|---|---|---|
idRequired | path | string | The event ID: evt_ and 32 characters. |
curl "https://ssjougrsaecdwfuxeasd.supabase.co/functions/v1/api-gateway/v1/events/{id}" \
-H "Authorization: Bearer $AVERTYN_KEY"Responses#
| Status | Means | Body |
|---|---|---|
200 | OK | data: Event |
401 | The key is missing, wrong, revoked or expired, or the request came from an address the key does not allow. | Problem |
403 | The key does not have a scope this route needs. | Problem |
404 | Nothing with this ID in your workspace. | Problem |
429 | Over the key's limit for this minute. | Problem |
500 | Avertyn could not complete the request. | Problem |
POST/v1/email#
Send an email from one of your own mailboxes on your own domain (Enterprise). It is queued and sent through your domain; follow it with GET /v1/email/{id} or the email.* webhook events.
Scope: email:send
Parameters#
| Name | In | Type | About |
|---|---|---|---|
Idempotency-Key | header | string | Makes a repeat of this request safe for 24 hours. |
Request body#
{
"from": "disputes@mail.yourplan.example",
"to": "billing@provider.example",
"subject": "Open negotiation: claim CLM-10442",
"text": "Please find our response attached in the portal.",
"case": "IDR-2026-0001"
}curl -X POST "https://ssjougrsaecdwfuxeasd.supabase.co/functions/v1/api-gateway/v1/email" \
-H "Authorization: Bearer $AVERTYN_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{"from":"disputes@mail.yourplan.example","to":"billing@provider.example","subject":"Open negotiation: claim CLM-10442","text":"Please find our response attached in the portal.","case":"IDR-2026-0001"}'Responses#
| Status | Means | Body |
|---|---|---|
202 | OK | JSON |
401 | The key is missing, wrong, revoked or expired, or the request came from an address the key does not allow. | Problem |
403 | The key does not have a scope this route needs. | Problem |
409 | The Idempotency-Key was used with a different request, or the first request is still running. | Problem |
422 | The request was understood and refused; detail says why. | Problem |
429 | Over the key's limit for this minute. | Problem |
500 | Avertyn could not complete the request. | Problem |
GET/v1/email/{id}#
One email sent through the API or from Avertyn: its mailbox, recipient, status (queued, held, sent, delivered, delayed, bounced, complaint, failed) and each event.
Scope: email:send
Parameters#
| Name | In | Type | About |
|---|---|---|---|
idRequired | path | string | The ID (a UUID). |
curl "https://ssjougrsaecdwfuxeasd.supabase.co/functions/v1/api-gateway/v1/email/{id}" \
-H "Authorization: Bearer $AVERTYN_KEY"Responses#
| Status | Means | Body |
|---|---|---|
200 | OK | JSON |
401 | The key is missing, wrong, revoked or expired, or the request came from an address the key does not allow. | Problem |
403 | The key does not have a scope this route needs. | Problem |
404 | Nothing with this ID in your workspace. | Problem |
429 | Over the key's limit for this minute. | Problem |
500 | Avertyn could not complete the request. | Problem |
POST/v1/webhooks#
Add a webhook endpoint. The signing secret is in the answer and is not shown again by the API.
Scope: webhooks:manage
Parameters#
| Name | In | Type | About |
|---|---|---|---|
Idempotency-Key | header | string | Makes a repeat of this request safe for 24 hours. |
Request body#
{
"url": "https://your-system.example/avertyn",
"events": [
"dispute.state_changed",
"deadline.due_soon"
],
"payload_level": "full",
"label": "Claims system"
}curl -X POST "https://ssjougrsaecdwfuxeasd.supabase.co/functions/v1/api-gateway/v1/webhooks" \
-H "Authorization: Bearer $AVERTYN_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{"url":"https://your-system.example/avertyn","events":["dispute.state_changed","deadline.due_soon"],"payload_level":"full","label":"Claims system"}'Responses#
| Status | Means | Body |
|---|---|---|
201 | OK | JSON |
401 | The key is missing, wrong, revoked or expired, or the request came from an address the key does not allow. | Problem |
403 | The key does not have a scope this route needs. | Problem |
409 | The Idempotency-Key was used with a different request, or the first request is still running. | Problem |
422 | The request was understood and refused; detail says why. | Problem |
429 | Over the key's limit for this minute. | Problem |
500 | Avertyn could not complete the request. | Problem |
GET/v1/webhooks#
Every webhook endpoint with its health.
Scope: webhooks:manage
curl "https://ssjougrsaecdwfuxeasd.supabase.co/functions/v1/api-gateway/v1/webhooks" \
-H "Authorization: Bearer $AVERTYN_KEY"Responses#
| Status | Means | Body |
|---|---|---|
200 | OK | List of Webhook |
401 | The key is missing, wrong, revoked or expired, or the request came from an address the key does not allow. | Problem |
403 | The key does not have a scope this route needs. | Problem |
429 | Over the key's limit for this minute. | Problem |
500 | Avertyn could not complete the request. | Problem |
GET/v1/webhooks/{id}#
One webhook endpoint with its health and the number of held events.
Scope: webhooks:manage
Parameters#
| Name | In | Type | About |
|---|---|---|---|
idRequired | path | string | The ID (a UUID). |
curl "https://ssjougrsaecdwfuxeasd.supabase.co/functions/v1/api-gateway/v1/webhooks/{id}" \
-H "Authorization: Bearer $AVERTYN_KEY"Responses#
| Status | Means | Body |
|---|---|---|
200 | OK | data: Webhook |
401 | The key is missing, wrong, revoked or expired, or the request came from an address the key does not allow. | Problem |
403 | The key does not have a scope this route needs. | Problem |
404 | Nothing with this ID in your workspace. | Problem |
429 | Over the key's limit for this minute. | Problem |
500 | Avertyn could not complete the request. | Problem |
PATCH/v1/webhooks/{id}#
Pause or resume an endpoint. While paused its events are held; resuming sends them unless send_held is false.
Scope: webhooks:manage
Parameters#
| Name | In | Type | About |
|---|---|---|---|
idRequired | path | string | The ID (a UUID). |
Idempotency-Key | header | string | Makes a repeat of this request safe for 24 hours. |
Request body#
{
"paused": true
}curl -X PATCH "https://ssjougrsaecdwfuxeasd.supabase.co/functions/v1/api-gateway/v1/webhooks/{id}" \
-H "Authorization: Bearer $AVERTYN_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{"paused":true}'Responses#
| Status | Means | Body |
|---|---|---|
200 | OK | data: Webhook |
401 | The key is missing, wrong, revoked or expired, or the request came from an address the key does not allow. | Problem |
403 | The key does not have a scope this route needs. | Problem |
404 | Nothing with this ID in your workspace. | Problem |
409 | The Idempotency-Key was used with a different request, or the first request is still running. | Problem |
422 | The request was understood and refused; detail says why. | Problem |
429 | Over the key's limit for this minute. | Problem |
500 | Avertyn could not complete the request. | Problem |
DELETE/v1/webhooks/{id}#
Remove a webhook endpoint and its delivery history.
Scope: webhooks:manage
Parameters#
| Name | In | Type | About |
|---|---|---|---|
idRequired | path | string | The ID (a UUID). |
Idempotency-Key | header | string | Makes a repeat of this request safe for 24 hours. |
curl -X DELETE "https://ssjougrsaecdwfuxeasd.supabase.co/functions/v1/api-gateway/v1/webhooks/{id}" \
-H "Authorization: Bearer $AVERTYN_KEY" \
-H "Idempotency-Key: $(uuidgen)"Responses#
| Status | Means | Body |
|---|---|---|
204 | Done. No body. | |
401 | The key is missing, wrong, revoked or expired, or the request came from an address the key does not allow. | Problem |
403 | The key does not have a scope this route needs. | Problem |
404 | Nothing with this ID in your workspace. | Problem |
409 | The Idempotency-Key was used with a different request, or the first request is still running. | Problem |
429 | Over the key's limit for this minute. | Problem |
500 | Avertyn could not complete the request. | Problem |
Objects#
Problem#
| Field | Type | About |
|---|---|---|
type | string | A URL that names the kind of error. |
title | string | A short name, for example invalid_cursor. |
status | integer | |
detail | string, or null | One sentence saying what to do. |
request_id | string | Quote this when you write to us. |
errors | array of object | On a 422 for case fields: one entry for each field refused. |
Key#
| Field | Type | About |
|---|---|---|
workspace_id | string (uuid) | |
key_id | string (uuid) | |
environment | string | live or test |
scopes | array of string | |
rate_limit_per_min | integer | |
expires_at | string, or null (date-time) | When the key stops working, if it has an expiry. |
api_version | string |
EventType#
| Field | Type | About |
|---|---|---|
type | string | The event name. |
group | string | notice, case, deadline, message, document, money or approval |
title | string | |
detail | string |
Case#
Fields depend on the key's read scope.
| Field | Type | About |
|---|---|---|
id | string (uuid) | |
external_ref | string | The case number. |
workflow_state | string | The step. |
disposition | string | The outcome; open until one is recorded. |
phase | string | open_negotiation or idr |
eligibility_score | number, or null | |
win_prob | number, or null | |
respond_by | string, or null (date-time) | |
pay_by | string, or null (date-time) | |
created_at | string (date-time) | |
updated_at | string (date-time) | |
cpt_code | string, or null | With cases:read. |
service_category | string, or null | With cases:read. |
billed_amount | number, or null | With cases:read. |
demand_amount | number, or null | With cases:read. |
qpa_amount | number, or null | With cases:read. |
plan_legal_name | string, or null | With cases:read. |
sponsor_legal_name | string, or null | With cases:read. |
idr_registration_number | string, or null | With cases:read. |
patient_ref | string, or null | With cases:read:phi. |
claim_number | string, or null | With cases:read:phi. |
service_date | string, or null (date) | With cases:read:phi. |
Event#
The same body a webhook endpoint receives.
| Field | Type | About |
|---|---|---|
id | string | evt_ and 32 characters; the same on every retry and every send-again. |
type | string | The event name. |
created | string (date-time) | |
api_version | string | |
workspace_id | string (uuid) | |
sample | boolean | True when the case is sample data. |
level | string | thin, full or phi |
data | object | The change. data.case uses the Case field names. |
Member#
| Field | Type | About |
|---|---|---|
id | string (uuid) | |
member_id | string | |
first_name | string, or null | |
last_name | string | |
middle_name | string, or null | |
dob | string (date) | |
sex | string, or null | F, M, X or U |
relationship | string, or null | self, spouse, child or other |
subscriber_id | string, or null | |
zip | string, or null | |
updated_at | string (date-time) | |
coverage | array of object |
RosterResult#
| Field | Type | About |
|---|---|---|
roster_id | string (uuid) | |
mode | string | change or full |
format | string | json, csv or 834 |
stats | object | |
not_loaded | integer | Rows that couldn't be loaded; problems lists the first 50. |
problems | array of object | |
unmatched_plans | array of object | Plan names in the file that match none of your plans; their rows weren't loaded. Match them once in Avertyn (Directory → Patients) or send plan. |
Roster#
| Field | Type | About |
|---|---|---|
id | string (uuid) | |
source | string | upload, api or sample |
format | string | |
mode | string | |
file_name | string, or null | |
status | string | staged, applying, applied or discarded |
stats | object | |
created_at | string (date-time) | |
applied_at | string, or null (date-time) |
PayPeriod#
| Field | Type | About |
|---|---|---|
start | string (date) | |
end | string (date) | |
label | string | For example 11/8/2026 to 11/14/2026. |
kind | string | weekly, biweekly, semimonthly or monthly |
ended | boolean | |
complete | boolean | Every week with time in it is approved. |
people | integer | People with time in the pay period. |
waiting | integer | People with weeks still waiting for approval. |
total_min | integer | All recorded minutes, approved or not. |
Timesheet#
| Field | Type | About |
|---|---|---|
period | object | |
ended | boolean | |
complete | boolean | Every week with time in it is approved. |
overtime_hours | number, or null | Hours in a work week after which time is overtime; null when the workspace does not count overtime. |
total_min | integer | |
overtime_min | integer, or null | Overtime in work weeks that end in this pay period. |
rule | string | How overtime is placed in pay periods. |
people | array of object | |
waiting | array of object | People whose weeks still wait for approval, with those weeks. |
Webhook#
| Field | Type | About |
|---|---|---|
id | string (uuid) | |
url | string | |
label | string, or null | |
events | array of string | |
payload_level | string | thin, full or phi |
active | boolean | |
health | string | ok, failing, paused or new |
paused_at | string, or null (date-time) | |
paused_by | string, or null | user, or auto after 3 days with no success |
paused_reason | string, or null | |
failing_since | string, or null (date-time) | |
last_success_at | string, or null (date-time) | |
last_failure_at | string, or null (date-time) | |
last_error | string, or null | |
held | integer | Events held while paused. |
created_at | string (date-time) |
Ask about this page
Answered from Avertyn's docs only, with links to where they say so. Not legal advice. Leave out patient details.