Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,11 @@ jobs:
GTM_CONTAINER_ID: ${{ secrets.GTM_CONTAINER_ID }}

- name: Deploy to Cloudflare Pages
uses: cloudflare/pages-action@v1
uses: cloudflare/wrangler-action@v4
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
projectName: turbodocx-docs
directory: build
command: pages deploy build --project-name=turbodocx-docs
gitHubToken: ${{ secrets.GITHUB_TOKEN }}

- name: Submit URLs to IndexNow
Expand Down
72 changes: 68 additions & 4 deletions docs/API/create-image-variable-folder.api.mdx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
id: create-image-variable-folder
title: "Create Image Variable (Folder)"
description: "Create Image Variable (Folder)"
description: "Create a reusable image, text, or HTML variable in a template folder or your knowledge base. Includes example request, response, and error handling."
sidebar_label: "Create Image Variable (Folder)"
hide_title: true
hide_table_of_contents: true
Expand All @@ -16,9 +16,73 @@ custom_edit_url: null


# Create Image Variable (Folder)

Create Image Variable (Folder)


This endpoint creates a reusable variable scoped to a template folder or to your organization's global knowledge base, independent of any single template. Despite the name, it is not limited to images: `mimeType` also accepts `text` and `html`, and the same endpoint is used for [Read Variables (Folder)](/docs/API/read-variables-folder) to later list.

## When to use it

Use this endpoint to build a shared library of content, such as a company logo, a standard address block, or boilerplate legal language, that multiple templates can reference by placeholder without duplicating the content in each one.

## Example request

```bash
curl -X POST "https://api.turbodocx.com/Variable" \
-H "Authorization: Bearer $TURBODOCX_API_KEY" \
-H "x-rapiddocx-org-id: $TURBODOCX_ORG_ID" \
-H "Content-Type: application/json" \
-d '{
"name": "Company Logo",
"placeholder": "{CompanyLogo}",
"mimeType": "image",
"text": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAB...",
"templateFolderId": "9d2b1c63-0f77-4a9c-b1d0-2c5e6f7a8b90",
"allowRichTextInjection": true
}'
```

Optionally send `templateFolderId` (scopes the variable to that folder) or `isGlobal: true` (adds it to your org-wide knowledge base); at most one may be set, and sending both is rejected. `text` must be a base64 `data:` URI when `mimeType` is `"image"`, or plain text/HTML otherwise. `placeholder` must be unique within its folder or knowledge base and, if set, must be wrapped in curly braces, for example `{CompanyLogo}`.

## Example response

On success the endpoint returns the created variable:

```json
{
"data": {
"results": {
"variable": {
"id": "e4f5a6b7-8c9d-4e0f-a1b2-3c4d5e6f7a8b",
"name": "Company Logo",
"placeholder": "{CompanyLogo}",
"mimeType": "image",
"isGlobal": false,
"templateFolderId": "9d2b1c63-0f77-4a9c-b1d0-2c5e6f7a8b90",
"allowRichTextInjection": true,
"orgId": "a1b2c3d4-5e6f-4a7b-8c9d-0e1f2a3b4c5d",
"createdBy": "f5e6d7c8-9a0b-4c1d-2e3f-4a5b6c7d8e9f",
"createdOn": "2026-05-01T14:22:10.000Z"
}
}
}
}
```

## Common errors

| Status | When | Response body |
| ------ | ---- | ------------- |
| 401 | Missing or invalid API key/token, or the organization cannot be resolved | Empty (status only) |
| 403 | The key's role is not administrator, contributor, or user | Empty (status only) |
| 403 | `isGlobal: true` and the key's role is `user` (creating a knowledge-base variable requires administrator or contributor) | Empty (status only) |
| 400 | `mimeType` or `text` is missing, or both `isGlobal` and `templateFolderId` are set | `{ "message", "type": "ValidationError", "data": { "errors": [...] } }` |
| 400 | `placeholder` is not wrapped in `{ }`, or already exists in that folder or knowledge base | `{ "message", "type": "TemplateError", "data": [{ "message", "type", "data": { "explanation", "context" } }] }` |

