---
title: "Customer"
permalink: "/docs/api-v2/customer"
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).

# Customer

## Customer

Operations about customers.

### List or search customers

`GET /projects/{project_id}/customers`

Operation ID: `list-customers`

This endpoint requires the following permission(s): <code>customer_information:customers:read</code>. This endpoint belongs to the <strong>Customer Information</strong> domain, which has a default rate limit of <strong>480 requests per minute</strong>.

**Parameters**

| Name | In | Required | Description |
| --- | --- | --- | --- |
| `project_id` | path | yes | ID of the project |
| `starting_after` | query | no | Pagination cursor. Pass the id of the last item from the previous page to fetch the next page; omit for the first page. |
| `limit` | query | no | Maximum number of items to return per page. Values below 1 or above 100 are clamped to that range rather than rejected. |
| `search` | query | no | Search term used to find matching customers within the project. The term is matched against, in order: the $email attribute (exact match), the customer's app user IDs, store transaction identifiers (Apple, Google Play and Amazon), and Apple order IDs. Email searches are paginated; all other identifier searches return a single page of matches. |

**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 `200` body**

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `object` | string | yes | String representing the object's type. Objects of the same type share the same value. Always has the value `list`. One of: `list` |
| `items` | array of Customer | yes | Details about each object. |
| `next_page` | string | yes | URL to access the next page of the project's customers. If not present / null, there is no next page |
| `url` | string | yes | The URL where this list can be accessed. |

<details><summary><code>items</code></summary>

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `object` | string | yes | String representing the object's type. Objects of the same type share the same value. One of: `customer` |
| `id` | string | yes |  |
| `project_id` | string | yes | ID of the project to which the customer belongs |
| `first_seen_at` | integer | yes | The earliest date we have for this customer, whichever comes first: when the SDK first saw them, their first purchase, the App Store install date, or when the record was created. Matches the 'First seen or purchased' date shown in the dashboard. |
| `last_seen_at` | integer | yes | The last time the customer was seen |
| `last_seen_app_version` | string | yes | The last app version the customer was seen on |
| `last_seen_country` | string | yes | The last country the customer was seen in |
| `last_seen_platform` | string | yes | The last platform the customer was seen on |
| `last_seen_platform_version` | string | yes | The last platform version the customer was seen on |
| `active_entitlements` | object | no | List of the entitlements currently active for the customer. This property is only available in the "Get a customer" endpoint. |
| `experiment` | ExperimentEnrollment | no |  |
| `attributes` | object | no | List of the attributes of the customer. This is an expandable property, only available in the "Get a customer" endpoint. |

<details><summary><code>experiment</code></summary>

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `object` | string | yes | String representing the object's type. Objects of the same type share the same value. One of: `experiment_enrollment` |
| `id` | string | yes |  |
| `name` | string | yes |  |
| `variant` | string | yes | The variant of the Experiment that the Customer was or is assigned to, where 'a' represents the Control, and 'b' represents the Treatment. |

</details>
</details>
### Create a customer

`POST /projects/{project_id}/customers`

Operation ID: `create-customer`

This endpoint requires the following permission(s): <code>customer_information:customers:read_write</code>. This endpoint belongs to the <strong>Customer Information</strong> domain, which has a default rate limit of <strong>480 requests per minute</strong>.

**Parameters**

| Name | In | Required | Description |
| --- | --- | --- | --- |
| `project_id` | path | yes | ID of the project |

**Request body**

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | string | yes | The ID of the customer |
| `attributes` | array of object | no |  |

<details><summary><code>attributes</code></summary>

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `name` | oneOf | yes | The name of the attribute |
| `value` | string | yes | The value of the attribute |

</details>
**Responses**

- `201` — Success. The customer 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

