Leads
Get lead details
Returns flat lead details including contact info, questionnaire, flags, and metadata. Does not include submissions or metrics.
Authorization
ApiKeyAuth X-API-Key<token>
API key generated from your Vayaflow dashboard Settings page
In: header
Path Parameters
leadId*string
The lead ID
Response Body
application/json
application/json
application/json
package mainimport ( "fmt" "net/http" "io/ioutil")func main() { url := "https://api.leadsail.app/api/v1/leads/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": {
"leadId": "string",
"campaign": {
"campaignId": "string",
"name": "string",
"clientId": "string",
"clientName": "string",
"clientAbbrev": "string",
"offerId": "string",
"offerName": "string",
"offerAbbrev": "string"
},
"approval": {
"status": "pending",
"campaignId": "string",
"decidedBy": "string",
"decidedAt": "string",
"reason": "string"
},
"firstName": "string",
"lastName": "string",
"email": "string",
"phone": "string",
"country": "string",
"address": {
"street": "string",
"unit": "string",
"city": "string",
"state": "string",
"zip": "string",
"country": "US"
},
"dateOfBirth": "string",
"timezone": "string",
"timezoneSource": "ip",
"notes": [
{
"id": "string",
"text": "string",
"createdAt": "string",
"createdBy": "string"
}
],
"questionnaire": [
{
"key": "string",
"question": "string",
"answer": null
}
],
"attribution": {
"params": {
"property1": "string",
"property2": "string"
},
"captureUrl": "http://example.com",
"referrer": "http://example.com",
"ipAddress": "string",
"userAgent": "string",
"gclid": "string",
"gbraid": "string",
"wbraid": "string",
"fbclid": "string",
"fbc": "string",
"fbp": "string",
"ttclid": "string",
"ttp": "string",
"msclkid": "string",
"tblci": "string",
"adPlatform": "string",
"capturePlatform": "string"
},
"compliance": {
"tcpaConsent": true,
"tcpaConsentTimestamp": "string",
"tcpaConsentMethod": "checkbox",
"tcpaLanguage": "string",
"trustedFormCertId": "string",
"trustedFormCertUrl": "http://example.com",
"jornayaLeadId": "string",
"privacyPolicyUrl": "http://example.com",
"termsUrl": "http://example.com",
"customFields": {
"property1": null,
"property2": null
}
},
"flags": {
"isTest": true,
"isDuplicate": true,
"isDnc": true,
"isRepost": true,
"wasImported": true
},
"customFields": {
"property1": null,
"property2": null
},
"status": "string",
"detail": "string",
"clientLeadId": "string",
"tags": [
"string"
],
"repostedTo": [
"string"
],
"firstSubmittedAt": "string",
"latestSubmittedAt": "string",
"lastActivityAt": "string",
"deliveredAt": "string",
"submissionCount": 0,
"createdAt": "string",
"updatedAt": "string",
"archivedAt": "string"
}
}{
"success": false,
"error": {
"code": "UNAUTHORIZED",
"message": "Authentication required"
}
}{
"success": false,
"error": {
"code": "NOT_FOUND",
"message": "Resource not found"
}
}