## Related endpoints

- [Read Variables (Folder)](/docs/API/read-variables-folder) to list variables you have created
- [Update Variable by ID](/docs/API/update-variable-by-id) to edit a variable after creating it
- [Delete Variables (by IDs)](/docs/API/delete-variables-by-i-ds) to remove variables in bulk

<DisplayEndpoint method="POST" endpoint="/Variable"/>
<QueryTable title="query" data="W10=" />
<HeadersTable title="headers" data="W3sia2V5IjoiYXV0aG9yaXphdGlvbiIsImV4YW1wbGUiOiIifSx7ImtleSI6IngtcmFwaWRkb2N4LW9yZy1pZCIsImV4YW1wbGUiOiIifSx7ImtleSI6ImFjY2VwdCIsImV4YW1wbGUiOiIifSx7ImtleSI6ImFjY2VwdC1sYW5ndWFnZSIsImV4YW1wbGUiOiIifSx7ImtleSI6ImNvbnRlbnQtdHlwZSIsImV4YW1wbGUiOiIifSx7ImtleSI6ImRudCIsImV4YW1wbGUiOiIifSx7ImtleSI6Im9yaWdpbiIsImV4YW1wbGUiOiIifSx7ImtleSI6InJlZmVyZXIiLCJleGFtcGxlIjoiIn0seyJrZXkiOiJzZWMtY2gtdWEtbW9iaWxlIiwiZXhhbXBsZSI6IiJ9LHsia2V5Ijoic2VjLWNoLXVhLXBsYXRmb3JtIiwiZXhhbXBsZSI6IiJ9LHsia2V5Ijoic2VjLWZldGNoLWRlc3QiLCJleGFtcGxlIjoiIn0seyJrZXkiOiJzZWMtZmV0Y2gtbW9kZSIsImV4YW1wbGUiOiIifSx7ImtleSI6InNlYy1mZXRjaC1zaXRlIiwiZXhhbXBsZSI6IiJ9XQ==" />
Expand Down
54 changes: 50 additions & 4 deletions docs/API/create-tag.api.mdx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
id: create-tag
title: "Create Tag"
description: "Create Tag"
description: "Create a reusable tag in your organization to attach to templates and variables. Includes example request, response, and error handling."
sidebar_label: "Create Tag"
hide_title: true
hide_table_of_contents: true
Expand All @@ -16,9 +16,55 @@ custom_edit_url: null


# Create Tag

Create Tag


The Create Tag endpoint adds a new tag to your organization. Tags are a flat, organization-wide label set; once created, a tag can be attached to templates (with [Edit Template Metadata](/docs/API/edit-template-metadata)) or variables to make them easier to filter and organize.

## When to use it

Use this endpoint to build a tag picker that lets users create new tags on the fly, or to seed a starting set of tags when provisioning an organization.

## Example request

```bash
curl -X POST "https://api.turbodocx.com/Tag" \
-H "Authorization: Bearer $TURBODOCX_API_KEY" \
-H "x-rapiddocx-org-id: $TURBODOCX_ORG_ID" \
-H "Content-Type: application/json" \
-d '{"label": "legal"}'
```

## Example response

```json
{
"data": {
"results": {
"id": "7c1a0b52-9e88-4f0d-b3a2-1d4c6f8e2a90",
"label": "legal",
"isActive": true,
"orgId": "a1b2c3d4-5e6f-4a7b-8c9d-0e1f2a3b4c5d",
"createdBy": "f5e6d7c8-9a0b-4c1d-2e3f-4a5b6c7d8e9f",
"createdOn": "2026-05-01T14:22:10.000Z",
"updatedOn": "2026-05-01T14:22:10.000Z"
}
}
}
```

## Common errors

| Status | When | Response body |
| ------ | ---- | ------------- |
| 401 | Missing or invalid API key/token, or the organization cannot be resolved | Empty (status only) |
| 403 | The key's role is not administrator, contributor, or user | Empty (status only) |
| 400 | `label` is missing or not between 1 and 255 characters | `{ "message", "type": "ValidationError", "data": { "errors": [...] } }` |

