AvertynDocs

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#

Cases#

Documents#

Messages#

Remittances#

Metrics#

Timesheets#

Members#

Email#

Webhooks#

GET/v1/me#

The workspace this key belongs to, its scopes, its limit and when it expires. Use it to check a key.

Example
curl "https://ssjougrsaecdwfuxeasd.supabase.co/functions/v1/api-gateway/v1/me" \
  -H "Authorization: Bearer $AVERTYN_KEY"

Responses#

StatusMeansBody
200OKdata: Key
401The key is missing, wrong, revoked or expired, or the request came from an address the key does not allow.Problem
429Over the key's limit for this minute.Problem
500Avertyn could not complete the request.Problem

GET/v1/event-types#

The event catalog: every event name with its group and meaning.

Example
curl "https://ssjougrsaecdwfuxeasd.supabase.co/functions/v1/api-gateway/v1/event-types" \
  -H "Authorization: Bearer $AVERTYN_KEY"

Responses#

StatusMeansBody
200OKList of EventType
401The key is missing, wrong, revoked or expired, or the request came from an address the key does not allow.Problem
429Over the key's limit for this minute.Problem
500Avertyn could not complete the request.Problem

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#

NameInTypeAbout
limitqueryintegerDefault 50How many to return: 1 to 200, 50 if left out.
cursorquerystringThe next_cursor of the page before.
stagequerystringOnly cases at this step, for example triage.
phasequerystringOnly cases in this phase: open_negotiation or idr.
dispositionquerystringOnly cases with this outcome, for example open or settled.
external_refquerystringThe case with exactly this case number.
updated_sincequerystringOnly cases changed at or after this time (ISO 8601).
respond_by_beforequerystringOnly cases whose response date is before this time (ISO 8601).
Example
curl "https://ssjougrsaecdwfuxeasd.supabase.co/functions/v1/api-gateway/v1/cases" \
  -H "Authorization: Bearer $AVERTYN_KEY"

Responses#

StatusMeansBody
200OKList of Case
400limit, cursor or a date filter is not valid.Problem
401The key is missing, wrong, revoked or expired, or the request came from an address the key does not allow.Problem
403The key does not have a scope this route needs.Problem
429Over the key's limit for this minute.Problem
500Avertyn 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#

NameInTypeAbout
idRequiredpathstringThe ID (a UUID).
Example
curl "https://ssjougrsaecdwfuxeasd.supabase.co/functions/v1/api-gateway/v1/cases/{id}" \
  -H "Authorization: Bearer $AVERTYN_KEY"

Responses#

StatusMeansBody
200OKdata: Case
401The key is missing, wrong, revoked or expired, or the request came from an address the key does not allow.Problem
403The key does not have a scope this route needs.Problem
404Nothing with this ID in your workspace.Problem
429Over the key's limit for this minute.Problem
500Avertyn could not complete the request.Problem

POST/v1/disputes#

Open cases from your claims system.

Scope: cases:write

Parameters#

NameInTypeAbout
Idempotency-KeyheaderstringMakes a repeat of this request safe for 24 hours.

Request body#

JSON
{
  "disputes": [
    {
      "external_ref": "CLM-10442",
      "cpt_code": "99285",
      "billed_amount": 4200,
      "qpa_amount": 1150,
      "notice_received_on": "2026-11-10"
    }
  ]
}
Example
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#

StatusMeansBody
201OKJSON
401The key is missing, wrong, revoked or expired, or the request came from an address the key does not allow.Problem
403The key does not have a scope this route needs.Problem
409The Idempotency-Key was used with a different request, or the first request is still running.Problem
422The request was understood and refused; detail says why.Problem
429Over the key's limit for this minute.Problem
500Avertyn 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#

NameInTypeAbout
idRequiredpathstringThe ID (a UUID).
Idempotency-KeyheaderstringMakes a repeat of this request safe for 24 hours.

Request body#

JSON
{
  "action": "add_note",
  "params": {
    "text": "Called the provider's billing office."
  },
  "rationale": "Follow-up"
}
Example
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#

