---
title: "Create a Recovery Link"
method: POST
path: "/admin/recovery/link"
tags: ["identity"]
---

# Create a Recovery Link

`POST /admin/recovery/link`

This endpoint creates a recovery link which should be given to the user in order for them to recover
(or activate) their account.

## Query parameters

- `return_to` string

## Request body

- CreateRecoveryLinkForIdentityBody — Create Recovery Link for Identity Request Body
  - `expires_in` string — Link Expires In The recovery link will expire after that amount of time has passed. Defaults to the configuration value of `selfservice.methods.code.config.lifespan`.
  - `identity_id` string, uuid, required — Identity to Recover The identity's ID you wish to recover.

## Response `200`

recoveryLinkForIdentity

- RecoveryLinkForIdentity — Used when an administrator creates a recovery link for an identity.
  - `expires_at` string, date-time — Recovery Link Expires At The timestamp when the recovery link expires.
  - `recovery_link` string, required — Recovery Link This link can be used to recover the account.

## Other responses

- `400` — errorGeneric
- `404` — errorGeneric
- `default` — errorGeneric

---

[API](https://skmtc.net/ory/apis/ory-identities-api.md) · [All operations](https://skmtc.net/ory/apis/ory-identities-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/ory/ory-identities-api/versions/7a0df90e2f13/schema)
