Templates (Designs)

List Templates (designs)

List all templates you have access to with the user assigned to the credentials.

This endpoint makes an HTTP GET request to retrieve a list of templates from the specified API endpoint.

Request

  • Method: GET

  • Endpoint: https://api.creatopy.com/v1beta/templates

  • Query Parameters:

    • keyword: The keyword to search for a template name

    • projectId: Return only templates from a project

    • limit: The maximum number of templates to be returned.

    • cursor: A cursor for pagination.

    • apiGenerated: Return only designs generated by API (excluded without this true)

    • onlyTemplates: Return only designs (marked as custom templates) from a team

Response

Upon a successful execution with a status code of 200, the response will be in JSON format and will include a "response" object containing an array of "nodes" with "id" and "name" properties, as well as a "pageInfo" object with "hasNextPage" and "endCursor" properties.

Request example:

curl --location 'https://api.creatopy.com/v1beta/templates' \
--header 'Authorization: Bearer eyJ...'

Response example:

{
    "response": {
        "nodes": [
            {
                "id": "3pqqql",
                "name": "Untitled design",
                "isTemplate": true,
                "projectId": 826801,
            },
            {
                "id": "lwp7dy",
                "name": "Untitled design",
                "isTemplate": true,
                "projectId": 826801,
            },
            {
                "id": "m0rg1n",
                "name": "Car test",
                "isTemplate": true,
                "projectId": 826801,
            },
            ...
            {
                "id": "q8lx0r",
                "name": "Zapi temp 2 - long name here for testing",
                "isTemplate": false,
                "projectId": 826801,
            },
            {
                "id": "jdeglo",
                "name": "Zapi temp_300x250px_Fri Sep 01 2023 copy",
                "isTemplate": true,
                "projectId": 826801,
            },
            {
                "id": "mexkl7",
                "name": "Zapi temp_300x250px_Mon Sep 04 2023",
                "isTemplate": false,
                "projectId": 826801,
            },
            {
                "id": "ydk1lz",
                "name": "Zapi temp",
                "isTemplate": true,
                "projectId": 826801,
            },
        ],
        "pageInfo": {
            "hasNextPage": true,
            "endCursor": "eyJsaW1pdCI6NTAsImxhc3RJZCI6MzEzNDI0Mn0="
        }
    }
}

Elements

Delete Template (design)

This endpoint allows you to delete a design (template).

Request

  • Method: DELETE

  • Endpoint: https://api.creatopy.com/v1beta/templates

  • Body:

    • hash (string, required): The hash of the template(design) you want to be deleted.

Request example

curl --location --request DELETE 'https://api.creatopy.com/v1beta/templates' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer eyJhdXRobSVV6STFOa...' \
--data '{
    "hash": "rfg5d6"
}'

Response

The response will be in JSON format:

{
    "response": {
        status": "success"
    }
}

Last updated