Update Email Settings Config
Due to SMTP updates, this API has been removed. A new API will be provided when available.
Use this API to update the Email Settings config.
Resource URL
https://<subdomain>/api/2/branding/email_settings
Header Parameters
Authorization required string | Set to Set The access token must have been generated using an API credential pair created using the scope required to call this API. This API can be called using any one of the following scopes: |
Content-Type required string |
Set to application/json . |
Update Email Settings Event
When you update the Email Settings config, it produces an Event in the OneLogin admin portal. To view the event, in the admin portal go to Activity > Events.
The event pictured below informs the admin that the operation succeeded.
Request Parameters
address | string | Required. Email Settings server address |
domain | string | Required. Domain of the From address. |
from | string | Required. The From email address in the message. |
port | integer | Optional. Defaults to 2.5. |
user_name | string | Optional. The user name of the account to authenticate with the Email Settings server. |
password | string | Optional. The password of the account to authenticate with the Email Settings server. |
use_tls | boolean | Optional. Defaults to true . |
authentication | string | Optional. The authentication type. |
Sample Request Body
{
"address": "smtp.sendgrid.net",
"use_tls": true,
"from": "email@example.com",
"domain": "example.com",
"user_name": "user-name",
"password": "password",
"authentication": "login",
"port": 587
}
Sample Responses
- 200 Ok
- 401 Unauthorized
- 422 Unprocessable Entity
{
"message": "Settings Updated",
"statusCode": 200,
"name": "Success"
}
Typically, this error means that your Authorization
header value is missing or incorrectly formatted. The Authorization
header value should use this format: bearer:<access_token>
.
{
"message": "Unauthorized",
"statusCode": 401,
"name": "UnauthorizedError"
}
Indicates that the syntax of the request is good but a value supplied is not valid.
{
"message": "Validation failed",
"statusCode": 422,
"name": "UnprocessableEntityError"
}
Postman Collection
Replace sample variables indicated by {{ }}
with your actual values.
Download for the Branding API
Sample Code
cURL
Replace sample values indicated by < >
with your actual values.
Update Email Settings Config
curl 'https://<subdomain>/api/2/branding/email_settings' \
-X PUT \
-H "Authorization: bearer <access_token>" \
-H "Content-Type: application/json" \
-d '{
"address": ""smtp.sendgrid.net",
"domain": "example.com",
"from": "email@example.com"
}'
Have a Question?
Found a problem or a bug? Submit a support ticket.
Looking for walkthroughs or how-to guides on OneLogin's user and admin features? Check out the documentation in our Knowledge Base.
Have a product idea or request? Share it with us in our Ideas Portal.