Skip to main content
DELETE
/
api
/
profiles
/
{profileId}
Delete Profile
curl --request DELETE \
  --url https://api.example.com/api/profiles/{profileId}
{
  "message": "<string>"
}

Authentication

This endpoint requires authentication using a JWT token in the Authorization header.

Path Parameters

profileId
string
required
The unique identifier of the profile to delete

Response

message
string
required
Success message confirming profile deletion

Example Request

curl -X DELETE https://api.contafy.com/api/profiles/prof_1234567890 \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json"

Example Response

{
  "message": "Profile deleted successfully"
}

Error Responses

401 Unauthorized

{
  "error": "Unauthorized",
  "message": "Invalid or missing authentication token"
}

403 Forbidden

{
  "error": "Forbidden",
  "message": "You do not have permission to delete this profile"
}

404 Not Found

{
  "error": "Not Found",
  "message": "Profile not found"
}

409 Conflict

{
  "error": "Conflict",
  "message": "Cannot delete profile with active invoices. Please archive or transfer invoices first."
}

500 Internal Server Error

{
  "error": "Internal Server Error",
  "message": "An error occurred while deleting the profile"
}

Important Notes

  • Deleting a profile is a permanent action and cannot be undone
  • Profiles with active invoices or ongoing transactions may be protected from deletion
  • Consider archiving or freezing profiles instead of deleting them to preserve historical data
  • All associated data and configurations will be permanently removed