---
title: "Create a Relay"
method: POST
path: "/relays"
tags: ["relay"]
---

# Create a Relay

`POST /relays`

## Request

- Base URL: `https://api.withpersona.com/api/v1`
- URL: `https://api.withpersona.com/api/v1/relays`
- Auth: none declared

Creates a new Relay.

## Headers

- `Key-Inflection` 'camel' | 'kebab' | 'snake'
- `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).

## Request body

- object
  - `claim-type` string, required: Possible values: - live_human_presence - age_over18_germany - age_over18_united_kingdom - age_over18_verified - age_over18_france - age_over18_italy - age_over18_brazil - age_over18_australia - age_over16_australia - age_over21_verified Do not assume this is a static enumeration; Persona may add new claim types in the future without a versioned update.
  - `encryption-key-pem` string, nullable, required: RSA public key (PEM-encoded, 2048-4096 bits). When non-null, claim payloads returned by subsequent reads will be encrypted with RSA OAEP. Pass `null` to receive unencrypted claim payloads.
  - `sandbox` boolean: When true, the Relay is created in a sandbox environment and uses the sandbox Privacy Pass namespace; sandbox passes are only redeemable against sandbox Relays. When omitted or false, the Relay is created in a production environment and uses the claim-type namespace.

## Response `201`

Returns the Relay tokens needed to redeem and read the claim.

- RelayCreateARelayResponse201
  - `relay-token` string, required: Public Relay identifier. Use this token in subsequent calls to `/relays/{relay-token}/generate-claim`.
  - `relay-secret` string, required: Secret value tied to this Relay. Returned only at creation and must be passed in the `Persona-Relay-Secret` header for any read of the claim payload.
  - `relay-session-access-token` string, required: Encoded JWT used by Persona's client SDK to load the associated Inquiry Session in the end-user's browser or device.

## Other responses

- `400`: The request was unacceptable, often due to invalid parameters.
- `401`: An invalid API key was provided.
- `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.

## Changes

- **2026-10-27** `0e8ab20c295d`: 1 info
  - added the non-success response with the status `404`

[Operation history](https://skmtc.dev/withpersona/apis/withpersona-7/changes/relays/post.md)

---

[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)
