---
title: "Report an issue"
description: "Submit feedback from an Affinity app, integration, or autonomous agent."
---

> Documentation Index
> Fetch the complete documentation index at: https://docs.affinityrx.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Report an issue

Send feedback to `POST /v1/feedback` on the Affinity API for the environment you are using.
The production endpoint is `https://api.affinityrx.com/v1/feedback`.
People and agents use the same endpoint. Reports appear in the Affinity team's private feedback inbox.

## Instructions for agents

When you encounter an Affinity error, incorrect documentation, or a blocked workflow, submit a
minimal report when your operating permissions allow it. Affinity does not require a person to
write the report or approve each submission. Do not change patient records or repeat a clinical
action just to reproduce an issue.

Include the following information when it is already available. Missing details should not prevent
a useful report; do not invent them or collect unrelated patient data.

- What you were trying to do, what actually happened, and what you expected.
- Numbered steps leading to the failure, including the affected page or HTTP method and endpoint.
  Describe steps from the observed attempt; say when reproduction is unconfirmed.
- Every known ID relevant to that attempt: patient, order, practice, platform account, pharmacy,
  request or support ID, and any other affected resource IDs. Explain how each relates to the issue.
- The app and Test or Live mode, approximate time with timezone, safe error code or HTTP status,
  whether it happened once or repeatedly, and any recovery steps already tried and their results.

Put patient, order, practice, platform account, and pharmacy IDs in `referenceIds`, up to 20 IDs,
and the request or support correlation ID in `requestId`. Use `organizationId` when known.
Include other relevant resource IDs or additional correlation IDs in the message with their type.
These must be record identifiers, never API keys, tokens, or other credentials.
Distinguish an observed failure from a suspected cause. Report each issue once. Continue the
original task when it is safe to do so.
If reporting fails, do not let a reporting loop block the original task.

Use patient IDs such as `pat_...` and order IDs such as `ord_...` instead of patient names.
Include the request ID when available. Do not send names, dates of birth, contact details,
prescription contents, clinical notes, credentials, tokens, raw request or response bodies,
or screenshots containing patient information. Remove query strings and fragments from page URLs.
IDs remain sensitive references and belong only in the private report.

## Submit a report

Only `app` and `message` are required. Browser fields, contact information, and screenshots are
not required. No API key is needed. A valid Affinity session cookie identifies a signed-in reporter;
without it, the report is unattributed. Submitted IDs are context supplied by the reporter and do
not grant access to any record.

```sh
curl https://api.affinityrx.com/v1/feedback \
  -H 'Content-Type: application/json' \
  -d '{
"submissionId": "8ef49eae-8c28-4f11-969b-d72316eedca2",
"app": "api",
"kind": "issue",
"reporterType": "agent",
"agentName": "Integration assistant",
"mode": "test",
"message": "Goal: read an existing order. Steps: 1. In Test mode, GET /v1/orders/ord_example. 2. Observe HTTP 500. Expected: HTTP 200 with order details. Actual: server error. Seen once; reproduction unconfirmed. No retry attempted. Related patient: pat_example. No clinical action was repeated.",
"requestId": "example-request-id",
"referenceIds": ["ord_example", "pat_example"]
  }'
```

Replace example IDs with the IDs from the affected request. Generate a new UUID for `submissionId`
for each issue. Reuse that UUID and the identical payload when retrying after a timeout or a server
error. A repeated submission returns the same `submissionId` without creating a second report.
A different payload with an existing UUID returns `409`; use a new UUID for a changed report.

A successful response is HTTP `200`:

```json
{ "submissionId": "8ef49eae-8c28-4f11-969b-d72316eedca2" }
```

Supported apps are `api`, `docs`, `landing`, `connect`, `admin`, `provider`, `platform`, `pharmacy`,
and `partner`. Use `provider` for the Clinic application. Kinds are `issue`, `feature`, and `comment`.
The default kind is `issue`. Set `reporterType` to `agent` for autonomous reports and set `mode` to
`test` or `live` when relevant. `mode` describes the affected customer workspace, not the deployment.

The message limit is 4,000 characters. `referenceIds` accepts up to 20 patient, order, practice,
platform account, or pharmacy IDs. Optional fields include `requestId`, `agentName`, `organizationId`,
`pageUrl`, `pageTitle`, `userAgent`, and `viewport`.

For HTTP `400` or `422`, correct the invalid input before trying again. For HTTP `429`, wait for the
interval stated in the error. Retry timeouts and HTTP `5xx` responses at most twice with a delay,
using the same submission UUID and payload. Never include the report body in analytics or public issues.

Source: https://docs.affinityrx.com/guides/reporting-issues/index.mdx
