Documents
Revoke a contact's documents link
Revokes the link: it stops working at once. The next send to the contact issues a new link.
Authorization
ApiKeyAuth X-API-Key<token>
API key generated from your Vayaflow dashboard Settings page
In: header
Path Parameters
portalLinkId*string
Request Body
application/json
revoked*boolean
Revoke the link: it stops working until the next send issues a new one.
Value in
trueResponse Body
application/json
application/json
application/json
application/json
package mainimport ( "fmt" "net/http" "io/ioutil" "strings")func main() { url := "https://api.vayaflow.com/api/v1/portal-links/plnk_abc123" body := strings.NewReader(`{ "revoked": true }`) req, _ := http.NewRequest("PATCH", url, body) req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body))}{
"success": true,
"data": {
"portalLinkId": "string",
"contactId": "string",
"playbookId": "string",
"enrollmentId": "string",
"expiresAt": "string",
"revokedAt": "string",
"lastSentAt": "string",
"isTest": true,
"createdAt": "string",
"updatedAt": "string"
}
}{
"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"
}
}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.
Create or update a file
Creates or updates a file reference for a contact. Upserts by contactId + fileKey — if a file with the same key already exists, it will be updated. The file must already be hosted at a publicly accessible URL.