StatusMeansBody
200OKJSON
202Staged for approval by a person.JSON
401The key is missing, wrong, revoked or expired, or the request came from an address the key does not allow.Problem
403The key does not have a scope this route needs.Problem
404Nothing with this ID in your workspace.Problem
409The Idempotency-Key was used with a different request, or the first request is still running.Problem
422The request was understood and refused; detail says why.Problem
429Over the key's limit for this minute.Problem
500Avertyn 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#

NameInTypeAbout
idRequiredpathstringThe ID (a UUID).
Idempotency-KeyheaderstringMakes a repeat of this request safe for 24 hours.

Request body#

JSON
{
  "filename": "eob.pdf",
  "mime": "application/pdf",
  "content_base64": "JVBERi0xLjcK…",
  "category": "eob"
}
Example
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#

StatusMeansBody
201OKJSON
401The key is missing, wrong, revoked or expired, or the request came from an address the key does not allow.Problem
403The key does not have a scope this route needs.Problem
404Nothing with this ID in your workspace.Problem
409The Idempotency-Key was used with a different request, or the first request is still running.Problem
422The request was understood and refused; detail says why.Problem
429Over the key's limit for this minute.Problem
500Avertyn 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#

NameInTypeAbout
idRequiredpathstringThe ID (a UUID).
Idempotency-KeyheaderstringMakes a repeat of this request safe for 24 hours.

Request body#

JSON
{
  "fields": {
    "claim_number": "CLM-10442"
  }
}
Example
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#

StatusMeansBody
200OKJSON
401The key is missing, wrong, revoked or expired, or the request came from an address the key does not allow.Problem
403The key does not have a scope this route needs.Problem
404Nothing with this ID in your workspace.Problem
409The Idempotency-Key was used with a different request, or the first request is still running.Problem
422The request was understood and refused; detail says why.Problem
429Over the key's limit for this minute.Problem
500Avertyn 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#

NameInTypeAbout
sourceRequiredpathstringWhere the message comes from, for example zendesk or front.
Idempotency-KeyheaderstringMakes a repeat of this request safe for 24 hours.

Request body#

JSON
{
  "subject": "Open negotiation notice",
  "body": "Text of the message",
  "from": "billing@provider.example",
  "case": "IDR-2026-5203",
  "external_id": "48213"
}
Example
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#

StatusMeansBody
202OKJSON
401The key is missing, wrong, revoked or expired, or the request came from an address the key does not allow.Problem
403The key does not have a scope this route needs.Problem
409The Idempotency-Key was used with a different request, or the first request is still running.Problem
422The request was understood and refused; detail says why.Problem
429Over the key's limit for this minute.Problem
500Avertyn 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#

NameInTypeAbout
Idempotency-KeyheaderstringMakes a repeat of this request safe for 24 hours.

Request body#

JSON
{
  "x12": "ISA*00*…~ST*835*0001~…~SE*12*0001~GE*1*1~IEA*1*000000001~",
  "direction": "outbound"
}
Example
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#

StatusMeansBody
201OKJSON
401The key is missing, wrong, revoked or expired, or the request came from an address the key does not allow.Problem
403The key does not have a scope this route needs.Problem
409The Idempotency-Key was used with a different request, or the first request is still running.Problem
422The request was understood and refused; detail says why.Problem
429Over the key's limit for this minute.Problem
500Avertyn could not complete the request.Problem

GET/v1/metrics/scorecard#

The workspace scorecard.

Scope: metrics:read

Example
curl "https://ssjougrsaecdwfuxeasd.supabase.co/functions/v1/api-gateway/v1/metrics/scorecard" \
  -H "Authorization: Bearer $AVERTYN_KEY"

Responses#

StatusMeansBody
200OKJSON
401The key is missing, wrong, revoked or expired, or the request came from an address the key does not allow.Problem
403The key does not have a scope this route needs.Problem
429Over the key's limit for this minute.Problem
500Avertyn could not complete the request.Problem

GET/v1/metrics/exposure#

