SafeWeb API

Onboard a new customer

POST
/api/integrations/customer/onboard

Header Parameters

SW-PARTNER-ID*string

Partner organization identifier

SW-API-KEY*string

API authentication key

Request Body

application/json

companyName*string

Name of the customer company

Length1 <= length
contactEmail*string

Primary contact email address. Will be automatically added to assetsEmails if not already present.

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. Optional, but at least one of assetsDomains or assetsEmails must be provided.

assetsEmails?array<>

Array of email addresses to monitor for breaches. Optional, but at least one of assetsDomains or assetsEmails must be provided. The contactEmail is automatically added if not present.

alertRecipients*array<>

Array of email addresses that will receive security alerts. At least one is required.

Items1 <= items
price*number

Subscription price (must be greater than or equal to 0)

Formatdouble
Range0 <= value
billedFromDate*string

Billing start date in ISO 8601 format. Must be a future date.

Formatdate-time
currencyCode*string

Currency code for billing

Value in"AUD" | "GBP" | "USD"
planType?string

Service plan tier. Defaults to safeweb-basic if not provided.

Default"safeweb-basic"
Value in"safeweb-basic" | "safeweb-plus"
enrolType?string

Enrollment type for the customer. Defaults to opt-out if not provided.

Default"opt-out"
Value in"opt-in" | "opt-out"
sendMonthlyReport?boolean

Whether to send monthly security reports to the customer. Defaults to false.

Defaultfalse
localeCode?string

Locale code for customer communications (e.g., en-GB, en-US, da-DK). Defaults to en-GB.

Default"en-GB"
Length1 <= length

Response Body

application/json

application/json

application/json

application/json

curl -X POST "https://connect.safeweb.co/api/integrations/customer/onboard" \  -H "SW-PARTNER-ID: string" \  -H "SW-API-KEY: string" \  -H "Content-Type: application/json" \  -d '{    "companyName": "Acme Corporation",    "contactEmail": "contact@acme.co",    "customerReference": "ACME-001",    "assetsDomains": [      "acme.co",      "www.acme.co"    ],    "alertRecipients": [      "alerts@acme.co"    ],    "price": 49.99,    "billedFromDate": "2026-06-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"
}