Skip to main content
PATCH
https://{tenantDomain}/api/v2
/
emails
/
provider
C#
using Auth0.ManagementApi;
using System.Threading.Tasks;
using Auth0.ManagementApi.Emails;

public partial class Examples
{
    public async Task Example() {
        var client = new ManagementClient(
            token: "<token>"
        );

        await client.Emails.Provider.UpdateAsync(
            new UpdateEmailProviderRequestContent()
        );
    }

}
package example

import (
context "context"

client "github.com/auth0/go-auth0/management/management/client"
emails "github.com/auth0/go-auth0/management/management/emails"
option "github.com/auth0/go-auth0/management/management/option"
)

func do() {
client := client.NewClient(
option.WithToken(
"<token>",
),
)
request := &emails.UpdateEmailProviderRequestContent{}
client.Emails.Provider.Update(
context.TODO(),
request,
)
}
package com.example.usage;

import com.auth0.client.mgmt.ManagementApi;
import com.auth0.client.mgmt.resources.emails.provider.requests.UpdateEmailProviderRequestContent;

public class Example {
public static void main(String[] args) {
ManagementApi client = ManagementApi
.builder()
.token("<token>")
.build();

client.emails().provider().update(
UpdateEmailProviderRequestContent
.builder()
.build()
);
}
}
<?php

namespace Example;

use Auth0\SDK\API\Management\Management;
use Auth0\SDK\API\Management\Emails\Provider\Requests\UpdateEmailProviderRequestContent;

$client = new Management(
token: '<token>',
);
$client->emails->provider->update(
new UpdateEmailProviderRequestContent([]),
);
from auth0.management import ManagementClient

client = ManagementClient(
token="<token>",
)

client.emails.provider.update()
require "auth0"

client = Auth0::Management.new(token: "<token>")

client.emails.provider.update
import { ManagementClient } from "auth0";

async function main() {
const client = new ManagementClient({
token: "<token>",
});
await client.emails.provider.update({});
}
main();
import { ManagementClient } from "auth0";

async function main() {
const client = new ManagementClient({
token: "<token>",
});
await client.emails.provider.update({});
}
main();
curl --request PATCH \
--url https://{tenantDomain}/api/v2/emails/provider \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"enabled": true,
"default_from_address": "<string>",
"credentials": {
"api_key": "<string>"
},
"settings": {}
}
'
{
  "name": "sendgrid",
  "enabled": true,
  "default_from_address": "<string>",
  "credentials": {
    "api_user": "<string>",
    "region": "<string>",
    "smtp_host": "<string>",
    "smtp_port": 123,
    "smtp_user": "<string>"
  },
  "settings": {}
}

Authorizations

Authorization
string
header
required

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

Body

name
enum<string>

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

Available options:
mailgun,
mandrill,
sendgrid,
resend,
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 | null

Specific provider setting

Response

Email provider successfully updated.

name
string
default:sendgrid

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

enabled
boolean
default: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