**Response `201` body**

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `object` | string | yes | String representing the object's type. Objects of the same type share the same value. One of: `customer` |
| `id` | string | yes |  |
| `project_id` | string | yes | ID of the project to which the customer belongs |
| `first_seen_at` | integer | yes | The earliest date we have for this customer, whichever comes first: when the SDK first saw them, their first purchase, the App Store install date, or when the record was created. Matches the 'First seen or purchased' date shown in the dashboard. |
| `last_seen_at` | integer | yes | The last time the customer was seen |
| `last_seen_app_version` | string | yes | The last app version the customer was seen on |
| `last_seen_country` | string | yes | The last country the customer was seen in |
| `last_seen_platform` | string | yes | The last platform the customer was seen on |
| `last_seen_platform_version` | string | yes | The last platform version the customer was seen on |
| `active_entitlements` | object | no | List of the entitlements currently active for the customer. This property is only available in the "Get a customer" endpoint. |
| `experiment` | ExperimentEnrollment | no |  |
| `attributes` | object | no | List of the attributes of the customer. This is an expandable property, only available in the "Get a customer" endpoint. |

<details><summary><code>active_entitlements</code></summary>

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `object` | string | yes | String representing the object's type. Objects of the same type share the same value. Always has the value `list`. One of: `list` |
| `items` | array of CustomerEntitlement | yes | Details about each object. |
| `next_page` | string | yes | URL to access the next page of the customer's active entitlements. If not present / null, there is no next page |
| `url` | string | yes | The URL where this list can be accessed. |

</details>

<details><summary><code>experiment</code></summary>

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `object` | string | yes | String representing the object's type. Objects of the same type share the same value. One of: `experiment_enrollment` |
| `id` | string | yes |  |
| `name` | string | yes |  |
| `variant` | string | yes | The variant of the Experiment that the Customer was or is assigned to, where 'a' represents the Control, and 'b' represents the Treatment. |

</details>

<details><summary><code>attributes</code></summary>

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `object` | string | yes | String representing the object's type. Objects of the same type share the same value. Always has the value `list`. One of: `list` |
| `items` | array of CustomerAttribute | yes | Details about each object. |
| `next_page` | string | yes | URL to access the next page of the customer's aliases. If not present / null, there is no next page |
| `url` | string | yes | The URL where this list can be accessed. |

</details>
### Get a customer

`GET /projects/{project_id}/customers/{customer_id}`

Operation ID: `get-customer`

This endpoint requires the following permission(s): <code>customer_information:customers:read</code>. This endpoint belongs to the <strong>Customer Information</strong> domain, which has a default rate limit of <strong>480 requests per minute</strong>.

**Parameters**

| Name | In | Required | Description |
| --- | --- | --- | --- |
| `project_id` | path | yes | ID of the project |
| `customer_id` | path | yes | ID of the customer |
| `expand` | query | no | Specifies which fields in the response should be expanded. Accepted values are: `attributes` (requires `customer_information:customers:read` permission). |

**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 `200` body**

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `object` | string | yes | String representing the object's type. Objects of the same type share the same value. One of: `customer` |
| `id` | string | yes |  |
| `project_id` | string | yes | ID of the project to which the customer belongs |
| `first_seen_at` | integer | yes | The earliest date we have for this customer, whichever comes first: when the SDK first saw them, their first purchase, the App Store install date, or when the record was created. Matches the 'First seen or purchased' date shown in the dashboard. |
| `last_seen_at` | integer | yes | The last time the customer was seen |
| `last_seen_app_version` | string | yes | The last app version the customer was seen on |
| `last_seen_country` | string | yes | The last country the customer was seen in |
| `last_seen_platform` | string | yes | The last platform the customer was seen on |
| `last_seen_platform_version` | string | yes | The last platform version the customer was seen on |
| `active_entitlements` | object | no | List of the entitlements currently active for the customer. This property is only available in the "Get a customer" endpoint. |
| `experiment` | ExperimentEnrollment | no |  |
| `attributes` | object | no | List of the attributes of the customer. This is an expandable property, only available in the "Get a customer" endpoint. |

<details><summary><code>active_entitlements</code></summary>

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `object` | string | yes | String representing the object's type. Objects of the same type share the same value. Always has the value `list`. One of: `list` |
| `items` | array of CustomerEntitlement | yes | Details about each object. |
| `next_page` | string | yes | URL to access the next page of the customer's active entitlements. If not present / null, there is no next page |
| `url` | string | yes | The URL where this list can be accessed. |

</details>

