v1

latestSwagger 2.0Apache 2.02026-07-1334102.9 MB
Users

Claim a User Account

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 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.
post/users/{user_id}/claim/

Path parameters

user_idstring required

The unique identifier of the user you are trying to claim. Example: abc123

Request body

Example request

{
  "data": {
    "type": "claim-user",
    "attributes": {
      "id": "xyz456",
      "email": "user@example.com"
    }
  }
}

Response

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.