Auto-Fill to Copy-Code Estimated reading: 2 minutes 52 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": "autofill_to_copy_code", "language": "en_US", "category": "authentication", "message_send_ttl_seconds": 60, "components": [ { "type": "body", "add_security_recommendation": true }, { "type": "footer", "code_expiration_minutes": 10 }, { "type": "buttons", "buttons": [ { "type": "otp", "otp_type": "one_tap", "text": "Copy Code", "autofill_text": "Autofill", "package_name": "app.pingtochat.com", "signature_hash": "K8a/AINcGX7" } ] } ] }ComponentsBody: Includes security recommendations for authentication messages. Footer: Specifies the OTP code expiration time (5 minutes). Buttons:OTP Type: zero_tap Button Text: “Copy Code” Autofill Text: “Autofill” Zero Tap Terms Accepted: true Supported Apps: Defines package names and signature hashes for authentication.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": "body", "add_security_recommendation": true }, { "type": "footer", "code_expiration_minutes": 5 }, { "type": "buttons", "buttons": [ { "type": "otp", "otp_type": "copy_code", "text": "Copy Code" } ] } ] }ComponentsBodyType: BODY Security Recommendation: trueFooterType: FOOTER Code Expiration: 5 minutesButtonsType: BUTTONS Buttons:Type: otp OTP Type: copy_code Text: Copy CodeSuccess ResponseStatus Code: 201 APPROVED{ "success": true, "id": "xxxxxx", "name": "autofill_to_copy_code", "category": "marketing" }NotesThe {{your_domain}} should be replaced with the actual domain. The {{phone_number_id}}, {{key}}, and {{template_id}} should be replaced with 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.