Endpoint Details
POST
/api/v0/customers
Idempotency: Supported (recommended for customer creation)
Rate Limiting: Subject to standard API rate limits
Authentication
All requests require API key authentication using the following headers:x-client-key
: Your application’s client keyx-client-secret
: Your application’s client secret
Idempotency
Include an idempotency key to prevent duplicate customer creation:idempotency-key
: Include a unique UUID v4 in the header- Subsequent requests with the same key return the original response
- Keys expire after 24 hours
Request Parameters
Required Parameters
Customer’s first name for personalization and legal documentation
Constraints: 1-100 characters
Example:
Constraints: 1-100 characters
Example:
"John"
Customer’s last name for personalization and legal documentation
Constraints: 1-100 characters
Example:
Constraints: 1-100 characters
Example:
"Doe"
Customer’s phone number with country code for notifications
Constraints: Max 20 characters, valid format
Example:
Constraints: Max 20 characters, valid format
Example:
"+1-555-123-4567"
Optional Parameters
Customer’s email address for notifications and receipts
Constraints: Valid email format, max 255 characters
Example:
Constraints: Valid email format, max 255 characters
Example:
"john.doe@example.com"
Type of customer account affecting features and compliance
Values:
Default:
Example:
Values:
"Individual"
, "Startup"
, "Small Business"
, "Medium Business"
, "Enterprise"
, "Non-Profit"
, "Government"
Default:
"Individual"
Example:
"Business"
Current status controlling access to services
Values:
Default:
Example:
Values:
"ACTIVE"
, "BLACKLISTED"
, "DEACTIVATED"
Default:
"ACTIVE"
Example:
"ACTIVE"
Customer Types
Thecustomer_type
field accepts the following values:
Type | Description |
---|---|
Individual | Personal customer account (default) |
Startup | Early-stage business customer |
Small Business | Small business customer |
Medium Business | Medium-sized business customer |
Enterprise | Enterprise-level customer |
Non-Profit | Non-profit organization |
Government | Government entity |
Customer Status Values
Thestatus
field accepts these enum values:
Status | Description |
---|---|
ACTIVE | Customer can access all services (default) |
BLACKLISTED | Customer is blocked from services |
DEACTIVATED | Customer account is deactivated |
Request Examples
Response Format
Success Response (201 Created)
Response Fields
Unique customer identifier (UUID)
Customer’s first name
Customer’s last name
Customer’s email address (nullable)
Customer’s phone number
Type of customer account
Current customer status
Last transaction amount (default: 0)
Date of last purchase (nullable)
Associated application ID
Customer creation timestamp (ISO 8601)
Last update timestamp (ISO 8601)
Error Responses
Validation Rules
Phone Number Format
- Must include country code (recommended format:
+[country-code]-[number]
) - Accepts numbers, spaces, hyphens, and parentheses
- Maximum 20 characters
- Examples:
+1-555-123-4567
,+44 20 7946 0958
,+33 1 42 86 83 26
Email Validation
- Must be valid email format when provided
- Maximum 255 characters
- Case-insensitive storage
- Must be unique per application
Name Validation
- Both first and last names required
- 1-100 characters each
- Cannot be empty strings
- Leading/trailing spaces automatically trimmed
Business Logic
Duplicate Prevention
- Email addresses must be unique within your application scope
- Phone numbers can be duplicated (multiple customers can share numbers)
- System checks for existing emails before creation
Default Values
status
defaults to"ACTIVE"
if not providedcustomer_type
defaults to"Individual"
if not providedlast_spent
initializes to0
last_purchase_date
initializes tonull
Audit Trail
Every customer creation is automatically logged with:- User who created the customer
- Timestamp of creation
- Customer details
- Request metadata (IP, user agent)
Use Cases
1. E-commerce Registration
Register new customers for payment processing and order management.2. Subscription Services
Store customer information for recurring payments and billing cycles.3. B2B Transactions
Create business customers with appropriate types for enterprise features.4. International Business
Support customers from different countries with proper phone number formats.5. Customer Relationship Management
Build comprehensive customer profiles for personalized experiences.Best Practices
1. Use Idempotency Keys
Always include idempotency keys to prevent duplicate customer creation during retries.2. Validate Data Client-Side
Implement client-side validation to reduce API calls and improve user experience.3. Handle Duplicates Gracefully
Check for existing customers before creation or handle duplicate email errors appropriately.4. Store Customer IDs
Save the returned customer ID for future transactions and references.5. International Support
Always include country codes in phone numbers for proper SMS delivery.6. Privacy Compliance
Ensure you have proper consent before storing customer data, especially emails.Integration Examples
Related Endpoints
- List Customers - Get customers with filtering
- Fetch Customer - Get specific customer details
- Update Customer - Update customer information
- Blacklist Customer - Blacklist customer access
- Delete Customer - Remove customer records
Support
For technical support or questions about customer management:- Review error responses for specific guidance
- Check validation rules for data format requirements
- Contact support with your application ID and customer ID for faster assistance
- Monitor rate limits to avoid throttling
For more information, see: