Create a Template

Templates have a unique name only, and will be the default template when being created.

KeyDescription
VONAGE_APPLICATION_ID

The Vonage Application ID.

VONAGE_APPLICATION_PRIVATE_KEY_PATH

Private key path.

JWT

Used to authenticate your request. See Authentication for more information, including how to generate a JWT.

Write the code

Add the following to create-template.sh:

curl -X POST "https://api.nexmo.com/v2/verify/templates" \
  -H "Authorization: Bearer $JWT" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "my-template"
  }'

View full source

Run your code

Save this file to your machine and run it:

sh create-template.sh