Documents

Document Solution Template Remove

DELETE
/documents/solution/{documentSolutionId}/template/{documentTemplateId}/remove

Detaches a template from a document solution. Both already exist — this only removes the link between them, and the template itself is left untouched and can still be attached to other solutions.

Unlike supplying ids when creating a solution, which skips anything it cannot find, this operation is strict: if either the solution or the template does not exist on this subscription, the request fails with a 404 and nothing changes. That 404 carries no body, so it does not distinguish a missing solution from a missing template — check both ids.

Authorization

AuthorizationBearer <token>

JWT token to authenticate the request.

In: header

X-Api-Key<token>

API key, sent as a request header.

In: header

Path Parameters

documentSolutionId*string

Id of the document solution, as returned by documents-solution-create in result.data.documentSolution.id.

Formatuuid
documentTemplateId*string

Id of the template, as returned by documents-template-create.

Formatuuid

Response Body

application/json

application/json

application/json

application/json

curl -X DELETE "https://example.com/documents/solution/d290f1ee-6c54-4b01-90e6-d701748f0851/template/2b7c9e14-5a63-4f08-9d21-7c4e0b8a3f52/remove"
{  "result": {    "statusCode": 200,    "message": "OK",    "data": {      "documentSolutionId": "d290f1ee-6c54-4b01-90e6-d701748f0851",      "documentTemplateId": "2b7c9e14-5a63-4f08-9d21-7c4e0b8a3f52",      "message": "TEMPLATE_REMOVED_FROM_SOLUTION"    }  },  "origin": "DELETE https://api.doctavian.com/v1/documents/solution/{documentSolutionId}/template/{documentTemplateId}/remove",  "dateTime": "2026-09-18T12:15:53.000Z",  "userId": "1a2b3c4d-5e6f-4a1b-8c2d-3e4f5a6b7c8d",  "operationId": "b5e0c31a7d92483fa4c61e08d7b3f925"}
{  "error": {    "statusCode": 401,    "message": "The request could not be authenticated.",    "innerErrors": [      {        "code": "UNAUTHORIZED",        "message": "The request could not be authenticated.",        "userMessage": "Your session has expired or is invalid. Please sign in again."      }    ]  },  "origin": "DELETE https://api.doctavian.com/v1/documents/solution/{documentSolutionId}/template/{documentTemplateId}/remove",  "dateTime": "2026-09-18T12:15:53.000Z",  "userId": "1a2b3c4d-5e6f-4a1b-8c2d-3e4f5a6b7c8d",  "operationId": "b5e0c31a7d92483fa4c61e08d7b3f925"}
{  "error": {    "statusCode": 403,    "message": "The caller is not authorized to perform this operation.",    "innerErrors": [      {        "code": "AUTHORIZATION_ERROR",        "message": "The caller is not authorized to perform this operation.",        "userMessage": "You do not have permission to do this. Contact your administrator."      }    ]  },  "origin": "DELETE https://api.doctavian.com/v1/documents/solution/{documentSolutionId}/template/{documentTemplateId}/remove",  "dateTime": "2026-09-18T12:15:53.000Z",  "userId": "1a2b3c4d-5e6f-4a1b-8c2d-3e4f5a6b7c8d",  "operationId": "b5e0c31a7d92483fa4c61e08d7b3f925"}
Empty
{  "error": {    "statusCode": 500,    "message": "The link could not be changed.",    "innerErrors": [      {        "code": "REMOVE_TEMPLATE_FROM_SOLUTION_ERROR",        "message": "The link could not be changed.",        "userMessage": "Something went wrong. Please try again or contact support."      }    ]  },  "origin": "DELETE https://api.doctavian.com/v1/documents/solution/{documentSolutionId}/template/{documentTemplateId}/remove",  "dateTime": "2026-09-18T12:15:53.000Z",  "userId": "1a2b3c4d-5e6f-4a1b-8c2d-3e4f5a6b7c8d",  "operationId": "b5e0c31a7d92483fa4c61e08d7b3f925"}