{
  "info": {
    "name": "Avertyn API",
    "description": "Set the collection variable api_key to your key. Version 2026-11-19.",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
  },
  "auth": {
    "type": "bearer",
    "bearer": [
      {
        "key": "token",
        "value": "{{api_key}}",
        "type": "string"
      }
    ]
  },
  "variable": [
    {
      "key": "base_url",
      "value": "https://ssjougrsaecdwfuxeasd.supabase.co/functions/v1/api-gateway"
    },
    {
      "key": "api_key",
      "value": ""
    },
    {
      "key": "case_id",
      "value": ""
    },
    {
      "key": "event_id",
      "value": ""
    },
    {
      "key": "webhook_id",
      "value": ""
    },
    {
      "key": "document_id",
      "value": ""
    }
  ],
  "item": [
    {
      "name": "Keys",
      "item": [
        {
          "name": "GET /v1/me",
          "request": {
            "method": "GET",
            "description": "The workspace this key belongs to, its scopes, its limit and when it expires. Use it to check a key.",
            "header": [],
            "url": {
              "raw": "{{base_url}}/v1/me",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "v1",
                "me"
              ]
            }
          }
        }
      ]
    },
    {
      "name": "Events",
      "item": [
        {
          "name": "GET /v1/event-types",
          "request": {
            "method": "GET",
            "description": "The event catalog: every event name with its group and meaning.",
            "header": [],
            "url": {
              "raw": "{{base_url}}/v1/event-types",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "v1",
                "event-types"
              ]
            }
          }
        },
        {
          "name": "GET /v1/events",
          "request": {
            "method": "GET",
            "description": "The event history of the last 30 days, newest first. Read it to catch up after an outage instead of waiting for retries.",
            "header": [],
            "url": {
              "raw": "{{base_url}}/v1/events?limit=50",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "v1",
                "events"
              ],
              "query": [
                {
                  "key": "limit",
                  "value": "50",
                  "description": "How many to return: 1 to 200, 50 if left out.",
                  "disabled": false
                },
                {
                  "key": "cursor",
                  "value": "",
                  "description": "The next_cursor of the page before.",
                  "disabled": true
                },
                {
                  "key": "type",
                  "value": "",
                  "description": "Only events with this name, for example dispute.state_changed.",
                  "disabled": true
                }
              ]
            }
          }
        },
        {
          "name": "GET /v1/events/{id}",
          "request": {
            "method": "GET",
            "description": "One event by its ID (evt_ and 32 characters).",
            "header": [],
            "url": {
              "raw": "{{base_url}}/v1/events/{{event_id}}",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "v1",
                "events",
                "{{event_id}}"
              ]
            }
          }
        }
      ]
    },
    {
      "name": "Cases",
      "item": [
        {
          "name": "GET /v1/cases",
          "request": {
            "method": "GET",
            "description": "Cases, soonest response date first, 50 at a time (200 at most). Follow next_cursor for the next page.",
            "header": [],
            "url": {
              "raw": "{{base_url}}/v1/cases?limit=50",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "v1",
                "cases"
              ],
              "query": [
                {
                  "key": "limit",
                  "value": "50",
                  "description": "How many to return: 1 to 200, 50 if left out.",
                  "disabled": false
                },
                {
                  "key": "cursor",
                  "value": "",
                  "description": "The next_cursor of the page before.",
                  "disabled": true
                },
                {
                  "key": "stage",
                  "value": "",
                  "description": "Only cases at this step, for example triage.",
                  "disabled": true
                },
                {
                  "key": "phase",
                  "value": "",
                  "description": "Only cases in this phase: open_negotiation or idr.",
                  "disabled": true
                },
                {
                  "key": "disposition",
                  "value": "",
                  "description": "Only cases with this outcome, for example open or settled.",
                  "disabled": true
                },
                {
                  "key": "external_ref",
                  "value": "",
                  "description": "The case with exactly this case number.",
                  "disabled": true
                },
                {
                  "key": "updated_since",
                  "value": "",
                  "description": "Only cases changed at or after this time (ISO 8601).",
                  "disabled": true
                },
                {
                  "key": "respond_by_before",
                  "value": "",
                  "description": "Only cases whose response date is before this time (ISO 8601).",
                  "disabled": true
                }
              ]
            }
          }
        },
        {
          "name": "GET /v1/cases/{id}",
          "request": {
            "method": "GET",
            "description": "One case. The fields returned depend on the key's read scope.",
            "header": [],
            "url": {
              "raw": "{{base_url}}/v1/cases/{{case_id}}",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "v1",
                "cases",
                "{{case_id}}"
              ]
            }
          }
        },
        {
          "name": "POST /v1/disputes",
          "request": {
            "method": "POST",
            "description": "Open cases from your claims system.",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Idempotency-Key",
                "value": "{{$guid}}"
              }
            ],
            "url": {
              "raw": "{{base_url}}/v1/disputes",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "v1",
                "disputes"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"disputes\": [\n    {\n      \"external_ref\": \"CLM-10442\",\n      \"cpt_code\": \"99285\",\n      \"billed_amount\": 4200,\n      \"qpa_amount\": 1150,\n      \"notice_received_on\": \"2026-11-10\"\n    }\n  ]\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "POST /v1/cases/{id}/actions",
          "request": {
            "method": "POST",
            "description": "Run a governed step on a case. A step that moves money or needs a second person is staged for approval and answers 202.",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Idempotency-Key",
                "value": "{{$guid}}"
              }
            ],
            "url": {
              "raw": "{{base_url}}/v1/cases/{{case_id}}/actions",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "v1",
                "cases",
                "{{case_id}}",
                "actions"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"action\": \"add_note\",\n  \"params\": {\n    \"text\": \"Called the provider's billing office.\"\n  },\n  \"rationale\": \"Follow-up\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "PATCH /v1/cases/{id}/fields",
          "request": {
            "method": "PATCH",
            "description": "Change case fields. All of the changes are saved or none; the old and new values go in the ledger.",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Idempotency-Key",
                "value": "{{$guid}}"
              }
            ],
            "url": {
              "raw": "{{base_url}}/v1/cases/{{case_id}}/fields",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "v1",
                "cases",
                "{{case_id}}",
                "fields"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"fields\": {\n    \"claim_number\": \"CLM-10442\"\n  }\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        }
      ]
    },
    {
      "name": "Documents",
      "item": [
        {
          "name": "POST /v1/cases/{id}/documents",
          "request": {
            "method": "POST",
            "description": "Attach a file to a case: PDF, PNG, JPEG, TIFF, DOCX, XLSX, text or CSV, 15 MB at most.",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Idempotency-Key",
                "value": "{{$guid}}"
              }
            ],
            "url": {
              "raw": "{{base_url}}/v1/cases/{{case_id}}/documents",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "v1",
                "cases",
                "{{case_id}}",
                "documents"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"filename\": \"eob.pdf\",\n  \"mime\": \"application/pdf\",\n  \"content_base64\": \"JVBERi0xLjcK…\",\n  \"category\": \"eob\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "GET /v1/documents/{id}",
          "request": {
            "method": "GET",
            "description": "One document with its text and signing state.",
            "header": [],
            "url": {
              "raw": "{{base_url}}/v1/documents/{{document_id}}",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "v1",
                "documents",
                "{{document_id}}"
              ]
            }
          }
        }
      ]
    },
    {
      "name": "Messages",
      "item": [
        {
          "name": "POST /v1/inbound/{source}",
          "request": {
            "method": "POST",
            "description": "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.",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Idempotency-Key",
                "value": "{{$guid}}"
              }
            ],
            "url": {
              "raw": "{{base_url}}/v1/inbound/zendesk",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "v1",
                "inbound",
                "zendesk"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"subject\": \"Open negotiation notice\",\n  \"body\": \"Text of the message\",\n  \"from\": \"billing@provider.example\",\n  \"case\": \"IDR-2026-5203\",\n  \"external_id\": \"48213\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        }
      ]
    },
    {
      "name": "Remittances",
      "item": [
        {
          "name": "POST /v1/remittances",
          "request": {
            "method": "POST",
            "description": "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.",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Idempotency-Key",
                "value": "{{$guid}}"
              }
            ],
            "url": {
              "raw": "{{base_url}}/v1/remittances",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "v1",
                "remittances"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"x12\": \"ISA*00*…~ST*835*0001~…~SE*12*0001~GE*1*1~IEA*1*000000001~\",\n  \"direction\": \"outbound\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        }
      ]
    },
    {
      "name": "Metrics",
      "item": [
        {
          "name": "GET /v1/metrics/scorecard",
          "request": {
            "method": "GET",
            "description": "The workspace scorecard.",
            "header": [],
            "url": {
              "raw": "{{base_url}}/v1/metrics/scorecard",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "v1",
                "metrics",
                "scorecard"
              ]
            }
          }
        },
        {
          "name": "GET /v1/metrics/exposure",
          "request": {
            "method": "GET",
            "description": "Open exposure by plan sponsor.",
            "header": [],
            "url": {
              "raw": "{{base_url}}/v1/metrics/exposure",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "v1",
                "metrics",
                "exposure"
              ]
            }
          }
        }
      ]
    },
    {
      "name": "Timesheets",
      "item": [
        {
          "name": "GET /v1/timesheets",
          "request": {
            "method": "GET",
            "description": "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.",
            "header": [],
            "url": {
              "raw": "{{base_url}}/v1/timesheets",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "v1",
                "timesheets"
              ],
              "query": [
                {
                  "key": "period",
                  "value": "",
                  "description": "Any day in the pay period you want, as YYYY-MM-DD. Left out, the last pay period that has ended.",
                  "disabled": true
                },
                {
                  "key": "status",
                  "value": "",
                  "description": "approved (the default) for approved time only, or all to include time still waiting for approval.",
                  "disabled": true
                }
              ]
            }
          }
        },
        {
          "name": "GET /v1/timesheets/periods",
          "request": {
            "method": "GET",
            "description": "The recent pay periods, newest first, each with its dates, whether it has ended and whether all of its time is approved.",
            "header": [],
            "url": {
              "raw": "{{base_url}}/v1/timesheets/periods?limit=6",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "v1",
                "timesheets",
                "periods"
              ],
              "query": [
                {
                  "key": "limit",
                  "value": "6",
                  "description": "How many pay periods: 1 to 26, 6 if left out.",
                  "disabled": false
                }
              ]
            }
          }
        }
      ]
    },
    {
      "name": "Members",
      "item": [
        {
          "name": "GET /v1/members",
          "request": {
            "method": "GET",
            "description": "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.",
            "header": [],
            "url": {
              "raw": "{{base_url}}/v1/members?limit=100",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "v1",
                "members"
              ],
              "query": [
                {
                  "key": "member_id",
                  "value": "",
                  "description": "The member with this member ID (spaces and dashes don't matter).",
                  "disabled": true
                },
                {
                  "key": "plan",
                  "value": "",
                  "description": "A plan: its ID, plan number, name, or the group number a roster file uses for it.",
                  "disabled": true
                },
                {
                  "key": "active_on",
                  "value": "",
                  "description": "Only members covered on this date (YYYY-MM-DD), for example a date of service.",
                  "disabled": true
                },
                {
                  "key": "limit",
                  "value": "100",
                  "description": "How many: 1 to 500, 100 if left out.",
                  "disabled": false
                },
                {
                  "key": "offset",
                  "value": "",
                  "description": "How many to skip, for the next page.",
                  "disabled": true
                }
              ]
            }
          }
        },
        {
          "name": "POST /v1/members",
          "request": {
            "method": "POST",
            "description": "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).",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Idempotency-Key",
                "value": "{{$guid}}"
              }
            ],
            "url": {
              "raw": "{{base_url}}/v1/members",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "v1",
                "members"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"mode\": \"change\",\n  \"plan\": \"GRP-7781\",\n  \"members\": [\n    {\n      \"member_id\": \"M100\",\n      \"first_name\": \"Nora\",\n      \"last_name\": \"Quill\",\n      \"dob\": \"1984-03-12\",\n      \"sex\": \"F\",\n      \"relationship\": \"self\",\n      \"coverage_start\": \"2026-01-01\",\n      \"coverage_end\": null\n    }\n  ]\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "POST /v1/rosters",
          "request": {
            "method": "POST",
            "description": "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.",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Idempotency-Key",
                "value": "{{$guid}}"
              }
            ],
            "url": {
              "raw": "{{base_url}}/v1/rosters",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "v1",
                "rosters"
              ],
              "query": [
                {
                  "key": "mode",
                  "value": "",
                  "description": "change (the default) or full: every member of the plans in the file.",
                  "disabled": true
                },
                {
                  "key": "plan",
                  "value": "",
                  "description": "A plan: its ID, plan number, name, or the group number a roster file uses for it.",
                  "disabled": true
                },
                {
                  "key": "confirm_ends",
                  "value": "",
                  "description": "true to go ahead when a full file would end the coverage of members not in it.",
                  "disabled": true
                },
                {
                  "key": "file_name",
                  "value": "",
                  "description": "The file's name, shown in Avertyn's roster history.",
                  "disabled": true
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"content\": \"Member ID,Last Name,First Name,DOB,Group Number,Effective Date\\nM100,Quill,Nora,03/12/1984,GRP-7781,01/01/2026\\n\",\n  \"mode\": \"change\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "GET /v1/rosters/{id}",
          "request": {
            "method": "GET",
            "description": "What a roster file or members batch did: members added, coverage lines, coverage ended, and rows not loaded.",
            "header": [],
            "url": {
              "raw": "{{base_url}}/v1/rosters/{{case_id}}",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "v1",
                "rosters",
                "{{case_id}}"
              ]
            }
          }
        }
      ]
    },
    {
      "name": "Email",
      "item": [
        {
          "name": "POST /v1/email",
          "request": {
            "method": "POST",
            "description": "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.",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Idempotency-Key",
                "value": "{{$guid}}"
              }
            ],
            "url": {
              "raw": "{{base_url}}/v1/email",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "v1",
                "email"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"from\": \"disputes@mail.yourplan.example\",\n  \"to\": \"billing@provider.example\",\n  \"subject\": \"Open negotiation: claim CLM-10442\",\n  \"text\": \"Please find our response attached in the portal.\",\n  \"case\": \"IDR-2026-0001\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "GET /v1/email/{id}",
          "request": {
            "method": "GET",
            "description": "One email sent through the API or from Avertyn: its mailbox, recipient, status (queued, held, sent, delivered, delayed, bounced, complaint, failed) and each event.",
            "header": [],
            "url": {
              "raw": "{{base_url}}/v1/email/{{case_id}}",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "v1",
                "email",
                "{{case_id}}"
              ]
            }
          }
        }
      ]
    },
    {
      "name": "Webhooks",
      "item": [
        {
          "name": "POST /v1/webhooks",
          "request": {
            "method": "POST",
            "description": "Add a webhook endpoint. The signing secret is in the answer and is not shown again by the API.",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Idempotency-Key",
                "value": "{{$guid}}"
              }
            ],
            "url": {
              "raw": "{{base_url}}/v1/webhooks",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "v1",
                "webhooks"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"url\": \"https://your-system.example/avertyn\",\n  \"events\": [\n    \"dispute.state_changed\",\n    \"deadline.due_soon\"\n  ],\n  \"payload_level\": \"full\",\n  \"label\": \"Claims system\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "GET /v1/webhooks",
          "request": {
            "method": "GET",
            "description": "Every webhook endpoint with its health.",
            "header": [],
            "url": {
              "raw": "{{base_url}}/v1/webhooks",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "v1",
                "webhooks"
              ]
            }
          }
        },
        {
          "name": "GET /v1/webhooks/{id}",
          "request": {
            "method": "GET",
            "description": "One webhook endpoint with its health and the number of held events.",
            "header": [],
            "url": {
              "raw": "{{base_url}}/v1/webhooks/{{webhook_id}}",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "v1",
                "webhooks",
                "{{webhook_id}}"
              ]
            }
          }
        },
        {
          "name": "PATCH /v1/webhooks/{id}",
          "request": {
            "method": "PATCH",
            "description": "Pause or resume an endpoint. While paused its events are held; resuming sends them unless send_held is false.",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Idempotency-Key",
                "value": "{{$guid}}"
              }
            ],
            "url": {
              "raw": "{{base_url}}/v1/webhooks/{{webhook_id}}",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "v1",
                "webhooks",
                "{{webhook_id}}"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"paused\": true\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "DELETE /v1/webhooks/{id}",
          "request": {
            "method": "DELETE",
            "description": "Remove a webhook endpoint and its delivery history.",
            "header": [
              {
                "key": "Idempotency-Key",
                "value": "{{$guid}}"
              }
            ],
            "url": {
              "raw": "{{base_url}}/v1/webhooks/{{webhook_id}}",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "v1",
                "webhooks",
                "{{webhook_id}}"
              ]
            }
          }
        }
      ]
    }
  ]
}
