ProTemplates API Documentation

ProTemplates is in BETA. This means we do not have complete API documentation.

Currently the API is limited to account interaction by generating a new Authorization Key in your account, and passing the Key value as
header: X-API-KEY: KEYVALUE with your request to the endpoint.

curl --location --request GET "https://api.protemplates.io/v2/user/accounts" --header "X-API-KEY: YOUR_AUTHORIZATION_KEY"
We also have pre-defined image sources, so if you call the "add favorite" endpoint, you will also receive the image source endpoint you can re-use in your css classes! You can see all available assets in the Asset References section below.

Please note: We use passwordless autorization on our frontend, and have integrated this into the API. We are still working on the documentation for that aspect, calling the endpoint "POST, variable:email, endpoint: https://api.protemplates.io/v2/login/forgotpassword/ is currently being used to send authorization tokens to the email address.

So you can register other users into an account, your database would simply have to store the end users email address. This will be restricted access to Partners only in the future.

We pass back TRUE on success and FALSE on failure for each request. If TRUE the data specified for that endpoint will be passed back in JSON format.

We highly recommend you use Postman to test the endpoints and view the returned results. If you are new to API's this is a great opportunity to get started understanding how an API works. Our ProTemplates extension and website was designed with API first implementation. Unfortunately we didn't get it exactly right the first time so a limited number of API endpoints are currently available.

Here is a complete function calling a favorite add/removal on click event (Jquery: Ajax):

var YOUR_AUTHORIZATION_KEY='TheKeyValue';
$(".favorite").on("click", function() {
    var TemplateID = $(this).attr("id");

    if ($("#" + TemplateID).hasClass("fa-star-o")) {
        $.ajax({
            url: "https://api.protemplates.io/v2/api/favorite",
            headers: {
                'X-API-KEY': YOUR_AUTHORIZATION_KEY
            },
            type: "PUT",
            dataType: 'json',
            data: {
                id: TemplateID,
                action: "add"
            },
            success: function(response) {
                if (response.status == true) {
                    $("#" + TemplateID).removeClass("fa-star-o");
                    $("#" + TemplateID).addClass("fa-star");
                    $("#" + TemplateID).html("⭑");

                    var imgsrc = "https://images.protemplates.io/assets/img/icons/star_fav_icon.png";
                    $("#" + TemplateID).attr("src", imgsrc);

                } else {
                    alert(response.message);
                }
            }
        });

    } else {
        $.ajax({
            url: "https://api.protemplates.io/v2/api/favorite",
            headers: {
                'X-API-KEY': YOUR_AUTHORIZATION_KEY
            },
            type: "PUT",
            dataType: 'json',
            data: {
                id: $(this).attr("id"),
                action: "remove"
            },
            success: function(response) {
                if (response.status == true) {
                    $("#" + TemplateID).removeClass("fa-star");
                    $("#" + TemplateID).addClass("fa-star-o");
                    var imgsrc = "https://images.protemplates.io/assets/img/icons/star_favo_icon.png";
                    $("#" + TemplateID).attr("src", imgsrc);
                } else {
                    alert(response.message);
                }
            }
        });
    }
})
API Endpoints
Remember all of these endpoints require X-API-KEY be set in the request header, we are working on developing more endpoints:

Method
Endpoint
values
Description
POST
/v2/user/regkey
keyname
Any alphanumeric characters to generate a new key
GET
/v2/user/keys
null
Will return your list of auth keys
GET
/v2/api/templates/
null
Returns all templates in JSON format.
GET
/v2/api/templates/id/
integer
Returns the template from the id passed in JSON format.
GET
/v2/api/search/name/
[string]
Returns all template data from templates matching on template name in JSON format.
GET
/v2/user/accounts/
null
Returns account info(email, level and group) in JSON format.
GET
/V2/api/favoritetemplates
null
Returns all template data matching users favorites in JSON format.
DELETE
/v2/api/deletetemplate
id
Deletes template with id passed returns true on success.
Asset References
Type
Preview
Resource
Image
https://images.protemplates.io/assets/img/icons/star_fav_icon.png
Image
https://images.protemplates.io/assets/img/icons/star_favo_icon.png
Image
https://images.protemplates.io/assets/img/icons/copy_html_icon.png
Image
https://images.protemplates.io/assets/img/icons/copy_txt_icon.png
Image
https://images.protemplates.io/assets/img/icons/delete_icon.png
Image
https://images.protemplates.io/assets/img/icons/edit_icon.png
Image
https://images.protemplates.io/assets/img/icons/sendtoaccount_icon.png
Image
https://images.protemplates.io/assets/img/icons/share_icon.png
Image
https://images.protemplates.io/assets/img/icons/hidepass_icon.png
Image
https://images.protemplates.io/assets/img/icons/showpass_icon.png
API Expansion
If you are interested in accelerating our API develop time and forking on github, please let us know by contacting support.