---
title: "Claim a User Account"
method: POST
path: "/users/{user_id}/claim/"
tags: ["Users"]
---

# Claim a User Account

`POST /users/{user_id}/claim/`

Allows a user to claim an unregistered OSF account.
This endpoint is typically used when a contributor is added to a project with an unregistered account, and the user wants to claim that account.
The user can be claimed by either:
 - A logged-in user (who is not the referrer of the unclaimed account).
 - A user who provides an email address for the claim.

#### Returns
Returns a `204 No Content` response on successful claim initiation.
#### Errors
If the request is unsuccessful, an `errors` key containing information about the failure will be returned. Refer to the [list of error codes](#tag/Errors-and-Error-Codes) to understand why this request may have failed.
Some common error cases:
 - `403 Forbidden`: The user is not authorized to claim this account.
 - `404 Not Found`: The specified user or record does not exist.
 - `400 Bad Request`: Invalid claim request parameters.

## Path parameters

- `user_id` string, required

## Request body

- object
  - `data` object, required
    - `type` 'claim-user'
    - `attributes` object
      - `id` string — The record ID associated with the unclaimed user. Usually corresponds to a project, preprint, etc.
      - `email` string — The email address to use for claiming the user account. Required if the claimer is not authenticated.

## Response `204`

Successfully initiated the claim process.
If the claimer is authenticated, they will receive an email confirming the claim. If not authenticated and an email is provided, the claim invitation will be sent to the specified email address.

## Other responses

- `400` — Bad request. The request payload is invalid or missing required fields (such as `id`).
- `403` — Permission denied. You do not have permission to claim this user, or the user has already been claimed.
- `404` — Not found. The specified user or record could not be found.

---

[API](https://skmtc.net/osf/apis/osf-apiv2-documentation.md) · [All operations](https://skmtc.net/osf/apis/osf-apiv2-documentation/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/osf/osf-apiv2-documentation/versions/ca701048eb0d/schema)
