Downgrade an active customer
Downgrades a customer from active to prospect status. Use this when an active customer should return to prospecting mode without full ongoing monitoring.
For the prospecting workflow and redaction rules, see Prospecting.
Request
POST /api/v1/integrations/customer/downgradeHeaders
| Header | Required | Description |
|---|---|---|
SW-PARTNER-ID | Yes | Partner organization identifier |
SW-API-KEY | Yes | Partner or distributor API key |
Content-Type | Yes | application/json |
Body
| Field | Type | Required | Description |
|---|---|---|---|
customerId | string | Yes | UUID of the active customer to downgrade |
Example
curl -X POST https://connect.safeweb.co/api/v1/integrations/customer/downgrade \
-H "Content-Type: application/json" \
-H "SW-PARTNER-ID: your-partner-id" \
-H "SW-API-KEY: your-api-key" \
-d '{
"customerId": "550e8400-e29b-41d4-a716-446655440000"
}'Responses
200 — Downgraded successfully
{
"success": true,
"message": "Customer downgraded successfully",
"customerId": "550e8400-e29b-41d4-a716-446655440000",
"status": "prospect"
}After downgrade, ongoing monitoring stops for this customer. Breach API responses and webhook payloads return to the redacted prospect format — limited to uuid, emails, and resolved per breach.
Error responses
| Status | Condition | Example error message |
|---|---|---|
400 | Invalid JSON or missing customerId | Validation failed: customerId: Customer ID is required |
401 | Missing or invalid credentials | Failed to verify org API key |
404 | Customer not found or does not belong to partner | Customer not found or does not belong to partner |
409 | Customer is already a prospect | Customer is already a prospect |
422 | Customer is not active (e.g. inactive or dormant) | Customer cannot be downgraded: customer is not active |
500 | Server error | Failed to downgrade customer |
Behaviour notes
- Only customers with
status: "active"can be downgraded through this endpoint. - Customers in
inactivestatus should use Reactivate customer to return toactive, then downgrade if needed. - Downgrade is idempotent in intent but returns
409if the customer is already aprospect. - Billing, assets, and plan configuration are preserved; downgrade only changes monitoring status and scan behaviour.
Related
Upgrade a prospect customer
Transitions a customer from prospect to active status, enabling full monitoring and detailed breach data. The customer must belong to the authenticated partner organization. Requires authentication via SW-PARTNER-ID and SW-API-KEY headers. Accepts a partner or distributor API key.
Prospecting
Onboard customers in prospect status for a one-time exposure scan with redacted breach results, then upgrade to active for full monitoring.