---
title: "IAM"
permalink: "/docs/api-v2/iam"
description: "RevenueCat API v2 endpoint reference for IAM."
original_source: "openapi-spec/api-v2.yaml"
---

> **AI agents:** This is the Markdown version of a RevenueCat documentation page. For the complete documentation index, see [llms.txt](https://www.revenuecat.com/docs/llms.txt).


# IAM | REST API v2 Reference (2.0.0)

Download OpenAPI specification:[Download](https://www.revenuecat.com/docs/redocusaurus/openapi-v2-iam.yaml)

RevenueCat API v2 endpoint reference for IAM.

## <a id="tag/IAM"></a>IAM

Part of the [REST API v2 Reference](/docs/api-v2).

Operations about Identity and Access Management.

#### Endpoints

-   [Authenticate a subscriber](#tag/IAM/operation/authenticate-subscriber) — `POST /projects/{project_id}/apps/{app_id}/authenticate`
-   [Get the customer attribute permissions of a project](#tag/IAM/operation/get-iam-attribute-permissions) — `GET /projects/{project_id}/iam/attribute_permissions`
-   [Update the customer attribute permissions of a project](#tag/IAM/operation/update-iam-attribute-permissions) — `POST /projects/{project_id}/iam/attribute_permissions`
-   [Get a list of IAM authentication methods](#tag/IAM/operation/list-iam-authentication-methods) — `GET /projects/{project_id}/iam/authentication_methods`
-   [Create an IAM authentication method](#tag/IAM/operation/create-iam-authentication-method) — `POST /projects/{project_id}/iam/authentication_methods`
-   [Delete an IAM authentication method](#tag/IAM/operation/delete-iam-authentication-method) — `DELETE /projects/{project_id}/iam/authentication_methods/{authentication_method_id}`
-   [Get an IAM authentication method](#tag/IAM/operation/get-iam-authentication-method) — `GET /projects/{project_id}/iam/authentication_methods/{authentication_method_id}`
-   [Update an IAM authentication method](#tag/IAM/operation/update-iam-authentication-method) — `POST /projects/{project_id}/iam/authentication_methods/{authentication_method_id}`
-   [Get the IAM settings of a project](#tag/IAM/operation/get-iam-settings) — `GET /projects/{project_id}/iam/settings`
-   [Update the IAM settings of a project](#tag/IAM/operation/update-iam-settings) — `POST /projects/{project_id}/iam/settings`

## <a id="tag/IAM/operation/authenticate-subscriber"></a>Authenticate a subscriber

post/projects/{project_id}/apps/{app_id}/authenticate

https://api.revenuecat.com/v2/projects/{project_id}/apps/{app_id}/authenticate

Issues a short-lived RevenueCat access token for the given `app_user_id`, scoped to the app. The token authenticates the subscriber and is not backed by an IAM user; no id token or refresh token is returned. This endpoint requires the following permission(s): `iam:authorization:issue_token`. This endpoint belongs to the **Iam** domain, which has a default rate limit of **60 requests per minute**.

##### Authorizations:

_BearerAuth_

##### path Parameters

- `project_id` (required): string <= 255 characters Example: proj1ab2c3d4 — ID of the project
- `app_id` (required): string <= 255 characters Example: app1ab2c3d4 — ID of the app

##### Request Body schema: application/json

required

- `app_user_id` (required): string [ 1 .. 1500 ] characters — The app user ID of the subscriber to authenticate.

### Responses

**200**

Success. An access token was issued for the subscriber.

**400**

Bad request

**401**

Unauthorized

**403**

Access denied

**404**

Not found

**409**

Conflict

**422**

Unprocessable entity

**423**

Locked

**429**

The request could not be completed because the rate limiting domain for this endpoint is currently at its limit for this project.

**500**

Internal server error

**503**

Internal server error

### Request samples

Content type

application/json

```json
{
  "app_user_id": "19b8de26-77c1-49f1-aa18-019a391603e2"
}
```

### Response samples

Content type

application/json

```json
{
  "object": "authentication",
  "access_token": "eyJhbGciOiJSUzI1NiIsImtpZCI6InNrXzEyMyJ9.eyJzdWIiOiJhcHBfdXNlcl8xMjMifQ.signature",
  "expires_at": 1658399423658
}
```

## <a id="tag/IAM/operation/get-iam-attribute-permissions"></a>Get the customer attribute permissions of a project

get/projects/{project_id}/iam/attribute_permissions

https://api.revenuecat.com/v2/projects/{project_id}/iam/attribute_permissions

This endpoint requires the following permission(s): `iam:settings:read`. This endpoint belongs to the **Iam** domain, which has a default rate limit of **60 requests per minute**.

##### Authorizations:

_BearerAuth_

##### path Parameters

- `project_id` (required): string <= 255 characters Example: proj1ab2c3d4 — ID of the project

### Responses

**200**

Success

**400**

Bad request

**401**

Unauthorized

**403**

Access denied

**404**

Not found

**423**

Locked

**429**

The request could not be completed because the rate limiting domain for this endpoint is currently at its limit for this project.

**500**

Internal server error

**503**

Internal server error

### Response samples

Content type

application/json

 

```json
{
  "object": "iam_attribute_permissions",
  "reserved_defaults": {
    "read_permission": "private",
    "effective_read_permission": "private"
  },
  "custom_defaults": {
    "read_permission": "authenticated",
    "effective_read_permission": "authenticated",
    "write_permission": "private",
    "effective_write_permission": "private"
  },
  "custom_overrides": [
    {
      "key": "favorite_cat",
      "read_permission": "private",
      "effective_read_permission": "private",
      "write_permission": null,
      "effective_write_permission": "private"
    }
  ]
}
```

## <a id="tag/IAM/operation/update-iam-attribute-permissions"></a>Update the customer attribute permissions of a project

post/projects/{project_id}/iam/attribute_permissions

https://api.revenuecat.com/v2/projects/{project_id}/iam/attribute_permissions

This endpoint requires the following permission(s): `iam:settings:read_write`. This endpoint belongs to the **Iam** domain, which has a default rate limit of **60 requests per minute**.

##### Authorizations:

_BearerAuth_

##### path Parameters

- `project_id` (required): string <= 255 characters Example: proj1ab2c3d4 — ID of the project

##### Request Body schema: application/json

required

non-empty

- `reserved_defaults`: object
  - `read_permission` (required): string or null Enum: "authenticated" "private" null — The read permission of all reserved attributes (prefixed with `$`).
- `custom_defaults`: object non-empty
  - `read_permission`: string or null Enum: "authenticated" "private" null — The default read permission of custom attributes.
  - `write_permission`: string or null Enum: "authenticated" "authenticated_protected" "private" "private_protected" null — The default write permission of custom attributes.
- `custom_overrides`: Array of objects [ 1 .. 100 ] items [ items \>= 2 properties ] — Permissions for specific custom attributes. Each key can only appear once. Keys that are not listed are left as they are.
  - `key` (required): string — The name of the custom attribute.
  - `read_permission`: string or null Enum: "authenticated" "private" null — The read permission of this attribute. `null` makes it inherit the custom attribute default.
  - `write_permission`: string or null Enum: "authenticated" "authenticated_protected" "private" "private_protected" null — The write permission of this attribute. `null` makes it inherit the custom attribute default.

### Responses

**200**

Success

**400**

Bad request

**401**

Unauthorized

**403**

Access denied

**404**

Not found

**409**

Conflict

**422**

Unprocessable entity

**423**

Locked

**429**

The request could not be completed because the rate limiting domain for this endpoint is currently at its limit for this project.

**500**

Internal server error

**503**

Internal server error

### Request samples

Content type

application/json

 

```json
{
  "reserved_defaults": {
    "read_permission": "private"
  },
  "custom_defaults": {
    "read_permission": "authenticated",
    "write_permission": "private"
  },
  "custom_overrides": [
    {
      "key": "favorite_cat",
      "read_permission": "private",
      "write_permission": "private_protected"
    }
  ]
}
```

### Response samples

Content type

application/json

 

```json
{
  "object": "iam_attribute_permissions",
  "reserved_defaults": {
    "read_permission": "private",
    "effective_read_permission": "private"
  },
  "custom_defaults": {
    "read_permission": "authenticated",
    "effective_read_permission": "authenticated",
    "write_permission": "private",
    "effective_write_permission": "private"
  },
  "custom_overrides": [
    {
      "key": "favorite_cat",
      "read_permission": "private",
      "effective_read_permission": "private",
      "write_permission": null,
      "effective_write_permission": "private"
    }
  ]
}
```

## <a id="tag/IAM/operation/list-iam-authentication-methods"></a>Get a list of IAM authentication methods

get/projects/{project_id}/iam/authentication_methods

https://api.revenuecat.com/v2/projects/{project_id}/iam/authentication_methods

This endpoint requires the following permission(s): `iam:authentication_methods:read`. This endpoint belongs to the **Iam** domain, which has a default rate limit of **60 requests per minute**.

##### Authorizations:

_BearerAuth_

##### path Parameters

- `project_id` (required): string <= 255 characters Example: proj1ab2c3d4 — ID of the project

##### query Parameters

- `starting_after`: string Example: starting_after=ent12354 — Pagination cursor. Pass the id of the last item from the previous page to fetch the next page; omit for the first page.
- `limit`: integer Default: 20 Example: limit=10 — Maximum number of items to return per page. Values below 1 or above 100 are clamped to that range rather than rejected.

### Responses

**200**

Success

**400**

Bad request

**401**

Unauthorized

**403**

Access denied

**404**

Not found

**423**

Locked

**429**

The request could not be completed because the rate limiting domain for this endpoint is currently at its limit for this project.

**500**

Internal server error

**503**

Internal server error

### Response samples

Content type

application/json

 

```json
{
  "object": "list",
  "items": [
    {
      "object": "iam_authentication_method",
      "id": "b5b7bfd2-66fb-4091-af50-7c3cdccfdf24",
      "name": "Sign in with Google",
      "created_at": 1658399423658,
      "updated_at": 1658399423658,
      "type": "email_otp",
      "sender_name": "My App",
      "reply_to_email": "support@example.com",
      "code_expiration_minutes": 10
    }
  ],
  "next_page": "/v2/projects/proj1ab2c3d4/iam/authentication_methods?starting_after=b5b7bfd2-66fb-4091-af50-7c3cdccfdf24",
  "url": "/v2/projects/proj1ab2c3d4/iam/authentication_methods"
}
```

## <a id="tag/IAM/operation/create-iam-authentication-method"></a>Create an IAM authentication method

post/projects/{project_id}/iam/authentication_methods

https://api.revenuecat.com/v2/projects/{project_id}/iam/authentication_methods

This endpoint requires the following permission(s): `iam:authentication_methods:read_write`. This endpoint belongs to the **Iam** domain, which has a default rate limit of **60 requests per minute**.

##### Authorizations:

_BearerAuth_

##### path Parameters

- `project_id` (required): string <= 255 characters Example: proj1ab2c3d4 — ID of the project

##### Request Body schema: application/json

required

- `name` (required): string [ 1 .. 100 ] characters — The display name of the authentication method.
- `type` (required): string Enum: `firebase`, `facebook`, `apple`, `google`, `oidc`, `magic_link`, `email_otp` — The type of the authentication method.
- `sender_name`: string or null [ 1 .. 100 ] characters — Display name of the sender of the emails.
- `reply_to_email`: string or null `email` — Reply-to address of the emails.
- `code_expiration_minutes`: integer or null [ 1 .. 1440 ] — Number of minutes the code stays valid.

### Responses

**201**

Success. The authentication method was created

**400**

Bad request

**401**

Unauthorized

**403**

Access denied

**404**

Not found

**409**

Conflict

**422**

Unprocessable entity

**423**

Locked

**429**

The request could not be completed because the rate limiting domain for this endpoint is currently at its limit for this project.

**500**

Internal server error

**503**

Internal server error

### Request samples

Content type

application/json

Example

GoogleEmail one-time codeOIDCGoogle

```json
{
  "name": "Google",
  "type": "google",
  "client_id": "1234567890-abc.apps.googleusercontent.com"
}
```

### Response samples

Content type

application/json

Example

email_otpmagic_linkoidcgoogleapplefacebookfirebaseemail_otp

```json
{
  "object": "iam_authentication_method",
  "id": "b5b7bfd2-66fb-4091-af50-7c3cdccfdf24",
  "name": "Sign in with Google",
  "created_at": 1658399423658,
  "updated_at": 1658399423658,
  "type": "email_otp",
  "sender_name": "My App",
  "reply_to_email": "support@example.com",
  "code_expiration_minutes": 10
}
```

## <a id="tag/IAM/operation/delete-iam-authentication-method"></a>Delete an IAM authentication method

delete/projects/{project_id}/iam/authentication_methods/{authentication_method_id}

https://api.revenuecat.com/v2/projects/{project_id}/iam/authentication_methods/{authentication_method_id}

Deletes the authentication method. A method that a published web funnel uses cannot be deleted. This endpoint requires the following permission(s): `iam:authentication_methods:read_write`. This endpoint belongs to the **Iam** domain, which has a default rate limit of **60 requests per minute**.

##### Authorizations:

_BearerAuth_

##### path Parameters

- `project_id` (required): string <= 255 characters Example: proj1ab2c3d4 — ID of the project
- `authentication_method_id` (required): string `uuid` Example: b5b7bfd2-66fb-4091-af50-7c3cdccfdf24 — ID of the IAM authentication method

### Responses

**200**

Success

**400**

Bad request

**401**

Unauthorized

**403**

Access denied

**404**

Not found

**409**

Conflict

**422**

Unprocessable entity

**423**

Locked

**429**

The request could not be completed because the rate limiting domain for this endpoint is currently at its limit for this project.

**500**

Internal server error

**503**

Internal server error

### Response samples

Content type

application/json

```json
{
  "object": "app",
  "id": "string",
  "deleted_at": 1658399423658
}
```

## <a id="tag/IAM/operation/get-iam-authentication-method"></a>Get an IAM authentication method

get/projects/{project_id}/iam/authentication_methods/{authentication_method_id}

https://api.revenuecat.com/v2/projects/{project_id}/iam/authentication_methods/{authentication_method_id}

This endpoint requires the following permission(s): `iam:authentication_methods:read`. This endpoint belongs to the **Iam** domain, which has a default rate limit of **60 requests per minute**.

##### Authorizations:

_BearerAuth_

##### path Parameters

- `project_id` (required): string <= 255 characters Example: proj1ab2c3d4 — ID of the project
- `authentication_method_id` (required): string `uuid` Example: b5b7bfd2-66fb-4091-af50-7c3cdccfdf24 — ID of the IAM authentication method

### Responses

**200**

Success

**400**

Bad request

**401**

Unauthorized

**403**

Access denied

**404**

Not found

**423**

Locked

**429**

The request could not be completed because the rate limiting domain for this endpoint is currently at its limit for this project.

**500**

Internal server error

**503**

Internal server error

### Response samples

Content type

application/json

Example

email_otpmagic_linkoidcgoogleapplefacebookfirebaseemail_otp

```json
{
  "object": "iam_authentication_method",
  "id": "b5b7bfd2-66fb-4091-af50-7c3cdccfdf24",
  "name": "Sign in with Google",
  "created_at": 1658399423658,
  "updated_at": 1658399423658,
  "type": "email_otp",
  "sender_name": "My App",
  "reply_to_email": "support@example.com",
  "code_expiration_minutes": 10
}
```

## <a id="tag/IAM/operation/update-iam-authentication-method"></a>Update an IAM authentication method

post/projects/{project_id}/iam/authentication_methods/{authentication_method_id}

https://api.revenuecat.com/v2/projects/{project_id}/iam/authentication_methods/{authentication_method_id}

Updates the name and the settings of the authentication method. Only the fields of the type of the method are accepted. The type cannot be changed. This endpoint requires the following permission(s): `iam:authentication_methods:read_write`. This endpoint belongs to the **Iam** domain, which has a default rate limit of **60 requests per minute**.

##### Authorizations:

_BearerAuth_

##### path Parameters

- `project_id` (required): string <= 255 characters Example: proj1ab2c3d4 — ID of the project
- `authentication_method_id` (required): string `uuid` Example: b5b7bfd2-66fb-4091-af50-7c3cdccfdf24 — ID of the IAM authentication method

##### Request Body schema: application/json

required

- `name`: string [ 1 .. 100 ] characters — The display name of the authentication method.
- `sender_name`: string or null [ 1 .. 100 ] characters — Display name of the sender of the emails.
- `reply_to_email`: string or null `email` — Reply-to address of the emails.
- `code_expiration_minutes`: integer or null [ 1 .. 1440 ] — Number of minutes the code stays valid.
- `magic_link_expiration_minutes`: integer or null [ 1 .. 10080 ] — Number of minutes the link stays valid.
- `issuer_url`: string [ 1 .. 2000 ] characters — Issuer URL of the identity provider. The OpenID configuration is discovered from it.
- `client_id`: string or null <= 2000 characters — OAuth client id (`oidc`, `google`). Matched against the `aud` claim of the ID token.
- `client_secret`: string or null <= 2000 characters — Client secret used for interactive login. It is never returned.
- `requested_scopes`: Array of strings or null[ items non-empty ] — OAuth scopes requested from the identity provider in addition to `openid`, which is always requested.
- `app_user_id_claim`: string or null — Dot-path selector of the ID token claim used as the app user id. When null, the `sub` claim is used. Cannot be changed after users signed in.
- `authorization_params`: object or null — Static query parameters added to the authorize URL of the identity provider during interactive login. OAuth and PKCE parameters cannot be overridden.
- `id_token_iat_freshness_seconds`: integer or null [ 1 .. 60 ] — Maximum age in seconds of the `iat` claim of the external ID token, used for replay protection. When omitted, 5 seconds are used.
- `app_ids`: Array of strings or null[ items [ 1 .. 255 ] characters ] — Ids of the Apple apps that form the Apple App ID group of the method. Omit or set to null to cover every Apple app of the project. Include the app that the Services ID is grouped with in Apple. Set to an empty list for a web-only method, whose Services ID is grouped with no app of the project; it then needs a `services_id`.
- `primary_app_id`: string or null [ 1 .. 255 ] characters — Id of the Apple app whose App ID is the primary one in the Apple Developer account.
- `services_id`: string or null [ 1 .. 255 ] characters — Apple Services ID used by Sign in with Apple on the web and on Android. Matched against the `aud` claim of the ID token.
- `facebook_app_id`: string [ 1 .. 2000 ] characters — Meta app id, matched against the token audience.
- `app_secret`: string or null [ 1 .. 2000 ] characters — Meta app secret, used to verify Android access tokens. It is never returned.
- `firebase_project_id`: string [ 1 .. 500 ] characters — Firebase project id, matched against the `aud` claim of the ID token.
- `api_key`: string [ 1 .. 2000 ] characters — Firebase web API key.
- `auth_domain`: string [ 1 .. 2000 ] characters — Firebase auth domain.

### Responses

**200**

Success. The authentication method was updated

**400**

Bad request

**401**

Unauthorized

**403**

Access denied

**404**

Not found

**409**

Conflict

**422**

Unprocessable entity

**423**

Locked

**429**

The request could not be completed because the rate limiting domain for this endpoint is currently at its limit for this project.

**500**

Internal server error

**503**

Internal server error

### Request samples

Content type

application/json

Example

RenameChange the Google client idRename

```json
{
  "name": "Sign in with Google"
}
```

### Response samples

Content type

application/json

Example

email_otpmagic_linkoidcgoogleapplefacebookfirebaseemail_otp

```json
{
  "object": "iam_authentication_method",
  "id": "b5b7bfd2-66fb-4091-af50-7c3cdccfdf24",
  "name": "Sign in with Google",
  "created_at": 1658399423658,
  "updated_at": 1658399423658,
  "type": "email_otp",
  "sender_name": "My App",
  "reply_to_email": "support@example.com",
  "code_expiration_minutes": 10
}
```

## <a id="tag/IAM/operation/get-iam-settings"></a>Get the IAM settings of a project

get/projects/{project_id}/iam/settings

https://api.revenuecat.com/v2/projects/{project_id}/iam/settings

This endpoint requires the following permission(s): `iam:settings:read`. This endpoint belongs to the **Iam** domain, which has a default rate limit of **60 requests per minute**.

##### Authorizations:

_BearerAuth_

##### path Parameters

- `project_id` (required): string <= 255 characters Example: proj1ab2c3d4 — ID of the project

### Responses

**200**

Success

**400**

Bad request

**401**

Unauthorized

**403**

Access denied

**404**

Not found

**423**

Locked

**429**

The request could not be completed because the rate limiting domain for this endpoint is currently at its limit for this project.

**500**

Internal server error

**503**

Internal server error

### Response samples

Content type

application/json

```json
{
  "object": "iam_settings",
  "migration_mode": "protected",
  "effective_migration_mode": "protected",
  "anonymous_migration_mode": "disabled",
  "sdk_virtual_currency_spend_enabled": false
}
```

## <a id="tag/IAM/operation/update-iam-settings"></a>Update the IAM settings of a project

post/projects/{project_id}/iam/settings

https://api.revenuecat.com/v2/projects/{project_id}/iam/settings

This endpoint requires the following permission(s): `iam:settings:read_write`. This endpoint belongs to the **Iam** domain, which has a default rate limit of **60 requests per minute**.

##### Authorizations:

_BearerAuth_

##### path Parameters

- `project_id` (required): string <= 255 characters Example: proj1ab2c3d4 — ID of the project

##### Request Body schema: application/json

required

non-empty

- `migration_mode`: string Enum: "dual" "protected" "authenticat_only" — The migration mode of the project. `dual`: legacy API-key authentication and IAM both work. `protected`: requests made with a public API key are rejected for customers that are linked to an IAM user. `authenticat_only`: requests made with a public API key are rejected for all customers.
- `anonymous_migration_mode`: string Enum: "disabled" "rc_prefix" "custom" — Which app user ids an anonymous login may pass as `app_user_id` to migrate an existing customer. `disabled`: anonymous logins with an `app_user_id` are rejected. `rc_prefix`: only RevenueCat anonymous ids (prefixed with `$RCAnonymousID:`). `custom`: also ids the project sets itself for customers who haven't logged in. Has no effect once the migration mode is `authenticat_only`.
- `sdk_virtual_currency_spend_enabled`: boolean — Whether SDKs may spend virtual currency with a user access token.

### Responses

**200**

Success

**400**

Bad request

**401**

Unauthorized

**403**

Access denied

**404**

Not found

**409**

Conflict

**422**

Unprocessable entity

**423**

Locked

**429**

The request could not be completed because the rate limiting domain for this endpoint is currently at its limit for this project.

**500**

Internal server error

**503**

Internal server error

### Request samples

Content type

application/json

```json
{
  "migration_mode": "protected",
  "anonymous_migration_mode": "rc_prefix",
  "sdk_virtual_currency_spend_enabled": true
}
```

### Response samples

Content type

application/json

```json
{
  "object": "iam_settings",
  "migration_mode": "protected",
  "effective_migration_mode": "protected",
  "anonymous_migration_mode": "disabled",
  "sdk_virtual_currency_spend_enabled": false
}
```

## <a id="tag/Endpoint-Reference"></a>Endpoint Reference

All API v2 resources, one page each. General concepts (authentication, pagination, rate limits, error handling) live on the [API v2 overview](/docs/api-v2).

-   [App](/docs/api-v2/app) — 7 endpoints
-   [Audience](/docs/api-v2/audience) — 6 endpoints
-   [Audit Log](/docs/api-v2/audit-log) — 1 endpoint
-   [Charts & Metrics](/docs/api-v2/charts-and-metrics) — 4 endpoints
-   [Collaborator](/docs/api-v2/collaborator) — 1 endpoint
-   [Customer](/docs/api-v2/customer) — 12 endpoints
-   [Customer Resources](/docs/api-v2/customer/resources) — 5 endpoints
-   [Discount](/docs/api-v2/discount) — 10 endpoints
-   [Entitlement](/docs/api-v2/entitlement) — 10 endpoints
-   [IAM](/docs/api-v2/iam) — 10 endpoints
-   [Integration](/docs/api-v2/integration) — 5 endpoints
-   [Invoice](/docs/api-v2/invoice) — 2 endpoints
-   [Offering](/docs/api-v2/offering) — 7 endpoints
-   [Package](/docs/api-v2/package) — 8 endpoints
-   [Paywall](/docs/api-v2/paywall) — 5 endpoints
-   [Paywall Fonts & Media](/docs/api-v2/paywall/assets) — 4 endpoints
-   [Paywall Publishing](/docs/api-v2/paywall/publishing) — 7 endpoints
-   [Product](/docs/api-v2/product) — 8 endpoints
-   [Project](/docs/api-v2/project) — 2 endpoints
-   [Purchase](/docs/api-v2/purchase) — 4 endpoints
-   [Subscription](/docs/api-v2/subscription) — 7 endpoints
-   [Subscription Data Model](/docs/api-v2/subscription-data-model) — full schema reference
-   [Subscription Transactions](/docs/api-v2/subscription-transactions) — 2 endpoints
-   [Virtual Currency](/docs/api-v2/virtual-currency) — 10 endpoints

## Response schema reference

Response examples above mirror the rendered API reference. These field definitions come from the same OpenAPI specification.

### Authentication

- Used by `POST /projects/{project_id}/apps/{app_id}/authenticate (200) — Authenticate a subscriber`

- `object` (required): string — one of `authentication`; String representing the object's type. Objects of the same type share the same value. Always has the value `authentication`.
- `access_token` (required): string — A short-lived RevenueCat access token authenticating the given `app_user_id`. Present it as a Bearer token on behalf of the subscriber. It is not backed by an IAM user and cannot be refreshed.
- `expires_at` (required): integer (format: `int64`) — The date when the access token expires, in ms since epoch.

### IAMAttributePermissions

- Used by `GET /projects/{project_id}/iam/attribute_permissions (200) — Get the customer attribute permissions of a project`
- Used by `POST /projects/{project_id}/iam/attribute_permissions (200) — Update the customer attribute permissions of a project`

- `object` (required): string — one of `iam_attribute_permissions`; String representing the object's type. Objects of the same type share the same value.
- `reserved_defaults` (required): IAMReservedAttributeDefaults
  - `read_permission` (required): string or null — one of `authenticated`, `private`, ``; The read permission set for all reserved attributes (prefixed with `$`), or null when it was never set.
  - `effective_read_permission` (required): string — one of `authenticated`, `private`; The read permission in effect for reserved attributes. It is `authenticated` when none was set.
- `custom_defaults` (required): IAMCustomAttributeDefaults
  - `read_permission` (required): string or null — one of `authenticated`, `private`, ``; The default read permission of custom attributes, or null when it was never set.
  - `effective_read_permission` (required): string — one of `authenticated`, `private`; The default read permission in effect. It is `authenticated` when none was set.
  - `write_permission` (required): string or null — one of `authenticated`, `authenticated_protected`, `private`, `private_protected`, ``; The default write permission of custom attributes, or null when it was never set.
  - `effective_write_permission` (required): string — one of `authenticated`, `authenticated_protected`, `private`, `private_protected`; The default write permission in effect. It is `authenticated` when none was set.
- `custom_overrides` (required): array of IAMCustomAttributeOverride — The custom attributes with their own permissions, sorted by key.
  - `key` (required): string — The name of the custom attribute.
  - `read_permission` (required): string or null — one of `authenticated`, `private`, ``; The read permission of this attribute, or null when it inherits the custom attribute default.
  - `effective_read_permission` (required): string — one of `authenticated`, `private`; The read permission in effect for this attribute.
  - `write_permission` (required): string or null — one of `authenticated`, `authenticated_protected`, `private`, `private_protected`, ``; The write permission of this attribute, or null when it inherits the custom attribute default.
  - `effective_write_permission` (required): string — one of `authenticated`, `authenticated_protected`, `private`, `private_protected`; The write permission in effect for this attribute.

### ListIAMAuthenticationMethods

- Used by `GET /projects/{project_id}/iam/authentication_methods (200) — Get a list of IAM authentication methods`

- `object` (required): string — one of `list`; String representing the object's type. Objects of the same type share the same value. Always has the value `list`.
- `items` (required): array of IAMAuthenticationMethod — Details about each authentication method.
  - `object` (required): string — one of `iam_authentication_method`; String representing the object's type. Objects of the same type share the same value.
  - `id` (required): string (format: `uuid`) — The id of the authentication method.
  - `name` (required): string — length 1–100; The display name of the authentication method.
  - `created_at` (required): integer (format: `int64`) — The date when the authentication method was created, in ms since epoch.
  - `updated_at` (required): integer (format: `int64`) — The date when the authentication method was last updated, in ms since epoch.
  - `type` (required): string — one of `email_otp`; The type of the authentication method.
  - `sender_name` (required): string or null — length 1–100; Display name of the sender of the emails.
  - `reply_to_email` (required): string or null (format: `email`) — Reply-to address of the emails.
  - `code_expiration_minutes` (required): integer — Number of minutes the code stays valid.
  - `object` (required): string — one of `iam_authentication_method`; String representing the object's type. Objects of the same type share the same value.
  - `id` (required): string (format: `uuid`) — The id of the authentication method.
  - `name` (required): string — length 1–100; The display name of the authentication method.
  - `created_at` (required): integer (format: `int64`) — The date when the authentication method was created, in ms since epoch.
  - `updated_at` (required): integer (format: `int64`) — The date when the authentication method was last updated, in ms since epoch.
  - `type` (required): string — one of `magic_link`; The type of the authentication method.
  - `sender_name` (required): string or null — length 1–100; Display name of the sender of the emails.
  - `reply_to_email` (required): string or null (format: `email`) — Reply-to address of the emails.
  - `magic_link_expiration_minutes` (required): integer — Number of minutes the link stays valid.
  - `object` (required): string — one of `iam_authentication_method`; String representing the object's type. Objects of the same type share the same value.
  - `id` (required): string (format: `uuid`) — The id of the authentication method.
  - `name` (required): string — length 1–100; The display name of the authentication method.
  - `created_at` (required): integer (format: `int64`) — The date when the authentication method was created, in ms since epoch.
  - `updated_at` (required): integer (format: `int64`) — The date when the authentication method was last updated, in ms since epoch.
  - `type` (required): string — one of `oidc`; The type of the authentication method.
  - `issuer_url` (required): string — Issuer URL of the identity provider.
  - `client_id` (required): string or null — Client id expected in the `aud` claim of the ID token.
  - `has_client_secret` (required): boolean — Whether a client secret is configured.
  - `oidc_configuration_url` (required): string — URL of the OpenID configuration document.
  - `jwks_url` (required): string — URL of the JSON Web Key Set of the identity provider.
  - `token_endpoint` (required): string or null — Token endpoint of the identity provider.
  - `authorization_endpoint` (required): string or null — Authorization endpoint of the identity provider.
  - `requested_scopes` (required): array of string — OAuth scopes requested from the identity provider in addition to `openid`, which is always requested.
  - `app_user_id_claim` (required): string or null — Dot-path selector of the ID token claim used as the app user id. When null, the `sub` claim is used. Cannot be changed after users signed in.
  - `authorization_params` (required): object — Static query parameters added to the authorize URL of the identity provider during interactive login. OAuth and PKCE parameters cannot be overridden.
  - `id_token_iat_freshness_seconds` (required): integer or null — Maximum age in seconds of the `iat` claim of the external ID token, used for replay protection.
  - `object` (required): string — one of `iam_authentication_method`; String representing the object's type. Objects of the same type share the same value.
  - `id` (required): string (format: `uuid`) — The id of the authentication method.
  - `name` (required): string — length 1–100; The display name of the authentication method.
  - `created_at` (required): integer (format: `int64`) — The date when the authentication method was created, in ms since epoch.
  - `updated_at` (required): integer (format: `int64`) — The date when the authentication method was last updated, in ms since epoch.
  - `type` (required): string — one of `google`; The type of the authentication method.
  - `client_id` (required): string — Google OAuth client id.
  - `id_token_iat_freshness_seconds` (required): integer or null — Maximum age in seconds of the `iat` claim of the external ID token, used for replay protection.
  - `object` (required): string — one of `iam_authentication_method`; String representing the object's type. Objects of the same type share the same value.
  - `id` (required): string (format: `uuid`) — The id of the authentication method.
  - `name` (required): string — length 1–100; The display name of the authentication method.
  - `created_at` (required): integer (format: `int64`) — The date when the authentication method was created, in ms since epoch.
  - `updated_at` (required): integer (format: `int64`) — The date when the authentication method was last updated, in ms since epoch.
  - `type` (required): string — one of `apple`; The type of the authentication method.
  - `app_ids` (required): array of string or null — Ids of the Apple apps that form the Apple App ID group of the method. Null when the method covers every Apple app of the project, empty for a web-only method.
  - `primary_app_id` (required): string or null — length 1–255; Id of the Apple app whose App ID is the primary one in the Apple Developer account.
  - `services_id` (required): string or null — length 1–255; Apple Services ID used by Sign in with Apple on the web and on Android.
  - `id_token_iat_freshness_seconds` (required): integer or null — Maximum age in seconds of the `iat` claim of the external ID token, used for replay protection.
  - `object` (required): string — one of `iam_authentication_method`; String representing the object's type. Objects of the same type share the same value.
  - `id` (required): string (format: `uuid`) — The id of the authentication method.
  - `name` (required): string — length 1–100; The display name of the authentication method.
  - `created_at` (required): integer (format: `int64`) — The date when the authentication method was created, in ms since epoch.
  - `updated_at` (required): integer (format: `int64`) — The date when the authentication method was last updated, in ms since epoch.
  - `type` (required): string — one of `facebook`; The type of the authentication method.
  - `facebook_app_id` (required): string — Meta app id.
  - `has_app_secret` (required): boolean — Whether an app secret is configured.
  - `id_token_iat_freshness_seconds` (required): integer or null — Maximum age in seconds of the `iat` claim of the external ID token, used for replay protection.
  - `object` (required): string — one of `iam_authentication_method`; String representing the object's type. Objects of the same type share the same value.
  - `id` (required): string (format: `uuid`) — The id of the authentication method.
  - `name` (required): string — length 1–100; The display name of the authentication method.
  - `created_at` (required): integer (format: `int64`) — The date when the authentication method was created, in ms since epoch.
  - `updated_at` (required): integer (format: `int64`) — The date when the authentication method was last updated, in ms since epoch.
  - `type` (required): string — one of `firebase`; The type of the authentication method.
  - `firebase_project_id` (required): string — Firebase project id.
  - `api_key` (required): string — Firebase web API key.
  - `auth_domain` (required): string — Firebase auth domain.
- `next_page` (required): string or null — URL to access the next page of authentication methods. If not present / null, there is no next page.
- `url` (required): string — length 0–5000; The URL where this list can be accessed.

### IAMAuthenticationMethod

- Used by `POST /projects/{project_id}/iam/authentication_methods (201) — Create an IAM authentication method`
- Used by `GET /projects/{project_id}/iam/authentication_methods/{authentication_method_id} (200) — Get an IAM authentication method`
- Used by `POST /projects/{project_id}/iam/authentication_methods/{authentication_method_id} (200) — Update an IAM authentication method`

- `object` (required): string — one of `iam_authentication_method`; String representing the object's type. Objects of the same type share the same value.
- `id` (required): string (format: `uuid`) — The id of the authentication method.
- `name` (required): string — length 1–100; The display name of the authentication method.
- `created_at` (required): integer (format: `int64`) — The date when the authentication method was created, in ms since epoch.
- `updated_at` (required): integer (format: `int64`) — The date when the authentication method was last updated, in ms since epoch.
- `type` (required): string — one of `email_otp`; The type of the authentication method.
- `sender_name` (required): string or null — length 1–100; Display name of the sender of the emails.
- `reply_to_email` (required): string or null (format: `email`) — Reply-to address of the emails.
- `code_expiration_minutes` (required): integer — Number of minutes the code stays valid.
- `object` (required): string — one of `iam_authentication_method`; String representing the object's type. Objects of the same type share the same value.
- `id` (required): string (format: `uuid`) — The id of the authentication method.
- `name` (required): string — length 1–100; The display name of the authentication method.
- `created_at` (required): integer (format: `int64`) — The date when the authentication method was created, in ms since epoch.
- `updated_at` (required): integer (format: `int64`) — The date when the authentication method was last updated, in ms since epoch.
- `type` (required): string — one of `magic_link`; The type of the authentication method.
- `sender_name` (required): string or null — length 1–100; Display name of the sender of the emails.
- `reply_to_email` (required): string or null (format: `email`) — Reply-to address of the emails.
- `magic_link_expiration_minutes` (required): integer — Number of minutes the link stays valid.
- `object` (required): string — one of `iam_authentication_method`; String representing the object's type. Objects of the same type share the same value.
- `id` (required): string (format: `uuid`) — The id of the authentication method.
- `name` (required): string — length 1–100; The display name of the authentication method.
- `created_at` (required): integer (format: `int64`) — The date when the authentication method was created, in ms since epoch.
- `updated_at` (required): integer (format: `int64`) — The date when the authentication method was last updated, in ms since epoch.
- `type` (required): string — one of `oidc`; The type of the authentication method.
- `issuer_url` (required): string — Issuer URL of the identity provider.
- `client_id` (required): string or null — Client id expected in the `aud` claim of the ID token.
- `has_client_secret` (required): boolean — Whether a client secret is configured.
- `oidc_configuration_url` (required): string — URL of the OpenID configuration document.
- `jwks_url` (required): string — URL of the JSON Web Key Set of the identity provider.
- `token_endpoint` (required): string or null — Token endpoint of the identity provider.
- `authorization_endpoint` (required): string or null — Authorization endpoint of the identity provider.
- `requested_scopes` (required): array of string — OAuth scopes requested from the identity provider in addition to `openid`, which is always requested.
- `app_user_id_claim` (required): string or null — Dot-path selector of the ID token claim used as the app user id. When null, the `sub` claim is used. Cannot be changed after users signed in.
- `authorization_params` (required): object — Static query parameters added to the authorize URL of the identity provider during interactive login. OAuth and PKCE parameters cannot be overridden.
- `id_token_iat_freshness_seconds` (required): integer or null — Maximum age in seconds of the `iat` claim of the external ID token, used for replay protection.
- `object` (required): string — one of `iam_authentication_method`; String representing the object's type. Objects of the same type share the same value.
- `id` (required): string (format: `uuid`) — The id of the authentication method.
- `name` (required): string — length 1–100; The display name of the authentication method.
- `created_at` (required): integer (format: `int64`) — The date when the authentication method was created, in ms since epoch.
- `updated_at` (required): integer (format: `int64`) — The date when the authentication method was last updated, in ms since epoch.
- `type` (required): string — one of `google`; The type of the authentication method.
- `client_id` (required): string — Google OAuth client id.
- `id_token_iat_freshness_seconds` (required): integer or null — Maximum age in seconds of the `iat` claim of the external ID token, used for replay protection.
- `object` (required): string — one of `iam_authentication_method`; String representing the object's type. Objects of the same type share the same value.
- `id` (required): string (format: `uuid`) — The id of the authentication method.
- `name` (required): string — length 1–100; The display name of the authentication method.
- `created_at` (required): integer (format: `int64`) — The date when the authentication method was created, in ms since epoch.
- `updated_at` (required): integer (format: `int64`) — The date when the authentication method was last updated, in ms since epoch.
- `type` (required): string — one of `apple`; The type of the authentication method.
- `app_ids` (required): array of string or null — Ids of the Apple apps that form the Apple App ID group of the method. Null when the method covers every Apple app of the project, empty for a web-only method.
- `primary_app_id` (required): string or null — length 1–255; Id of the Apple app whose App ID is the primary one in the Apple Developer account.
- `services_id` (required): string or null — length 1–255; Apple Services ID used by Sign in with Apple on the web and on Android.
- `id_token_iat_freshness_seconds` (required): integer or null — Maximum age in seconds of the `iat` claim of the external ID token, used for replay protection.
- `object` (required): string — one of `iam_authentication_method`; String representing the object's type. Objects of the same type share the same value.
- `id` (required): string (format: `uuid`) — The id of the authentication method.
- `name` (required): string — length 1–100; The display name of the authentication method.
- `created_at` (required): integer (format: `int64`) — The date when the authentication method was created, in ms since epoch.
- `updated_at` (required): integer (format: `int64`) — The date when the authentication method was last updated, in ms since epoch.
- `type` (required): string — one of `facebook`; The type of the authentication method.
- `facebook_app_id` (required): string — Meta app id.
- `has_app_secret` (required): boolean — Whether an app secret is configured.
- `id_token_iat_freshness_seconds` (required): integer or null — Maximum age in seconds of the `iat` claim of the external ID token, used for replay protection.
- `object` (required): string — one of `iam_authentication_method`; String representing the object's type. Objects of the same type share the same value.
- `id` (required): string (format: `uuid`) — The id of the authentication method.
- `name` (required): string — length 1–100; The display name of the authentication method.
- `created_at` (required): integer (format: `int64`) — The date when the authentication method was created, in ms since epoch.
- `updated_at` (required): integer (format: `int64`) — The date when the authentication method was last updated, in ms since epoch.
- `type` (required): string — one of `firebase`; The type of the authentication method.
- `firebase_project_id` (required): string — Firebase project id.
- `api_key` (required): string — Firebase web API key.
- `auth_domain` (required): string — Firebase auth domain.

### DeletedObject

- Used by `DELETE /projects/{project_id}/iam/authentication_methods/{authentication_method_id} (200) — Delete an IAM authentication method`

- `object` (required): string — one of `app`, `chart_annotation`, `customer`, `discount`, `discount_code`, `entitlement`, `experiment`, `iam_authentication_method`, `offering`, `package`, `paywall`, `product`, `targeting_rule`, `virtual_currency`, `webhook_integration`; The type of the deleted object
- `id` (required): string — The ID of the deleted object
- `deleted_at` (required): integer (format: `int64`) — The date when the object was deleted in ms since epoch

### IAMSettings

- Used by `GET /projects/{project_id}/iam/settings (200) — Get the IAM settings of a project`
- Used by `POST /projects/{project_id}/iam/settings (200) — Update the IAM settings of a project`

- `object` (required): string — one of `iam_settings`; String representing the object's type. Objects of the same type share the same value.
- `migration_mode` (required): string or null — one of `dual`, `protected`, `authenticat_only`, ``; The migration mode set for the project, or null when it was never set. `dual`: legacy API-key authentication and IAM both work. `protected`: requests made with a public API key are rejected for customers that are linked to an IAM user. `authenticat_only`: requests made with a public API key are rejected for all customers.
- `effective_migration_mode` (required): string — one of `dual`, `protected`, `authenticat_only`; The migration mode in effect. It is `dual` when no mode was set.
- `anonymous_migration_mode` (required): string — one of `disabled`, `rc_prefix`, `custom`; Which app user ids an anonymous login may pass as `app_user_id` to migrate an existing customer. `disabled`: anonymous logins with an `app_user_id` are rejected. `rc_prefix`: only RevenueCat anonymous ids (prefixed with `$RCAnonymousID:`). `custom`: also ids the project sets itself for customers who haven't logged in. It is `disabled` unless you change it.
- `sdk_virtual_currency_spend_enabled` (required): boolean — Whether SDKs may spend virtual currency with a user access token. It is `false` unless you enable it.