Open exposure by plan sponsor.

Scope: metrics:read

Example
curl "https://ssjougrsaecdwfuxeasd.supabase.co/functions/v1/api-gateway/v1/metrics/exposure" \
  -H "Authorization: Bearer $AVERTYN_KEY"

Responses#

StatusMeansBody
200OKJSON
401The key is missing, wrong, revoked or expired, or the request came from an address the key does not allow.Problem
403The key does not have a scope this route needs.Problem
429Over the key's limit for this minute.Problem
500Avertyn could not complete the request.Problem

GET/v1/documents/{id}#

One document with its text and signing state.

Scope: documents:read

Parameters#

NameInTypeAbout
idRequiredpathstringThe ID (a UUID).
Example
curl "https://ssjougrsaecdwfuxeasd.supabase.co/functions/v1/api-gateway/v1/documents/{id}" \
  -H "Authorization: Bearer $AVERTYN_KEY"

Responses#

StatusMeansBody
200OKJSON
401The key is missing, wrong, revoked or expired, or the request came from an address the key does not allow.Problem
403The key does not have a scope this route needs.Problem
404Nothing with this ID in your workspace.Problem
429Over the key's limit for this minute.Problem
500Avertyn 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#

NameInTypeAbout
periodquerystring (date)Any day in the pay period you want, as YYYY-MM-DD. Left out, the last pay period that has ended.
statusquerystringDefault approvedapproved (the default) for approved time only, or all to include time still waiting for approval.
Example
curl "https://ssjougrsaecdwfuxeasd.supabase.co/functions/v1/api-gateway/v1/timesheets" \
  -H "Authorization: Bearer $AVERTYN_KEY"

Responses#

StatusMeansBody
200OKdata: Timesheet
401The key is missing, wrong, revoked or expired, or the request came from an address the key does not allow.Problem
403The key does not have a scope this route needs.Problem
422period is not a date, or status is not approved or all.Problem
429Over the key's limit for this minute.Problem
500Avertyn 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#

NameInTypeAbout
limitqueryintegerDefault 6How many pay periods: 1 to 26, 6 if left out.
Example
curl "https://ssjougrsaecdwfuxeasd.supabase.co/functions/v1/api-gateway/v1/timesheets/periods" \
  -H "Authorization: Bearer $AVERTYN_KEY"

Responses#

StatusMeansBody
200OKList of PayPeriod
401The key is missing, wrong, revoked or expired, or the request came from an address the key does not allow.Problem
403The key does not have a scope this route needs.Problem
422limit is not a whole number from 1 to 26.Problem
429Over the key's limit for this minute.Problem
500Avertyn 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#

NameInTypeAbout
member_idquerystringThe member with this member ID (spaces and dashes don't matter).
planquerystringA plan: its ID, plan number, name, or the group number a roster file uses for it.
active_onquerystring (date)Only members covered on this date (YYYY-MM-DD), for example a date of service.
limitqueryintegerDefault 100How many: 1 to 500, 100 if left out.
offsetqueryintegerDefault 0How many to skip, for the next page.
Example
curl "https://ssjougrsaecdwfuxeasd.supabase.co/functions/v1/api-gateway/v1/members" \
  -H "Authorization: Bearer $AVERTYN_KEY"

Responses#

StatusMeansBody
200OKList of Member
401The key is missing, wrong, revoked or expired, or the request came from an address the key does not allow.Problem
403The key does not have a scope this route needs.Problem
422limit, offset or active_on is not valid, or plan doesn't match one of your plans.Problem
429Over the key's limit for this minute.Problem
500Avertyn 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#

NameInTypeAbout
Idempotency-KeyheaderstringMakes a repeat of this request safe for 24 hours.

Request body#

JSON
{
  "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
    }
  ]
}
Example
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#

StatusMeansBody
201OKdata: RosterResult
401The key is missing, wrong, revoked or expired, or the request came from an address the key does not allow.Problem
403The key does not have a scope this route needs.Problem
409The Idempotency-Key was used with a different request, or the first request is still running.Problem
422The request was understood and refused; detail says why.Problem
429Over the key's limit for this minute.Problem
500Avertyn 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#

