List a contact's documents
Every document the contact owes or receives for a playbook, where each stands, and the state of the contact's link. Omit playbookId for documents sent outside any playbook.
Authorization
ApiKeyAuth API key generated from your Vayaflow dashboard Settings page
In: header
Path Parameters
Query Parameters
Response Body
application/json
application/json
application/json
application/json
package mainimport ( "fmt" "net/http" "io/ioutil")func main() { url := "https://api.vayaflow.com/api/v1/contacts/cont_abc123/documents" req, _ := http.NewRequest("GET", url, nil) res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body))}{
"success": true,
"data": {
"playbookId": "string",
"items": [
{
"fileKey": "retainer",
"name": "Retainer agreement",
"kind": "esign",
"required": true,
"includeByDefault": true,
"status": "not_sent",
"documentId": "string",
"variant": "string",
"documentTemplateId": "string",
"inEnvelopeIds": [
"string"
]
}
],
"link": {
"state": "active",
"portalLinkId": "string",
"expiresAt": "string",
"portalUrl": "string"
},
"envelopes": [
{
"envelopeId": "env_abc123",
"createdAt": "string",
"source": "agent",
"status": "open",
"documents": [
{
"fileKey": "string",
"name": "string"
}
],
"done": 0,
"total": 0
}
]
}
}{
"success": false,
"error": {
"code": "VALIDATION_ERROR",
"message": "Invalid input data",
"details": [
"string"
]
}
}{
"success": false,
"error": {
"code": "UNAUTHORIZED",
"message": "Authentication required"
}
}{
"success": false,
"error": {
"code": "NOT_FOUND",
"message": "Resource not found"
}
}Send documents to a contact
Sends a playbook's documents (or one template) to a contact as one send with one link to the contact's documents page. With no documents list, every outstanding document whose conditions match the contact and that the playbook includes by default goes. Documents already done, or already sent and still open, are skipped and listed, never sent twice. The link is reused across sends for the same contact and playbook, and each send extends it. Responds 409 NOTHING_TO_SEND when every document is done, already out, or does not apply.
Revoke a contact's documents link
Revokes the link: it stops working at once. The next send to the contact issues a new link.