Skip to content

Users

Deletes a user from Instaply by their email address.

POST https://me.instaply.com/api/user/delete-by-email

  • token — Authentication token provided by Instaply.

See Authentication for the full set of required headers.

{
"email": "user@test.com"
}
  • email (string) — The email address of the user to delete.
Terminal window
curl --location --request POST "https://me.instaply.com/api/user/delete-by-email" \
--header "token: <to-be-provided-by-instaply>" \
--header "Content-Type: application/json" \
--data-raw '{
"email": "user@test.com"
}'
  • Authorization
    • The provided token determines the organization context.
    • Clients can only delete users belonging to their own organization.
    • The API token must include the user:delete permission.
    • If you intend to use this endpoint, ask your Instaply CSM to enable user:delete for your API token.
  • Business rules
    • A user cannot be deleted if they are the last customer representative (contactable employee) in any business.
    • A user cannot be deleted if they are the last member of an escalation pool for a business.
    • Attempting to delete in these scenarios will return an error response.
{
"status": "success",
"deletedUserId": "1388838",
"email": "user@test.com"
}
{
"error": "User not found in organization"
}
{
"body": [
{
"message": "is missing and not optional",
"property": "@.email"
}
],
"headers": []
}

Last customer representative for at least one business (400)

Section titled “Last customer representative for at least one business (400)”
{
"error": "User cannot be deleted as they are the last customer representative in one or more businesses"
}
{
"error": "User cannot be deleted as they are the last person in the escalation pool for business 123"
}