# Delete NDA template version

Source: https://docs.orbiqhq.com/docs/api/v1/nda-templates/id/versions/versionid/delete

### DELETE /api/v1/nda-templates/{id}/versions/{versionId}

**Delete NDA template version**

Delete a version of an NDA template that you no longer need.

Any version except the active one can be deleted. The template and
its other versions are not changed.

**Authentication:** Bearer token (`Authorization: Bearer <token>`)

**Path parameters:**

| Name | Type | Required | Description |
|---|---|---|---|
| `id` | string (uuid) | Yes | Template ID |
| `versionId` | string (uuid) | Yes | Version ID |

**Responses:**

- `204` - Version deleted successfully
- `401` - Unauthorized
  - `error` (string): Error message
- `403` - Forbidden
  - `error` (string)
- `404` - Not found
  - `error` (string)
- `409` - Version is active
  - `error` (string)
- `500` - Internal server error
  - `error` (string): Error message

**Code samples:**

```cURL
curl -X DELETE https://app.orbiqhq.com/api/v1/nda-templates/550e8400-e29b-41d4-a716-446655440000/versions/0d5340f6-8095-47e7-946b-5fad86710e96 \
  -H "Authorization: Bearer $TRUST_CENTER_API_KEY"

```

JavaScript (fetch):

```js
const apiKey = process.env.TRUST_CENTER_API_KEY;

const response = await fetch("https://app.orbiqhq.com/api/v1/nda-templates/550e8400-e29b-41d4-a716-446655440000/versions/0d5340f6-8095-47e7-946b-5fad86710e96", {
  method: "DELETE",
  headers: {
    "Authorization": "Bearer " + apiKey
  }
});

if (!response.ok) throw new Error(await response.text());

```