NameInTypeAbout
modequerystringDefault changechange (the default) or full: every member of the plans in the file.
planquerystringA plan: its ID, plan number, name, or the group number a roster file uses for it.
confirm_endsquerybooleanDefault falsetrue to go ahead when a full file would end the coverage of members not in it.
file_namequerystringThe file's name, shown in Avertyn's roster history.
Idempotency-KeyheaderstringMakes a repeat of this request safe for 24 hours.

Request body#

JSON
{
  "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"
}
Example
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#

StatusMeansBody
201OKdata: RosterResult
401The key is missing, wrong, revoked or expired, or the request came from an address the key does not allow.Problem
403The key does not have a scope this route needs.Problem
409The Idempotency-Key was used with a different request, or the first request is still running.Problem
422The request was understood and refused; detail says why.Problem
429Over the key's limit for this minute.Problem
500Avertyn 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#

NameInTypeAbout
idRequiredpathstringThe ID (a UUID).
Example
curl "https://ssjougrsaecdwfuxeasd.supabase.co/functions/v1/api-gateway/v1/rosters/{id}" \
  -H "Authorization: Bearer $AVERTYN_KEY"

Responses#

StatusMeansBody
200OKdata: Roster
401The key is missing, wrong, revoked or expired, or the request came from an address the key does not allow.Problem
403The key does not have a scope this route needs.Problem
404Nothing with this ID in your workspace.Problem
429Over the key's limit for this minute.Problem
500Avertyn 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#

NameInTypeAbout
limitqueryintegerDefault 50How many to return: 1 to 200, 50 if left out.
cursorquerystringThe next_cursor of the page before.
typequerystringOnly events with this name, for example dispute.state_changed.
Example
curl "https://ssjougrsaecdwfuxeasd.supabase.co/functions/v1/api-gateway/v1/events" \
  -H "Authorization: Bearer $AVERTYN_KEY"

Responses#

StatusMeansBody
200OKList of Event
400limit, cursor or a date filter is not valid.Problem
401The key is missing, wrong, revoked or expired, or the request came from an address the key does not allow.Problem
403The key does not have a scope this route needs.Problem
429Over the key's limit for this minute.Problem
500Avertyn 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#

NameInTypeAbout
idRequiredpathstringThe event ID: evt_ and 32 characters.
Example
curl "https://ssjougrsaecdwfuxeasd.supabase.co/functions/v1/api-gateway/v1/events/{id}" \
  -H "Authorization: Bearer $AVERTYN_KEY"

Responses#

StatusMeansBody
200OKdata: Event
401The key is missing, wrong, revoked or expired, or the request came from an address the key does not allow.Problem
403The key does not have a scope this route needs.Problem
404Nothing with this ID in your workspace.Problem
429Over the key's limit for this minute.Problem
500Avertyn 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#

NameInTypeAbout
Idempotency-KeyheaderstringMakes a repeat of this request safe for 24 hours.

Request body#

JSON
{
  "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"
}
Example
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#

StatusMeansBody
202OKJSON
401The key is missing, wrong, revoked or expired, or the request came from an address the key does not allow.Problem
403The key does not have a scope this route needs.Problem
409The Idempotency-Key was used with a different request, or the first request is still running.Problem
422The request was understood and refused; detail says why.Problem
429Over the key's limit for this minute.Problem
500Avertyn 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#

NameInTypeAbout
idRequiredpathstringThe ID (a UUID).
Example
curl "https://ssjougrsaecdwfuxeasd.supabase.co/functions/v1/api-gateway/v1/email/{id}" \
  -H "Authorization: Bearer $AVERTYN_KEY"

Responses#

StatusMeansBody
200OKJSON
401The key is missing, wrong, revoked or expired, or the request came from an address the key does not allow.Problem
403The key does not have a scope this route needs.Problem
404Nothing with this ID in your workspace.Problem
429Over the key's limit for this minute.Problem
500Avertyn 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#

