Docustay.Api
0.2.2
dotnet add package Docustay.Api --version 0.2.2
NuGet\Install-Package Docustay.Api -Version 0.2.2
<PackageReference Include="Docustay.Api" Version="0.2.2" />
<PackageVersion Include="Docustay.Api" Version="0.2.2" />
<PackageReference Include="Docustay.Api" />
paket add Docustay.Api --version 0.2.2
#r "nuget: Docustay.Api, 0.2.2"
#:package Docustay.Api@0.2.2
#addin nuget:?package=Docustay.Api&version=0.2.2
#tool nuget:?package=Docustay.Api&version=0.2.2
Docustay for C#
The official .NET client for the Docustay e-signature API: send a document from a template, get a webhook when each person signs, download the sealed PDF.
- API version: 2026-10-07
- Package version: 0.2.2
Install
dotnet add package Docustay.Api --version 0.2.2
The package targets .NET 8.
Send your first document
Put your key in DOCUSTAY_API_KEY and a template id in DOCUSTAY_TEMPLATE_ID.
using Docustay.Api.Api;
using Docustay.Api.Client;
using Docustay.Api.Model;
var config = new Configuration { AccessToken = Environment.GetEnvironmentVariable("DOCUSTAY_API_KEY") };
var api = new DocumentsApi(config);
var request = new SendRequest(
templateId: Guid.Parse(Environment.GetEnvironmentVariable("DOCUSTAY_TEMPLATE_ID")!),
parties: new List<SendRequestPartiesInner> { new SendRequestPartiesInner(seat: "signer_1", name: "Pat Example", email: "pat@example.com") });
var doc = api.SendDocument(Guid.NewGuid().ToString(), request);
More: https://docustay.app/docs
API reference
All URIs are relative to https://app.docustay.app
| Class | Method | HTTP request | Description |
|---|---|---|---|
| AccountApi | AiUsage | GET /api/v1/ai/usage | AI drafts used against your plan |
| AccountApi | PaymentsStatus | GET /api/v1/payments/status | Is Stripe ready to take a payment? |
| AccountApi | Preflight | POST /api/v1/preflight | Ask what an action would do to your plan, before doing it |
| AccountApi | Usage | GET /api/v1/usage | Documents, templates and emails used against your plan |
| DocumentsApi | AuditLogCsv | GET /api/v1/documents/{id}/audit-log.csv | The document's audit log as CSV |
| DocumentsApi | CancelAiJob | POST /api/v1/documents/ai/jobs/{id}/cancel | Cancel an AI job |
| DocumentsApi | CheckDocument | POST /api/v1/documents/check | Check a document's words before making it |
| DocumentsApi | CreateDocument | POST /api/v1/documents | Make a document from words and people |
| DocumentsApi | DeleteDraft | DELETE /api/v1/documents/{id} | Delete a draft that was never sent |
| DocumentsApi | DetectFields | POST /api/v1/documents/detect-fields | Find the fields on a PDF |
| DocumentsApi | DownloadSignedPdf | GET /api/v1/documents/{id}/signed.pdf | Download the signed copy |
| DocumentsApi | DraftWithAi | POST /api/v1/documents/ai/draft | Ask for an AI-written draft |
| DocumentsApi | EditWithAi | POST /api/v1/documents/ai/edit | Ask the assistant to change a document |
| DocumentsApi | EmbedSession | POST /api/v1/documents/{id}/embed-session | Start an embedded signing session for a seat |
| DocumentsApi | GetAiDraft | GET /api/v1/documents/ai/jobs/{id} | Read an AI draft job |
| DocumentsApi | GetDocument | GET /api/v1/documents/{id} | One document and where each person is |
| DocumentsApi | GetDraftSource | GET /api/v1/documents/{id}/source | The words, people and choices of a draft |
| DocumentsApi | GetWizard | GET /api/v1/ai/wizard | The wizard's questions |
| DocumentsApi | ListDocuments | GET /api/v1/documents | List documents |
| DocumentsApi | ListTemplates | GET /api/v1/documents/templates | Templates you can send |
| DocumentsApi | Remind | POST /api/v1/documents/{id}/remind | Remind the people who still have to sign |
| DocumentsApi | ReviseDocument | POST /api/v1/documents/{id}/revise | Change the words of a draft |
| DocumentsApi | Search | GET /api/v1/search | Search documents, templates and people |
| DocumentsApi | SendDocument | POST /api/v1/documents/send | Send a template to people to sign |
| DocumentsApi | SendDraft | POST /api/v1/documents/{id}/send | Send a draft |
| DocumentsApi | TestSign | POST /api/v1/documents/{id}/test-sign | Sign a test document (test mode only) |
| DocumentsApi | VoidDocument | POST /api/v1/documents/{id}/void | Void a document that is still out for signature |
| EmailApi | ListEmails | GET /api/v1/emails | The log of email about your documents |
| EmbeddingApi | BuilderSession | POST /api/v1/embedded/builder-session | Start an embedded template builder session |
| EmbeddingApi | ScribeSession | POST /api/v1/embedded/scribe-session | Start an embedded Scribe session |
| PaymentsApi | ListPayments | GET /api/v1/payments | List payments taken through documents |
| PaymentsApi | RefundPayment | POST /api/v1/payments/{id}/refund | Refund a payment, in full or in part |
| PlaysApi | AnswerDraft | POST /api/v1/drafts/{draftRef}/answers | Answer a template's questions |
| PlaysApi | ArchivePlay | DELETE /api/v1/plays/{name} | Archive a play |
| PlaysApi | DuplicatePlay | POST /api/v1/plays/{name}/duplicate | Copy a play under a new name |
| PlaysApi | GetPlay | GET /api/v1/plays/{name} | One play |
| PlaysApi | ListPlaybooks | GET /api/v1/playbooks | List playbooks (packs) |
| PlaysApi | ListPlays | GET /api/v1/plays | List plays |
| PlaysApi | PublishPlay | POST /api/v1/plays/{name}/publish | Publish a play version |
| PlaysApi | SavePlay | POST /api/v1/plays | Save a play (a new version) |
| PlaysApi | SavePlaybook | POST /api/v1/playbooks | Save a playbook (pack) |
| PlaysApi | SetPlaybookOn | POST /api/v1/playbooks/{name}/enable | Switch a pack on or off |
| PlaysApi | StartDraft | POST /api/v1/drafts | Start a draft from a template |
| PlaysApi | TestPlay | POST /api/v1/plays/test | Check a play without saving it |
| TeamsApi | ListTeams | GET /api/v1/teams | Teams and their members |
| TemplatesApi | CreateTemplateFromFile | POST /api/v1/templates/file | Make a template from a file with text tags |
| TemplatesApi | CreateTemplateFromHtml | POST /api/v1/templates/html | Make a template from HTML with text tags |
| TemplatesApi | CreateTemplateFromSource | POST /api/v1/templates/source | Make a template from a document source |
| TemplatesApi | CustomizeLibraryTemplate | POST /api/v1/templates/library/{slug}/customize | Customize a built-in template |
| TemplatesApi | DraftFromLibraryTemplate | POST /api/v1/templates/library/{slug}/documents | Make a draft from a built-in template |
| TemplatesApi | GetLibraryTemplate | GET /api/v1/templates/library/{slug} | One built-in template |
| TemplatesApi | GetTemplate | GET /api/v1/templates/{id} | One template and its seats |
| TemplatesApi | ListLibraryTemplates | GET /api/v1/templates/library | List the built-in templates |
| TemplatesApi | SetTemplateDefaults | POST /api/v1/templates/{id}/defaults | Set what a document made from a template starts with |
| TemplatesApi | UseTemplate | POST /api/v1/templates/{id}/documents | Use a written template for people |
| WebhooksApi | CreateWebhook | POST /api/v1/webhooks | Add a webhook |
| WebhooksApi | DeleteWebhook | DELETE /api/v1/webhooks/{id} | Remove a webhook |
| WebhooksApi | FetchRelayEvents | GET /api/v1/webhooks/{id}/relay | Fetch stored deliveries of a relay webhook |
| WebhooksApi | GetWebhook | GET /api/v1/webhooks/{id} | Get a webhook |
| WebhooksApi | ListWebhookDeliveries | GET /api/v1/webhooks/{id}/deliveries | Recent deliveries |
| WebhooksApi | ListWebhookTopics | GET /api/v1/webhooks/topics | The events a webhook can subscribe to |
| WebhooksApi | ListWebhooks | GET /api/v1/webhooks | List webhooks |
| WebhooksApi | RotateWebhookSecret | POST /api/v1/webhooks/{id}/rotate | Rotate the signing secret |
| WebhooksApi | TestWebhook | POST /api/v1/webhooks/{id}/test | Send a test event |
Models
- AiDraftJob
- AiUsage
- AiUsageByFeatureValue
- AnswerDraftRequest
- BuilderSession
- BuilderSessionRequest
- CheckDocument200Response
- CheckDocumentRequest
- CreateDocumentRequest
- CreateTemplateFromSource201Response
- CreateTemplateFromSourceRequest
- CreateWebhook201Response
- CreateWebhookRequest
- CustomizeLibraryTemplateRequest
- DeleteDraft200Response
- DeleteWebhook200Response
- DetectFieldsRequest
- DetectFieldsResult
- DetectFieldsResultDocumentsInner
- DetectFieldsResultPagesInner
- DetectFieldsResultSummary
- DetectedField
- Document
- DocumentEventsInner
- DocumentMade
- DocumentSummary
- DraftFromLibraryTemplateRequest
- DraftWithAi202Response
- DraftWithAiRequest
- DuplicatePlayRequest
- EditWithAiRequest
- EditWithAiRequestVariablesInner
- EmailChoice
- EmbedSession200Response
- EmbedSessionRequest
- Error
- ErrorError
- FetchRelayEvents200Response
- FetchRelayEvents200ResponseEventsInner
- FileTemplateRequest
- GetDraftSource200Response
- HtmlTemplateRequest
- ListDocuments200Response
- ListDocuments200ResponsePage
- ListEmails200Response
- ListLibraryTemplates400Response
- ListLibraryTemplates400ResponseError
- ListTeams200Response
- ListTeams200ResponseTeamsInner
- ListTeams200ResponseTeamsInnerMembersInner
- ListTemplates200Response
- ListWebhookDeliveries200Response
- ListWebhookDeliveries200ResponseDeliveriesInner
- ListWebhookTopics200Response
- ListWebhooks200Response
- Party
- Payment
- PaymentFee
- PaymentsStatus200Response
- Person
- PreflightAnswer
- PreflightAnswerCost
- PreflightAnswerPeriod
- PreflightAnswerPlan
- PreflightOption
- PreflightRequest
- PublishPlayRequest
- RefundPaymentRequest
- Remind200Response
- RemindRequest
- ReviseDocument201Response
- ReviseDocumentRequest
- RotateWebhookSecret200Response
- RotateWebhookSecretRequest
- SavePlayRequest
- SavePlaybookRequest
- ScribeSessionRequest
- SendChoices
- SendDocument201Response
- SendDocument201ResponseNotEmailedInner
- SendDraft201Response
- SendDraft202Response
- SendDraft202ResponseApproval
- SendDraftRequest
- SendRequest
- SendRequestPartiesInner
- SetPlaybookOnRequest
- SetTemplateDefaults200Response
- SetTemplateDefaultsRequest
- StartDraftRequest
- StartDraftRequestAnswersValue
- StartDraftRequestPeopleInner
- Template
- TemplateMade
- TemplateMadeDetected
- TemplateMadeWarningsInner
- TemplateSeatsInner
- TestSign200Response
- TestSign200ResponseProgress
- TestSignRequest
- TestWebhook200Response
- TestWebhookRequest
- Usage
- UsageBilling
- UsageDocuments
- UsageDrafts
- UsageEmails
- UsageLimits
- UsagePeriod
- UsageSigners
- UsageTemplates
- UseTemplateRequest
- VoidDocument200Response
- VoidDocumentRequest
- WebhookDocumentsDocumentCreatedRequest
- WebhookDocumentsDocumentSentRequest
- WebhookEndpoint
- WizardBrief
- WizardBriefPayment
Authorization
Send your API key as a bearer token: Authorization: Bearer $DOCUSTAY_API_KEY. A test key (it starts with ds_test_) only ever emails you.
Licence
MIT. See the LICENSE file. The Docustay server is AGPL-3.0; this client is MIT so you can ship it in any project.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net8.0
- JsonSubTypes (>= 2.0.1)
- Newtonsoft.Json (>= 13.0.3)
- Polly (>= 8.1.0)
- RestSharp (>= 112.0.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Minor update