VayaFlow
Contacts

Update a contact

Partially updates a contact. Supports updating contact info, questionnaire answers, notes, and flags.

PATCH
/api/v1/contacts/{contactId}

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

firstName?|
Length1 <= length
lastName?|
Length1 <= length
email?|
Formatemail
phone?|
Length10 <= length
channels?
kind?string
Value in"person" | "organization"
organizationId?|
role?|
country?string
address?|
dateOfBirth?|
Match^\d{4}-\d{2}-\d{2}$
timezone?|
Length1 <= length
questionnaire?array<>
deleteQuestionnaireKeys?array<>
notes?array<>
customFields?
deleteCustomFieldKeys?array<>
attribution?
compliance?
detail?|
Length1 <= length
flags?
aiOff?|
tags?array<>|
lastActivityAt?|

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"  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": null
}
{
  "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"
  }
}