## Related endpoints

- [Read Tag](/docs/API/read-tag) to list existing tags before creating a duplicate
- [Update Tag](/docs/API/update-tag) to rename a tag
- [Delete Tags (by IDs)](/docs/API/delete-tags-by-i-ds) to remove tags you no longer need

<DisplayEndpoint method="POST" endpoint="/Tag"/>
<QueryTable title="query" data="W10=" />
<HeadersTable title="headers" data="W3sia2V5IjoiYXV0aG9yaXphdGlvbiIsImV4YW1wbGUiOiIifSx7ImtleSI6IngtcmFwaWRkb2N4LW9yZy1pZCIsImV4YW1wbGUiOiIifSx7ImtleSI6ImFjY2VwdCIsImV4YW1wbGUiOiIifSx7ImtleSI6ImFjY2VwdC1sYW5ndWFnZSIsImV4YW1wbGUiOiIifSx7ImtleSI6ImNvbnRlbnQtdHlwZSIsImV4YW1wbGUiOiIifSx7ImtleSI6ImRudCIsImV4YW1wbGUiOiIifSx7ImtleSI6Im9yaWdpbiIsImV4YW1wbGUiOiIifSx7ImtleSI6InJlZmVyZXIiLCJleGFtcGxlIjoiIn0seyJrZXkiOiJzZWMtY2gtdWEiLCJleGFtcGxlIjoiIn0seyJrZXkiOiJzZWMtY2gtdWEtbW9iaWxlIiwiZXhhbXBsZSI6IiJ9LHsia2V5Ijoic2VjLWNoLXVhLXBsYXRmb3JtIiwiZXhhbXBsZSI6IiJ9LHsia2V5Ijoic2VjLWZldGNoLWRlc3QiLCJleGFtcGxlIjoiIn0seyJrZXkiOiJzZWMtZmV0Y2gtbW9kZSIsImV4YW1wbGUiOiIifSx7ImtleSI6InNlYy1mZXRjaC1zaXRlIiwiZXhhbXBsZSI6IiJ9XQ==" />
Expand Down
68 changes: 64 additions & 4 deletions docs/API/create-webhook.api.mdx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
id: create-webhook
title: "Create Webhook"
description: "Register a new signature webhook for the org. The `name` field is hardcoded to `signature` by the SDK. The returned `secret` is shown **once** — store it on receipt. It cannot be retrieved later; use Regenerate Webhook Secret if lost."
description: "Register a new signature webhook for your org. The SDK always sends name=\"signature\". The returned secret is shown once; store it immediately."
sidebar_label: "Create Webhook"
hide_title: true
hide_table_of_contents: true
Expand All @@ -16,9 +16,69 @@ custom_edit_url: null


# Create Webhook

Create Webhook


The Create Webhook endpoint registers a webhook that TurboDocx calls when TurboSign events happen in your organization, such as a document being signed or completed. Each webhook needs a unique `name` among your org's active webhooks; every TurboDocx SDK sends `"signature"`. A second create call with that name conflicts (409) only while an active webhook already has it; if you paused a webhook via [Update Webhook](/docs/API/update-webhook)'s `isActive: false` instead of deleting it, creating a new one with the same name succeeds and leaves two rows sharing that name, and by-name lookups on the other endpoints may then hit either one. Delete the old webhook (see [Delete Webhook](/docs/API/delete-webhook)) before reusing its name, rather than just pausing it.

## When to use it

Use this endpoint once, during integration setup, to start receiving signature lifecycle events instead of polling the API. To change the URLs or subscribed events later, use [Update Webhook](/docs/API/update-webhook) rather than creating a new one.

## Example request

```bash
curl -X POST "https://api.turbodocx.com/api/webhooks" \
-H "Authorization: Bearer $TURBODOCX_API_KEY" \
-H "x-rapiddocx-org-id: $TURBODOCX_ORG_ID" \
-H "Content-Type: application/json" \
-d '{
"name": "signature",
"urls": ["https://example.com/webhooks/turbodocx"],
"events": ["signature.document.completed", "signature.document.voided"]
}'
```

