Passer au contenu principal
PATCH
/
emails
/
provider
TypeScript
import { ManagementClient } from "auth0";

async function main() {
    const client = new ManagementClient({
        token: "<token>",
    });
    await client.emails.provider.update({});
}
main();
{
  "name": "sendgrid",
  "enabled": true,
  "default_from_address": "<string>",
  "credentials": {
    "api_user": "<string>",
    "region": "<string>",
    "smtp_host": "<string>",
    "smtp_port": 123,
    "smtp_user": "<string>"
  },
  "settings": {}
}

Autorisations

Authorization
string
header
requis

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Corps

name
enum<string>

Name of the email provider. Can be mailgun, mandrill, sendgrid, ses, sparkpost, smtp, azure_cs, ms365, or custom.

Options disponibles:
mailgun,
mandrill,
sendgrid,
ses,
sparkpost,
smtp,
azure_cs,
ms365,
custom
enabled
boolean

Whether the provider is enabled (true) or disabled (false).

default_from_address
string

Email address to use as "from" when no other address specified.

credentials
object

Credentials required to use the provider.

settings
object

Specific provider setting

Réponse

Email provider successfully updated.

name
string
défaut:sendgrid

Name of the email provider. Can be mailgun, mandrill, sendgrid, ses, sparkpost, smtp, azure_cs, ms365, or custom.

enabled
boolean
défaut:true

Whether the provider is enabled (true) or disabled (false).

default_from_address
string

Email address to use as "from" when no other address specified.

credentials
object

Credentials required to use the provider.

settings
object

Specific provider setting