# Get the record as a zone-file line

The record in BIND zone-file format, for providers that take an import.

GET `/api/v1/claims/{id}/zone-file`

**cURL**

```shell
curl 'https://www.prufy.dev/api/v1/claims/clm_4b1f7c1e-52e7-4c0a-9a3b-7d2f0c6e8a10/zone-file' \
  -b cookies.txt
```

**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/zone-file", {
  headers: { cookie },
})
const data = await response.json()
```

**Python**

```python
import requests

# `session` is the requests.Session() that created the claim.
response = session.get("https://www.prufy.dev/api/v1/claims/clm_4b1f7c1e-52e7-4c0a-9a3b-7d2f0c6e8a10/zone-file")
data = response.json()
```

Response 200 OK

```json
{
  "line": "_prufy-challenge.yourcompany.com. 300 IN TXT \"prufy-domain-verification=xwqyp4hnsmgqxceo2xd6orgeay\""
}
```

One line, with the full name ending in a dot and the value in double quotes. Paste it into a zone file or a provider's import box as it is.

## 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_`.

## Response

`200 OK`, with every field below present. Times are ISO 8601 strings in UTC.

- `line` string

  The record as one line of a BIND zone file.

## Errors

| Status | Kind | When |
| --- | --- | --- |
| 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. |

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
