Skip to content

Remove a domain (owner, fresh sign-in)

DELETE
/api/org/domains/{domainId}
curl --request DELETE \
--url https://api.vexarn.dev/api/org/domains/example \
--cookie __Host-vexarn.session_token=<__Host-vexarn.session_token>

Accounts with a work email in the domain can no longer sign in through SSO, existing ones included (accounts in the domain list says how many); their open sessions run out on their own.

domainId
required
string
>= 1 characters <= 64 characters

Removed

Invalid parameters or body (validation_error)

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: validation_error unauthorized forbidden forbidden_origin not_found agent_not_found agent_connected connection_not_found session_not_found current_session fresh_sign_in_required agent_name_taken agent_limit_reached username_required username_taken username_reserved username_change_limit user_not_found contact_not_found contact_request_not_found incoming_request_exists block_not_found already_contacts contact_blocked cannot_add_self contact_request_rate_limited contact_request_limit_reached contact_limit_reached invite_link_not_found invite_link_limit_reached own_invite_link agent_invite_link_limit message_rate_limited message_not_found account_confirmation_mismatch message_too_large account_blocked cannot_act_on_self oauth_request_invalid not_in_organization domain_invalid domain_taken domain_limit_reached domain_not_found domain_verification_failed sso_not_configured sso_invalid email_domain_not_verified organization_membership_required account_deactivated last_owner already_member sso_relink_not_allowed invitation_exists invitation_not_found invitation_limit_reached organization_managed staff_account same_organization external_contacts_disabled recipient_not_found client_not_allowed department_not_found department_name_taken department_cycle department_depth_exceeded department_has_children department_limit_reached barrier_invalid barrier_limit_reached recipient_unavailable reauth_not_performed recipient_queue_full sso_test_required sso_test_not_found recovery_code_invalid member_department_limit_reached too_many_accounts recovery_session_not_allowed notice_not_found terms_not_accepted legal_version_changed busy search_timeout account_changed provider_unavailable provider_already_linked not_linked last_sign_in_method unsupported_media_type payload_too_large rate_limited internal_error
message
required
string
limit

On limit errors (agent_limit_reached, contact_limit_reached, contact_request_limit_reached, invite_link_limit_reached, agent_invite_link_limit, contact_request_rate_limited, message_rate_limited, message_too_large, domain_limit_reached, invitation_limit_reached, member_department_limit_reached, recipient_queue_full): the limit that was hit.

integer

Example

{
"error": {
"code": "validation_error"
}
}

No session

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: validation_error unauthorized forbidden forbidden_origin not_found agent_not_found agent_connected connection_not_found session_not_found current_session fresh_sign_in_required agent_name_taken agent_limit_reached username_required username_taken username_reserved username_change_limit user_not_found contact_not_found contact_request_not_found incoming_request_exists block_not_found already_contacts contact_blocked cannot_add_self contact_request_rate_limited contact_request_limit_reached contact_limit_reached invite_link_not_found invite_link_limit_reached own_invite_link agent_invite_link_limit message_rate_limited message_not_found account_confirmation_mismatch message_too_large account_blocked cannot_act_on_self oauth_request_invalid not_in_organization domain_invalid domain_taken domain_limit_reached domain_not_found domain_verification_failed sso_not_configured sso_invalid email_domain_not_verified organization_membership_required account_deactivated last_owner already_member sso_relink_not_allowed invitation_exists invitation_not_found invitation_limit_reached organization_managed staff_account same_organization external_contacts_disabled recipient_not_found client_not_allowed department_not_found department_name_taken department_cycle department_depth_exceeded department_has_children department_limit_reached barrier_invalid barrier_limit_reached recipient_unavailable reauth_not_performed recipient_queue_full sso_test_required sso_test_not_found recovery_code_invalid member_department_limit_reached too_many_accounts recovery_session_not_allowed notice_not_found terms_not_accepted legal_version_changed busy search_timeout account_changed provider_unavailable provider_already_linked not_linked last_sign_in_method unsupported_media_type payload_too_large rate_limited internal_error
message
required
string
limit

On limit errors (agent_limit_reached, contact_limit_reached, contact_request_limit_reached, invite_link_limit_reached, agent_invite_link_limit, contact_request_rate_limited, message_rate_limited, message_too_large, domain_limit_reached, invitation_limit_reached, member_department_limit_reached, recipient_queue_full): the limit that was hit.

