Files
Get all files for a contact
Returns all file references associated with a contact.
Authorization
ApiKeyAuth X-API-Key<token>
API key generated from your Vayaflow dashboard Settings page
In: header
Path Parameters
contactId*string
The contact ID
Response Body
application/json
application/json
package mainimport ( "fmt" "net/http" "io/ioutil")func main() { url := "https://api.vayaflow.com/api/v1/files/string" 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": {
"contactId": "string",
"files": [
{
"fileId": "file_abc123",
"contactId": "contact_xyz789",
"fileKey": "retainer_signed",
"fileName": "retainer_signed.pdf",
"fileType": "pdf",
"documentUrl": "https://storage.example.com/files/retainer_signed.pdf",
"status": "signed",
"provider": "vayaflow",
"createdAt": "2024-06-15T10:30:00Z",
"updatedAt": "2024-06-15T14:22:00Z",
"signedAt": "2024-06-15T14:22:00Z"
}
],
"count": 0
}
}{
"success": false,
"error": {
"code": "UNAUTHORIZED",
"message": "Authentication required"
}
}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.
Get a specific file
Returns a single file by its contactId and fileKey.