NameInTypeAbout
Idempotency-KeyheaderstringMakes a repeat of this request safe for 24 hours.

Request body#

JSON
{
  "url": "https://your-system.example/avertyn",
  "events": [
    "dispute.state_changed",
    "deadline.due_soon"
  ],
  "payload_level": "full",
  "label": "Claims system"
}
Example
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#

StatusMeansBody
201OKJSON
401The key is missing, wrong, revoked or expired, or the request came from an address the key does not allow.Problem
403The key does not have a scope this route needs.Problem
409The Idempotency-Key was used with a different request, or the first request is still running.Problem
422The request was understood and refused; detail says why.Problem
429Over the key's limit for this minute.Problem
500Avertyn could not complete the request.Problem

GET/v1/webhooks#

Every webhook endpoint with its health.

Scope: webhooks:manage

Example
curl "https://ssjougrsaecdwfuxeasd.supabase.co/functions/v1/api-gateway/v1/webhooks" \
  -H "Authorization: Bearer $AVERTYN_KEY"

Responses#

StatusMeansBody
200OKList of Webhook
401The key is missing, wrong, revoked or expired, or the request came from an address the key does not allow.Problem
403The key does not have a scope this route needs.Problem
429Over the key's limit for this minute.Problem
500Avertyn 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#

NameInTypeAbout
idRequiredpathstringThe ID (a UUID).
Example
curl "https://ssjougrsaecdwfuxeasd.supabase.co/functions/v1/api-gateway/v1/webhooks/{id}" \
  -H "Authorization: Bearer $AVERTYN_KEY"

Responses#

StatusMeansBody
200OKdata: Webhook
401The key is missing, wrong, revoked or expired, or the request came from an address the key does not allow.Problem
403The key does not have a scope this route needs.Problem
404Nothing with this ID in your workspace.Problem
429Over the key's limit for this minute.Problem
500Avertyn 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#

NameInTypeAbout
idRequiredpathstringThe ID (a UUID).
Idempotency-KeyheaderstringMakes a repeat of this request safe for 24 hours.

Request body#

JSON
{
  "paused": true
}
Example
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#

StatusMeansBody
200OKdata: Webhook
401The key is missing, wrong, revoked or expired, or the request came from an address the key does not allow.Problem
403The key does not have a scope this route needs.Problem
404Nothing with this ID in your workspace.Problem
409The Idempotency-Key was used with a different request, or the first request is still running.Problem
422The request was understood and refused; detail says why.Problem
429Over the key's limit for this minute.Problem
500Avertyn could not complete the request.Problem

DELETE/v1/webhooks/{id}#

Remove a webhook endpoint and its delivery history.

Scope: webhooks:manage

Parameters#

NameInTypeAbout
idRequiredpathstringThe ID (a UUID).
Idempotency-KeyheaderstringMakes a repeat of this request safe for 24 hours.
Example
curl -X DELETE "https://ssjougrsaecdwfuxeasd.supabase.co/functions/v1/api-gateway/v1/webhooks/{id}" \
  -H "Authorization: Bearer $AVERTYN_KEY" \
  -H "Idempotency-Key: $(uuidgen)"

Responses#

StatusMeansBody
204Done. No body.
401The key is missing, wrong, revoked or expired, or the request came from an address the key does not allow.Problem
403The key does not have a scope this route needs.Problem
404Nothing with this ID in your workspace.Problem
409The Idempotency-Key was used with a different request, or the first request is still running.Problem
429Over the key's limit for this minute.Problem
500Avertyn could not complete the request.Problem

Objects#

Problem#

FieldTypeAbout
typestringA URL that names the kind of error.
titlestringA short name, for example invalid_cursor.
statusinteger
detailstring, or nullOne sentence saying what to do.
request_idstringQuote this when you write to us.
errorsarray of objectOn a 422 for case fields: one entry for each field refused.

Key#