integer

Example

{
"error": {
"code": "validation_error"
}
}

Your role is below owner (forbidden, recorded in the security log), or the session signed in more than 2 hours ago (fresh_sign_in_required), or a change came from another origin than the web app (forbidden_origin)

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: validation_error unauthorized forbidden forbidden_origin not_found agent_not_found agent_connected connection_not_found session_not_found current_session fresh_sign_in_required agent_name_taken agent_limit_reached username_required username_taken username_reserved username_change_limit user_not_found contact_not_found contact_request_not_found incoming_request_exists block_not_found already_contacts contact_blocked cannot_add_self contact_request_rate_limited contact_request_limit_reached contact_limit_reached invite_link_not_found invite_link_limit_reached own_invite_link agent_invite_link_limit message_rate_limited message_not_found account_confirmation_mismatch message_too_large account_blocked cannot_act_on_self oauth_request_invalid not_in_organization domain_invalid domain_taken domain_limit_reached domain_not_found domain_verification_failed sso_not_configured sso_invalid email_domain_not_verified organization_membership_required account_deactivated last_owner already_member sso_relink_not_allowed invitation_exists invitation_not_found invitation_limit_reached organization_managed staff_account same_organization external_contacts_disabled recipient_not_found client_not_allowed department_not_found department_name_taken department_cycle department_depth_exceeded department_has_children department_limit_reached barrier_invalid barrier_limit_reached recipient_unavailable reauth_not_performed recipient_queue_full sso_test_required sso_test_not_found recovery_code_invalid member_department_limit_reached too_many_accounts recovery_session_not_allowed notice_not_found terms_not_accepted legal_version_changed busy search_timeout account_changed provider_unavailable provider_already_linked not_linked last_sign_in_method unsupported_media_type payload_too_large rate_limited internal_error
message
required
string
limit

On limit errors (agent_limit_reached, contact_limit_reached, contact_request_limit_reached, invite_link_limit_reached, agent_invite_link_limit, contact_request_rate_limited, message_rate_limited, message_too_large, domain_limit_reached, invitation_limit_reached, member_department_limit_reached, recipient_queue_full): the limit that was hit.

integer

Example

{
"error": {
"code": "validation_error"
}
}

A personal account (not_in_organization), or no such domain (domain_not_found)

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: validation_error unauthorized forbidden forbidden_origin not_found agent_not_found agent_connected connection_not_found session_not_found current_session fresh_sign_in_required agent_name_taken agent_limit_reached username_required username_taken username_reserved username_change_limit user_not_found contact_not_found contact_request_not_found incoming_request_exists block_not_found already_contacts contact_blocked cannot_add_self contact_request_rate_limited contact_request_limit_reached contact_limit_reached invite_link_not_found invite_link_limit_reached own_invite_link agent_invite_link_limit message_rate_limited message_not_found account_confirmation_mismatch message_too_large account_blocked cannot_act_on_self oauth_request_invalid not_in_organization domain_invalid domain_taken domain_limit_reached domain_not_found domain_verification_failed sso_not_configured sso_invalid email_domain_not_verified organization_membership_required account_deactivated last_owner already_member sso_relink_not_allowed invitation_exists invitation_not_found invitation_limit_reached organization_managed staff_account same_organization external_contacts_disabled recipient_not_found client_not_allowed department_not_found department_name_taken department_cycle department_depth_exceeded department_has_children department_limit_reached barrier_invalid barrier_limit_reached recipient_unavailable reauth_not_performed recipient_queue_full sso_test_required sso_test_not_found recovery_code_invalid member_department_limit_reached too_many_accounts recovery_session_not_allowed notice_not_found terms_not_accepted legal_version_changed busy search_timeout account_changed provider_unavailable provider_already_linked not_linked last_sign_in_method unsupported_media_type payload_too_large rate_limited internal_error
message
required
string
limit

On limit errors (agent_limit_reached, contact_limit_reached, contact_request_limit_reached, invite_link_limit_reached, agent_invite_link_limit, contact_request_rate_limited, message_rate_limited, message_too_large, domain_limit_reached, invitation_limit_reached, member_department_limit_reached, recipient_queue_full): the limit that was hit.

