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