FieldTypeAbout
workspace_idstring (uuid)
key_idstring (uuid)
environmentstringlive or test
scopesarray of string
rate_limit_per_mininteger
expires_atstring, or null (date-time)When the key stops working, if it has an expiry.
api_versionstring

EventType#

FieldTypeAbout
typestringThe event name.
groupstringnotice, case, deadline, message, document, money or approval
titlestring
detailstring

Case#

Fields depend on the key's read scope.

FieldTypeAbout
idstring (uuid)
external_refstringThe case number.
workflow_statestringThe step.
dispositionstringThe outcome; open until one is recorded.
phasestringopen_negotiation or idr
eligibility_scorenumber, or null
win_probnumber, or null
respond_bystring, or null (date-time)
pay_bystring, or null (date-time)
created_atstring (date-time)
updated_atstring (date-time)
cpt_codestring, or nullWith cases:read.
service_categorystring, or nullWith cases:read.
billed_amountnumber, or nullWith cases:read.
demand_amountnumber, or nullWith cases:read.
qpa_amountnumber, or nullWith cases:read.
plan_legal_namestring, or nullWith cases:read.
sponsor_legal_namestring, or nullWith cases:read.
idr_registration_numberstring, or nullWith cases:read.
patient_refstring, or nullWith cases:read:phi.
claim_numberstring, or nullWith cases:read:phi.
service_datestring, or null (date)With cases:read:phi.

Event#

The same body a webhook endpoint receives.

FieldTypeAbout
idstringevt_ and 32 characters; the same on every retry and every send-again.
typestringThe event name.
createdstring (date-time)
api_versionstring
workspace_idstring (uuid)
samplebooleanTrue when the case is sample data.
levelstringthin, full or phi
dataobjectThe change. data.case uses the Case field names.

Member#

FieldTypeAbout
idstring (uuid)
member_idstring
first_namestring, or null
last_namestring
middle_namestring, or null
dobstring (date)
sexstring, or nullF, M, X or U
relationshipstring, or nullself, spouse, child or other
subscriber_idstring, or null
zipstring, or null
updated_atstring (date-time)
coveragearray of object

RosterResult#

FieldTypeAbout
roster_idstring (uuid)
modestringchange or full
formatstringjson, csv or 834
statsobject
not_loadedintegerRows that couldn't be loaded; problems lists the first 50.
problemsarray of object
unmatched_plansarray of objectPlan 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#

FieldTypeAbout
idstring (uuid)
sourcestringupload, api or sample
formatstring
modestring
file_namestring, or null
statusstringstaged, applying, applied or discarded
statsobject
created_atstring (date-time)
applied_atstring, or null (date-time)

PayPeriod#

FieldTypeAbout
startstring (date)
endstring (date)
labelstringFor example 11/8/2026 to 11/14/2026.
kindstringweekly, biweekly, semimonthly or monthly
endedboolean
completebooleanEvery week with time in it is approved.
peopleintegerPeople with time in the pay period.
waitingintegerPeople with weeks still waiting for approval.
total_minintegerAll recorded minutes, approved or not.

Timesheet#

FieldTypeAbout
periodobject
endedboolean
completebooleanEvery week with time in it is approved.
overtime_hoursnumber, or nullHours in a work week after which time is overtime; null when the workspace does not count overtime.
total_mininteger
overtime_mininteger, or nullOvertime in work weeks that end in this pay period.
rulestringHow overtime is placed in pay periods.
peoplearray of object
waitingarray of objectPeople whose weeks still wait for approval, with those weeks.

Webhook#

FieldTypeAbout
idstring (uuid)
urlstring
labelstring, or null
eventsarray of string
payload_levelstringthin, full or phi
activeboolean
healthstringok, failing, paused or new
paused_atstring, or null (date-time)
paused_bystring, or nulluser, or auto after 3 days with no success
paused_reasonstring, or null
failing_sincestring, or null (date-time)
last_success_atstring, or null (date-time)
last_failure_atstring, or null (date-time)
last_errorstring, or null
heldintegerEvents held while paused.
created_atstring (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.

Updated 11/26/2026Suggest a change