Skip to contentSkip to navigationSkip to topbar
Page tools
Useful for sharing or LLM

On this pageProducts used
Looking for more inspiration?Visit the
Error
Application error

60251: Invalid Templates parameter

Twilio Verify DocumentationVerify

Description

description page anchor

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

Possible causes

possible-causes page anchor
  • The Templates value is not valid JSON, or is valid JSON but not an array.
  • An entry in the array is missing the required sid field.
  • A sid value is not a valid template SID. Template SIDs start with HJ followed by 32 hexadecimal digits.
  • An entry's substitutions value is not an object of key-value pairs.
  • The array contains more than the maximum number of entries allowed.
  • JSON-encode the Templates value 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 substitutions as 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 Templates payload in your application before calling the Verify API.

Additional resources

additional-resources page anchor