{
  "success": true,
  "message": "Customer successfully deleted",
  "deletedAt": "2024-03-22T16:45:30Z",
  "customerId": "550e8400-e29b-41d4-a716-446655440000"
}
The Delete Customer endpoint permanently removes customer records from your application. This operation is irreversible and should be used with extreme caution. All associated data including transaction history, payment methods, and related records will be affected. This endpoint is primarily used for compliance with data protection regulations like GDPR or for removing test/duplicate customer records.
Irreversible Operation: Customer deletion is permanent and cannot be undone. Ensure you have proper authorization and backup procedures before proceeding.

Endpoint Details

method
string
DELETE
url
string
/api/v0/customers/{id}
Authentication: Required (API Key & Secret)
Idempotency: Supported (recommended for delete operations)
Rate Limiting: Subject to standard API rate limits
Audit Logging: All deletion operations are automatically logged

Authentication

All requests require API key authentication using the following headers:
  • x-client-key: Your application’s client key
  • x-client-secret: Your application’s client secret

Idempotency

Include an idempotency key to ensure delete operations are safely retryable:
  • 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

Path Parameters

id
string
required
Customer’s unique identifier (UUID)
Format: UUID v4
Example: "550e8400-e29b-41d4-a716-446655440000"

Request Examples

curl -X DELETE "https://api.devdraft.ai/api/v0/customers/550e8400-e29b-41d4-a716-446655440000" \
  -H "x-client-key: YOUR_CLIENT_KEY" \
  -H "x-client-secret: YOUR_CLIENT_SECRET" \
  -H "idempotency-key: $(uuidgen)"

Response Format

Success Response (200 OK)

{
  "success": true,
  "message": "Customer successfully deleted",
  "deletedAt": "2024-03-22T16:45:30Z",
  "customerId": "550e8400-e29b-41d4-a716-446655440000"
}

Error Responses

{
  "statusCode": 404,
  "message": "Customer not found",
  "error": "Not Found"
}

Use Cases

1. GDPR Compliance

Remove customer data upon valid erasure requests.

2. Test Data Cleanup

Clean up test customer records from development environments.

3. Account Closure

Permanently remove customers who have closed their accounts.

Safety Measures

Important Reminder: Customer deletion is irreversible. Always verify the customer ID and ensure you have proper authorization before proceeding.

Support

For technical support or questions about deleting customers:
  • Ensure you have proper authorization before deleting customers
  • Contact support for guidance on bulk deletion operations
  • Maintain audit logs of all deletion activities