<details><summary><code>experiment</code></summary>

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `object` | string | yes | String representing the object's type. Objects of the same type share the same value. One of: `experiment_enrollment` |
| `id` | string | yes |  |
| `name` | string | yes |  |
| `variant` | string | yes | The variant of the Experiment that the Customer was or is assigned to, where 'a' represents the Control, and 'b' represents the Treatment. |

</details>

<details><summary><code>attributes</code></summary>

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `object` | string | yes | String representing the object's type. Objects of the same type share the same value. Always has the value `list`. One of: `list` |
| `items` | array of CustomerAttribute | yes | Details about each object. |
| `next_page` | string | yes | URL to access the next page of the customer's aliases. If not present / null, there is no next page |
| `url` | string | yes | The URL where this list can be accessed. |

</details>
### Delete a customer

`DELETE /projects/{project_id}/customers/{customer_id}`

Operation ID: `delete-customer`

This endpoint requires the following permission(s): <code>customer_information:customers:read_write</code>. This endpoint belongs to the <strong>Customer Information</strong> domain, which has a default rate limit of <strong>480 requests per minute</strong>.

**Parameters**

| Name | In | Required | Description |
| --- | --- | --- | --- |
| `project_id` | path | yes | ID of the project |
| `customer_id` | path | yes | ID of the customer |

**Responses**

