Create a new customer

Creates a new OEM customer record in your partner account.

Best practices:

  • Use your own customer/tenant ID as the externalId for easy cross-referencing
  • The externalId must be unique across your account
  • You can assign keysets during creation or add them later via the assign keysets endpoint
Header Parameters
PubNub-Version string REQUIRED

Possible values: [2026-02-09]

Request Body REQUIRED
externalId maxLength(255) REQUIRED

Possible values: length ≤ 255, Value must match regular expression ^[a-zA-Z0-9_-]+$

A unique external identifier for the customer (URL-safe alphanumeric, hyphens, and underscores)

keysetIds number[]

Optional array of keyset IDs to assign to the customer upon creation

name maxLength(255) REQUIRED

Possible values: length ≤ 255

The display name for the customer (max 255 characters)

Responses
200

Success

Schema OPTIONAL
result object
id string
externalId string
name string
created string

a string to be decoded into a Date

updated string

a string to be decoded into a Date

keysets object[]
id number
assignedAt string

a string to be decoded into a Date

400

Bad Request Error

Schema OPTIONAL
statusCode number
error string

Possible values: [BadRequest]

message string[]
401

UnauthorizedError

Schema OPTIONAL
statusCode number
error string

Possible values: [Unauthorized]

message string[]
403

ForbiddenError

Schema OPTIONAL
statusCode number
error string

Possible values: [Forbidden]

message string[]
500

InternalErrorError

Schema OPTIONAL
statusCode number
error string

Possible values: [InternalError]

message string[]
* required
PubNub-Version*
Type: string
Possible values: [2026-02-09]
* required
externalId*
Type: string
A unique external identifier for the customer (URL-safe alphanumeric, hyphens, and underscores)
≤ 255 charsPattern: ^[a-zA-Z0-9_-]+$
keysetIds
Type: array
Optional array of keyset IDs to assign to the customer upon creation
Array items:
items
Type: number
name*
Type: string
The display name for the customer (max 255 characters)
≤ 255 chars
result
Type: object
statusCode
Type: number
error
Type: string
Enum (1 values)
View all values
"BadRequest"
message
Type: array
Array items:
items
Type: string
statusCode
Type: number
error
Type: string
Enum (1 values)
View all values
"Unauthorized"
message
Type: array
Array items:
items
Type: string
statusCode
Type: number
error
Type: string
Enum (1 values)
View all values
"Forbidden"
message
Type: array
Array items:
items
Type: string
statusCode
Type: number
error
Type: string
Enum (1 values)
View all values
"InternalError"
message
Type: array
Array items:
items
Type: string