`urls` accepts up to 10 HTTPS endpoints (plain HTTP is rejected); `events` must be one or more of the values listed in [Get Webhook](/docs/API/get-webhook)'s `availableEvents`. Requires an API key with the administrator role.

## Example response

On success the endpoint returns `201 Created`:

```json
{
"data": {
"id": "b7e2c4a1-3f9d-4e6a-8c1b-5d0f7a2e9c34",
"orgId": "a1b2c3d4-5e6f-4a7b-8c9d-0e1f2a3b4c5d",
"name": "signature",
"urls": ["https://example.com/webhooks/turbodocx"],
"events": ["signature.document.completed", "signature.document.voided"],
"secret": "whsec_REPLACE_WITH_YOUR_WEBHOOK_SECRET",
"isActive": true,
"createdBy": "f5e6d7c8-9a0b-4c1d-2e3f-4a5b6c7d8e9f",
"createdOn": "2026-05-01T14:22:10.000Z",
"updatedOn": "2026-05-01T14:22:10.000Z",
"secretExists": true
},
"message": "Webhook created successfully. Save the secret - it won't be shown again."
}
```

`secret` is only ever returned in full on create and on [Regenerate Webhook Secret](/docs/API/regenerate-webhook-secret); every other endpoint returns a masked `maskedSecret` instead. Use `secret` to verify the `X-TurboDocx-Signature` header on incoming webhook calls.

## Common errors

| Status | When | Response body |
| ------ | ---- | ------------- |
| 401 | Missing or invalid API key/token, or the organization cannot be resolved | Empty (status only) |
| 403 | The key's role is not administrator | Empty (status only) |
| 400 | `name`, `urls`, or `events` is missing or invalid, or any URL is not HTTPS | `{ "message", "type": "ValidationError", "data": { "errors": [...] } }` |
| 409 | A webhook named `signature` already exists in your organization | `{ "message", "error": "WebhookNameTaken", "data": { "constraint", "orgId", "name" } }` |

## Related endpoints

- [Get Webhook](/docs/API/get-webhook) to view the webhook you created, its delivery stats, and available event types
- [Update Webhook](/docs/API/update-webhook) to change its URLs, events, or active state
- [Test Webhook](/docs/API/test-webhook) to send a sample event before going live

<DisplayEndpoint method="POST" endpoint="/api/webhooks"/>
<QueryTable title="query" data="W10=" />
<HeadersTable title="headers" data="W3sia2V5IjoiYXV0aG9yaXphdGlvbiIsImV4YW1wbGUiOiIifSx7ImtleSI6IngtcmFwaWRkb2N4LW9yZy1pZCIsImV4YW1wbGUiOiIifSx7ImtleSI6ImFjY2VwdCIsImV4YW1wbGUiOiIifSx7ImtleSI6ImFjY2VwdC1sYW5ndWFnZSIsImV4YW1wbGUiOiIifSx7ImtleSI6ImNvbnRlbnQtdHlwZSIsImV4YW1wbGUiOiIifSx7ImtleSI6ImRudCIsImV4YW1wbGUiOiIifSx7ImtleSI6Im9yaWdpbiIsImV4YW1wbGUiOiIifSx7ImtleSI6InJlZmVyZXIiLCJleGFtcGxlIjoiIn0seyJrZXkiOiJzZWMtY2gtdWEiLCJleGFtcGxlIjoiIn0seyJrZXkiOiJzZWMtY2gtdWEtbW9iaWxlIiwiZXhhbXBsZSI6IiJ9LHsia2V5Ijoic2VjLWNoLXVhLXBsYXRmb3JtIiwiZXhhbXBsZSI6IiJ9LHsia2V5Ijoic2VjLWZldGNoLWRlc3QiLCJleGFtcGxlIjoiIn0seyJrZXkiOiJzZWMtZmV0Y2gtbW9kZSIsImV4YW1wbGUiOiIifSx7ImtleSI6InNlYy1mZXRjaC1zaXRlIiwiZXhhbXBsZSI6IiJ9XQ==" />
Expand Down
48 changes: 44 additions & 4 deletions docs/API/delete-tags-by-i-ds.api.mdx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
id: delete-tags-by-i-ds
title: "Delete Tags (by IDs)"
description: "Delete Tags (by IDs)"
description: "Delete one or more tags from your organization in a single call, by ID. Includes example request, response, and error handling."
sidebar_label: "Delete Tags (by IDs)"
hide_title: true
hide_table_of_contents: true
Expand All @@ -16,9 +16,49 @@ custom_edit_url: null


