Parameter with header body dynamic button url to static url Estimated reading: 2 minutes 64 views Create a TemplateEndpointhttp://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates{{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create keyRequest HeadersAuthorization: Bearer token for authentication. Content-Type: Should be set to application/json.Request Body{ "name": "edit_ac", "language": "en_US", "category": "UTILITY", "allow_category_change": true, "components": [ { "type": "HEADER", "format": "TEXT", "text": "Our pingtochat {{1}} is on!", "example": { "header_text": [ "Summer Sale" ] } }, { "type": "BODY", "text": "Shop now through {{1}} and use code {{2}} to get {{3}} off of all merchandise.", "example": { "body_text": [ [ "the end of August", "25OFF", "25%" ] ] } }, { "type": "FOOTER", "text": "Use the buttons below to manage your marketing subscriptions" } ] }ParametersName: edit_ac Language: en_US Category: UTILITY Allow Category Change: trueComponentsHeaderText: "Our pingtochat {{1}} is on!" Example: "Summer Sale"BodyText: "Shop now through {{1}} and use code {{2}} to get {{3}} off of all merchandise." Example:{{1}}: "the end of August" {{2}}: "25OFF" {{3}}: "25%"FooterText: "Use the buttons below to manage your marketing subscriptions"Success ResponseStatus Code: 201 APPROVED{ "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" }Edit an Existing TemplateEndpointhttp://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/{{template_id}}/template_updateRequest Body{ "components": [ { "type": "HEADER", "format": "TEXT", "text": "Our pingtochat {{1}} is on!", "example": { "header_text": [ "Winter Sale" ] } }, { "type": "BODY", "text": "Shop now through {{1}} and use code {{2}} to get {{3}} off of all merchandise.", "example": { "body_text": [ [ "the end of August", "45OFF", "35%" ] ] } }, { "type": "FOOTER", "text": "Use the buttons below to manage your Urwallet subscriptions" }, { "type": "BUTTONS", "buttons": [ { "type": "url", "text": "Go to link", "url": "https://developers.pingtochat.com/{{1}}", "example": [ "?docs=pingtochat/wp" ] } ] } ] }Component Header Example: "Winter Sale" Body Example:{{1}}: "the end of August" {{2}}: "45OFF" {{3}}: "35%" Footer Text: "Use the buttons below to manage your Urwallet subscriptions" ButtonsURL ButtonText: "Go to link" URL: "https://developers.pingtochat.com/{{1}}" Example: "?docs=pingtochat/wp"Response{ "success": true, "id": "xxxxxx", "name": "edit_s", "category": "marketing" }NotesThe {{your_domain}} should be replaced with the actual domain. The {{phone_number_id}}, {{key}}, and {{template_id}} should be replaced with the actual values. Ensure that the request body is formatted correctly as JSON. Only authorized users with a valid key can create or update templates. Categories may be restricted based on platform policies.