---
title: "App | Apply For Templates with sample media"
method: POST
path: "/partner/app/{appId}/templates"
tags: ["App"]
---

# App | Apply For Templates with sample media

`POST /partner/app/{appId}/templates`

## Request

- Base URL: `https://partner.gupshup.io`
- URL: `https://partner.gupshup.io/partner/app/{appId}/templates`
- Auth: none declared

## Path parameters

- `appId` string, required

## Headers

- `Authorization` string

## Request body `application/x-www-form-urlencoded`

- union
  - object
    - `elementName` string
    - `languageCode` string
    - `content` string
    - `footer` string: Footer of the template. Character limit: 60
    - `category` string: The category of your template. Possible Values: AUTHENTICATION, MARKETING and UTILITY. If you submit the templates with the any other categories, you will receive an error Invalid category provided, kindly use category from these option AUTHENTICATION, MARKETING, UTILITY.
    - `templateType` string
    - `vertical` string
    - `appId` string
    - `example` string
    - `exampleMedia` string
    - `enableSample` boolean: Required when submitting CTA template with variables.
    - `allowTemplateCategoryChange` boolean: Boolean value. If True, Meta will automatically update the category of the template as per the template content. Default value is False. If the category gets updated, you can view the oldCategory from the Get Templates API
  - object
    - `elementName` string: The name of a template. Element name is unique for a WABAs namespace.
    - `languageCode` string: Language code for the template. Refer to all the language codes here.
    - `category` string: The category of your template. Possible Values: AUTHENTICATION, MARKETING and UTILITY. If you submit the templates with the any other categories, you will receive an error Invalid category provided, kindly use category from these option AUTHENTICATION, MARKETING, UTILITY.
    - `templateType` string: The type of template: TEXT, IMAGE, LOCATION, VIDEO & DOCUMENT
    - `vertical` string: Character limit: 180
    - `content` string: The body of the template. Character limit: 1028. For “Authentication” category the first line should be - {{1}} is your verification code.
    - `header` string: Header of the template. Applicable for templateType = Text Character limit: 60. Not applicable for “Authentication” category.
    - `footer` string: Footer of the template. Character limit: 60. Not applicable for “Authentication” category, only set based on code_expiration_minutes value
    - `buttons` string: Used only if your template has a CTA. An example is also submitted if a URL button has variable parameter. For “Authentication” category OTP button type is supported with two otp_type: 1. COPY_CODE 2. ONE_TAP If otp_type is set to ONE_TAP, three additional parameters are required: 1. autofill_text 2. package_name 3. signature_hash
    - `example` string: An example of the template.
    - `enableSample` boolean: Required for creating all types of templates.
    - `allowTemplateCategoryChange` boolean: Boolean value. If True, Meta will automatically update the category of the template as per the template content. Default value is False. If the category gets updated, you can view the oldCategory from the Get Templates API
    - `exampleHeader` string
    - `addSecurityRecommendation` boolean: Optionally for "Authentication" category a security disclaimer is added to content - For your security, do not share this code
    - `codeExpirationMinutes` integer: Optionally for “Authentication” category the following text is added to footer - This code expires in <NUM_MINUTES> minutes. Code expiry time should be between 1 and 90 minutes.

## Response `200`

Successful response

## Other responses

- `400`: Bad request
- `401`: Unauthorized
- `500`: Internal server error

---

[API](https://skmtc.dev/gupshup/apis/partner-portal-public-apis.md) - [All operations](https://skmtc.dev/gupshup/apis/partner-portal-public-apis/llms.txt) - [OpenAPI document](https://skmtc.dev/gupshup/apis/partner-portal-public-apis/revisions/f0e74168189c?raw)