# Delete Tags (by IDs)

Delete Tags (by IDs)


The Delete Tags (by IDs) endpoint deactivates one or more tags in a single call. It is a soft delete: matching tags are marked inactive rather than removed from the database, so they immediately stop appearing in [Read Tag](/docs/API/read-tag) and tag pickers.

## When to use it

Use this endpoint to let users bulk-remove tags they no longer need, instead of calling a single-tag delete endpoint in a loop.

## Example request

```bash
curl -X DELETE "https://api.turbodocx.com/Tag/Bulk/Action" \
-H "Authorization: Bearer $TURBODOCX_API_KEY" \
-H "x-rapiddocx-org-id: $TURBODOCX_ORG_ID" \
-H "Content-Type: application/json" \
-d '{"ids": ["7c1a0b52-9e88-4f0d-b3a2-1d4c6f8e2a90", "9d2b1c63-0f77-4a9c-b1d0-2c5e6f7a8b90"]}'
```

## Example response

On success the endpoint returns `200 OK` with an empty data object:

```json
{
"data": {}
}
```

Deletion is idempotent: IDs that do not exist, or belong to another organization, are silently skipped rather than causing an error.

## Common errors

| Status | When | Response body |
| ------ | ---- | ------------- |
| 401 | Missing or invalid API key/token, or the organization cannot be resolved | Empty (status only) |
| 403 | The key's role is not administrator, contributor, or user | Empty (status only) |
| 400 | `ids` is missing or not an array | `{ "message", "type": "ValidationError", "data": { "errors": [...] } }` |

## Related endpoints

- [Read Tag](/docs/API/read-tag) to find the tag IDs to delete
- [Create Tag](/docs/API/create-tag) to add a new tag
- [Update Tag](/docs/API/update-tag) to rename a tag instead of deleting it

<DisplayEndpoint method="DELETE" endpoint="/Tag/bulk/action"/>
<QueryTable title="query" data="W10=" />
<HeadersTable title="headers" data="W3sia2V5IjoieC1yYXBpZGRvY3gtb3JnLWlkIiwiZXhhbXBsZSI6IiJ9LHsia2V5IjoiYXV0aG9yaXphdGlvbiIsImV4YW1wbGUiOiIifSx7ImtleSI6ImFjY2VwdCIsImV4YW1wbGUiOiIifSx7ImtleSI6ImFjY2VwdC1sYW5ndWFnZSIsImV4YW1wbGUiOiIifSx7ImtleSI6ImNvbnRlbnQtdHlwZSIsImV4YW1wbGUiOiIifSx7ImtleSI6ImRudCIsImV4YW1wbGUiOiIifSx7ImtleSI6Im9yaWdpbiIsImV4YW1wbGUiOiIifSx7ImtleSI6InJlZmVyZXIiLCJleGFtcGxlIjoiIn0seyJrZXkiOiJzZWMtY2gtdWEiLCJleGFtcGxlIjoiIn0seyJrZXkiOiJzZWMtY2gtdWEtbW9iaWxlIiwiZXhhbXBsZSI6IiJ9LHsia2V5Ijoic2VjLWNoLXVhLXBsYXRmb3JtIiwiZXhhbXBsZSI6IiJ9LHsia2V5Ijoic2VjLWZldGNoLWRlc3QiLCJleGFtcGxlIjoiIn0seyJrZXkiOiJzZWMtZmV0Y2gtbW9kZSIsImV4YW1wbGUiOiIifSx7ImtleSI6InNlYy1mZXRjaC1zaXRlIiwiZXhhbXBsZSI6IiJ9XQ==" />
Expand Down
47 changes: 43 additions & 4 deletions docs/API/delete-variables-by-i-ds.api.mdx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
id: delete-variables-by-i-ds
title: "Delete Variables (by IDs)"
description: "Delete Variables (by IDs)"
description: "Delete one or more knowledge-base or folder variables in a single call, by variableMapId. Includes example request, response, and errors."
sidebar_label: "Delete Variables (by IDs)"
hide_title: true
hide_table_of_contents: true
Expand All @@ -16,9 +16,48 @@ custom_edit_url: null


