Get Message Template
Early Preview
This API is in early preview and may be subject to change. Please contact your account manager if you are interested in trying the Branding API.
Use this API to retrieve a single message template.
Resource URL
https://<subdomain>/api/2/branding/brands/:brand_id/templates/:template_id
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: In order to use the Branding API your API Credentials must be created after 21st October 2020. |
Content-Type required string |
Set to application/json . |
Resource Parameters
brand_id required integer |
Unique identifier for the branding object. |
template_id required integer |
Unique identifier for the template to return. |
Sample Responses
- 200 Ok
- 401 Unauthorized
- 404 Not Found
{
"id": 544880,
"account_id": 118462,
"locale": "en",
"type": "email_code_app_verification",
"template_class": "email_template",
"template": {
"subject": "Email MFA App Verification Code",
"html": "<html><head></head><body><p>Here is the code: {{otp_code}}</p></body></html>",
"plain": "Here is the code: "
},
"updated_at": "2021-11-24T21:25:29.480Z",
"brand_id": 5
}
{
"name": "UnauthorizedError",
"message": "The request requires user authentication."
}
{
"name": "NotFoundError",
"message": "Unknown Content Template type: \"544880\"",
"statusCode": 404
}
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.
Get Account Brand
curl 'https://<subdomain>/api/2/branding/brands/:id/templates/:template_id' \
-X GET \
-H "Authorization: bearer <access_token>"
-H "Content-Type: application/json" \
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.