# Account

> Read the identity, the plan, and the scopes of the token that calls the Reassign REST API.

Source: https://reassign.dev/reference/account/

Use the account endpoint to find who owns a token, which plan the account has, and which scopes the token has. Call it when your client starts.

The machine-readable spec of all public endpoints: [openapi.json](https://reassign.dev/openapi.json).

## The token identity model

The token identity tells your client about the caller of the request. It works with each valid token. The token does not need a scope, and the account does not need a paid plan.

The response has one shape for all callers. Each field is always present, except `auth.clientId`. A field with no value is `null`.

| Field                              | Meaning                                                                                                                                                                                                                |
| ---------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `id`                               | The ID (a UUID) of the user who owns the token.                                                                                                                                                                        |
| `email`                            | The email address of the user, or `null` when the user has no email address.                                                                                                                                           |
| `plan`                             | The plan of the account now: `trial`, `pro`, or `none`. The REST API needs a trial or Pro plan. With `none`, most other endpoints return `403` with the code `permission`.                                             |
| `trialEndsAt`                      | The end of the trial, as an ISO 8601 UTC instant. The value is `null` when `plan` is not `trial`.                                                                                                                      |
| `subscription`                     | The paid subscription, or `null` when the account has no subscription (for example during a trial with no card).                                                                                                       |
| `subscription.provider`            | The store that bills the subscription: `web` or `apple`.                                                                                                                                                               |
| `subscription.status`              | `active`, `past_due`, or `canceled`. An `active` or a `past_due` subscription gives the `pro` plan.                                                                                                                    |
| `subscription.currentPeriodEndsAt` | The end of the current billing period, as an ISO 8601 UTC instant, or `null`.                                                                                                                                          |
| `subscription.cancelAtPeriodEnd`   | `true` when the subscription stops at the end of the current period.                                                                                                                                                   |
| `offer.kind`                       | `entitled` when the subscription status is `active` or `past_due`. Otherwise `paynow`.                                                                                                                                 |
| `emailSubscribed`                  | `true` when the user gets email updates from Reassign.                                                                                                                                                                 |
| `scopes`                           | The scopes of the token: `events:read`, `events:write`, or both. A token with `events:write` can also read, also when `scopes` does not show `events:read`. The list does not show scopes that Reassign does not know. |
| `auth.via`                         | How the caller authenticated. `pat`: a Personal Access Token. `oauth`: an OAuth access token. `session`: the session of the Reassign web app.                                                                          |
| `auth.clientId`                    | The ID of the OAuth client. The response includes this field only for an OAuth access token.                                                                                                                           |

- `id` (_string, required_)
- `plan` (_"trial" | "pro" | "none", required_)
- `trialEndsAt` (_string | null, required_)
- `subscription` (_object | null, required_)
  - `provider` (_"web" | "apple", required_)
  - `status` (_"active" | "past\_due" | "canceled", required_)
  - `currentPeriodEndsAt` (_string | null, required_)
  - `cancelAtPeriodEnd` (_boolean, required_)
- `email` (_string | null, required_)
- `offer` (_object, required_)
  - `kind` (_"paynow" | "entitled", required_)
- `emailSubscribed` (_boolean, required_)
- `scopes` (_"events:read" | "events:write"\[], required_)
- `auth` (_object, required_)
  - `via` (_"oauth" | "pat" | "session", required_)
  - `clientId` (_string_)

---

## Get the token identity

**GET** `/api/v1/me`

Get the identity, the plan, and the scopes of the caller.

- All plans can call this endpoint, also `none`. Thus your client can read `plan` and `scopes` first. Then it does not have to find a `403` error.
- A token with no scope can also call this endpoint.
- This endpoint takes no query parameters. An unknown query parameter returns `422` with the code `validation`.

Refer to [Errors](https://reassign.dev/errors.md) for the error format.

### Response fields

- `id` (_string, required_)
- `plan` (_"trial" | "pro" | "none", required_)
- `trialEndsAt` (_string | null, required_)
- `subscription` (_object | null, required_)
  - `provider` (_"web" | "apple", required_)
  - `status` (_"active" | "past\_due" | "canceled", required_)
  - `currentPeriodEndsAt` (_string | null, required_)
  - `cancelAtPeriodEnd` (_boolean, required_)
- `email` (_string | null, required_)
- `offer` (_object, required_)
  - `kind` (_"paynow" | "entitled", required_)
- `emailSubscribed` (_boolean, required_)
- `scopes` (_"events:read" | "events:write"\[], required_)
- `auth` (_object, required_)
  - `via` (_"oauth" | "pat" | "session", required_)
  - `clientId` (_string_)

### Responses

| Status | Codes          | Meaning                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| ------ | -------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `200`  | —              | Success.                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| `401`  | `unauthorized` | No Bearer token and no session cookie, or the token is invalid, expired, or revoked. The response carries a `WWW-Authenticate` challenge that points at the protected-resource metadata.                                                                                                                                                                                                                                                                                               |
| `403`  | `permission`   | A cookie session from another site gets `permission` "Cross-origin request."                                                                                                                                                                                                                                                                                                                                                                                                           |
| `422`  | `validation`   | The request has a query parameter; this operation takes none.                                                                                                                                                                                                                                                                                                                                                                                                                          |
| `429`  | `rate_limited` | Too many requests. The edge firewall limits each IP to 2000 requests per minute across `/api/v1`; that 429 comes from the edge and can have a body that is not this JSON and no `Retry-After` header. When an edge 429 has no `Retry-After`, retry after 60 seconds. The app also limits each Bearer credential to 600 requests per minute, and some routes limit each user. These limits return this body. This app 429 always has `Retry-After`: retry after that number of seconds. |
| `503`  | `internal`     | A fault on our side. The request is safe to retry.                                                                                                                                                                                                                                                                                                                                                                                                                                     |

**Request** — **GET** `/api/v1/me`

**cURL**

```bash
curl "https://reassign.app/api/v1/me" \
  -H "Authorization: Bearer rsk_live_YOUR_TOKEN"
```

**JavaScript**

```js
const res = await fetch("https://reassign.app/api/v1/me", {
  headers: {
    Authorization: "Bearer rsk_live_YOUR_TOKEN",
  },
});
const data = await res.json();
```

**Response**

```json
{
  "id": "00000000-0000-4000-8000-000000000042",
  "email": "user@example.com",
  "plan": "pro",
  "trialEndsAt": null,
  "offer": {
    "kind": "entitled"
  },
  "subscription": {
    "provider": "web",
    "status": "active",
    "currentPeriodEndsAt": "2026-09-13T08:00:00.000Z",
    "cancelAtPeriodEnd": false
  },
  "emailSubscribed": true,
  "scopes": [
    "events:read",
    "events:write"
  ],
  "auth": {
    "via": "oauth",
    "clientId": "reassign-ios"
  }
}
```
