Skip to documentation
Get started

Make your first GenHealth API request

Authenticate with a GenHealth API key and retrieve the first page of cases for your organization.

View as Markdown
  1. 1

    Store your API key

    Set the key as an environment variable in your development environment.

    bash
    export GENHEALTH_API_KEY="<YOUR_API_KEY>"
  2. 2

    List cases

    Send the API key as a bearer token and request the first page of cases.

    bash
    curl 'https://api.umpa.genhealth.ai/v2/cases?page=1&limit=10' \
      --header "Authorization: Bearer $GENHEALTH_API_KEY" \
      --header 'Accept: application/json'
  3. 3

    Follow the pagination object

    Use the returned pagination metadata to request subsequent pages. Case results are always limited to the authenticated organization.

Understand the response

Successful list requests return a data array and pagination metadata. Store resource IDs from the response instead of depending on display text, which may change over time.

json
{
  "data": [{ "id": "case_123", "status": "open" }],
  "pagination": { "page": 1, "limit": 10, "has_more": false }
}

Handle errors

StatusMeaningWhat to do
401Credential was not acceptedCheck the bearer token and its expiration
404Resource was not foundConfirm the ID and organization access
422Request parameters are invalidUse the error details to correct the request

Next steps