Contacts
Update a contact
Partially updates a contact. Supports updating contact info, questionnaire answers, notes, and flags.
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?|
Length
1 <= lengthlastName?|
Length
1 <= lengthemail?|
Format
emailphone?|
Length
10 <= lengthchannels?
kind?string
Value in
"person" | "organization"organizationId?|
role?|
country?string
address?|
dateOfBirth?|
Match
^\d{4}-\d{2}-\d{2}$timezone?|
Length
1 <= lengthquestionnaire?array<>
deleteQuestionnaireKeys?array<>
notes?array<>
customFields?
deleteCustomFieldKeys?array<>
attribution?
compliance?
detail?|
Length
1 <= lengthflags?
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"
}
}