Create or update a Contact
curl --request POST \
--url 'https://api.vida.dev/api/v2/contact?token=' \
--header 'Content-Type: application/json' \
--data '
{
"phone": "+15551234567",
"name": "Example Person",
"email": "lead@example.com",
"address": {
"state": "LA",
"zip": "71101"
},
"customFields": {
"vendorLeadCode": "lead-123"
}
}
'import requests
url = "https://api.vida.dev/api/v2/contact?token="
payload = {
"phone": "+15551234567",
"name": "Example Person",
"email": "lead@example.com",
"address": {
"state": "LA",
"zip": "71101"
},
"customFields": { "vendorLeadCode": "lead-123" }
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
phone: '+15551234567',
name: 'Example Person',
email: 'lead@example.com',
address: {state: 'LA', zip: '71101'},
customFields: {vendorLeadCode: 'lead-123'}
})
};
fetch('https://api.vida.dev/api/v2/contact?token=', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.vida.dev/api/v2/contact?token=",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'phone' => '+15551234567',
'name' => 'Example Person',
'email' => 'lead@example.com',
'address' => [
'state' => 'LA',
'zip' => '71101'
],
'customFields' => [
'vendorLeadCode' => 'lead-123'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.vida.dev/api/v2/contact?token="
payload := strings.NewReader("{\n \"phone\": \"+15551234567\",\n \"name\": \"Example Person\",\n \"email\": \"lead@example.com\",\n \"address\": {\n \"state\": \"LA\",\n \"zip\": \"71101\"\n },\n \"customFields\": {\n \"vendorLeadCode\": \"lead-123\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.vida.dev/api/v2/contact?token=")
.header("Content-Type", "application/json")
.body("{\n \"phone\": \"+15551234567\",\n \"name\": \"Example Person\",\n \"email\": \"lead@example.com\",\n \"address\": {\n \"state\": \"LA\",\n \"zip\": \"71101\"\n },\n \"customFields\": {\n \"vendorLeadCode\": \"lead-123\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.vida.dev/api/v2/contact?token=")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"phone\": \"+15551234567\",\n \"name\": \"Example Person\",\n \"email\": \"lead@example.com\",\n \"address\": {\n \"state\": \"LA\",\n \"zip\": \"71101\"\n },\n \"customFields\": {\n \"vendorLeadCode\": \"lead-123\"\n }\n}"
response = http.request(request)
puts response.read_bodyContacts
Create or update a Contact
Creates a Contact or updates the matching Contact, then returns the persisted Contact. Resolve an existing person using id or target; provide phone or email to create one when no person is found. Provided top-level fields replace existing values; use PATCH for nested merges. See Contact fields for the complete field reference.
POST
/
api
/
v2
/
contact
Create or update a Contact
curl --request POST \
--url 'https://api.vida.dev/api/v2/contact?token=' \
--header 'Content-Type: application/json' \
--data '
{
"phone": "+15551234567",
"name": "Example Person",
"email": "lead@example.com",
"address": {
"state": "LA",
"zip": "71101"
},
"customFields": {
"vendorLeadCode": "lead-123"
}
}
'import requests
url = "https://api.vida.dev/api/v2/contact?token="
payload = {
"phone": "+15551234567",
"name": "Example Person",
"email": "lead@example.com",
"address": {
"state": "LA",
"zip": "71101"
},
"customFields": { "vendorLeadCode": "lead-123" }
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
phone: '+15551234567',
name: 'Example Person',
email: 'lead@example.com',
address: {state: 'LA', zip: '71101'},
customFields: {vendorLeadCode: 'lead-123'}
})
};
fetch('https://api.vida.dev/api/v2/contact?token=', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.vida.dev/api/v2/contact?token=",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'phone' => '+15551234567',
'name' => 'Example Person',
'email' => 'lead@example.com',
'address' => [
'state' => 'LA',
'zip' => '71101'
],
'customFields' => [
'vendorLeadCode' => 'lead-123'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.vida.dev/api/v2/contact?token="
payload := strings.NewReader("{\n \"phone\": \"+15551234567\",\n \"name\": \"Example Person\",\n \"email\": \"lead@example.com\",\n \"address\": {\n \"state\": \"LA\",\n \"zip\": \"71101\"\n },\n \"customFields\": {\n \"vendorLeadCode\": \"lead-123\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.vida.dev/api/v2/contact?token=")
.header("Content-Type", "application/json")
.body("{\n \"phone\": \"+15551234567\",\n \"name\": \"Example Person\",\n \"email\": \"lead@example.com\",\n \"address\": {\n \"state\": \"LA\",\n \"zip\": \"71101\"\n },\n \"customFields\": {\n \"vendorLeadCode\": \"lead-123\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.vida.dev/api/v2/contact?token=")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"phone\": \"+15551234567\",\n \"name\": \"Example Person\",\n \"email\": \"lead@example.com\",\n \"address\": {\n \"state\": \"LA\",\n \"zip\": \"71101\"\n },\n \"customFields\": {\n \"vendorLeadCode\": \"lead-123\"\n }\n}"
response = http.request(request)
puts response.read_bodyBody
application/json
- Option 1
- Option 2
- Option 3
- Option 4
Create or update an organization Contact. Supply id or target to resolve an existing person, or phone/email to create one. Fields are sent directly in the body, not inside meta.contact. Provided top-level values replace existing values; prefer PATCH for nested merges or deleting a field.
Response
default