---
title: "Sync Revenuecat Id"
method: PUT
path: "/api/auth/me/revenuecat-id"
tags: ["Auth"]
---

# Sync Revenuecat Id

`PUT /api/auth/me/revenuecat-id`

## Request

- Base URL: `https://api.earmarkiq.app` (the document declares no server; this is the origin it was published from)
- URL: `https://api.earmarkiq.app/api/auth/me/revenuecat-id`
- Auth: HTTP bearer

Save the RevenueCat user ID on the current user's profile.

Called by the mobile app after login or first purchase so that
webhook events can be correlated back to the Earmark user.

IDEMPOTENT, AND SAFE IN THE FIRST SECONDS OF AN ACCOUNT
The app calls this on every open and every login (20 Sep 2026: a 500
eight seconds after sign-up). So:
  - the same id again writes nothing and answers 200;
  - no id (no body, null, blank) is a 200 no-op;
  - a replay that fails — even one that leaves the session in a failed
    transaction — cannot turn the answer into a 500. The id is already
    committed by then; the session is rolled back so the request's closing
    commit is clean.

## Request body

- RevenueCatIdRequest
  - `revenuecat_user_id` string, nullable

## Response `200`

Successful Response

- unknown

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/earmarkiq/apis/earmark-api.md) · [All operations](https://skmtc.dev/earmarkiq/apis/earmark-api/llms.txt) · [OpenAPI document](https://skmtc.dev/earmarkiq/apis/earmark-api/revisions/4a2c41907105?raw)
