# How to claim your researcher profile

If a profile about you already exists (the build pipeline made one, or someone
added one for you), claiming it makes you its owner. You can then edit, publish,
and manage it. You can sign in with **ORCID**, **Google**, or both linked to one
account. For why a claim needs proof, see [Core concepts](/prosopia/concepts.md).

## Three ways to prove a profile is yours

The server picks the strongest proof that applies.

1. **Your ORCID iD.** If the profile's id is an ORCID iD and your account has
   that ORCID iD linked, the claim works at once. Signed in with Google only?
   Open Settings (`/account`) or Your profile (`/me`) and choose
   **Link ORCID iD**. You come back to the same page, and the claim works.
2. **Your Google email, for a Prosopia-id profile.** A profile whose id starts
   with `local:` (not an ORCID iD) can be claimed at once when its email equals
   the email of your Google sign-in, and all of these are true:
    - Google still manages your address: a Gmail address, or a Google Workspace
      account of your organization. A personal Google account that uses a
      university address does not count, because Google does not recheck it;
    - you signed in with Google (or linked it) in the last 24 hours. If not,
      sign in with Google again;
    - nobody owns the profile, and it was never released by an operator;
    - no other profile carries the same email.
3. **An operator's review.** For everything else, choose **Ask for review** and
   add a short message (a lab page, a publication, anything that helps). An
   operator approves or rejects it. You see the answer, and any note, on Your
   profile. You can have 3 requests waiting at a time, and you can withdraw one.

## One profile about yourself

Every account has at most one profile about the account holder: your self
profile. If you already have one and find another that is also yours, the two
are merged instead of claimed, so you end with one profile:

- the ORCID-id profile always stays; if neither has an ORCID iD, the profile you
  found stays (you can choose to keep yours instead);
- the other profile is folded into it: missing details, papers, grants and
  links come along, and its old link keeps working;
- if both have a SOUL, you choose which to keep, or both;
- a merge cannot be undone, so the review screen shows everything first.

If your account gains an ORCID iD and there is no ORCID profile for you, you
are offered **Convert your profile to my ORCID iD**: the same merge, into a new
profile with your ORCID iD that keeps your handle.

## The ORCID verified mark

When your profile's id is your ORCID iD and you have signed in with ORCID (or
linked it in Settings), Prosopia marks your profile as ORCID verified.
Unlinking ORCID removes the mark.

## Steps

1. Sign in: `GET /auth/orcid` or `GET /auth/google`. You now hold a
   session cookie (`rp_session`).

2. Read the session probe:

    ```bash
    curl -b "rp_session=<your-cookie>" https://prosopia.databio.org/api/v1/manage/session
    ```

    - `claimable` lists profiles you can claim right now, each with `via`
      (`orcid-match` or `google-email-match`);
    - `claim_suggestions` lists profiles that carry your Google email but need
      more, each with a `code` saying what;
    - `merge_offers` lists profiles to merge into the one you already have;
    - `claim_requests` lists your requests and their status.

3. Claim a profile from `claimable`:

    ```bash
    curl -b "rp_session=<your-cookie>" -H "Content-Type: application/json" \
      -X POST https://prosopia.databio.org/api/v1/manage/claims -d '{"slug": "jane-doe"}'
    ```

    Or ask for review:

    ```bash
    curl -b "rp_session=<your-cookie>" -H "Content-Type: application/json" \
      -X POST https://prosopia.databio.org/api/v1/manage/claim-requests \
      -d '{"slug": "jane-doe", "message": "This is my lab: https://lab.example.org"}'
    ```

## What success looks like

A claim returns `201 Created` with `{slug, rid, via, owned}`. The profile then
appears under `owned` on the session probe, marked `is_self`.

## What can go wrong

- **`401`**: you are not signed in, or your session expired.
- **`403`**: nothing proves the profile is yours yet. The message names the way
  forward: link your ORCID iD, sign in with Google again, or ask for review.
- **`404`**: no such profile, or a hidden profile nothing ties to you. The two
  answers are identical on purpose.
- **`409`**: the profile already has an owner, or you already have a profile
  (merge instead).

## Next steps

- Claiming does not publish. See [How to share your profile](/prosopia/how-to/share-your-profile.md).
- To fill in a shell profile yourself, see [How to build a profile](/prosopia/how-to/build-on-demand.md).
