# Create a setup link

Make a link that lets someone else add the record, and optionally email it.

POST `/api/v1/claims/{id}/shares`

**cURL**

```shell
curl -X POST 'https://www.prufy.dev/api/v1/claims/clm_4b1f7c1e-52e7-4c0a-9a3b-7d2f0c6e8a10/shares' \
  -b cookies.txt \
  -H 'content-type: application/json' \
  -d '{
  "email": "it@yourcompany.com",
  "note": "Could you add this TXT record? It proves the domain is ours."
}'
```

**Node.js**

```javascript
// `cookie` is the session cookie that Create a claim returned.
const response = await fetch("https://www.prufy.dev/api/v1/claims/clm_4b1f7c1e-52e7-4c0a-9a3b-7d2f0c6e8a10/shares", {
  method: "POST",
  headers: { "content-type": "application/json", cookie },
  body: JSON.stringify({
    email: "it@yourcompany.com",
    note: "Could you add this TXT record? It proves the domain is ours.",
  }),
})
const data = await response.json()
```

**Python**

```python
import requests

# `session` is the requests.Session() that created the claim.
response = session.post(
    "https://www.prufy.dev/api/v1/claims/clm_4b1f7c1e-52e7-4c0a-9a3b-7d2f0c6e8a10/shares",
    json={
        "email": "it@yourcompany.com",
        "note": "Could you add this TXT record? It proves the domain is ours.",
    },
)
data = response.json()
```

Response 201 Created

```json
{
  "url": "https://www.prufy.dev/setup/hVx6J3zTcbYj4346Es7BIgP90GoSrAFEw_PCGOjUwlQ",
  "emailed": true,
  "expiresAt": "2026-12-10T09:31:20.175Z"
}
```

The link shows one claim's record and lets its holder ask for a check. That's all adding a record takes. It can't get a new code, stop the claim or see anything else, so it's safe to forward to an agency or hand to an agent.

Send an empty object to get a link to copy. Add `email` and we send it too, with your `note` if you wrote one. `emailed` says whether that worked.

A link works for 30 days. The claim has to be pending or at risk, because those are the two states where a record needs adding.

## Authentication

Send the session cookie. Without it the answer is `unauthorized`. [How sessions work](https://www.prufy.dev/docs/authentication.md).

## Path parameters

`id` string required

The claim's id, from Create a claim or List claims. It starts with `clm_`.

## Body

JSON, with `content-type: application/json`.

- `email` email optional

  Who should get the link by email. Leave it out to only get the link back.

  - At most 254 characters
- `note` string optional

  A line from you, added to the email. It can't contain a link: the setup link is added for you.

  - At most 280 characters

## Response

`201 Created`, with every field below present. Times are ISO 8601 strings in UTC.

- `url` URL

  The setup link. Whoever has it can see the record and run a check.
- `emailed` boolean

  True when the link was also sent to `email`.
- `expiresAt` string

  When the link stops working: 30 days from now.

## Errors

| Status | Kind | When |
| --- | --- | --- |
| 400 | `bad_request` | The body isn't JSON, or doesn't match the shape below. `message` names the first field to fix, and `fields` lists each one with its path. |
| 401 | `unauthorized` | The request has no session cookie, or one we don't recognise. |
| 404 | `not_found` | No claim has this id in your account. Another account's claim looks the same as one that doesn't exist. |
| 409 | `not_checkable` | The claim isn't pending or at risk, so there's no record for anyone to add. |
| 413 | `payload_too_large` | The body is over 16 KB. No route takes anything near that. |
| 429 | `rate_limited` | More than 10 links for this claim in an hour. With `email`: more than 5 emailed invites from this account in an hour, more than 10 from this network address in an hour, or more than 3 to the same address in 24 hours. |
| 503 | `email_unavailable` | `email` was given, but this server has no email set up. Leave it out and copy the link. |

Any route can also answer `500` with `internal_error`. Every error has the same shape, described in [Errors](https://www.prufy.dev/docs/errors.md).

---

Every page of these docs, as a list: https://www.prufy.dev/llms.txt