- `200` — Success
- `202` — Accepted. The customer deletion was queued.
- `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 `200` body**

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `object` | string | yes | The type of the deleted object One of: `app`, `chart_annotation`, `customer`, `discount`, `entitlement`, `experiment`, `offering`, `package`, `paywall`, `product`, `virtual_currency`, `webhook_integration` |
| `id` | string | yes | The ID of the deleted object |
| `deleted_at` | integer | yes | The date when the object was deleted in ms since epoch |

### Transfer customer's subscriptions and one-time purchases to another customer

`POST /projects/{project_id}/customers/{customer_id}/actions/transfer`

Operation ID: `transfer-customer-data`

This endpoint requires the following permission(s): <code>customer_information:customers:read_write</code>, <code>customer_information:subscriptions:read_write</code>, <code>customer_information:purchases:read_write</code>. This endpoint belongs to the <strong>Customer Information</strong> domain, which has a default rate limit of <strong>480 requests per minute</strong>.

**Parameters**

| Name | In | Required | Description |
| --- | --- | --- | --- |
| `project_id` | path | yes | ID of the project |
| `customer_id` | path | yes | ID of the customer |

**Request body**

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `target_customer_id` | string | yes | The ID of the customer to whom the subscriptions and one-time purchases will be transferred. |
| `app_ids` | array of string | no | Optional. The IDs of the apps to filter the transfer by. When specified, only purchases and subscriptions associated with these apps will be transferred. |

**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 `200` body**

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `source_customer` | Customer | yes |  |
| `target_customer` | Customer | yes |  |

<details><summary><code>source_customer</code></summary>

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `object` | string | yes | String representing the object's type. Objects of the same type share the same value. One of: `customer` |
| `id` | string | yes |  |
| `project_id` | string | yes | ID of the project to which the customer belongs |
| `first_seen_at` | integer | yes | The earliest date we have for this customer, whichever comes first: when the SDK first saw them, their first purchase, the App Store install date, or when the record was created. Matches the 'First seen or purchased' date shown in the dashboard. |
| `last_seen_at` | integer | yes | The last time the customer was seen |
| `last_seen_app_version` | string | yes | The last app version the customer was seen on |
| `last_seen_country` | string | yes | The last country the customer was seen in |
| `last_seen_platform` | string | yes | The last platform the customer was seen on |
| `last_seen_platform_version` | string | yes | The last platform version the customer was seen on |
| `active_entitlements` | object | no | List of the entitlements currently active for the customer. This property is only available in the "Get a customer" endpoint. |
| `experiment` | ExperimentEnrollment | no |  |
| `attributes` | object | no | List of the attributes of the customer. This is an expandable property, only available in the "Get a customer" endpoint. |

<details><summary><code>experiment</code></summary>

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `object` | string | yes | String representing the object's type. Objects of the same type share the same value. One of: `experiment_enrollment` |
| `id` | string | yes |  |
| `name` | string | yes |  |
| `variant` | string | yes | The variant of the Experiment that the Customer was or is assigned to, where 'a' represents the Control, and 'b' represents the Treatment. |

</details>
</details>

<details><summary><code>target_customer</code></summary>

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `object` | string | yes | String representing the object's type. Objects of the same type share the same value. One of: `customer` |
| `id` | string | yes |  |
| `project_id` | string | yes | ID of the project to which the customer belongs |
| `first_seen_at` | integer | yes | The earliest date we have for this customer, whichever comes first: when the SDK first saw them, their first purchase, the App Store install date, or when the record was created. Matches the 'First seen or purchased' date shown in the dashboard. |
| `last_seen_at` | integer | yes | The last time the customer was seen |
| `last_seen_app_version` | string | yes | The last app version the customer was seen on |
| `last_seen_country` | string | yes | The last country the customer was seen in |
| `last_seen_platform` | string | yes | The last platform the customer was seen on |
| `last_seen_platform_version` | string | yes | The last platform version the customer was seen on |
| `active_entitlements` | object | no | List of the entitlements currently active for the customer. This property is only available in the "Get a customer" endpoint. |
| `experiment` | ExperimentEnrollment | no |  |
| `attributes` | object | no | List of the attributes of the customer. This is an expandable property, only available in the "Get a customer" endpoint. |

<details><summary><code>experiment</code></summary>

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `object` | string | yes | String representing the object's type. Objects of the same type share the same value. One of: `experiment_enrollment` |
| `id` | string | yes |  |
| `name` | string | yes |  |
| `variant` | string | yes | The variant of the Experiment that the Customer was or is assigned to, where 'a' represents the Control, and 'b' represents the Treatment. |

</details>
</details>
### Grant an entitlement to a customer

`POST /projects/{project_id}/customers/{customer_id}/actions/grant_entitlement`

Operation ID: `grant-customer-entitlement`

Grants an entitlement to a customer unless one already exists. As a side effect, a promotional subscription is created. This endpoint requires the following permission(s): <code>customer_information:customers:read_write</code>. This endpoint belongs to the <strong>Customer Information</strong> domain, which has a default rate limit of <strong>480 requests per minute</strong>.

**Parameters**

| Name | In | Required | Description |
| --- | --- | --- | --- |
| `project_id` | path | yes | ID of the project |
| `customer_id` | path | yes | ID of the customer |

**Request body**

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `entitlement_id` | string | yes | The ID of the entitlement to grant to the customer. |
| `expires_at` | integer | yes | The date after which the access to the entitlement expires in ms since epoch. |

**Responses**

- `201` — Entitlement granted successfully
- `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 `201` body**

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `object` | string | yes | String representing the object's type. Objects of the same type share the same value. One of: `customer` |
| `id` | string | yes |  |
| `project_id` | string | yes | ID of the project to which the customer belongs |
| `first_seen_at` | integer | yes | The earliest date we have for this customer, whichever comes first: when the SDK first saw them, their first purchase, the App Store install date, or when the record was created. Matches the 'First seen or purchased' date shown in the dashboard. |
| `last_seen_at` | integer | yes | The last time the customer was seen |
| `last_seen_app_version` | string | yes | The last app version the customer was seen on |
| `last_seen_country` | string | yes | The last country the customer was seen in |
| `last_seen_platform` | string | yes | The last platform the customer was seen on |
| `last_seen_platform_version` | string | yes | The last platform version the customer was seen on |
| `active_entitlements` | object | no | List of the entitlements currently active for the customer. This property is only available in the "Get a customer" endpoint. |
| `experiment` | ExperimentEnrollment | no |  |
| `attributes` | object | no | List of the attributes of the customer. This is an expandable property, only available in the "Get a customer" endpoint. |

<details><summary><code>active_entitlements</code></summary>

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `object` | string | yes | String representing the object's type. Objects of the same type share the same value. Always has the value `list`. One of: `list` |
| `items` | array of CustomerEntitlement | yes | Details about each object. |
| `next_page` | string | yes | URL to access the next page of the customer's active entitlements. If not present / null, there is no next page |
| `url` | string | yes | The URL where this list can be accessed. |

