Delete User
Delete an existing user and their associated workspace from your super-user/enterprise account. This endpoint allows superusers/enterprise to remove user accounts when needed.
API Endpoint
POST delete-userAuthentication
This endpoint requires SuperUser/Enterprise API key authentication. Include your API key in the request headers:
sivi-api-key: YOUR_API_KEYRequest Body
{
"abstractUserId": "281743-2322-34i44sd3-dkfjgdkjf292"
}Request Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| abstractUserId | string | Yes | Unique identifier for the user to delete |
Response
Successful Deletion
{
"status": 200,
"body": {
"message": "Successfully deleted the user"
}
}User Not Found
{
"status": 400,
"body": {
"message": "User does not exists"
}
}Authentication Error
{
"status": 401,
"body": {
"message": "Failed to authenticate request. Please add sivi-api-key header in request"
}
}Invalid Input
{
"status": 422,
"body": {
"message": "Invalid input"
}
}Usage Notes
- This operation permanently deletes a user and their workspace
- All designs, content, and settings associated with the user will be irreversibly removed
- This action cannot be undone
- If the user doesn't exist in Sivi's system, the operation will fail with a 400 status code
Example
curl -X POST "https://connect.sivi.ai/api/prod/v2/super/delete-user" \
-H "sivi-api-key: YOUR_SUPER_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"abstractUserId": "user-12345"
}'User Deletion Flow
The following flowchart illustrates the user deletion process:
flowchart TD
A[SuperUser] --> B{Call Delete User API}
B -->|User exists| C[Delete User]
B -->|User doesn't exist| D[Return Error]
C --> E[Delete User Data]
E --> F[Delete Workspace]
F --> G[Return Success]
D --> H[Return 400 Error]Related APIs
- Login User - Create a new user or login an existing user
