(templates.recipients)
- get - Get template recipient
- create - Create template recipient
- createMany - Create template recipients
- update - Update template recipient
- updateMany - Update template recipients
- delete - Delete template recipient
Returns a single recipient. If you want to retrieve all the recipients for a template, use the "Get Template" endpoint.
import { Documenso } from "@documenso/sdk-typescript";
const documenso = new Documenso({
apiKey: process.env["DOCUMENSO_API_KEY"] ?? "",
});
async function run() {
const result = await documenso.templates.recipients.get({
recipientId: 7003.47,
});
// Handle the result
console.log(result);
}
run();
The standalone function version of this method:
import { DocumensoCore } from "@documenso/sdk-typescript/core.js";
import { templatesRecipientsGet } from "@documenso/sdk-typescript/funcs/templatesRecipientsGet.js";
// Use `DocumensoCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const documenso = new DocumensoCore({
apiKey: process.env["DOCUMENSO_API_KEY"] ?? "",
});
async function run() {
const res = await templatesRecipientsGet(documenso, {
recipientId: 7003.47,
});
if (!res.ok) {
throw res.error;
}
const { value: result } = res;
// Handle the result
console.log(result);
}
run();
Parameter | Type | Required | Description |
---|---|---|---|
request |
operations.RecipientGetTemplateRecipientRequest | ✔️ | The request object to use for the request. |
options |
RequestOptions | ➖ | Used to set various options for making HTTP requests. |
options.fetchOptions |
RequestInit | ➖ | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body , are allowed. |
options.retries |
RetryConfig | ➖ | Enables retrying HTTP requests under certain failure conditions. |
Promise<operations.RecipientGetTemplateRecipientResponse>
Error Type | Status Code | Content Type |
---|---|---|
errors.RecipientGetTemplateRecipientBadRequestError | 400 | application/json |
errors.RecipientGetTemplateRecipientNotFoundError | 404 | application/json |
errors.RecipientGetTemplateRecipientInternalServerError | 500 | application/json |
errors.APIError | 4XX, 5XX | */* |
Create a single recipient for a template.
import { Documenso } from "@documenso/sdk-typescript";
const documenso = new Documenso({
apiKey: process.env["DOCUMENSO_API_KEY"] ?? "",
});
async function run() {
const result = await documenso.templates.recipients.create({
templateId: 4865.89,
recipient: {
email: "[email protected]",
name: "<value>",
role: "CC",
},
});
// Handle the result
console.log(result);
}
run();
The standalone function version of this method:
import { DocumensoCore } from "@documenso/sdk-typescript/core.js";
import { templatesRecipientsCreate } from "@documenso/sdk-typescript/funcs/templatesRecipientsCreate.js";
// Use `DocumensoCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const documenso = new DocumensoCore({
apiKey: process.env["DOCUMENSO_API_KEY"] ?? "",
});
async function run() {
const res = await templatesRecipientsCreate(documenso, {
templateId: 4865.89,
recipient: {
email: "[email protected]",
name: "<value>",
role: "CC",
},
});
if (!res.ok) {
throw res.error;
}
const { value: result } = res;
// Handle the result
console.log(result);
}
run();
Parameter | Type | Required | Description |
---|---|---|---|
request |
operations.RecipientCreateTemplateRecipientRequest | ✔️ | The request object to use for the request. |
options |
RequestOptions | ➖ | Used to set various options for making HTTP requests. |
options.fetchOptions |
RequestInit | ➖ | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body , are allowed. |
options.retries |
RetryConfig | ➖ | Enables retrying HTTP requests under certain failure conditions. |
Promise<operations.RecipientCreateTemplateRecipientResponse>
Error Type | Status Code | Content Type |
---|---|---|
errors.RecipientCreateTemplateRecipientBadRequestError | 400 | application/json |
errors.RecipientCreateTemplateRecipientInternalServerError | 500 | application/json |
errors.APIError | 4XX, 5XX | */* |
Create multiple recipients for a template.
import { Documenso } from "@documenso/sdk-typescript";
const documenso = new Documenso({
apiKey: process.env["DOCUMENSO_API_KEY"] ?? "",
});
async function run() {
const result = await documenso.templates.recipients.createMany({
templateId: 5158.41,
recipients: [
{
email: "[email protected]",
name: "<value>",
role: "APPROVER",
},
{
email: "[email protected]",
name: "<value>",
role: "APPROVER",
},
],
});
// Handle the result
console.log(result);
}
run();
The standalone function version of this method:
import { DocumensoCore } from "@documenso/sdk-typescript/core.js";
import { templatesRecipientsCreateMany } from "@documenso/sdk-typescript/funcs/templatesRecipientsCreateMany.js";
// Use `DocumensoCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const documenso = new DocumensoCore({
apiKey: process.env["DOCUMENSO_API_KEY"] ?? "",
});
async function run() {
const res = await templatesRecipientsCreateMany(documenso, {
templateId: 5158.41,
recipients: [
{
email: "[email protected]",
name: "<value>",
role: "APPROVER",
},
{
email: "[email protected]",
name: "<value>",
role: "APPROVER",
},
],
});
if (!res.ok) {
throw res.error;
}
const { value: result } = res;
// Handle the result
console.log(result);
}
run();
Parameter | Type | Required | Description |
---|---|---|---|
request |
operations.RecipientCreateTemplateRecipientsRequest | ✔️ | The request object to use for the request. |
options |
RequestOptions | ➖ | Used to set various options for making HTTP requests. |
options.fetchOptions |
RequestInit | ➖ | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body , are allowed. |
options.retries |
RetryConfig | ➖ | Enables retrying HTTP requests under certain failure conditions. |
Promise<operations.RecipientCreateTemplateRecipientsResponse>
Error Type | Status Code | Content Type |
---|---|---|
errors.RecipientCreateTemplateRecipientsBadRequestError | 400 | application/json |
errors.RecipientCreateTemplateRecipientsInternalServerError | 500 | application/json |
errors.APIError | 4XX, 5XX | */* |
Update a single recipient for a template.
import { Documenso } from "@documenso/sdk-typescript";
const documenso = new Documenso({
apiKey: process.env["DOCUMENSO_API_KEY"] ?? "",
});
async function run() {
const result = await documenso.templates.recipients.update({
templateId: 8574.78,
recipient: {
id: 5971.29,
},
});
// Handle the result
console.log(result);
}
run();
The standalone function version of this method:
import { DocumensoCore } from "@documenso/sdk-typescript/core.js";
import { templatesRecipientsUpdate } from "@documenso/sdk-typescript/funcs/templatesRecipientsUpdate.js";
// Use `DocumensoCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const documenso = new DocumensoCore({
apiKey: process.env["DOCUMENSO_API_KEY"] ?? "",
});
async function run() {
const res = await templatesRecipientsUpdate(documenso, {
templateId: 8574.78,
recipient: {
id: 5971.29,
},
});
if (!res.ok) {
throw res.error;
}
const { value: result } = res;
// Handle the result
console.log(result);
}
run();
Parameter | Type | Required | Description |
---|---|---|---|
request |
operations.RecipientUpdateTemplateRecipientRequest | ✔️ | The request object to use for the request. |
options |
RequestOptions | ➖ | Used to set various options for making HTTP requests. |
options.fetchOptions |
RequestInit | ➖ | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body , are allowed. |
options.retries |
RetryConfig | ➖ | Enables retrying HTTP requests under certain failure conditions. |
Promise<operations.RecipientUpdateTemplateRecipientResponse>
Error Type | Status Code | Content Type |
---|---|---|
errors.RecipientUpdateTemplateRecipientBadRequestError | 400 | application/json |
errors.RecipientUpdateTemplateRecipientInternalServerError | 500 | application/json |
errors.APIError | 4XX, 5XX | */* |
Update multiple recipients for a template.
import { Documenso } from "@documenso/sdk-typescript";
const documenso = new Documenso({
apiKey: process.env["DOCUMENSO_API_KEY"] ?? "",
});
async function run() {
const result = await documenso.templates.recipients.updateMany({
templateId: 4057.69,
recipients: [
{
id: 5359.16,
},
{
id: 8982.15,
},
],
});
// Handle the result
console.log(result);
}
run();
The standalone function version of this method:
import { DocumensoCore } from "@documenso/sdk-typescript/core.js";
import { templatesRecipientsUpdateMany } from "@documenso/sdk-typescript/funcs/templatesRecipientsUpdateMany.js";
// Use `DocumensoCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const documenso = new DocumensoCore({
apiKey: process.env["DOCUMENSO_API_KEY"] ?? "",
});
async function run() {
const res = await templatesRecipientsUpdateMany(documenso, {
templateId: 4057.69,
recipients: [
{
id: 5359.16,
},
{
id: 8982.15,
},
],
});
if (!res.ok) {
throw res.error;
}
const { value: result } = res;
// Handle the result
console.log(result);
}
run();
Parameter | Type | Required | Description |
---|---|---|---|
request |
operations.RecipientUpdateTemplateRecipientsRequest | ✔️ | The request object to use for the request. |
options |
RequestOptions | ➖ | Used to set various options for making HTTP requests. |
options.fetchOptions |
RequestInit | ➖ | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body , are allowed. |
options.retries |
RetryConfig | ➖ | Enables retrying HTTP requests under certain failure conditions. |
Promise<operations.RecipientUpdateTemplateRecipientsResponse>
Error Type | Status Code | Content Type |
---|---|---|
errors.RecipientUpdateTemplateRecipientsBadRequestError | 400 | application/json |
errors.RecipientUpdateTemplateRecipientsInternalServerError | 500 | application/json |
errors.APIError | 4XX, 5XX | */* |
Delete template recipient
import { Documenso } from "@documenso/sdk-typescript";
const documenso = new Documenso({
apiKey: process.env["DOCUMENSO_API_KEY"] ?? "",
});
async function run() {
const result = await documenso.templates.recipients.delete({
recipientId: 5459.07,
});
// Handle the result
console.log(result);
}
run();
The standalone function version of this method:
import { DocumensoCore } from "@documenso/sdk-typescript/core.js";
import { templatesRecipientsDelete } from "@documenso/sdk-typescript/funcs/templatesRecipientsDelete.js";
// Use `DocumensoCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const documenso = new DocumensoCore({
apiKey: process.env["DOCUMENSO_API_KEY"] ?? "",
});
async function run() {
const res = await templatesRecipientsDelete(documenso, {
recipientId: 5459.07,
});
if (!res.ok) {
throw res.error;
}
const { value: result } = res;
// Handle the result
console.log(result);
}
run();
Parameter | Type | Required | Description |
---|---|---|---|
request |
operations.RecipientDeleteTemplateRecipientRequest | ✔️ | The request object to use for the request. |
options |
RequestOptions | ➖ | Used to set various options for making HTTP requests. |
options.fetchOptions |
RequestInit | ➖ | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body , are allowed. |
options.retries |
RetryConfig | ➖ | Enables retrying HTTP requests under certain failure conditions. |
Promise<operations.RecipientDeleteTemplateRecipientResponse>
Error Type | Status Code | Content Type |
---|---|---|
errors.RecipientDeleteTemplateRecipientBadRequestError | 400 | application/json |
errors.RecipientDeleteTemplateRecipientInternalServerError | 500 | application/json |
errors.APIError | 4XX, 5XX | */* |