Skip to main content

Templates / Get all templates

Get all templates

Method: POST

https://api-prod.enotifiers.com/api/V1/service/template/getAll

Request details

API Parameters
Parameter Description Example
templateCategory
string
The category of the email template. testing_1

Curl code

Tabbed Interface
curl --location 
            'https://api-prod.enotifiers.com/api/V1/service/template/getAll' \
            --header 'accept: application/json' \
            --header 'Content-Type: application/json' \
            --header 'Authorization: Basic {{Authorization}}' \
            --data '{
              "templateCategory": "testing_1"
            }'

Success response details

API Parameters
Parameter Description Example
status
String
Indicates the success status
of the API operation
success
code
String
Provides the status code indicating
the success of the request.
200
message
String
Provides a descriptive message
indicating the outcome of the
request
All templates fetched successfully.
data.templateName
String
A string representing the name of the template test
data.templateType
String
Indicates the type of the template transactional
data.templateImage
String
A string representing the image associated with the template "/9j/4AAQSkZJRgABA..."
{
    "status": "success",
    "code": "200",
    "message": "All templates fetched successfully.",
    "data": [
        {
            "templateName": "test",
            "templateType": "transactional",
            "templateImage": "/9j/4AAQSkZJRgABAQ/9k=..."
        },
        {
            "templateName": "test_2",
            "templateType": "transactional",
            "templateImage": "/9j/4AAQSkZJRgABAQ/Z..."
        },
        {
            "templateName": "test_edit_test",
            "templateType": "transactional",
            "templateImage": "/9j/4AAQSkZJRgABAQ/9k=..."
        },
        {
            "templateName": "test123456789",
            "templateType": "transactional",
            "templateImage": "/9j/4AAQSkZJRgABAQ/2Q==..."
        }
    ]
}

Failure response details

API Parameters
Parameter Description Example
status
String
Indicates the overall status
of the API request.
failed
code
String
Provides the HTTP status code
corresponding to the failure.
400
message
String
Provides the reason for the error Template category does not exists
data.error
String
Specific error message providing
more context about the issue.
Template category not found
{
    "status": "failed",
    "code": "400",
    "message": "Template category does not exists.",
    "data": {
        "error": "Template category not found."
    }
}

Document

Policy

Terms of Use

policy

© 2024 E-Notifiers. All rights reserved.