VayaFlow
Contacts

Create a contact (direct)

Directly creates a contact without engine processing. Used for imports, migrations, and the Add Contact UI. Does not trigger qualification or delivery.

POST
/api/v1/contacts

Authorization

ApiKeyAuth
X-API-Key<token>

API key generated from your Vayaflow dashboard Settings page

In: header

Request Body

application/json

playbookId?string
Length1 <= length
firstName*string
Length1 <= length
lastName*string
Length1 <= length
email?string
Formatemail
phone?string
Match^[\d\s\-\(\)\.+]+$
Length10 <= length
country?string
address?
timezone?string
flags?
notes?array<>
files?array<>
questionnaire?|array<>
Default{}
attribution?
compliance?

Response Body

application/json

application/json

application/json

package mainimport (  "fmt"  "net/http"  "io/ioutil"  "strings")func main() {  url := "https://api.vayaflow.com/api/v1/contacts"  body := strings.NewReader(`{    "firstName": "string",    "lastName": "string"  }`)  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",
    "submissionId": "string"
  }
}
{
  "success": false,
  "error": {
    "code": "VALIDATION_ERROR",
    "message": "Invalid input data",
    "details": [
      "string"
    ]
  }
}
{
  "success": false,
  "error": {
    "code": "UNAUTHORIZED",
    "message": "Authentication required"
  }
}