Get allowed domains

GET https://chat.zulip.org/api/v1/realm/domains

Get the set of allowed domains configured in the organization for user account email addresses.

As each Zulip user account is associated with an email address, organization owners can restrict new account creation (and email changes) to email addresses with these domains.

Usage examples

The -u line implements HTTP Basic authentication. See the Authorization header documentation for how to get those credentials for Zulip users and bots.

curl -sSX GET -G https://chat.zulip.org/api/v1/realm/domains \
    -u EMAIL_ADDRESS:API_KEY

Parameters

This endpoint does not accept any parameters.

Response

Return values

  • domains: (object)[]

    A list of objects containing details of each domain allowed for user account email addresses.

    • domain: string

      The allowed domain.

    • allow_subdomains: boolean

      Whether subdomains are allowed for this domain.

Example response(s)

Changes: As of Zulip 7.0 (feature level 167), if any parameters sent in the request are not supported by this endpoint, a successful JSON response will include an ignored_parameters_unsupported array.

A typical successful JSON response may look like:

{
    "domains": [
        {
            "allow_subdomains": false,
            "domain": "example.com"
        }
    ],
    "msg": "",
    "result": "success"
}