</details>

<details><summary><code>experiment</code></summary>

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `object` | string | yes | String representing the object's type. Objects of the same type share the same value. One of: `experiment_enrollment` |
| `id` | string | yes |  |
| `name` | string | yes |  |
| `variant` | string | yes | The variant of the Experiment that the Customer was or is assigned to, where 'a' represents the Control, and 'b' represents the Treatment. |

</details>

<details><summary><code>attributes</code></summary>

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `object` | string | yes | String representing the object's type. Objects of the same type share the same value. Always has the value `list`. One of: `list` |
| `items` | array of CustomerAttribute | yes | Details about each object. |
| `next_page` | string | yes | URL to access the next page of the customer's aliases. If not present / null, there is no next page |
| `url` | string | yes | The URL where this list can be accessed. |

</details>
### Revoke a granted entitlement from a customer

`POST /projects/{project_id}/customers/{customer_id}/actions/revoke_granted_entitlement`

Operation ID: `revoke-customer-granted-entitlement`

Revokes a granted entitlement from a customer. As a side effect, the promotional subscription associated with the granted entitlement is expired. This endpoint requires the following permission(s): <code>customer_information:customers:read_write</code>. This endpoint belongs to the <strong>Customer Information</strong> domain, which has a default rate limit of <strong>480 requests per minute</strong>.

**Parameters**

| Name | In | Required | Description |
| --- | --- | --- | --- |
| `project_id` | path | yes | ID of the project |
| `customer_id` | path | yes | ID of the customer |

**Request body**

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `entitlement_id` | string | yes | The ID of the granted entitlement to revoke from the customer. |

**Responses**

- `200` — Entitlement revoked successfully
- `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 `200` body**

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `object` | string | yes | String representing the object's type. Objects of the same type share the same value. One of: `customer` |
| `id` | string | yes |  |
| `project_id` | string | yes | ID of the project to which the customer belongs |
| `first_seen_at` | integer | yes | The earliest date we have for this customer, whichever comes first: when the SDK first saw them, their first purchase, the App Store install date, or when the record was created. Matches the 'First seen or purchased' date shown in the dashboard. |
| `last_seen_at` | integer | yes | The last time the customer was seen |
| `last_seen_app_version` | string | yes | The last app version the customer was seen on |
| `last_seen_country` | string | yes | The last country the customer was seen in |
| `last_seen_platform` | string | yes | The last platform the customer was seen on |
| `last_seen_platform_version` | string | yes | The last platform version the customer was seen on |
| `active_entitlements` | object | no | List of the entitlements currently active for the customer. This property is only available in the "Get a customer" endpoint. |
| `experiment` | ExperimentEnrollment | no |  |
| `attributes` | object | no | List of the attributes of the customer. This is an expandable property, only available in the "Get a customer" endpoint. |

<details><summary><code>active_entitlements</code></summary>

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `object` | string | yes | String representing the object's type. Objects of the same type share the same value. Always has the value `list`. One of: `list` |
| `items` | array of CustomerEntitlement | yes | Details about each object. |
| `next_page` | string | yes | URL to access the next page of the customer's active entitlements. If not present / null, there is no next page |
| `url` | string | yes | The URL where this list can be accessed. |

</details>

<details><summary><code>experiment</code></summary>

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `object` | string | yes | String representing the object's type. Objects of the same type share the same value. One of: `experiment_enrollment` |
| `id` | string | yes |  |
| `name` | string | yes |  |
| `variant` | string | yes | The variant of the Experiment that the Customer was or is assigned to, where 'a' represents the Control, and 'b' represents the Treatment. |

</details>

<details><summary><code>attributes</code></summary>

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `object` | string | yes | String representing the object's type. Objects of the same type share the same value. Always has the value `list`. One of: `list` |
| `items` | array of CustomerAttribute | yes | Details about each object. |
| `next_page` | string | yes | URL to access the next page of the customer's aliases. If not present / null, there is no next page |
| `url` | string | yes | The URL where this list can be accessed. |

</details>
### Assign or clear an offering override for a customer

`POST /projects/{project_id}/customers/{customer_id}/actions/assign_offering`

Operation ID: `assign-customer-offering`

This endpoint requires the following permission(s): <code>project_configuration:offerings:read</code>, <code>customer_information:customers:read_write</code>. This endpoint belongs to the <strong>Customer Information</strong> domain, which has a default rate limit of <strong>480 requests per minute</strong>.

**Parameters**

| Name | In | Required | Description |
| --- | --- | --- | --- |
| `project_id` | path | yes | ID of the project |
| `customer_id` | path | yes | ID of the customer |

**Request body**

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `offering_id` | string | yes | The ID of the offering to assign to the customer. Set to null to clear any existing override. |

**Responses**

- `200` — Offering assigned successfully
- `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

