GET
/
templates
/
all
Note: This operation does not consume any account credits, but rate limits apply.

Retrieve All Templates

This endpoint retrieves all templates belonging to the authenticated user. You can optionally sort the results by fields such as updatedAt.

Request

  • Endpoint: GET /templates/all
  • Authorization: Bearer token required

Query Parameters

  • sort (string, optional): Sort behavior, either by the date the template was created (createdAt) or when it was last updated (updatedAt). Defaults to updatedAt.
  • order (string, optional): Sort order, either ascending (asc) or descending (desc). Defaults to desc.

Response

A successful response will return an array of templates.

Example Response

[
   {
      "id": "template123",
      "name": "Sample Template",
      "createdAt": "2024-09-12T02:44:45.213Z",
      "updatedAt": "2024-09-13T02:44:45.213Z"
   },
   {
      "id": "template456",
      "name": "Another Template",
      "createdAt": "2024-09-10T02:44:45.213Z",
      "updatedAt": "2024-09-11T02:44:45.213Z"
   }
]

Authorizations

Authorization
string
headerrequired

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Query Parameters

sort
string
default: updatedAt

Sort behavior, either by the date the template was created (createdAt) or when it was last updated (updatedAt).

order
enum<string>
default: desc

Sort order, either ascending ('asc') or descending ('desc').

Available options:
asc,
desc

Response

200 - application/json
id
string

The ID of the template

name
string

The name of the template

createdAt
string

The date and time when the template was created

updatedAt
string

The date and time when the template was last updated