Skip to main content
POST
/
identity-providers
/
{idp_id}
/
domains
C#
using Auth0Auth0;
using System.Threading.Tasks;
using Auth0Auth0.Organization.IdentityProviders;

namespace Usage;

public class Example
{
    public async Task Do() {
        var client = new Auth0Auth0Client(
            token: "<token>"
        );

        await client.Organization.IdentityProviders.Domains.CreateAsync(
            "idp_id",
            new CreateIdpDomainRequestContent {
                Domain = "my-domain.com"
            }
        );
    }

}
{
  "domain": "my-domain.com"
}

Authorizations

Authorization
string
header
required

The access token received from the authorization server in the OAuth 2.0 flow.

Path Parameters

idp_id
string
required

Identity provider identifier.

Pattern: ^con_[A-Za-z0-9]{16}$

Body

application/json
domain
string
required

Domain name.

Pattern: ^(([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]*[a-zA-Z0-9])\.)*([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9-]*[A-Za-z0-9])$

Response

Domain successfully associated with identity provider.

domain
string
required

Domain name.

Pattern: ^(([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]*[a-zA-Z0-9])\.)*([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9-]*[A-Za-z0-9])$