Business Endpoints
Register new business partners on the CekatAI platform using the partner registration endpoint.
Register Business
POST/register
Create a new business account and receive API credentials.
Authentication
This endpoint requires the x-partner-api-key header, not Bearer token authentication.
bash
curl -X POST "https://api.cekat.ai/register" \
-H "x-partner-api-key: YOUR_PARTNER_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Acme Corporation",
"email": "[email protected]",
"phone": "+62812345678",
"plan": "pro"
}'
Request Body
namestring*
Business name (2-100 characters)
emailstring*
Admin email address
phonestring*
Contact phone number in E.164 format
planstring
Subscription plan: free, pro, or business. Defaults to free
Response
201 OK
{
"success": true,
"data": {
"business_id": "biz_abc123",
"name": "Acme Corporation",
"email": "[email protected]",
"api_key": "sk_live_xxxxxxxxxxxx",
"created_at": "2025-03-27T10:00:00Z"
}
}
Error Responses
json
{
"success": false,
"error": {
"code": "VALIDATION_ERROR",
"message": "Invalid request body",
"details": [
{ "field": "email", "message": "Invalid email format" }
]
}
}
json
{
"success": false,
"error": {
"code": "DUPLICATE_BUSINESS",
"message": "A business with this email already exists"
}
}
json
{
"success": false,
"error": {
"code": "UNAUTHORIZED",
"message": "Invalid or missing x-partner-api-key"
}
}
Code Examples
javascript
const response = await fetch('https://api.cekat.ai/register', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'x-partner-api-key': 'YOUR_PARTNER_KEY'
},
body: JSON.stringify({
name: 'Acme Corporation',
email: '[email protected]',
phone: '+62812345678',
plan: 'pro'
})
});
const data = await response.json();
console.log(data.api_key); // Store this securely
