list_user_email_domains

UserEmailDomainManagementApi.list_user_email_domains(role_id, _request_timeout=None, _request_auth=None, _content_type=None, _headers=None, _host_index=0)

List allowed user email domains

Returns the allow-listed email domains used when creating users, plus LastModifiedBy and LastModifiedTime. Requires system-settings.view.

Parameters:
  • role_id (str) – Amorphic role ID the request is authorized against. Must be a role the user belongs to. Used for permission checks and audit logs. (required)

  • _request_timeout (int, tuple(int, int), optional) – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.

  • _request_auth (dict, optional) – set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request.

  • _content_type (str, Optional) – force content-type for the request.

  • _headers (dict, optional) – set to override the headers for a single request; this effectively ignores the headers in the spec for a single request.

  • _host_index (int, optional) – set to override the host_index for a single request; this effectively ignores the host_index in the spec for a single request.

Return type:

ListUserEmailDomainsResponse

Returns:

Returns the result object.

Request and Response Examples

HTTP: GET /user-domains

Success (HTTP 200)

Domains is the stored list (comma-split). Empty store returns an empty list. LastModifiedBy is System when the LastModifiedBy tag is missing.

Allow-listed domains

{
  "Domains": [
    "example.com",
    "corp.example.com"
  ],
  "LastModifiedBy": "adminuser",
  "LastModifiedTime": "2026-08-14 10:15:30.123456+00:00"
}

Errors

Documented error codes: AUTH-1001, AUTH-1030, RTE-1001, EMF-1001.

HTTP 400

AUTH-1001 when role_id is missing. AUTH-1030 when the role lacks system-settings.view.

Missing role_id

{
  "Message": "AUTH-1001 - Missing role information in event header"
}

Missing permission

{
  "Message": "AUTH-1030 - User is not authorized to list user email domains due to the following missing permission(s) - {'system-settings': ['view']}"
}

HTTP 500

Uncaught Exception formatted as RTE-1001 via EMF-1001.

Uncaught Exception

{
  "Message": "RTE-1001 - ParameterNotFound."
}