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