# List Whatsapp Templates

`GET /v1/whatsapp/templates`

List a WhatsApp sender's templates in every review state, newest first, live from its BSP.

Only `approved` ones send; one with `unsupported_reason` set cannot be sent from a batch.

Authenticate with `Authorization: Bearer $TALQING_API_KEY`. Errors use the shared envelope: https://docs.talqing.com/api-reference/errors.md

## OpenAPI

```json
{
 "openapi":"3.1.0",
 "servers":[
  {
   "description":"Talqing API",
   "url":"https://api.talqing.com"
  }
 ],
 "paths":{
  "/v1/whatsapp/templates":{
   "get":{
    "description":"List a WhatsApp sender's templates in every review state, newest first, live from its BSP.\n\nOnly `approved` ones send; one with `unsupported_reason` set cannot be sent from a batch.",
    "operationId":"whatsapp.templates.list",
    "parameters":[
     {
      "description":"A connected WhatsApp sender.",
      "in":"query",
      "name":"integration_id",
      "required":true,
      "schema":{
       "description":"A connected WhatsApp sender.",
       "format":"uuid",
       "title":"Integration Id",
       "type":"string"
      }
     },
     {
      "in":"query",
      "name":"status",
      "required":false,
      "schema":{
       "anyOf":[
        {
         "items":{
          "enum":[
           "pending",
           "approved",
           "rejected",
           "paused",
           "disabled"
          ],
          "type":"string"
         },
         "type":"array"
        },
        {
         "type":"null"
        }
       ],
       "title":"Status"
      }
     }
    ],
    "responses":{
     "200":{
      "content":{
       "application/json":{
        "schema":{
         "$ref":"#/components/schemas/WhatsAppTemplatesResponse"
        }
       }
      },
      "description":"Successful Response"
     },
     "401":{
      "$ref":"#/components/responses/Unauthorized"
     },
     "422":{
      "$ref":"#/components/responses/ValidationFailed"
     },
     "default":{
      "$ref":"#/components/responses/Error"
     }
    },
    "security":[
     {
      "BearerAuth":[]
     },
     {
      "SessionCookie":[]
     }
    ],
    "summary":"List Whatsapp Templates",
    "tags":[
     "whatsapp"
    ]
   }
  }
 },
 "components":{
  "responses":{
   "Error":{
    "content":{
     "application/json":{
      "schema":{
       "$ref":"#/components/schemas/ErrorResponse"
      }
     }
    },
    "description":"Unexpected error. Every error this API returns carries this body."
   },
   "Unauthorized":{
    "content":{
     "application/json":{
      "schema":{
       "$ref":"#/components/schemas/ErrorResponse"
      }
     }
    },
    "description":"Missing credential, or one that is revoked or no longer a member of this organization."
   },
   "ValidationFailed":{
    "content":{
     "application/json":{
      "schema":{
       "$ref":"#/components/schemas/ErrorResponse"
      }
     }
    },
    "description":"The request did not match this operation's schema; `detail.errors` lists each field."
   }
  },
  "schemas":{
   "ErrorBody":{
    "description":"The structured half of our error contract: a human `message` plus a list\nof individual `errors` (used wherever we surface many problems at once,\nincluding tool publish, op-tree checks, and request validation). The global\nexception handlers normalize every API error to\n`{detail: {message, errors, code}}`, so SDKs can parse one shape consistently.",
    "properties":{
     "code":{
      "anyOf":[
       {
        "type":"string"
       },
       {
        "type":"null"
       }
      ],
      "default":null,
      "description":"A stable identifier for this error, when it has one.",
      "title":"Code"
     },
     "errors":{
      "items":{
       "type":"string"
      },
      "title":"Errors",
      "type":"array"
     },
     "message":{
      "title":"Message",
      "type":"string"
     }
    },
    "required":[
     "message",
     "errors"
    ],
    "title":"ErrorBody",
    "type":"object"
   },
   "ErrorResponse":{
    "description":"The body of every error response, at every status code.",
    "properties":{
     "detail":{
      "$ref":"#/components/schemas/ErrorBody"
     }
    },
    "required":[
     "detail"
    ],
    "title":"ErrorResponse",
    "type":"object"
   },
   "WhatsAppTemplate":{
    "description":"A template and where WhatsApp's review of it stands. Only `approved` can be sent.",
    "properties":{
     "body":{
      "title":"Body",
      "type":"string"
     },
     "buttons":{
      "items":{
       "$ref":"#/components/schemas/WhatsAppTemplateButton"
      },
      "title":"Buttons",
      "type":"array"
     },
     "category":{
      "enum":[
       "marketing",
       "utility",
       "authentication"
      ],
      "title":"Category",
      "type":"string"
     },
     "created_at":{
      "format":"date-time",
      "title":"Created At",
      "type":"string"
     },
     "examples":{
      "additionalProperties":{
       "type":"string"
      },
      "title":"Examples",
      "type":"object"
     },
     "footer":{
      "anyOf":[
       {
        "type":"string"
       },
       {
        "type":"null"
       }
      ],
      "title":"Footer"
     },
     "header":{
      "anyOf":[
       {
        "$ref":"#/components/schemas/WhatsAppTemplateHeader"
       },
       {
        "type":"null"
       }
      ]
     },
     "id":{
      "title":"Id",
      "type":"string"
     },
     "language":{
      "title":"Language",
      "type":"string"
     },
     "name":{
      "title":"Name",
      "type":"string"
     },
     "rejection_reason":{
      "anyOf":[
       {
        "type":"string"
       },
       {
        "type":"null"
       }
      ],
      "title":"Rejection Reason"
     },
     "status":{
      "enum":[
       "pending",
       "approved",
       "rejected",
       "paused",
       "disabled"
      ],
      "title":"Status",
      "type":"string"
     },
     "unsupported_reason":{
      "anyOf":[
       {
        "type":"string"
       },
       {
        "type":"null"
       }
      ],
      "title":"Unsupported Reason"
     },
     "variables":{
      "items":{
       "type":"string"
      },
      "title":"Variables",
      "type":"array"
     }
    },
    "required":[
     "id",
     "name",
     "language",
     "category",
     "header",
     "body",
     "footer",
     "buttons",
     "variables",
     "status",
     "rejection_reason",
     "created_at",
     "examples",
     "unsupported_reason"
    ],
    "title":"WhatsAppTemplate",
    "type":"object"
   },
   "WhatsAppTemplateButton":{
    "properties":{
     "code":{
      "anyOf":[
       {
        "type":"string"
       },
       {
        "type":"null"
       }
      ],
      "title":"Code"
     },
     "phone_number":{
      "anyOf":[
       {
        "type":"string"
       },
       {
        "type":"null"
       }
      ],
      "title":"Phone Number"
     },
     "text":{
      "title":"Text",
      "type":"string"
     },
     "ttl_minutes":{
      "anyOf":[
       {
        "type":"integer"
       },
       {
        "type":"null"
       }
      ],
      "title":"Ttl Minutes"
     },
     "type":{
      "enum":[
       "url",
       "phone_number",
       "quick_reply",
       "copy_code",
       "voice_call"
      ],
      "title":"Type",
      "type":"string"
     },
     "url":{
      "anyOf":[
       {
        "type":"string"
       },
       {
        "type":"null"
       }
      ],
      "title":"Url"
     }
    },
    "required":[
     "type",
     "text",
     "url",
     "phone_number",
     "code",
     "ttl_minutes"
    ],
    "title":"WhatsAppTemplateButton",
    "type":"object"
   },
   "WhatsAppTemplateHeader":{
    "properties":{
     "text":{
      "anyOf":[
       {
        "type":"string"
       },
       {
        "type":"null"
       }
      ],
      "title":"Text"
     },
     "type":{
      "enum":[
       "text",
       "image",
       "video",
       "document"
      ],
      "title":"Type",
      "type":"string"
     },
     "url":{
      "anyOf":[
       {
        "type":"string"
       },
       {
        "type":"null"
       }
      ],
      "title":"Url"
     }
    },
    "required":[
     "type",
     "text",
     "url"
    ],
    "title":"WhatsAppTemplateHeader",
    "type":"object"
   },
   "WhatsAppTemplatesResponse":{
    "properties":{
     "integration_id":{
      "format":"uuid",
      "title":"Integration Id",
      "type":"string"
     },
     "templates":{
      "items":{
       "$ref":"#/components/schemas/WhatsAppTemplate"
      },
      "title":"Templates",
      "type":"array"
     }
    },
    "required":[
     "integration_id",
     "templates"
    ],
    "title":"WhatsAppTemplatesResponse",
    "type":"object"
   }
  }
 }
}
```