# Delete Variables (by IDs)

Delete Variables (by IDs)


The Delete Variables (by IDs) endpoint removes one or more variables from your knowledge base or a template folder in a single call, along with their versions, tags, and (for image variables) their stored files.

## When to use it

Use this endpoint to let users bulk-clean their variable library, instead of calling a single-variable delete endpoint in a loop.

## Example request

```bash
curl -X DELETE "https://api.turbodocx.com/Variable/Bulk/Action" \
-H "Authorization: Bearer $TURBODOCX_API_KEY" \
-H "x-rapiddocx-org-id: $TURBODOCX_ORG_ID" \
-H "Content-Type: application/json" \
-d '{"ids": ["e4f5a6b7-8c9d-4e0f-a1b2-3c4d5e6f7a8b"]}'
```

Each entry in `ids` is a `variableMapId`, the same `id` returned by [Read Variables (Folder)](/docs/API/read-variables-folder).

## Example response

On success the endpoint returns `200 OK` with an empty data object:

```json
{
"data": {}
}
```

## Common errors

| Status | When | Response body |
| ------ | ---- | ------------- |
| 401 | Missing or invalid API key/token, or the organization cannot be resolved | Empty (status only) |
| 403 | The key's role is not administrator, contributor, or user | Empty (status only) |
| 400 | `ids` is missing or not an array | `{ "message", "type": "ValidationError", "data": { "errors": [...] } }` |

## Related endpoints

- [Read Variables (Folder)](/docs/API/read-variables-folder) to find the variable IDs to delete
- [Update Variable by ID](/docs/API/update-variable-by-id) to edit a variable instead of deleting it

<DisplayEndpoint method="DELETE" endpoint="/Variable/bulk/action"/>
<QueryTable title="query" data="W10=" />
<HeadersTable title="headers" data="W3sia2V5IjoiYXV0aG9yaXphdGlvbiIsImV4YW1wbGUiOiIifSx7ImtleSI6IngtcmFwaWRkb2N4LW9yZy1pZCIsImV4YW1wbGUiOiIifSx7ImtleSI6Im9yaWdpbiIsImV4YW1wbGUiOiIifSx7ImtleSI6ImFjY2VwdCIsImV4YW1wbGUiOiIifSx7ImtleSI6ImFjY2VwdC1sYW5ndWFnZSIsImV4YW1wbGUiOiIifSx7ImtleSI6ImNvbnRlbnQtdHlwZSIsImV4YW1wbGUiOiIifSx7ImtleSI6ImRudCIsImV4YW1wbGUiOiIifSx7ImtleSI6InJlZmVyZXIiLCJleGFtcGxlIjoiIn0seyJrZXkiOiJzZWMtY2gtdWEiLCJleGFtcGxlIjoiIn0seyJrZXkiOiJzZWMtY2gtdWEtbW9iaWxlIiwiZXhhbXBsZSI6IiJ9LHsia2V5Ijoic2VjLWNoLXVhLXBsYXRmb3JtIiwiZXhhbXBsZSI6IiJ9LHsia2V5Ijoic2VjLWZldGNoLWRlc3QiLCJleGFtcGxlIjoiIn0seyJrZXkiOiJzZWMtZmV0Y2gtbW9kZSIsImV4YW1wbGUiOiIifSx7ImtleSI6InNlYy1mZXRjaC1zaXRlIiwiZXhhbXBsZSI6IiJ9XQ==" />
Expand Down
Loading
Loading