Create Customer API
This API endpoint allows you to create a new customer account along with one or more brands. You must provide user details for the primary admin and at least one brand object. The brand_image field is optional (URL to brand logo). On success, a redirect URL (login key) and the new customer ID are returned.
- Method: POST
- Endpoint:
/api/api-services/v1/brand-service/create-customer - Authentication: Required (Bearer token from Authenticate User API)
- Returns: Redirect URL and customer ID on success
Create Customer
POST https://app.brand2social.com/api/api-services/v1/brand-service/create-customer
Example Request Body (JSON)
Visual examples of similar API requests in tools like Postman and cURL:
| Field | Type | Required | Description | ||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| user_details | object | Yes | Primary user/admin details | ||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||
| brand_details | array[object] | Yes (min 1) | List of brands to create | ||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||
curl --location 'https://app.brand2social.com/api/api-services/v1/brand-service/create-customer' \
--header 'Authorization: Bearer B2S_dummyToken' \
--header 'Content-Type: application/json' \
--data-raw '{
"user_details": {
"email_address": "demo@example.com",
"password": "demo@example.com",
"timezone": "Asia/Kolkata",
"first_name": "Demo"
},
"brand_details": [
{
"brand_name": "DemoBrand",
"brand_image": "https://example.com/logo.png",
"timezone": "Asia/Kolkata",
"brand_limitation": {
"social_account_limit": 1,
"users_limit": 1,
"ai_content_tokens": 1,
"ai_image_token": 1
}
}
]
}'Response
{
"status": "SUCCESS",
"http_code": 200,
"message": "Successfully created new customer",
"data": {
"redirect_url": "https://app.brand2social.com/login?login_key=unique-login-key",
"customer_id": "cust_abc123xyz"
}
}Note: This endpoint is typically used by resellers or agencies to provision new client accounts programmatically.