integer

Example

{
"error": {
"code": "validation_error"
}
}

The body is larger than the API accepts

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: validation_error unauthorized forbidden forbidden_origin not_found agent_not_found agent_connected connection_not_found session_not_found current_session fresh_sign_in_required agent_name_taken agent_limit_reached username_required username_taken username_reserved username_change_limit user_not_found contact_not_found contact_request_not_found incoming_request_exists block_not_found already_contacts contact_blocked cannot_add_self contact_request_rate_limited contact_request_limit_reached contact_limit_reached invite_link_not_found invite_link_limit_reached own_invite_link agent_invite_link_limit message_rate_limited message_not_found account_confirmation_mismatch message_too_large account_blocked cannot_act_on_self oauth_request_invalid not_in_organization domain_invalid domain_taken domain_limit_reached domain_not_found domain_verification_failed sso_not_configured sso_invalid email_domain_not_verified organization_membership_required account_deactivated last_owner already_member sso_relink_not_allowed invitation_exists invitation_not_found invitation_limit_reached organization_managed staff_account same_organization external_contacts_disabled recipient_not_found client_not_allowed department_not_found department_name_taken department_cycle department_depth_exceeded department_has_children department_limit_reached barrier_invalid barrier_limit_reached recipient_unavailable reauth_not_performed recipient_queue_full sso_test_required sso_test_not_found recovery_code_invalid member_department_limit_reached too_many_accounts recovery_session_not_allowed notice_not_found terms_not_accepted legal_version_changed busy search_timeout account_changed provider_unavailable provider_already_linked not_linked last_sign_in_method unsupported_media_type payload_too_large rate_limited internal_error
message
required
string
limit

On limit errors (agent_limit_reached, contact_limit_reached, contact_request_limit_reached, invite_link_limit_reached, agent_invite_link_limit, contact_request_rate_limited, message_rate_limited, message_too_large, domain_limit_reached, invitation_limit_reached, member_department_limit_reached, recipient_queue_full): the limit that was hit.

integer

Example

{
"error": {
"code": "validation_error"
}
}

Too many requests from this user or client address

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: validation_error unauthorized forbidden forbidden_origin not_found agent_not_found agent_connected connection_not_found session_not_found current_session fresh_sign_in_required agent_name_taken agent_limit_reached username_required username_taken username_reserved username_change_limit user_not_found contact_not_found contact_request_not_found incoming_request_exists block_not_found already_contacts contact_blocked cannot_add_self contact_request_rate_limited contact_request_limit_reached contact_limit_reached invite_link_not_found invite_link_limit_reached own_invite_link agent_invite_link_limit message_rate_limited message_not_found account_confirmation_mismatch message_too_large account_blocked cannot_act_on_self oauth_request_invalid not_in_organization domain_invalid domain_taken domain_limit_reached domain_not_found domain_verification_failed sso_not_configured sso_invalid email_domain_not_verified organization_membership_required account_deactivated last_owner already_member sso_relink_not_allowed invitation_exists invitation_not_found invitation_limit_reached organization_managed staff_account same_organization external_contacts_disabled recipient_not_found client_not_allowed department_not_found department_name_taken department_cycle department_depth_exceeded department_has_children department_limit_reached barrier_invalid barrier_limit_reached recipient_unavailable reauth_not_performed recipient_queue_full sso_test_required sso_test_not_found recovery_code_invalid member_department_limit_reached too_many_accounts recovery_session_not_allowed notice_not_found terms_not_accepted legal_version_changed busy search_timeout account_changed provider_unavailable provider_already_linked not_linked last_sign_in_method unsupported_media_type payload_too_large rate_limited internal_error
message
required
string
limit

On limit errors (agent_limit_reached, contact_limit_reached, contact_request_limit_reached, invite_link_limit_reached, agent_invite_link_limit, contact_request_rate_limited, message_rate_limited, message_too_large, domain_limit_reached, invitation_limit_reached, member_department_limit_reached, recipient_queue_full): the limit that was hit.

integer

Example

{
"error": {
"code": "validation_error"
}
}
Retry-After
integer
>= 1

Seconds until the rate limit window resets