---
source_url: https://www.pubnub.com/docs/analytics/decisions/create-entities-as-partner
title: Create Illuminate resources for your customers
updated_at: 2026-09-30T07:20:08.000Z
---

# Create Illuminate resources for your customers

## Documentation index

To discover more PubNub resources:

1. Fetch [PubNub's llms.txt](https://www.pubnub.com/llms-full.txt) for a list of available pages in Markdown format.
2. Identify relevant URLs from that index.
3. Fetch the target pages.

Do not assume a path exists, always check the index first.

This guide shows you how to set up customer records in PubNub, assign keysets to them, and create Illuminate resources on their behalf from the Admin Portal.

If you have not completed the one-time account setup (enabling the partner feature), do that first. See [For partners](https://www.pubnub.com/docs/analytics/decisions/for-partners.md) for an overview of how the integration works.

## Before you start

Before starting, confirm you have:

* A PubNub account with access to the [Admin Portal](https://admin.pubnub.com/).
* The partner feature enabled on your account. Contact [PubNub Support](https://support.pubnub.com/) or your account executive to enable it if it is not already active.
* Your PubNub account ID. Find it in the Admin Portal under your account settings.
* If you plan to use the API: an x-session-token. Generate one:

```bash
curl --location --request POST 'https://admin.pubnub.com/api/me' \
--header 'Content-Type: application/json' \
--data-raw '{
  "email": "'$LOGIN'",
  "password": "'$PASSWORD'"
}'
```

The response includes a session token. Use it as the `x-session-token` header in all API calls below.

For the complete list of partner API operations, including keyset generation and customer listing, see [API operations for partners](https://www.pubnub.com/docs/analytics/decisions/partner-api-operations.md).

## Create a customer record

Create a record for each end customer before assigning keysets or creating Illuminate resources for them.

### Use the Partner Portal

1. Sign in to the Admin Portal and go to **Partner Portal** > **Customers**.
2. Create a new customer. Provide the customer name and a customer ID. The customer ID is your unique identifier for this customer. A customer's external ID cannot be changed after you save the customer record.
3. Save the customer.

### Use the API

```bash
curl -X POST "https://admin.pubnub.com/api/oem/customers" \
  -H "Content-Type: application/json" \
  -H "x-session-token: <portal-session-token>" \
  -d '{
    "externalId": "<customer-unique-id>",
    "name": "<customer-name>",
    "accountId": <your-PubNub-account-id>
  }'
```

Creating a customer that already exists returns `400 Bad Request` with the message `partner customer unique constraint violated`.

## Assign keysets to a customer

Assign at least one keyset to a customer before creating Illuminate resources for them. One keyset can only be assigned to one customer. A PubNub partner customer can have up to five keysets assigned to it.

### Use the Partner Portal

1. In the Partner Portal **Customers** section, open the customer record.
2. Assign one or more keysets to the customer.

### Use the API

To assign keysets, you need the PubNub-generated customer ID (not your external ID). Retrieve it:

```bash
curl -X GET "https://admin.pubnub.com/api/oem/customers?accountId=<your-PubNub-account-id>" \
  -H "x-session-token: <portal-session-token>"
```

The response includes an `id` field for each customer. Use that ID to assign keysets.

If you do not yet have a keyset to assign, create one first. Call `POST /api/keys` to generate a new keyset and get its numeric ID. See [Generate a keyset](https://www.pubnub.com/docs/analytics/decisions/partner-api-operations.md#generate-a-keyset) in the API reference for the full request. The response returns the keyset's `id`. Use that value as `keysetId1` below.

```bash
curl -X POST "https://admin.pubnub.com/api/oem/customers/<PubNub-customer-id>/keysets" \
  -H "Content-Type: application/json" \
  -H "x-session-token: <portal-session-token>" \
  -d '{
    "keysetIds": [<keysetId1>, <keysetId2>],
    "accountId": <your-PubNub-account-id>
  }'
```

Assigning a keyset that's already assigned to another customer returns `500 Internal Server Error`.

## Create Illuminate resources for a customer

Once a customer has a keyset assigned, you can create Business Objects, Decisions, and Dashboards for them from the Admin Portal.

1. Sign in to the Admin Portal and open the **Illuminate** section.
2. Use the partner drop-down to select the customer you are working on.

   The drop-down options are your company name (for your own resources), a specific customer name, all customers, or all internal and customers combined.

3. Create Business Objects, Decisions, and Dashboards for this customer following the standard steps. All resources you create are scoped to the selected customer.

The **Customer** column in each section identifies whether a resource belongs to a customer or to your organization.

For step-by-step creation instructions, see:

* [Create a Business Object](https://www.pubnub.com/docs/analytics/decisions/create-business-objects.md). Follow this tutorial, with the customer selected in the partner drop-down before you start.
* [Create a Decision](https://www.pubnub.com/docs/analytics/decisions/create-decisions.md). Follow this tutorial in the same way.
* [Create a Dashboard](https://www.pubnub.com/docs/analytics/decisions/create-dashboards.md). Follow this tutorial in the same way.

## Troubleshoot

**Customer not visible in the drop-down.** Create the customer in the Partner Portal and assign a keyset to them, then reload the drop-down.

**No apps or keysets visible after selecting a customer.** Assign keysets to this customer in the Partner Portal.

Last updated at: 2026-09-30T07:20:08.000Z
