Update a Template

You can update a Template to change its default status or its unique name.

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.

TEMPLATE_ID

The custom template ID

Write the code

Add the following to update-template.sh:

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

View full source

Run your code

Save this file to your machine and run it:

sh update-template.sh