Template Actions (PUT /v2.0/templates/{templateId}/action/{action-name})

This method allows you to delete, activate, or deactivate a template.

Request Parameters

 

Request Headers

Header Value
Authorization Bearer {access_token}
app_auth_type jsign-oauth2

Request Parameters

Field Type Required Description
templateId GUID Yes Template ID
action string Yes Action name to be performed (activate, deactivate, delete)

Response Parameters

Response Body Message Field

Field Value
message Template [deleted/activated/deactivated] successfully

Sample Success Response

REQUEST:
curl --location --request PUT 'api/v2.0/templates/2406B36E-6B11-dsad-117377B09651/action/deactivate' \
--header 'app_auth_type: jsign-oauth2' \
--header 'Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9'

RESPONSE:
{
"message": "Template deactivated successfully",
"data": {}
}

Sample Error Response

REQUEST:
curl --location --request PUT 'api/v2.0/templates/2406B36E-6B11-dsad-117377B09651/action/deactivate' \
--header 'app_auth_type: jsign-oauth2' \
--header 'Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9'

RESPONSE:
{
"errors": [
{
"error_code": "TEMPLATE_DEACTIVATE_NOT_ALLOWED",
developer_message": "The template which you are trying to deactivate has been already deactivated."
}
]
}

Note: View the full list of applicable error code for this method here.

Return to the top of this page.