---
title: "Generate a Relay claim"
method: POST
path: "/relays/{relay-token}/generate-claim"
tags: ["relay"]
---

# Generate a Relay claim

`POST /relays/{relay-token}/generate-claim`

## Request

- Base URL: `https://api.withpersona.com/api/v1`
- URL: `https://api.withpersona.com/api/v1/relays/{relay-token}/generate-claim`
- Auth: API key in header `Authorization`

Returns a relay's claim.

## Path parameters

- `relay-token` string, required

## Headers

- `Key-Inflection` 'camel' | 'kebab' | 'snake'
- `Idempotency-Key` string
- `Persona-Version` '2026-09-29' | '2025-12-08' | '2025-10-27' | '2023-01-05' | '2022-09-01' | '2021-08-18' | '2021-07-05' | '2021-02-21' | '2020-05-18': Server API version. More info on versioning can be found [here](https://docs.withpersona.com/versioning).
- `Persona-Relay-Secret` string, required

## Response `200`

Returns the claim payload and whether the Privacy Pass token was consumed.

- RelayGenerateARelayClaimResponse200
  - `claim-payload` string, required: The claim payload. If an `encryption-key-pem` was provided at Relay creation, this is a base64-encoded RSA OAEP ciphertext that must be decrypted client-side. Otherwise, this is a JSON string containing `claim_type`, `claim_result`, and an optional `methodology` array.
  - `token-consumed` boolean, required: `true` if the Privacy Pass token was consumed by this request. `false` if the underlying claim did not pass and the token was refunded to the client.

## Other responses

- `400`: The request was unacceptable, often due to invalid parameters.
- `401`: No valid Privacy Pass token was presented.
- `403`: The given API key doesn’t have permissions to perform the request or a quota has been exceeded.
- `404`: The requested resource doesn’t exist.
- `409`: The request conflicts with another request, often due to attempting to create a duplicate resource.
- `422`: The request modifies the resource in an unacceptable way, often due to an invalid action or parameter.
- `429`: Your organization’s rate limit has been exceeded. We recommend an exponential backoff on requests.

---

[API](https://skmtc.dev/withpersona/apis/withpersona-7.md) - [All operations](https://skmtc.dev/withpersona/apis/withpersona-7/llms.txt) - [OpenAPI document](https://skmtc.dev/withpersona/apis/withpersona-7/revisions/904c4b28844f?raw)
