VayaFlow
Contacts

Resolve or reopen a contact review

Rules on the review hold on the contact's pursuit. Approving releases the pursuit so the chase and delivery proceed. Rejecting ends the pursuit and records the contact as rejected. Setting to pending puts the contact back on hold.

POST
/api/v1/contacts/{contactId}/approve

Authorization

ApiKeyAuth
X-API-Key<token>

API key generated from your Vayaflow dashboard Settings page

In: header

Path Parameters

contactId*string

The contact ID

Request Body

application/json

status*string

The approval decision

Value in"approved" | "rejected" | "pending"
reason?string

Optional reason for the decision

Response 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/contacts/string/approve"  body := strings.NewReader(`{    "status": "approved"  }`)  req, _ := http.NewRequest("POST", 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": {
    "contactId": "string",
    "status": "approved",
    "pursuitId": "string",
    "pursuitStatus": "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"
  }
}