- 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.
package main
import(
"context"
"os"
sdkgo "github.com/documenso/sdk-go"
"log"
)
func main() {
ctx := context.Background()
s := sdkgo.New(
sdkgo.WithSecurity(os.Getenv("DOCUMENSO_API_KEY")),
)
res, err := s.Templates.Recipients.Get(ctx, 9436.42)
if err != nil {
log.Fatal(err)
}
if res.Object != nil {
// handle response
}
}| Parameter | Type | Required | Description |
|---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
recipientID |
float64 | ✔️ | N/A |
opts |
[]operations.Option | ➖ | The options for this request. |
*operations.RecipientGetTemplateRecipientResponse, error
| Error Type | Status Code | Content Type |
|---|---|---|
| apierrors.RecipientGetTemplateRecipientBadRequestError | 400 | application/json |
| apierrors.RecipientGetTemplateRecipientUnauthorizedError | 401 | application/json |
| apierrors.RecipientGetTemplateRecipientForbiddenError | 403 | application/json |
| apierrors.RecipientGetTemplateRecipientNotFoundError | 404 | application/json |
| apierrors.RecipientGetTemplateRecipientInternalServerError | 500 | application/json |
| apierrors.APIError | 4XX, 5XX | */* |
Create a single recipient for a template.
package main
import(
"context"
"os"
sdkgo "github.com/documenso/sdk-go"
"github.com/documenso/sdk-go/models/operations"
"log"
)
func main() {
ctx := context.Background()
s := sdkgo.New(
sdkgo.WithSecurity(os.Getenv("DOCUMENSO_API_KEY")),
)
res, err := s.Templates.Recipients.Create(ctx, operations.RecipientCreateTemplateRecipientRequest{
TemplateID: 5712.95,
Recipient: operations.RecipientCreateTemplateRecipientRecipient{
Email: "Gerhard88@yahoo.com",
Name: "<value>",
Role: operations.RecipientCreateTemplateRecipientRoleRequestSigner,
},
})
if err != nil {
log.Fatal(err)
}
if res.Object != nil {
// handle response
}
}| Parameter | Type | Required | Description |
|---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
request |
operations.RecipientCreateTemplateRecipientRequest | ✔️ | The request object to use for the request. |
opts |
[]operations.Option | ➖ | The options for this request. |
*operations.RecipientCreateTemplateRecipientResponse, error
| Error Type | Status Code | Content Type |
|---|---|---|
| apierrors.RecipientCreateTemplateRecipientBadRequestError | 400 | application/json |
| apierrors.RecipientCreateTemplateRecipientUnauthorizedError | 401 | application/json |
| apierrors.RecipientCreateTemplateRecipientForbiddenError | 403 | application/json |
| apierrors.RecipientCreateTemplateRecipientInternalServerError | 500 | application/json |
| apierrors.APIError | 4XX, 5XX | */* |
Create multiple recipients for a template.
package main
import(
"context"
"os"
sdkgo "github.com/documenso/sdk-go"
"github.com/documenso/sdk-go/models/operations"
"log"
)
func main() {
ctx := context.Background()
s := sdkgo.New(
sdkgo.WithSecurity(os.Getenv("DOCUMENSO_API_KEY")),
)
res, err := s.Templates.Recipients.CreateMany(ctx, operations.RecipientCreateTemplateRecipientsRequest{
TemplateID: 5642.48,
Recipients: []operations.RecipientCreateTemplateRecipientsRecipientRequest{},
})
if err != nil {
log.Fatal(err)
}
if res.Object != nil {
// handle response
}
}| Parameter | Type | Required | Description |
|---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
request |
operations.RecipientCreateTemplateRecipientsRequest | ✔️ | The request object to use for the request. |
opts |
[]operations.Option | ➖ | The options for this request. |
*operations.RecipientCreateTemplateRecipientsResponse, error
| Error Type | Status Code | Content Type |
|---|---|---|
| apierrors.RecipientCreateTemplateRecipientsBadRequestError | 400 | application/json |
| apierrors.RecipientCreateTemplateRecipientsUnauthorizedError | 401 | application/json |
| apierrors.RecipientCreateTemplateRecipientsForbiddenError | 403 | application/json |
| apierrors.RecipientCreateTemplateRecipientsInternalServerError | 500 | application/json |
| apierrors.APIError | 4XX, 5XX | */* |
Update a single recipient for a template.
package main
import(
"context"
"os"
sdkgo "github.com/documenso/sdk-go"
"github.com/documenso/sdk-go/models/operations"
"log"
)
func main() {
ctx := context.Background()
s := sdkgo.New(
sdkgo.WithSecurity(os.Getenv("DOCUMENSO_API_KEY")),
)
res, err := s.Templates.Recipients.Update(ctx, operations.RecipientUpdateTemplateRecipientRequest{
TemplateID: 2984.61,
Recipient: operations.RecipientUpdateTemplateRecipientRecipient{
ID: 8617.99,
},
})
if err != nil {
log.Fatal(err)
}
if res.Object != nil {
// handle response
}
}| Parameter | Type | Required | Description |
|---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
request |
operations.RecipientUpdateTemplateRecipientRequest | ✔️ | The request object to use for the request. |
opts |
[]operations.Option | ➖ | The options for this request. |
*operations.RecipientUpdateTemplateRecipientResponse, error
| Error Type | Status Code | Content Type |
|---|---|---|
| apierrors.RecipientUpdateTemplateRecipientBadRequestError | 400 | application/json |
| apierrors.RecipientUpdateTemplateRecipientUnauthorizedError | 401 | application/json |
| apierrors.RecipientUpdateTemplateRecipientForbiddenError | 403 | application/json |
| apierrors.RecipientUpdateTemplateRecipientInternalServerError | 500 | application/json |
| apierrors.APIError | 4XX, 5XX | */* |
Update multiple recipients for a template.
package main
import(
"context"
"os"
sdkgo "github.com/documenso/sdk-go"
"github.com/documenso/sdk-go/models/operations"
"log"
)
func main() {
ctx := context.Background()
s := sdkgo.New(
sdkgo.WithSecurity(os.Getenv("DOCUMENSO_API_KEY")),
)
res, err := s.Templates.Recipients.UpdateMany(ctx, operations.RecipientUpdateTemplateRecipientsRequest{
TemplateID: 5597.58,
Recipients: []operations.RecipientUpdateTemplateRecipientsRecipientRequest{
operations.RecipientUpdateTemplateRecipientsRecipientRequest{
ID: 1630.42,
},
},
})
if err != nil {
log.Fatal(err)
}
if res.Object != nil {
// handle response
}
}| Parameter | Type | Required | Description |
|---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
request |
operations.RecipientUpdateTemplateRecipientsRequest | ✔️ | The request object to use for the request. |
opts |
[]operations.Option | ➖ | The options for this request. |
*operations.RecipientUpdateTemplateRecipientsResponse, error
| Error Type | Status Code | Content Type |
|---|---|---|
| apierrors.RecipientUpdateTemplateRecipientsBadRequestError | 400 | application/json |
| apierrors.RecipientUpdateTemplateRecipientsUnauthorizedError | 401 | application/json |
| apierrors.RecipientUpdateTemplateRecipientsForbiddenError | 403 | application/json |
| apierrors.RecipientUpdateTemplateRecipientsInternalServerError | 500 | application/json |
| apierrors.APIError | 4XX, 5XX | */* |
Delete template recipient
package main
import(
"context"
"os"
sdkgo "github.com/documenso/sdk-go"
"github.com/documenso/sdk-go/models/operations"
"log"
)
func main() {
ctx := context.Background()
s := sdkgo.New(
sdkgo.WithSecurity(os.Getenv("DOCUMENSO_API_KEY")),
)
res, err := s.Templates.Recipients.Delete(ctx, operations.RecipientDeleteTemplateRecipientRequest{
RecipientID: 312.69,
})
if err != nil {
log.Fatal(err)
}
if res.Object != nil {
// handle response
}
}| Parameter | Type | Required | Description |
|---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
request |
operations.RecipientDeleteTemplateRecipientRequest | ✔️ | The request object to use for the request. |
opts |
[]operations.Option | ➖ | The options for this request. |
*operations.RecipientDeleteTemplateRecipientResponse, error
| Error Type | Status Code | Content Type |
|---|---|---|
| apierrors.RecipientDeleteTemplateRecipientBadRequestError | 400 | application/json |
| apierrors.RecipientDeleteTemplateRecipientUnauthorizedError | 401 | application/json |
| apierrors.RecipientDeleteTemplateRecipientForbiddenError | 403 | application/json |
| apierrors.RecipientDeleteTemplateRecipientInternalServerError | 500 | application/json |
| apierrors.APIError | 4XX, 5XX | */* |