Onboard a new customer
Authorization
PartnerAuth SW-API-KEY<token>
Partner authentication requires two headers:
- SW-PARTNER-ID: Your partner organization identifier
- SW-API-KEY: Your API authentication key
In: header
Request Body
application/json
companyName*string
Name of the customer company
Length
1 <= lengthcontactEmail*string
Primary contact email address
Format
emailcustomerReference*string
Unique customer reference identifier (used for partner's internal tracking)
Length
1 <= lengthassetsDomains*array<>
Array of domains to monitor for security issues
Items
1 <= itemsassetsEmails*array<>
Array of email addresses to monitor for breaches
Items
1 <= itemsalertRecipients*array<>
Array of email addresses that will receive security alerts
Items
1 <= itemsprice*number
Subscription price (must be positive)
Format
doubleRange
0.01 <= valuebilledFromDate*string
Billing start date in ISO 8601 format
Format
date-timeinsuranceActiveFromDate?string
Insurance coverage start date in ISO 8601 format (optional)
Format
date-timecurrencyCode*string
Currency code for billing
Value in
"AUD" | "GBP" | "USD"planType*string
Service plan tier
Value in
"safeweb-basic" | "safeweb-plus" | "safeweb-pro"enrolType*string
Enrollment type for the customer
Value in
"opt-in" | "opt-out"sendMonthlyReport*boolean
Whether to send monthly security reports to the customer
localeCode*string
Locale code for customer communications (e.g., en-GB, en-US, da-DK)
Length
1 <= lengthResponse Body
application/json
application/json
application/json
application/json
curl -X POST "https://api.safeweb.co/api/integrations/customer/onboard" \ -H "Content-Type: application/json" \ -d '{ "companyName": "Acme Corporation", "contactEmail": "contact@acme.co", "customerReference": "ACME-001", "assetsDomains": [ "acme.co", "www.acme.co" ], "assetsEmails": [ "admin@acme.co", "security@acme.co" ], "alertRecipients": [ "alerts@acme.co" ], "price": 49.99, "billedFromDate": "2026-02-01T00:00:00.000Z", "currencyCode": "USD", "planType": "safeweb-basic", "enrolType": "opt-in", "sendMonthlyReport": true, "localeCode": "en-GB" }'{
"success": true,
"message": "Customer onboarded successfully",
"customerId": "550e8400-e29b-41d4-a716-446655440000"
}{
"success": false,
"error": "Invalid JSON in request body"
}{
"success": false,
"error": "Partner ID and API key are required in headers"
}{
"success": false,
"error": "Failed to onboard customer"
}