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

> ## Agent Instructions
> These guides connect a treatment facility's website forms to Carescale. Each facility has one website forms endpoint: an endpoint address and a secret, both copied from Carescale under Settings, Website forms.
> Send every submission as an HTTPS POST with a JSON body and the header Authorization: Bearer <secret>. Use the endpoint address exactly as Carescale shows it. Never put it behind a redirect or a proxy that redirects.
> Keep the secret out of committed code and out of client-side JavaScript. Put it in wp-config.php or a server-side environment setting.
> Gravity Forms Elite and Nonprofit licenses can use the Webhooks Add-On with no code. Basic and Pro licenses use the snippet. Any other form tool follows the payload contract on the Other form tools page.
> Never use real patient or client details in examples, logs or test submissions. Use made-up names, the 555 phone range and example.com addresses.
> Labels in bold match the Carescale app and Gravity Forms exactly. Quote them as written.

# Troubleshooting

> What each response code from the Carescale website forms endpoint means, and what to check when a submission doesn't become a lead.

Every request to the endpoint gets one of these answers. Gravity Forms records it in the entry's notes, for example "Webhook sent. Response code: 401." Any answer other than `200` means Carescale refused the submission and didn't keep it. The Carescale card then shows **Last rejected delivery** with the reason and the time.

## Response codes

Each code below shows the reason the Carescale card gives, then what to do. A `401` is the most common setup error.

### 200 Received

Carescale stored the submission and fills the lead within seconds. A repeat of an entry Carescale already has also answers `200` and changes nothing.

### 400 Unreadable request

The body isn't a JSON object or a form-encoded body. Send a JSON object with `Content-Type: application/json`. In Gravity Forms, set **Request Format** to `JSON`.

### 401 Missing secret

No `Authorization` header arrived. Add the header `Authorization: Bearer <secret>`. A proxy or security plugin may be removing it.

### 401 Wrong secret

The secret doesn't match. Check for a missing `Bearer ` prefix or a cut-off secret. A lost secret can't be shown again, so the Carescale admin uses **Rotate secret** to make a new one. The old secret stops working 24 hours later.

### 404 Endpoint off

An admin turned the endpoint off. Ask the Carescale admin to choose **Turn endpoint on**. Submissions sent while it was off aren't kept.

### 404 Not found

No endpoint at this address. Copy the **Endpoint address** again, exactly, with no trailing slash or extra characters.

### 413 Request too large

The body is over 256 KB. Send the form's fields only. Send files as URLs, never as file contents.

### 429 Too many requests

More than 20 submissions a minute reached this endpoint. Wait for the time in the `Retry-After` header. Gravity Forms doesn't retry, so check for a loop or a bulk resend.

## No submission arrived

The card still reads **Waiting for first submission**, and there's no **Last rejected delivery**:

* **Check the entry's notes in WordPress.** No note means the feed never ran: check that the feed is active and that **Webhook Condition** is off. A note reading "Webhook was not successfully executed" means the site couldn't reach Carescale. The message after it names the network error.
* **Check the address.** It must start with `https://` and be pasted exactly. A redirect, such as `http` to `https` or an added trailing slash, turns the request into a `GET`, which Carescale doesn't accept.
* **Check for spam.** Gravity Forms sends nothing for an entry it flags as spam. Look under the form's **Spam** entries.
* **Check the snippet.** When you use the snippet, confirm the file is in `wp-content/mu-plugins/` and that `wp-config.php` defines both constants.

## Submissions arrive late

Gravity Forms sends webhooks from a background request the site makes to itself. When that request is blocked, by a security plugin, basic authentication on a staging site, or a host that disables loopback requests, deliveries wait for the site's 5-minute WordPress cron. That cron runs only when someone visits the site. A late delivery keeps its original submission time in Carescale.

To fix it, allow the site's requests to itself, or set up a real server cron that calls `wp-cron.php` every 5 minutes. **Forms**, then **System Status**, shows background task problems.

## A field isn't filling the lead

Carescale matches each question to a lead field by its label. In **Settings**, then **Website forms**, open the form. A question reading **Review** needs an admin to pick the right field. Questions sent with no label, such as All Fields numbers, need to be picked by hand, or switch to **Select Fields** or the snippet so labels arrive.

Every answer is still kept on the lead, word for word, in the **Website forms** section of its Activity tab.

## An insurance card didn't arrive

The lead says Carescale couldn't retrieve the file from the website. The file must be at an `https://` address on the form's own site, be a JPEG, PNG, WebP, HEIC or PDF of at most 20 MB, and stay downloadable for about an hour. Staff can ask for the card on the first call.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.