Skip to main content Link Menu Expand (external link) Document Search Copy Copied

auth0 email provider create

Create the email provider.

To create interactively, use auth0 email provider create with no arguments.

To create non-interactively, supply the provider name and other information through the flags.

Use --data to supply the whole payload as JSON (inline, @file.json, or piped via stdin). It is sent as-is and validated by the API. Use --schema to print the request payload schema and exit.

For a custom provider, --data must include "credentials":{}; the API rejects the request without it.

Usage

auth0 email provider create [flags]

Examples

  auth0 email provider create
  auth0 email provider create --json
  auth0 email provider create --json-compact
  auth0 email provider create --provider mandrill --enabled=true --credentials='{ "api_key":"TheAPIKey" }' --settings='{ "message": { "view_control_link": true } }'
  auth0 email provider create --provider mandrill --default-from-address='admin@example.com' --credentials='{ "api_key":"TheAPIKey" }' --settings='{ "message": { "view_control_link": true } }'
  auth0 email provider create --provider ses --credentials='{ "accessKeyId":"TheAccessKeyId", "secretAccessKey":"TheSecretAccessKey", "region":"eu" }' --settings='{ "message": { "configuration_set_name": "TheConfigurationSetName" } }'
  auth0 email provider create --provider sendgrid --credentials='{ "api_key":"TheAPIKey" }'
  auth0 email provider create --provider sparkpost --credentials='{ "api_key":"TheAPIKey" }'
  auth0 email provider create --provider sparkpost --credentials='{ "api_key":"TheAPIKey", "region":"eu" }'
  auth0 email provider create --provider mailgun --credentials='{ "api_key":"TheAPIKey", "domain": "example.com"}'
  auth0 email provider create --provider mailgun --credentials='{ "api_key":"TheAPIKey", "domain": "example.com", "region":"eu" }'
  auth0 email provider create --provider smtp --credentials='{ "smtp_host":"smtp.example.com", "smtp_port":25, "smtp_user":"smtp", "smtp_pass":"TheSMTPPassword" }'
  auth0 email provider create --provider azure_cs --credentials='{ "connection_string":"TheConnectionString" }'
  auth0 email provider create --provider ms365 --credentials='{ "tenantId":"TheTenantId", "clientId":"TheClientID", "clientSecret":"TheClientSecret" }'
  auth0 email provider create --provider custom --enabled=true --default-from-address="admin@example.com"

  # Discover the payload schema
  auth0 email provider create --schema
  auth0 email provider create --schema --json

  # JSON input mode (for agents and automation)
  auth0 email provider create --data '{"name":"sendgrid","credentials":{"api_key":"TheAPIKey"},"enabled":true}'
  auth0 email provider create --data '{"name":"custom","credentials":{},"enabled":true}'
  auth0 email provider create --data @provider.json

Flags

  -c, --credentials string            Credentials for the email provider, formatted as JSON.
      --data string                   JSON payload for the operation, as a JSON string or file path (@file.json). Can also be piped via stdin.
  -f, --default-from-address string   Provider default FROM address if none is specified.
  -e, --enabled                       Whether the provided is enabled (true) or disabled (false). (default true)
      --json                          Output in json format.
      --json-compact                  Output in compact json format.
  -p, --provider string               Provider name. Can be 'mandrill', 'ses', 'sendgrid', 'sparkpost', 'mailgun', 'smtp', 'azure_cs', 'ms365', or 'custom'
      --schema                        Print the request payload schema for this command and exit. Use with --json or --json-compact for machine-readable output.
  -s, --settings string               Settings for the email provider. formatted as JSON.

Inherited Flags

      --agent-mode      Output JSON, disable prompts and colors. Auto-enabled for AI agents; set AUTH0_AGENT_MODE=false to disable.
      --debug           Enable debug mode.
      --no-color        Disable colors.
      --no-input        Disable interactivity.
      --tenant string   Specific tenant to use.