---
agentTools:
  projectIndex: https://moorse.readme.io/llms.txt
---

# Listagem de Templates

Essa rota é utilizada para listagem de templates.

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "Moorse",
    "version": "1.0"
  },
  "servers": [
    {
      "url": "https://api.moorse.io"
    }
  ],
  "components": {
    "securitySchemes": {
      "sec0": {
        "type": "oauth2",
        "flows": {
          "clientCredentials": {
            "tokenUrl": "https://example.com/oauth2/token",
            "scopes": {}
          }
        }
      }
    }
  },
  "security": [
    {
      "sec0": []
    }
  ],
  "paths": {
    "/v1/templates": {
      "get": {
        "summary": "Listagem de Templates",
        "description": "Essa rota é utilizada para listagem de templates.",
        "operationId": "templates",
        "parameters": [
          {
            "name": "integrationId",
            "in": "query",
            "description": "Id da integração que está associado os templates",
            "schema": {
              "properties": {},
              "type": "object"
            }
          },
          {
            "name": "name",
            "in": "query",
            "description": "Nome do template",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "status",
            "in": "query",
            "description": "Status do template. Os status tem os seguintes valores: SUBMITTED(enviado), APPROVED(aprovado), REJECTED(rejeitado)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "type",
            "in": "query",
            "description": "Tipo do template. Os tipos tem os seguintes valores: STANDARD(template apenas com um mensagem de texto), MEDIA_INTERACTIVE(template composto por imagem, texto, botões, URLs)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "category",
            "in": "query",
            "description": "Categoria do template. As categorias indicam o que significa a notificação que vai ser enviada. Ela possui os seguintes valores: ACCOUNT_UPDATE, PAYMENT_UPDATE, PERSONAL_FINANCE_UPDATE, SHIPPING_UPDATE, RESERVATION_UPDATE, ISSUE_RESOLUTION, APPOINTMENT_UPDATE, TRANSPORTATION_UPDATE, TICKET_UPDATE, ALERT_UPDATE, AUTO_REPLY",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n  \"data\": {\n    \"content\": [\n      {\n        \"id\": \"99ecb91b-f0b9-4ebb-ac04-ce6153546542\",\n        \"creationDate\": \"2022-03-21T17:36:11.961705\",\n        \"lastUpdateDate\": \"2022-03-21T17:36:11.961741\",\n        \"clientId\": \"0ea4ea08-9d94-4fd0-9648-9ea5c737786a\",\n        \"name\": \"teste_dev_template_3\",\n        \"description\": \"teste_dev_template_3\",\n        \"integrationId\": \"aa039027-71e2-4b5c-9834-2cb8d001eb5a\",\n        \"type\": \"STANDARD\",\n        \"status\": \"APPROVED\",\n        \"rejectedReason\": \"\",\n        \"templateFb\": \"{\\\"namespace\\\":\\\"0b040fac_f670_4f69_a1f8_4b58bc66a5c1\\\",\\\"name\\\":\\\"teste_dev_template_3\\\",\\\"category\\\":\\\"ALERT_UPDATE\\\",\\\"language\\\":\\\"pt_BR\\\",\\\"status\\\":\\\"approved\\\",\\\"components\\\":[{\\\"type\\\":\\\"BODY\\\",\\\"text\\\":\\\"SEja bem vindo {{1}}, vem compra com a {{2}}\\\"}],\\\"rejected_reason\\\":\\\"\\\"}\"\n      },\n      {\n        \"id\": \"a848ab1d-e3bb-4668-8925-008aa5be6d94\",\n        \"creationDate\": \"2022-03-21T17:36:11.999216\",\n        \"lastUpdateDate\": \"2022-03-21T17:36:11.999235\",\n        \"clientId\": \"0ea4ea08-9d94-4fd0-9648-9ea5c737786a\",\n        \"name\": \"teste_moorse_template_api_notification_new_client\",\n        \"description\": \"teste_moorse_template_api_notification_new_client\",\n        \"integrationId\": \"aa039027-71e2-4b5c-9834-2cb8d001eb5a\",\n        \"type\": \"MEDIA_INTERACTIVE\",\n        \"status\": \"APPROVED\",\n        \"rejectedReason\": \"\",\n        \"templateFb\": \"{\\\"namespace\\\":\\\"0b040fac_f670_4f69_a1f8_4b58bc66a5c1\\\",\\\"name\\\":\\\"teste_moorse_template_api_notification_new_client\\\",\\\"category\\\":\\\"ALERT_UPDATE\\\",\\\"language\\\":\\\"pt_BR\\\",\\\"status\\\":\\\"approved\\\",\\\"components\\\":[{\\\"type\\\":\\\"BODY\\\",\\\"text\\\":\\\"Novo cliente cadastrado\\\"},{\\\"type\\\":\\\"HEADER\\\",\\\"example\\\":{\\\"header_handle\\\":[\\\"https://moorse.io/assets/img/moorse/moorse-integrations.png\\\"]},\\\"format\\\":\\\"IMAGE\\\"},{\\\"type\\\":\\\"FOOTER\\\",\\\"text\\\":\\\"Bora que bora\\\"},{\\\"type\\\":\\\"BUTTONS\\\",\\\"buttons\\\":[{\\\"type\\\":\\\"URL\\\",\\\"text\\\":\\\"Site Moorse\\\",\\\"url\\\":\\\"https://moorse.io/\\\"},{\\\"type\\\":\\\"PHONE_NUMBER\\\",\\\"text\\\":\\\"Falar com a Moorse\\\",\\\"phone_number\\\":\\\"558396544327\\\"}]}],\\\"rejected_reason\\\":\\\"\\\"}\"\n      }\n    ],\n    \"pageable\": {\n      \"sort\": [],\n      \"offset\": 0,\n      \"pageNumber\": 0,\n      \"pageSize\": 20,\n      \"paged\": true,\n      \"unpaged\": false\n    },\n    \"totalPages\": 1,\n    \"totalElements\": 2,\n    \"last\": false,\n    \"size\": 20,\n    \"number\": 0,\n    \"sort\": [],\n    \"numberOfElements\": 20,\n    \"first\": true,\n    \"empty\": false\n  },\n  \"errors\": null\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "content": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "example": "99ecb91b-f0b9-4ebb-ac04-ce6153546542"
                              },
                              "creationDate": {
                                "type": "string",
                                "example": "2022-03-21T17:36:11.961705"
                              },
                              "lastUpdateDate": {
                                "type": "string",
                                "example": "2022-03-21T17:36:11.961741"
                              },
                              "clientId": {
                                "type": "string",
                                "example": "0ea4ea08-9d94-4fd0-9648-9ea5c737786a"
                              },
                              "name": {
                                "type": "string",
                                "example": "teste_dev_template_3"
                              },
                              "description": {
                                "type": "string",
                                "example": "teste_dev_template_3"
                              },
                              "integrationId": {
                                "type": "string",
                                "example": "aa039027-71e2-4b5c-9834-2cb8d001eb5a"
                              },
                              "type": {
                                "type": "string",
                                "example": "STANDARD"
                              },
                              "status": {
                                "type": "string",
                                "example": "APPROVED"
                              },
                              "rejectedReason": {
                                "type": "string",
                                "example": ""
                              },
                              "templateFb": {
                                "type": "string",
                                "example": "{\"namespace\":\"0b040fac_f670_4f69_a1f8_4b58bc66a5c1\",\"name\":\"teste_dev_template_3\",\"category\":\"ALERT_UPDATE\",\"language\":\"pt_BR\",\"status\":\"approved\",\"components\":[{\"type\":\"BODY\",\"text\":\"SEja bem vindo {{1}}, vem compra com a {{2}}\"}],\"rejected_reason\":\"\"}"
                              }
                            }
                          }
                        },
                        "pageable": {
                          "type": "object",
                          "properties": {
                            "sort": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {}
                              }
                            },
                            "offset": {
                              "type": "integer",
                              "example": 0,
                              "default": 0
                            },
                            "pageNumber": {
                              "type": "integer",
                              "example": 0,
                              "default": 0
                            },
                            "pageSize": {
                              "type": "integer",
                              "example": 20,
                              "default": 0
                            },
                            "paged": {
                              "type": "boolean",
                              "example": true,
                              "default": true
                            },
                            "unpaged": {
                              "type": "boolean",
                              "example": false,
                              "default": true
                            }
                          }
                        },
                        "totalPages": {
                          "type": "integer",
                          "example": 1,
                          "default": 0
                        },
                        "totalElements": {
                          "type": "integer",
                          "example": 2,
                          "default": 0
                        },
                        "last": {
                          "type": "boolean",
                          "example": false,
                          "default": true
                        },
                        "size": {
                          "type": "integer",
                          "example": 20,
                          "default": 0
                        },
                        "number": {
                          "type": "integer",
                          "example": 0,
                          "default": 0
                        },
                        "sort": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {}
                          }
                        },
                        "numberOfElements": {
                          "type": "integer",
                          "example": 20,
                          "default": 0
                        },
                        "first": {
                          "type": "boolean",
                          "example": true,
                          "default": true
                        },
                        "empty": {
                          "type": "boolean",
                          "example": false,
                          "default": true
                        }
                      }
                    },
                    "errors": {}
                  }
                }
              }
            }
          },
          "400": {
            "description": "400",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {}
                }
              }
            }
          }
        },
        "deprecated": false
      }
    }
  },
  "x-readme": {
    "headers": [],
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "x-readme-fauxas": true,
  "_id": "5ee29e9b95ba7f023df3170f:623a57ca4b5fd7005df71264"
}
```