Error
Application error
60251: Invalid Templates parameter
Verify
The Templates parameter in your request to create a verification is not structurally valid. Twilio rejected the request before attempting to resolve any template.
Templates is a JSON-encoded array of template configurations, sent as a string because the Verify API uses application/x-www-form-urlencoded. Each entry requires a sid and may include an optional substitutions object.
HTTP status: 400
- The
Templatesvalue is not valid JSON, or is valid JSON but not an array. - An entry in the array is missing the required
sidfield. - A
sidvalue is not a valid template SID. Template SIDs start withHJfollowed by 32 hexadecimal digits. - An entry's
substitutionsvalue is not an object of key-value pairs. - The array contains more than the maximum number of entries allowed.
- JSON-encode the
Templatesvalue as an array before URL-encoding it into the request body. - Give every entry a
sid, and copy each SID directly from the Twilio Console or from a Templates API response rather than typing it by hand. - Send
substitutionsas an object, for example{"sid": "HJ...", "substitutions": {"title": "Sign in"}}. - Reduce the number of entries so the list stays within the allowed maximum.
- Validate the
Templatespayload in your application before calling the Verify API.