Create a Customer API Key

Create a customer API key using Admin API. Add IP rules, name, and description for secure integration across systems and platforms.

๐Ÿ› ๏ธ Create a Customer API Key

Generate a new API key for a customer using your Admin API key. Customize the key with optional IP whitelisting, naming, and descriptions.

๐Ÿ”น HTTP Request

POST ADMIN-API-URL/customers/CUSTOMER-UID/api-keys

๐Ÿ”ธ URL Segments

Segment
Type
Required
Description

CUSTOMER-UID

string

Yes

Unique identifier of the customer

๐Ÿ” Authorization Header

X-ADMIN-API-KEY: your-admin-api-key-here

๐Ÿ’ป PHP Example

$response = $endpoint->createApiKey('ab382plq98zr7', [
  'name' => 'My site',
  'description' => 'This key is used on my site',
  'ip_whitelist' => ['123.123.123.123', '111.111.111.111'],
  'ip_blacklist' => ['231.231.231.231', '222.222.222.222']
]);

echo '<hr /><pre>';
print_r($response->body);
echo '</pre>';

๐Ÿ“ฆ Sample JSON Response

Last updated