### Restore a Google Play purchase by order ID

`POST /projects/{project_id}/customers/{customer_id}/actions/restore_purchase_by_order_id`

Operation ID: `restore-purchase-by-order-id`

Restores a Google Play purchase to the specified customer using a Google Play order ID. This endpoint requires the following permission(s): <code>customer_information:customers:read_write</code>. This endpoint belongs to the <strong>Customer Information</strong> domain, which has a default rate limit of <strong>480 requests per minute</strong>.

**Parameters**

| Name | In | Required | Description |
| --- | --- | --- | --- |
| `project_id` | path | yes | ID of the project |
| `customer_id` | path | yes | ID of the customer |

**Request body**

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `order_id` | string | yes | The Google Play order ID to restore. |

**Responses**

- `200` — Purchase restored successfully
- `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 `200` body**

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `object` | string | yes | String representing the object's type. Objects of the same type share the same value. One of: `customer` |
| `id` | string | yes |  |
| `project_id` | string | yes | ID of the project to which the customer belongs |
| `first_seen_at` | integer | yes | The earliest date we have for this customer, whichever comes first: when the SDK first saw them, their first purchase, the App Store install date, or when the record was created. Matches the 'First seen or purchased' date shown in the dashboard. |
| `last_seen_at` | integer | yes | The last time the customer was seen |
| `last_seen_app_version` | string | yes | The last app version the customer was seen on |
| `last_seen_country` | string | yes | The last country the customer was seen in |
| `last_seen_platform` | string | yes | The last platform the customer was seen on |
| `last_seen_platform_version` | string | yes | The last platform version the customer was seen on |
| `active_entitlements` | object | no | List of the entitlements currently active for the customer. This property is only available in the "Get a customer" endpoint. |
| `experiment` | ExperimentEnrollment | no |  |
| `attributes` | object | no | List of the attributes of the customer. This is an expandable property, only available in the "Get a customer" endpoint. |

<details><summary><code>active_entitlements</code></summary>

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `object` | string | yes | String representing the object's type. Objects of the same type share the same value. Always has the value `list`. One of: `list` |
| `items` | array of CustomerEntitlement | yes | Details about each object. |
| `next_page` | string | yes | URL to access the next page of the customer's active entitlements. If not present / null, there is no next page |
| `url` | string | yes | The URL where this list can be accessed. |

</details>

<details><summary><code>experiment</code></summary>

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `object` | string | yes | String representing the object's type. Objects of the same type share the same value. One of: `experiment_enrollment` |
| `id` | string | yes |  |
| `name` | string | yes |  |
| `variant` | string | yes | The variant of the Experiment that the Customer was or is assigned to, where 'a' represents the Control, and 'b' represents the Treatment. |

</details>

<details><summary><code>attributes</code></summary>

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `object` | string | yes | String representing the object's type. Objects of the same type share the same value. Always has the value `list`. One of: `list` |
| `items` | array of CustomerAttribute | yes | Details about each object. |
| `next_page` | string | yes | URL to access the next page of the customer's aliases. If not present / null, there is no next page |
| `url` | string | yes | The URL where this list can be accessed. |

</details>
### Get a list of the customer's aliases

`GET /projects/{project_id}/customers/{customer_id}/aliases`

Operation ID: `list-customer-aliases`

This endpoint requires the following permission(s): <code>customer_information:customers:read</code>. This endpoint belongs to the <strong>Customer Information</strong> domain, which has a default rate limit of <strong>480 requests per minute</strong>.

**Parameters**

| Name | In | Required | Description |
| --- | --- | --- | --- |
| `project_id` | path | yes | ID of the project |
| `customer_id` | path | yes | ID of the customer |
| `starting_after` | query | no | Pagination cursor. Pass the id of the last item from the previous page to fetch the next page; omit for the first page. |
| `limit` | query | no | 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 `200` body**

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `object` | string | yes | String representing the object's type. Objects of the same type share the same value. Always has the value `list`. One of: `list` |
| `items` | array of CustomerAlias | yes | Details about each object. |
| `next_page` | string | yes | URL to access the next page of the customer's aliases. If not present / null, there is no next page |
| `url` | string | yes | The URL where this list can be accessed. |

<details><summary><code>items</code></summary>

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `object` | string | yes | String representing the object's type. Objects of the same type share the same value. One of: `customer.alias` |
| `id` | string | yes |  |
| `created_at` | integer | yes | The time when the alias was created |

</details>
### Get a list of the customer's attributes

`GET /projects/{project_id}/customers/{customer_id}/attributes`

Operation ID: `list-customer-attributes`

This endpoint requires the following permission(s): <code>customer_information:customers:read</code>. This endpoint belongs to the <strong>Customer Information</strong> domain, which has a default rate limit of <strong>480 requests per minute</strong>.

**Parameters**

| Name | In | Required | Description |
| --- | --- | --- | --- |
| `project_id` | path | yes | ID of the project |
| `customer_id` | path | yes | ID of the customer |
| `starting_after` | query | no | Pagination cursor. Pass the id of the last item from the previous page to fetch the next page; omit for the first page. |
| `limit` | query | no | 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 `200` body**

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `object` | string | yes | String representing the object's type. Objects of the same type share the same value. Always has the value `list`. One of: `list` |
| `items` | array of CustomerAttribute | yes | Details about each object. |
| `next_page` | string | yes | URL to access the next page of the customer's aliases. If not present / null, there is no next page |
| `url` | string | yes | The URL where this list can be accessed. |

<details><summary><code>items</code></summary>

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `object` | string | yes | String representing the object's type. Objects of the same type share the same value. One of: `customer.attribute` |
| `name` | string | yes | The name of the attribute. Reserved attributes are prefixed with a `$`. |
| `value` | string | yes | The value of the attribute. |
| `updated_at` | integer | yes | The time when the attribute was last updated. |

</details>
### Set a customer's attributes

`POST /projects/{project_id}/customers/{customer_id}/attributes`

Operation ID: `set-customer-attributes`

This endpoint requires the following permission(s): <code>customer_information:customers:read_write</code>. This endpoint belongs to the <strong>Customer Information</strong> domain, which has a default rate limit of <strong>480 requests per minute</strong>.

**Parameters**

| Name | In | Required | Description |
| --- | --- | --- | --- |
| `project_id` | path | yes | ID of the project |
| `customer_id` | path | yes | ID of the customer |

**Request body**

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `attributes` | array of object | yes |  |

<details><summary><code>attributes</code></summary>

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `name` | oneOf | yes | The name of the attribute |
| `value` | string | yes | The value of the attribute. Use null to delete the attribute. |

</details>
**Responses**

- `200` — Success. The customer attributes were set
- `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 `200` body**

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `object` | string | yes | String representing the object's type. Objects of the same type share the same value. Always has the value `list`. One of: `list` |
| `items` | array of CustomerAttribute | yes | Details about each object. |
| `next_page` | string | yes | URL to access the next page of the customer's aliases. If not present / null, there is no next page |
| `url` | string | yes | The URL where this list can be accessed. |

<details><summary><code>items</code></summary>

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `object` | string | yes | String representing the object's type. Objects of the same type share the same value. One of: `customer.attribute` |
| `name` | string | yes | The name of the attribute. Reserved attributes are prefixed with a `$`. |
| `value` | string | yes | The value of the attribute. |
| `updated_at` | integer | yes | The time when the attribute was last updated. |

</details>
