SafeWeb API

Onboard a new customer

POST
/api/integrations/customer/onboard

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

Length1 <= length
contactEmail*string

Primary contact email address

Formatemail
customerReference*string

Unique customer reference identifier (used for partner's internal tracking)

Length1 <= length
assetsDomains*array<>

Array of domains to monitor for security issues

Items1 <= items
assetsEmails*array<>

Array of email addresses to monitor for breaches

Items1 <= items
alertRecipients*array<>

Array of email addresses that will receive security alerts

Items1 <= items
price*number

Subscription price (must be positive)

Formatdouble
Range0.01 <= value
billedFromDate*string

Billing start date in ISO 8601 format

Formatdate-time
insuranceActiveFromDate?string

Insurance coverage start date in ISO 8601 format (optional)

Formatdate-time
currencyCode*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)

Length1 <= length

Response 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"
}