curl --request POST \
--url https://api-connect-us.bridge.new/bridge/api/v1/workspaces/{workspaceId}/contacts/partial \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"cellphone": "+14084029292",
"firstName": "Maria",
"lastName": "Lopez",
"email": "maria@acme.com",
"languageCode": "EN",
"ownerIdentifier": {
"identifier": "jane@acme.com",
"identifierType": "EMAIL"
},
"customAttributes": {
"closedAttributes": [],
"openAttributes": []
}
}
'import requests
url = "https://api-connect-us.bridge.new/bridge/api/v1/workspaces/{workspaceId}/contacts/partial"
payload = {
"cellphone": "+14084029292",
"firstName": "Maria",
"lastName": "Lopez",
"email": "maria@acme.com",
"languageCode": "EN",
"ownerIdentifier": {
"identifier": "jane@acme.com",
"identifierType": "EMAIL"
},
"customAttributes": {
"closedAttributes": [],
"openAttributes": []
}
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
cellphone: '+14084029292',
firstName: 'Maria',
lastName: 'Lopez',
email: 'maria@acme.com',
languageCode: 'EN',
ownerIdentifier: {identifier: 'jane@acme.com', identifierType: 'EMAIL'},
customAttributes: {closedAttributes: [], openAttributes: []}
})
};
fetch('https://api-connect-us.bridge.new/bridge/api/v1/workspaces/{workspaceId}/contacts/partial', 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-connect-us.bridge.new/bridge/api/v1/workspaces/{workspaceId}/contacts/partial",
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([
'cellphone' => '+14084029292',
'firstName' => 'Maria',
'lastName' => 'Lopez',
'email' => 'maria@acme.com',
'languageCode' => 'EN',
'ownerIdentifier' => [
'identifier' => 'jane@acme.com',
'identifierType' => 'EMAIL'
],
'customAttributes' => [
'closedAttributes' => [
],
'openAttributes' => [
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$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-connect-us.bridge.new/bridge/api/v1/workspaces/{workspaceId}/contacts/partial"
payload := strings.NewReader("{\n \"cellphone\": \"+14084029292\",\n \"firstName\": \"Maria\",\n \"lastName\": \"Lopez\",\n \"email\": \"maria@acme.com\",\n \"languageCode\": \"EN\",\n \"ownerIdentifier\": {\n \"identifier\": \"jane@acme.com\",\n \"identifierType\": \"EMAIL\"\n },\n \"customAttributes\": {\n \"closedAttributes\": [],\n \"openAttributes\": []\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
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-connect-us.bridge.new/bridge/api/v1/workspaces/{workspaceId}/contacts/partial")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"cellphone\": \"+14084029292\",\n \"firstName\": \"Maria\",\n \"lastName\": \"Lopez\",\n \"email\": \"maria@acme.com\",\n \"languageCode\": \"EN\",\n \"ownerIdentifier\": {\n \"identifier\": \"jane@acme.com\",\n \"identifierType\": \"EMAIL\"\n },\n \"customAttributes\": {\n \"closedAttributes\": [],\n \"openAttributes\": []\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-connect-us.bridge.new/bridge/api/v1/workspaces/{workspaceId}/contacts/partial")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"cellphone\": \"+14084029292\",\n \"firstName\": \"Maria\",\n \"lastName\": \"Lopez\",\n \"email\": \"maria@acme.com\",\n \"languageCode\": \"EN\",\n \"ownerIdentifier\": {\n \"identifier\": \"jane@acme.com\",\n \"identifierType\": \"EMAIL\"\n },\n \"customAttributes\": {\n \"closedAttributes\": [],\n \"openAttributes\": []\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "b6cf1c4a-2b1e-4e63-8f3e-0f9d1a2a1234",
"workspaceId": "92b2d4f3-81e1-4b61-a7ec-6f4ff3b58be5",
"type": "NORMAL",
"createdAt": "2003-04-10T08:00:00.000Z",
"updatedAt": "2003-04-10T08:00:00.000Z",
"firstName": "John",
"lastName": "Doe",
"email": "john.doe@example.com",
"cellphone": "+14084029292",
"customAttributes": [
{
"key": "<string>",
"values": [
"<string>"
]
}
],
"languageCode": "EN",
"ownerId": "37673840-6259-40f9-bbe5-a7db40f8e3cf"
}Create or update a contact
Create or update a contact using only cellphone. Classifies as NORMAL or PARTIAL.
curl --request POST \
--url https://api-connect-us.bridge.new/bridge/api/v1/workspaces/{workspaceId}/contacts/partial \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"cellphone": "+14084029292",
"firstName": "Maria",
"lastName": "Lopez",
"email": "maria@acme.com",
"languageCode": "EN",
"ownerIdentifier": {
"identifier": "jane@acme.com",
"identifierType": "EMAIL"
},
"customAttributes": {
"closedAttributes": [],
"openAttributes": []
}
}
'import requests
url = "https://api-connect-us.bridge.new/bridge/api/v1/workspaces/{workspaceId}/contacts/partial"
payload = {
"cellphone": "+14084029292",
"firstName": "Maria",
"lastName": "Lopez",
"email": "maria@acme.com",
"languageCode": "EN",
"ownerIdentifier": {
"identifier": "jane@acme.com",
"identifierType": "EMAIL"
},
"customAttributes": {
"closedAttributes": [],
"openAttributes": []
}
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
cellphone: '+14084029292',
firstName: 'Maria',
lastName: 'Lopez',
email: 'maria@acme.com',
languageCode: 'EN',
ownerIdentifier: {identifier: 'jane@acme.com', identifierType: 'EMAIL'},
customAttributes: {closedAttributes: [], openAttributes: []}
})
};
fetch('https://api-connect-us.bridge.new/bridge/api/v1/workspaces/{workspaceId}/contacts/partial', 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-connect-us.bridge.new/bridge/api/v1/workspaces/{workspaceId}/contacts/partial",
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([
'cellphone' => '+14084029292',
'firstName' => 'Maria',
'lastName' => 'Lopez',
'email' => 'maria@acme.com',
'languageCode' => 'EN',
'ownerIdentifier' => [
'identifier' => 'jane@acme.com',
'identifierType' => 'EMAIL'
],
'customAttributes' => [
'closedAttributes' => [
],
'openAttributes' => [
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$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-connect-us.bridge.new/bridge/api/v1/workspaces/{workspaceId}/contacts/partial"
payload := strings.NewReader("{\n \"cellphone\": \"+14084029292\",\n \"firstName\": \"Maria\",\n \"lastName\": \"Lopez\",\n \"email\": \"maria@acme.com\",\n \"languageCode\": \"EN\",\n \"ownerIdentifier\": {\n \"identifier\": \"jane@acme.com\",\n \"identifierType\": \"EMAIL\"\n },\n \"customAttributes\": {\n \"closedAttributes\": [],\n \"openAttributes\": []\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
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-connect-us.bridge.new/bridge/api/v1/workspaces/{workspaceId}/contacts/partial")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"cellphone\": \"+14084029292\",\n \"firstName\": \"Maria\",\n \"lastName\": \"Lopez\",\n \"email\": \"maria@acme.com\",\n \"languageCode\": \"EN\",\n \"ownerIdentifier\": {\n \"identifier\": \"jane@acme.com\",\n \"identifierType\": \"EMAIL\"\n },\n \"customAttributes\": {\n \"closedAttributes\": [],\n \"openAttributes\": []\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-connect-us.bridge.new/bridge/api/v1/workspaces/{workspaceId}/contacts/partial")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"cellphone\": \"+14084029292\",\n \"firstName\": \"Maria\",\n \"lastName\": \"Lopez\",\n \"email\": \"maria@acme.com\",\n \"languageCode\": \"EN\",\n \"ownerIdentifier\": {\n \"identifier\": \"jane@acme.com\",\n \"identifierType\": \"EMAIL\"\n },\n \"customAttributes\": {\n \"closedAttributes\": [],\n \"openAttributes\": []\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "b6cf1c4a-2b1e-4e63-8f3e-0f9d1a2a1234",
"workspaceId": "92b2d4f3-81e1-4b61-a7ec-6f4ff3b58be5",
"type": "NORMAL",
"createdAt": "2003-04-10T08:00:00.000Z",
"updatedAt": "2003-04-10T08:00:00.000Z",
"firstName": "John",
"lastName": "Doe",
"email": "john.doe@example.com",
"cellphone": "+14084029292",
"customAttributes": [
{
"key": "<string>",
"values": [
"<string>"
]
}
],
"languageCode": "EN",
"ownerId": "37673840-6259-40f9-bbe5-a7db40f8e3cf"
}Authorizations
Copy the API key as provided by the Bridge Console.
Path Parameters
Unique identifier of the workspace (UUID v4).
"b6cf1c4a-2b1e-4e63-8f3e-0f9d1a2a1234"
Body
Request body for partial contact creation. Only cellphone is required.
Contact's cellphone number in E.164 format. Used to identify the contact for upsert.
"+14084029292"
Contact's first name. Required for NORMAL classification.
"Maria"
Contact's last name. Required for NORMAL classification.
"Lopez"
Contact's email address.
"maria@acme.com"
Contact's language code. Required for NORMAL classification.
ES, EN "EN"
Body to identify an internal user in Bridge System.
Show child attributes
Show child attributes
{
"identifier": "jane@acme.com",
"identifierType": "EMAIL"
}
Object with open and closed custom attributes.
Show child attributes
Show child attributes
{
"closedAttributes": [],
"openAttributes": []
}
Response
Successful Response
Response body for contact-related operations.
Unique identifier for the contact (UUID v4).
"b6cf1c4a-2b1e-4e63-8f3e-0f9d1a2a1234"
Unique identifier of the workspace this contact belongs to
"92b2d4f3-81e1-4b61-a7ec-6f4ff3b58be5"
NORMAL when all required identity and custom attribute fields are present, PARTIAL otherwise.
PARTIAL, NORMAL "NORMAL"
"PARTIAL"
Timestamp when the contact was created.
"2003-04-10T08:00:00.000Z"
Timestamp when the contact was last updated.
"2003-04-10T08:00:00.000Z"
Contact's first name.
"John"
Contact's last name.
"Doe"
Contact's email address.
"john.doe@example.com"
Contact's cellphone address.
"+14084029292"
Array of custom key-value attributes.
Show child attributes
Show child attributes
Language code from external user.
ES, EN "EN"
Email address of the salesperson or user who owns this contact.
"37673840-6259-40f9-bbe5-a7db40f8e3cf"
Was this page helpful?

