{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-products/whatsapp/sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":["admonition"]},"type":"markdown"},"seo":{"title":"Manage templates","description":"Integration and usage documentation."},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"manage-templates","__idx":0},"children":["Manage templates"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Use these endpoints to create new templates and add language variants to existing ones.",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"Before making requests, ensure you have configured ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/products/whatsapp/enterprise-documentation/developer-documentation/authentication"},"children":["authentication"]},"."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["For the full technical reference, see the ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/products/whatsapp/openapi/template/createtemplate"},"children":["OpenAPI specification"]},"."]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"create-a-template","__idx":1},"children":["Create a template"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Creates a new template. The template will be submitted to Meta for approval and will have status ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["PENDING"]}," until approved."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"endpoint","__idx":2},"children":["Endpoint"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"POST /api/template/create\n"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"headers","__idx":3},"children":["Headers"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Name"},"children":["Name"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Required"},"children":["Required"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Description"},"children":["Description"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Authorization"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Yes"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Basic Auth credentials. See ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/products/whatsapp/enterprise-documentation/developer-documentation/authentication"},"children":["Authentication"]},"."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["X-Api-Key"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Yes"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["API key for the account. See ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/products/whatsapp/enterprise-documentation/developer-documentation/authentication"},"children":["Authentication"]},"."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Content-Type"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Yes"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Must be ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["application/json"]},"."]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"body-parameters","__idx":4},"children":["Body parameters"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Parameter"},"children":["Parameter"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Type"},"children":["Type"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Required"},"children":["Required"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Description"},"children":["Description"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["language"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Yes"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Default template language. See ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://developers.facebook.com/docs/whatsapp/api/messages/message-templates#supported-languages"},"children":["supported languages"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["category"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Yes"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Template category: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["UTILITY"]}," or ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["MARKETING"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["name"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Yes"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Template name. Only alphabetic characters and underscores (max 100 characters)"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["description"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Yes"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Template description"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["body"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["object"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Yes"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Body text with optional placeholders (",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["{{1}}"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["{{2}}"]},", ...) and default parameter values"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["urlButtons"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["array"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Depends"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["URL buttons. Each entry: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["index"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["text"]}," (button label), ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["url"]}," (base URL with optional ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["{{1}}"]}," placeholder), ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["urlPath"]}," (default path). Max 2 buttons."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["textHeader"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["object"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["No"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Header text (preset, no placeholders)"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["footer"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["object"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["No"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Footer text (preset, no placeholders)"]}]}]}]}]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"info","name":"Template variable rules"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Common rejection reasons from Meta:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Variable parameters must use the format ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["{{1}}"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["{{2}}"]},", etc."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Parameters cannot contain special characters like ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["#"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["$"]},", or ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["%"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Parameters must be sequential — no gaps (e.g. ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["{{1}}"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["{{2}}"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["{{4}}"]}," without ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["{{3}}"]}," is invalid)"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Templates cannot start or end with a variable parameter"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Too many parameters relative to message length"]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"request-example","__idx":5},"children":["Request example"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"body\": {\n    \"text\": \"Hello *{{1}}*, your signature is required for a document. Open by using following link:\",\n    \"parameters\": [\n      { \"text\": \"John Smith\" }\n    ]\n  },\n  \"urlButtons\": [\n    {\n      \"index\": 0,\n      \"urlPath\": \"sign\",\n      \"url\": \"https://yourendpoint.com/{{1}}\",\n      \"text\": \"Open Document\"\n    }\n  ],\n  \"textHeader\": {\n    \"text\": \"Document signing request\"\n  },\n  \"footer\": {\n    \"text\": \"The link expires in 10 minutes\"\n  },\n  \"language\": \"en\",\n  \"name\": \"signature_template\",\n  \"category\": \"UTILITY\",\n  \"description\": \"sign a doc using a link\"\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"response-examples","__idx":6},"children":["Response examples"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["200 — Template created (pending approval)"]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"body\": {\n    \"text\": \"Hello *{{1}}*, your signature is required for a document. Open by using following link:\",\n    \"parameters\": [\n      { \"text\": \"John Smith\" }\n    ]\n  },\n  \"urlButtons\": [\n    {\n      \"index\": 0,\n      \"urlPath\": \"sign\",\n      \"url\": \"https://yourendpoint.com/{{1}}\",\n      \"text\": \"Open Document\"\n    }\n  ],\n  \"textHeader\": {\n    \"text\": \"Document signing request\"\n  },\n  \"footer\": {\n    \"text\": \"The link expires in 10 minutes\"\n  },\n  \"language\": \"en\",\n  \"status\": \"PENDING\",\n  \"category\": \"UTILITY\",\n  \"name\": \"signature_template\",\n  \"description\": \"sign a doc using a link\",\n  \"templateId\": \"802\",\n  \"default\": true\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The response returns the full template object. See ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/products/whatsapp/enterprise-documentation/developer-documentation/api-references/template-management/get-template#get-template-by-language"},"children":["Get template by language"]}," for a description of the response fields."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["400 — Invalid input"]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"type\": \"ConstraintViolationException\",\n  \"code\": 3,\n  \"message\": \"Allowed category are: UTILITY, MARKETING\"\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"error-codes","__idx":7},"children":["Error codes"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"HTTP Status"},"children":["HTTP Status"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Error code"},"children":["Error code"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Error type"},"children":["Error type"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Solution"},"children":["Solution"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["400"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["3"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ConstraintViolationException"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Check the request parameters against the API documentation"]}]}]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["For authentication errors (code 1, 6, 9), see ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/products/whatsapp/enterprise-documentation/developer-documentation/authentication"},"children":["Authentication"]},"."]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"add-a-template-language","__idx":8},"children":["Add a template language"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Adds a new language version to an existing template."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"endpoint-1","__idx":9},"children":["Endpoint"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"POST /api/template/{templateId}/language\n"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"headers-1","__idx":10},"children":["Headers"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Name"},"children":["Name"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Required"},"children":["Required"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Description"},"children":["Description"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Authorization"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Yes"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Basic Auth credentials. See ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/products/whatsapp/enterprise-documentation/developer-documentation/authentication"},"children":["Authentication"]},"."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["X-Api-Key"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Yes"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["API key for the account. See ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/products/whatsapp/enterprise-documentation/developer-documentation/authentication"},"children":["Authentication"]},"."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Content-Type"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Yes"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Must be ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["application/json"]},"."]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"path-parameters","__idx":11},"children":["Path parameters"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Parameter"},"children":["Parameter"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Type"},"children":["Type"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Required"},"children":["Required"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Description"},"children":["Description"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["templateId"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["integer"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Yes"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The existing template ID"]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"body-parameters-1","__idx":12},"children":["Body parameters"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Parameter"},"children":["Parameter"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Type"},"children":["Type"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Required"},"children":["Required"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Description"},"children":["Description"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["language"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Yes"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The new language to add. See ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://developers.facebook.com/docs/whatsapp/api/messages/message-templates#supported-languages"},"children":["supported languages"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["body"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["object"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Yes"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Body text in the new language with optional placeholders and default parameter values"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["urlButtons"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["array"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["No"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["URL buttons for the new language version"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["textHeader"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["object"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["No"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Header text in the new language"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["footer"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["object"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["No"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Footer text in the new language"]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"request-example-1","__idx":13},"children":["Request example"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"body\": {\n    \"text\": \"Ciao *{{1}}*, la tua firma è richiesta per un documento. Aprilo usando il seguente link:\",\n    \"parameters\": [\n      { \"text\": \"Mario Rossi\" }\n    ]\n  },\n  \"urlButtons\": [\n    {\n      \"index\": 0,\n      \"urlPath\": \"sign\",\n      \"url\": \"https://yourendpoint.com/{{1}}\",\n      \"text\": \"Apri documento\"\n    }\n  ],\n  \"textHeader\": {\n    \"text\": \"Richiesta di firma documento\"\n  },\n  \"footer\": {\n    \"text\": \"Il link scade in 10 minuti\"\n  },\n  \"language\": \"it\"\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"response-examples-1","__idx":14},"children":["Response examples"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["200 — Language added"]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"body\": {\n    \"text\": \"Ciao *{{1}}*, la tua firma è richiesta per un documento. Aprilo usando il seguente link:\",\n    \"parameters\": [\n      { \"text\": \"Mario Rossi\" }\n    ]\n  },\n  \"urlButtons\": [\n    {\n      \"index\": 0,\n      \"urlPath\": \"sign\",\n      \"url\": \"https://yourendpoint.com/{{1}}\",\n      \"text\": \"Apri documento\"\n    }\n  ],\n  \"textHeader\": {\n    \"text\": \"Richiesta di firma documento\"\n  },\n  \"footer\": {\n    \"text\": \"Il link scade in 10 minuti\"\n  },\n  \"language\": \"it\",\n  \"status\": \"PENDING\",\n  \"category\": \"UTILITY\",\n  \"name\": \"signature_template\",\n  \"description\": \"sign a doc using a link\",\n  \"templateId\": \"802\",\n  \"default\": false\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The response returns the full template object for the new language variant. See ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/products/whatsapp/enterprise-documentation/developer-documentation/api-references/template-management/get-template#get-template-by-language"},"children":["Get template by language"]}," for a description of the response fields."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["400 — Language already exists"]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"type\": \"InvalidLanguageException\",\n  \"code\": 14,\n  \"message\": \"The language 'en' already exists for template '61'\"\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["400 — Language not supported"]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"type\": \"ClientWebApplicationException\",\n  \"code\": 12,\n  \"message\": \"Invalid parameter\"\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["404 — Template not found"]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"type\": \"UnavailableTemplateException\",\n  \"code\": 7,\n  \"message\": \"Template not found\"\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"error-codes-1","__idx":15},"children":["Error codes"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"HTTP Status"},"children":["HTTP Status"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Error code"},"children":["Error code"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Error type"},"children":["Error type"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Solution"},"children":["Solution"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["400"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["12"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ClientWebApplicationException"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The language code is not supported by Meta. See ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://developers.facebook.com/docs/whatsapp/api/messages/message-templates#supported-languages"},"children":["supported languages"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["400"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["14"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["InvalidLanguageException"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The language already exists for this template"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["404"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["7"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["UnavailableTemplateException"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Verify that the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["templateId"]}," exists"]}]}]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["For authentication errors (code 1, 6, 9), see ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/products/whatsapp/enterprise-documentation/developer-documentation/authentication"},"children":["Authentication"]},"."]}]},"headings":[{"value":"Manage templates","id":"manage-templates","depth":1},{"value":"Create a template","id":"create-a-template","depth":2},{"value":"Endpoint","id":"endpoint","depth":4},{"value":"Headers","id":"headers","depth":4},{"value":"Body parameters","id":"body-parameters","depth":4},{"value":"Request example","id":"request-example","depth":4},{"value":"Response examples","id":"response-examples","depth":4},{"value":"Error codes","id":"error-codes","depth":4},{"value":"Add a template language","id":"add-a-template-language","depth":2},{"value":"Endpoint","id":"endpoint-1","depth":4},{"value":"Headers","id":"headers-1","depth":4},{"value":"Path parameters","id":"path-parameters","depth":4},{"value":"Body parameters","id":"body-parameters-1","depth":4},{"value":"Request example","id":"request-example-1","depth":4},{"value":"Response examples","id":"response-examples-1","depth":4},{"value":"Error codes","id":"error-codes-1","depth":4}],"frontmatter":{"seo":{"title":"Manage templates"}},"lastModified":"2026-03-07T14:23:07.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/products/whatsapp/enterprise-documentation/developer-documentation/api-references/template-management/manage-templates","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}