Update a submission
Partially updates a submission. Used to update status, qualification results, and posting results.
Authorization
ApiKeyAuth API key generated from your Vayaflow dashboard Settings page
In: header
Path Parameters
The submission ID
Request Body
application/json
"standard" | "manual_delivery" | "repost"Response Body
application/json
application/json
application/json
application/json
package mainimport ( "fmt" "net/http" "io/ioutil" "strings")func main() { url := "https://api.leadsail.app/api/v1/submissions/string" body := strings.NewReader(`{}`) 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": {
"submissionId": "string",
"leadId": "string",
"submissionNumber": 0,
"campaign": {
"campaignId": "string",
"name": "string",
"clientId": "string",
"clientName": "string",
"clientAbbrev": "string",
"offerId": "string",
"offerName": "string",
"offerAbbrev": "string"
},
"status": "new",
"qualification": {
"passed": true,
"originalCampaignQualified": true,
"score": 0,
"method": "string",
"reason": "string",
"qualifiedAt": "string"
},
"routing": {
"wasRouted": true,
"originalCampaignId": "string",
"routedToCampaignId": "string",
"routingReason": "string",
"routingMethod": "original",
"routingRuleName": "string",
"alternativeCampaigns": [
{
"campaignId": "string",
"clientName": "string",
"offerName": "string",
"qualified": true,
"priority": 0,
"reason": "string"
}
],
"routingEvaluatedAt": "string"
},
"posting": {
"success": true,
"clientLeadId": "string",
"statusCode": 0,
"postedAt": "string"
},
"delivery": {
"success": true,
"clientLeadId": "string",
"statusCode": 0,
"responseMessage": "string",
"url": "string",
"method": "string",
"bodyFormat": "string",
"deliveredAt": "string"
},
"result": "string",
"clientLeadId": "string",
"responseFields": {
"property1": "string",
"property2": "string"
},
"journeyEvents": [
{
"timestamp": "string",
"type": null,
"toClient": "string",
"toOffer": "string",
"toCampaignId": "string",
"reason": "string",
"details": {
"property1": null,
"property2": null
},
"error": {
"code": "string",
"message": "string",
"stack": "string"
}
}
],
"firstSubmissionActions": [
null
],
"flowType": "standard",
"submittedAt": "string",
"qualifiedAt": "string",
"postedAt": "string",
"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"
}
}Get submission details
Returns full details for a single submission including qualification results, routing decisions, and posting results.
Initiate an AI voice call
Triggers an outbound AI voice call to a lead. The call is placed asynchronously and the response returns immediately with an interaction ID for tracking. Pre-flight validation checks that the lead exists with a valid E.164 phone number, the campaign is active with a voice agent configured, the lead is not on the Do Not Call list, and auto-dialer rules are satisfied (operating hours, min gap, max attempts). Use webhooks to receive call completion events, or poll the interaction for status updates.