Upsert a contact
curl --request POST \
--url https://incoming.qomon.app/contacts/upsert \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"data": {
"actions": [
{
"id": 1,
"label": "<string>",
"value": "<string>"
}
],
"address": {
"addition": "<string>",
"building": "<string>",
"city": "<string>",
"citycode": "<string>",
"country": "<string>",
"county": "<string>",
"door": "<string>",
"floor": "<string>",
"housenumber": "<string>",
"id": 1,
"infos": "<string>",
"latitude": "<string>",
"longitude": "<string>",
"pollingstation": "<string>",
"postalcode": "<string>",
"state": "<string>",
"street": "<string>"
},
"age_category": 123,
"birthcity": "<string>",
"birthcountry": "<string>",
"birthdate": "<string>",
"birthdept": "<string>",
"black_list": true,
"consents": [
{
"id": 1,
"label": "<string>",
"value": "<string>"
}
],
"custom_fields": [
{
"id": 1,
"label": "<string>",
"value": "<string>"
}
],
"firstname": "<string>",
"forms": [
{
"id": 1,
"label": "<string>",
"value": "<string>"
}
],
"id": 1,
"mail": "jsmith@example.com",
"married_name": "<string>",
"mobile": "<string>",
"name_presences": [
{
"id": 1,
"label": "<string>",
"value": "<string>"
}
],
"nationality": "<string>",
"nationbuilderid": 123,
"notes": [
{
"content": "<string>",
"id": 1,
"pinned": true
}
],
"phone": "<string>",
"status": [
{
"id": 1,
"label": "<string>",
"value": "<string>"
}
],
"surname": "<string>",
"tags": [
{
"name": "<string>"
}
]
},
"kind": "contact"
}
'import requests
url = "https://incoming.qomon.app/contacts/upsert"
payload = {
"data": {
"actions": [
{
"id": 1,
"label": "<string>",
"value": "<string>"
}
],
"address": {
"addition": "<string>",
"building": "<string>",
"city": "<string>",
"citycode": "<string>",
"country": "<string>",
"county": "<string>",
"door": "<string>",
"floor": "<string>",
"housenumber": "<string>",
"id": 1,
"infos": "<string>",
"latitude": "<string>",
"longitude": "<string>",
"pollingstation": "<string>",
"postalcode": "<string>",
"state": "<string>",
"street": "<string>"
},
"age_category": 123,
"birthcity": "<string>",
"birthcountry": "<string>",
"birthdate": "<string>",
"birthdept": "<string>",
"black_list": True,
"consents": [
{
"id": 1,
"label": "<string>",
"value": "<string>"
}
],
"custom_fields": [
{
"id": 1,
"label": "<string>",
"value": "<string>"
}
],
"firstname": "<string>",
"forms": [
{
"id": 1,
"label": "<string>",
"value": "<string>"
}
],
"id": 1,
"mail": "jsmith@example.com",
"married_name": "<string>",
"mobile": "<string>",
"name_presences": [
{
"id": 1,
"label": "<string>",
"value": "<string>"
}
],
"nationality": "<string>",
"nationbuilderid": 123,
"notes": [
{
"content": "<string>",
"id": 1,
"pinned": True
}
],
"phone": "<string>",
"status": [
{
"id": 1,
"label": "<string>",
"value": "<string>"
}
],
"surname": "<string>",
"tags": [{ "name": "<string>" }]
},
"kind": "contact"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
data: {
actions: [{id: 1, label: '<string>', value: '<string>'}],
address: {
addition: '<string>',
building: '<string>',
city: '<string>',
citycode: '<string>',
country: '<string>',
county: '<string>',
door: '<string>',
floor: '<string>',
housenumber: '<string>',
id: 1,
infos: '<string>',
latitude: '<string>',
longitude: '<string>',
pollingstation: '<string>',
postalcode: '<string>',
state: '<string>',
street: '<string>'
},
age_category: 123,
birthcity: '<string>',
birthcountry: '<string>',
birthdate: '<string>',
birthdept: '<string>',
black_list: true,
consents: [{id: 1, label: '<string>', value: '<string>'}],
custom_fields: [{id: 1, label: '<string>', value: '<string>'}],
firstname: '<string>',
forms: [{id: 1, label: '<string>', value: '<string>'}],
id: 1,
mail: 'jsmith@example.com',
married_name: '<string>',
mobile: '<string>',
name_presences: [{id: 1, label: '<string>', value: '<string>'}],
nationality: '<string>',
nationbuilderid: 123,
notes: [{content: '<string>', id: 1, pinned: true}],
phone: '<string>',
status: [{id: 1, label: '<string>', value: '<string>'}],
surname: '<string>',
tags: [{name: '<string>'}]
},
kind: 'contact'
})
};
fetch('https://incoming.qomon.app/contacts/upsert', 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://incoming.qomon.app/contacts/upsert",
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([
'data' => [
'actions' => [
[
'id' => 1,
'label' => '<string>',
'value' => '<string>'
]
],
'address' => [
'addition' => '<string>',
'building' => '<string>',
'city' => '<string>',
'citycode' => '<string>',
'country' => '<string>',
'county' => '<string>',
'door' => '<string>',
'floor' => '<string>',
'housenumber' => '<string>',
'id' => 1,
'infos' => '<string>',
'latitude' => '<string>',
'longitude' => '<string>',
'pollingstation' => '<string>',
'postalcode' => '<string>',
'state' => '<string>',
'street' => '<string>'
],
'age_category' => 123,
'birthcity' => '<string>',
'birthcountry' => '<string>',
'birthdate' => '<string>',
'birthdept' => '<string>',
'black_list' => true,
'consents' => [
[
'id' => 1,
'label' => '<string>',
'value' => '<string>'
]
],
'custom_fields' => [
[
'id' => 1,
'label' => '<string>',
'value' => '<string>'
]
],
'firstname' => '<string>',
'forms' => [
[
'id' => 1,
'label' => '<string>',
'value' => '<string>'
]
],
'id' => 1,
'mail' => 'jsmith@example.com',
'married_name' => '<string>',
'mobile' => '<string>',
'name_presences' => [
[
'id' => 1,
'label' => '<string>',
'value' => '<string>'
]
],
'nationality' => '<string>',
'nationbuilderid' => 123,
'notes' => [
[
'content' => '<string>',
'id' => 1,
'pinned' => true
]
],
'phone' => '<string>',
'status' => [
[
'id' => 1,
'label' => '<string>',
'value' => '<string>'
]
],
'surname' => '<string>',
'tags' => [
[
'name' => '<string>'
]
]
],
'kind' => 'contact'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://incoming.qomon.app/contacts/upsert"
payload := strings.NewReader("{\n \"data\": {\n \"actions\": [\n {\n \"id\": 1,\n \"label\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"address\": {\n \"addition\": \"<string>\",\n \"building\": \"<string>\",\n \"city\": \"<string>\",\n \"citycode\": \"<string>\",\n \"country\": \"<string>\",\n \"county\": \"<string>\",\n \"door\": \"<string>\",\n \"floor\": \"<string>\",\n \"housenumber\": \"<string>\",\n \"id\": 1,\n \"infos\": \"<string>\",\n \"latitude\": \"<string>\",\n \"longitude\": \"<string>\",\n \"pollingstation\": \"<string>\",\n \"postalcode\": \"<string>\",\n \"state\": \"<string>\",\n \"street\": \"<string>\"\n },\n \"age_category\": 123,\n \"birthcity\": \"<string>\",\n \"birthcountry\": \"<string>\",\n \"birthdate\": \"<string>\",\n \"birthdept\": \"<string>\",\n \"black_list\": true,\n \"consents\": [\n {\n \"id\": 1,\n \"label\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"custom_fields\": [\n {\n \"id\": 1,\n \"label\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"firstname\": \"<string>\",\n \"forms\": [\n {\n \"id\": 1,\n \"label\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"id\": 1,\n \"mail\": \"jsmith@example.com\",\n \"married_name\": \"<string>\",\n \"mobile\": \"<string>\",\n \"name_presences\": [\n {\n \"id\": 1,\n \"label\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"nationality\": \"<string>\",\n \"nationbuilderid\": 123,\n \"notes\": [\n {\n \"content\": \"<string>\",\n \"id\": 1,\n \"pinned\": true\n }\n ],\n \"phone\": \"<string>\",\n \"status\": [\n {\n \"id\": 1,\n \"label\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"surname\": \"<string>\",\n \"tags\": [\n {\n \"name\": \"<string>\"\n }\n ]\n },\n \"kind\": \"contact\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://incoming.qomon.app/contacts/upsert")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"data\": {\n \"actions\": [\n {\n \"id\": 1,\n \"label\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"address\": {\n \"addition\": \"<string>\",\n \"building\": \"<string>\",\n \"city\": \"<string>\",\n \"citycode\": \"<string>\",\n \"country\": \"<string>\",\n \"county\": \"<string>\",\n \"door\": \"<string>\",\n \"floor\": \"<string>\",\n \"housenumber\": \"<string>\",\n \"id\": 1,\n \"infos\": \"<string>\",\n \"latitude\": \"<string>\",\n \"longitude\": \"<string>\",\n \"pollingstation\": \"<string>\",\n \"postalcode\": \"<string>\",\n \"state\": \"<string>\",\n \"street\": \"<string>\"\n },\n \"age_category\": 123,\n \"birthcity\": \"<string>\",\n \"birthcountry\": \"<string>\",\n \"birthdate\": \"<string>\",\n \"birthdept\": \"<string>\",\n \"black_list\": true,\n \"consents\": [\n {\n \"id\": 1,\n \"label\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"custom_fields\": [\n {\n \"id\": 1,\n \"label\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"firstname\": \"<string>\",\n \"forms\": [\n {\n \"id\": 1,\n \"label\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"id\": 1,\n \"mail\": \"jsmith@example.com\",\n \"married_name\": \"<string>\",\n \"mobile\": \"<string>\",\n \"name_presences\": [\n {\n \"id\": 1,\n \"label\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"nationality\": \"<string>\",\n \"nationbuilderid\": 123,\n \"notes\": [\n {\n \"content\": \"<string>\",\n \"id\": 1,\n \"pinned\": true\n }\n ],\n \"phone\": \"<string>\",\n \"status\": [\n {\n \"id\": 1,\n \"label\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"surname\": \"<string>\",\n \"tags\": [\n {\n \"name\": \"<string>\"\n }\n ]\n },\n \"kind\": \"contact\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://incoming.qomon.app/contacts/upsert")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"data\": {\n \"actions\": [\n {\n \"id\": 1,\n \"label\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"address\": {\n \"addition\": \"<string>\",\n \"building\": \"<string>\",\n \"city\": \"<string>\",\n \"citycode\": \"<string>\",\n \"country\": \"<string>\",\n \"county\": \"<string>\",\n \"door\": \"<string>\",\n \"floor\": \"<string>\",\n \"housenumber\": \"<string>\",\n \"id\": 1,\n \"infos\": \"<string>\",\n \"latitude\": \"<string>\",\n \"longitude\": \"<string>\",\n \"pollingstation\": \"<string>\",\n \"postalcode\": \"<string>\",\n \"state\": \"<string>\",\n \"street\": \"<string>\"\n },\n \"age_category\": 123,\n \"birthcity\": \"<string>\",\n \"birthcountry\": \"<string>\",\n \"birthdate\": \"<string>\",\n \"birthdept\": \"<string>\",\n \"black_list\": true,\n \"consents\": [\n {\n \"id\": 1,\n \"label\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"custom_fields\": [\n {\n \"id\": 1,\n \"label\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"firstname\": \"<string>\",\n \"forms\": [\n {\n \"id\": 1,\n \"label\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"id\": 1,\n \"mail\": \"jsmith@example.com\",\n \"married_name\": \"<string>\",\n \"mobile\": \"<string>\",\n \"name_presences\": [\n {\n \"id\": 1,\n \"label\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"nationality\": \"<string>\",\n \"nationbuilderid\": 123,\n \"notes\": [\n {\n \"content\": \"<string>\",\n \"id\": 1,\n \"pinned\": true\n }\n ],\n \"phone\": \"<string>\",\n \"status\": [\n {\n \"id\": 1,\n \"label\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"surname\": \"<string>\",\n \"tags\": [\n {\n \"name\": \"<string>\"\n }\n ]\n },\n \"kind\": \"contact\"\n}"
response = http.request(request)
puts response.read_body{
"detail": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "<string>",
"status": 123,
"title": "<string>",
"type": "about:blank"
}Contacts
Upsert a contact
Asynchronously creates or updates a contact in the Qomon database. See the upsert rules in the documentation.
POST
/
contacts
/
upsert
Upsert a contact
curl --request POST \
--url https://incoming.qomon.app/contacts/upsert \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"data": {
"actions": [
{
"id": 1,
"label": "<string>",
"value": "<string>"
}
],
"address": {
"addition": "<string>",
"building": "<string>",
"city": "<string>",
"citycode": "<string>",
"country": "<string>",
"county": "<string>",
"door": "<string>",
"floor": "<string>",
"housenumber": "<string>",
"id": 1,
"infos": "<string>",
"latitude": "<string>",
"longitude": "<string>",
"pollingstation": "<string>",
"postalcode": "<string>",
"state": "<string>",
"street": "<string>"
},
"age_category": 123,
"birthcity": "<string>",
"birthcountry": "<string>",
"birthdate": "<string>",
"birthdept": "<string>",
"black_list": true,
"consents": [
{
"id": 1,
"label": "<string>",
"value": "<string>"
}
],
"custom_fields": [
{
"id": 1,
"label": "<string>",
"value": "<string>"
}
],
"firstname": "<string>",
"forms": [
{
"id": 1,
"label": "<string>",
"value": "<string>"
}
],
"id": 1,
"mail": "jsmith@example.com",
"married_name": "<string>",
"mobile": "<string>",
"name_presences": [
{
"id": 1,
"label": "<string>",
"value": "<string>"
}
],
"nationality": "<string>",
"nationbuilderid": 123,
"notes": [
{
"content": "<string>",
"id": 1,
"pinned": true
}
],
"phone": "<string>",
"status": [
{
"id": 1,
"label": "<string>",
"value": "<string>"
}
],
"surname": "<string>",
"tags": [
{
"name": "<string>"
}
]
},
"kind": "contact"
}
'import requests
url = "https://incoming.qomon.app/contacts/upsert"
payload = {
"data": {
"actions": [
{
"id": 1,
"label": "<string>",
"value": "<string>"
}
],
"address": {
"addition": "<string>",
"building": "<string>",
"city": "<string>",
"citycode": "<string>",
"country": "<string>",
"county": "<string>",
"door": "<string>",
"floor": "<string>",
"housenumber": "<string>",
"id": 1,
"infos": "<string>",
"latitude": "<string>",
"longitude": "<string>",
"pollingstation": "<string>",
"postalcode": "<string>",
"state": "<string>",
"street": "<string>"
},
"age_category": 123,
"birthcity": "<string>",
"birthcountry": "<string>",
"birthdate": "<string>",
"birthdept": "<string>",
"black_list": True,
"consents": [
{
"id": 1,
"label": "<string>",
"value": "<string>"
}
],
"custom_fields": [
{
"id": 1,
"label": "<string>",
"value": "<string>"
}
],
"firstname": "<string>",
"forms": [
{
"id": 1,
"label": "<string>",
"value": "<string>"
}
],
"id": 1,
"mail": "jsmith@example.com",
"married_name": "<string>",
"mobile": "<string>",
"name_presences": [
{
"id": 1,
"label": "<string>",
"value": "<string>"
}
],
"nationality": "<string>",
"nationbuilderid": 123,
"notes": [
{
"content": "<string>",
"id": 1,
"pinned": True
}
],
"phone": "<string>",
"status": [
{
"id": 1,
"label": "<string>",
"value": "<string>"
}
],
"surname": "<string>",
"tags": [{ "name": "<string>" }]
},
"kind": "contact"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
data: {
actions: [{id: 1, label: '<string>', value: '<string>'}],
address: {
addition: '<string>',
building: '<string>',
city: '<string>',
citycode: '<string>',
country: '<string>',
county: '<string>',
door: '<string>',
floor: '<string>',
housenumber: '<string>',
id: 1,
infos: '<string>',
latitude: '<string>',
longitude: '<string>',
pollingstation: '<string>',
postalcode: '<string>',
state: '<string>',
street: '<string>'
},
age_category: 123,
birthcity: '<string>',
birthcountry: '<string>',
birthdate: '<string>',
birthdept: '<string>',
black_list: true,
consents: [{id: 1, label: '<string>', value: '<string>'}],
custom_fields: [{id: 1, label: '<string>', value: '<string>'}],
firstname: '<string>',
forms: [{id: 1, label: '<string>', value: '<string>'}],
id: 1,
mail: 'jsmith@example.com',
married_name: '<string>',
mobile: '<string>',
name_presences: [{id: 1, label: '<string>', value: '<string>'}],
nationality: '<string>',
nationbuilderid: 123,
notes: [{content: '<string>', id: 1, pinned: true}],
phone: '<string>',
status: [{id: 1, label: '<string>', value: '<string>'}],
surname: '<string>',
tags: [{name: '<string>'}]
},
kind: 'contact'
})
};
fetch('https://incoming.qomon.app/contacts/upsert', 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://incoming.qomon.app/contacts/upsert",
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([
'data' => [
'actions' => [
[
'id' => 1,
'label' => '<string>',
'value' => '<string>'
]
],
'address' => [
'addition' => '<string>',
'building' => '<string>',
'city' => '<string>',
'citycode' => '<string>',
'country' => '<string>',
'county' => '<string>',
'door' => '<string>',
'floor' => '<string>',
'housenumber' => '<string>',
'id' => 1,
'infos' => '<string>',
'latitude' => '<string>',
'longitude' => '<string>',
'pollingstation' => '<string>',
'postalcode' => '<string>',
'state' => '<string>',
'street' => '<string>'
],
'age_category' => 123,
'birthcity' => '<string>',
'birthcountry' => '<string>',
'birthdate' => '<string>',
'birthdept' => '<string>',
'black_list' => true,
'consents' => [
[
'id' => 1,
'label' => '<string>',
'value' => '<string>'
]
],
'custom_fields' => [
[
'id' => 1,
'label' => '<string>',
'value' => '<string>'
]
],
'firstname' => '<string>',
'forms' => [
[
'id' => 1,
'label' => '<string>',
'value' => '<string>'
]
],
'id' => 1,
'mail' => 'jsmith@example.com',
'married_name' => '<string>',
'mobile' => '<string>',
'name_presences' => [
[
'id' => 1,
'label' => '<string>',
'value' => '<string>'
]
],
'nationality' => '<string>',
'nationbuilderid' => 123,
'notes' => [
[
'content' => '<string>',
'id' => 1,
'pinned' => true
]
],
'phone' => '<string>',
'status' => [
[
'id' => 1,
'label' => '<string>',
'value' => '<string>'
]
],
'surname' => '<string>',
'tags' => [
[
'name' => '<string>'
]
]
],
'kind' => 'contact'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://incoming.qomon.app/contacts/upsert"
payload := strings.NewReader("{\n \"data\": {\n \"actions\": [\n {\n \"id\": 1,\n \"label\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"address\": {\n \"addition\": \"<string>\",\n \"building\": \"<string>\",\n \"city\": \"<string>\",\n \"citycode\": \"<string>\",\n \"country\": \"<string>\",\n \"county\": \"<string>\",\n \"door\": \"<string>\",\n \"floor\": \"<string>\",\n \"housenumber\": \"<string>\",\n \"id\": 1,\n \"infos\": \"<string>\",\n \"latitude\": \"<string>\",\n \"longitude\": \"<string>\",\n \"pollingstation\": \"<string>\",\n \"postalcode\": \"<string>\",\n \"state\": \"<string>\",\n \"street\": \"<string>\"\n },\n \"age_category\": 123,\n \"birthcity\": \"<string>\",\n \"birthcountry\": \"<string>\",\n \"birthdate\": \"<string>\",\n \"birthdept\": \"<string>\",\n \"black_list\": true,\n \"consents\": [\n {\n \"id\": 1,\n \"label\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"custom_fields\": [\n {\n \"id\": 1,\n \"label\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"firstname\": \"<string>\",\n \"forms\": [\n {\n \"id\": 1,\n \"label\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"id\": 1,\n \"mail\": \"jsmith@example.com\",\n \"married_name\": \"<string>\",\n \"mobile\": \"<string>\",\n \"name_presences\": [\n {\n \"id\": 1,\n \"label\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"nationality\": \"<string>\",\n \"nationbuilderid\": 123,\n \"notes\": [\n {\n \"content\": \"<string>\",\n \"id\": 1,\n \"pinned\": true\n }\n ],\n \"phone\": \"<string>\",\n \"status\": [\n {\n \"id\": 1,\n \"label\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"surname\": \"<string>\",\n \"tags\": [\n {\n \"name\": \"<string>\"\n }\n ]\n },\n \"kind\": \"contact\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://incoming.qomon.app/contacts/upsert")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"data\": {\n \"actions\": [\n {\n \"id\": 1,\n \"label\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"address\": {\n \"addition\": \"<string>\",\n \"building\": \"<string>\",\n \"city\": \"<string>\",\n \"citycode\": \"<string>\",\n \"country\": \"<string>\",\n \"county\": \"<string>\",\n \"door\": \"<string>\",\n \"floor\": \"<string>\",\n \"housenumber\": \"<string>\",\n \"id\": 1,\n \"infos\": \"<string>\",\n \"latitude\": \"<string>\",\n \"longitude\": \"<string>\",\n \"pollingstation\": \"<string>\",\n \"postalcode\": \"<string>\",\n \"state\": \"<string>\",\n \"street\": \"<string>\"\n },\n \"age_category\": 123,\n \"birthcity\": \"<string>\",\n \"birthcountry\": \"<string>\",\n \"birthdate\": \"<string>\",\n \"birthdept\": \"<string>\",\n \"black_list\": true,\n \"consents\": [\n {\n \"id\": 1,\n \"label\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"custom_fields\": [\n {\n \"id\": 1,\n \"label\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"firstname\": \"<string>\",\n \"forms\": [\n {\n \"id\": 1,\n \"label\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"id\": 1,\n \"mail\": \"jsmith@example.com\",\n \"married_name\": \"<string>\",\n \"mobile\": \"<string>\",\n \"name_presences\": [\n {\n \"id\": 1,\n \"label\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"nationality\": \"<string>\",\n \"nationbuilderid\": 123,\n \"notes\": [\n {\n \"content\": \"<string>\",\n \"id\": 1,\n \"pinned\": true\n }\n ],\n \"phone\": \"<string>\",\n \"status\": [\n {\n \"id\": 1,\n \"label\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"surname\": \"<string>\",\n \"tags\": [\n {\n \"name\": \"<string>\"\n }\n ]\n },\n \"kind\": \"contact\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://incoming.qomon.app/contacts/upsert")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"data\": {\n \"actions\": [\n {\n \"id\": 1,\n \"label\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"address\": {\n \"addition\": \"<string>\",\n \"building\": \"<string>\",\n \"city\": \"<string>\",\n \"citycode\": \"<string>\",\n \"country\": \"<string>\",\n \"county\": \"<string>\",\n \"door\": \"<string>\",\n \"floor\": \"<string>\",\n \"housenumber\": \"<string>\",\n \"id\": 1,\n \"infos\": \"<string>\",\n \"latitude\": \"<string>\",\n \"longitude\": \"<string>\",\n \"pollingstation\": \"<string>\",\n \"postalcode\": \"<string>\",\n \"state\": \"<string>\",\n \"street\": \"<string>\"\n },\n \"age_category\": 123,\n \"birthcity\": \"<string>\",\n \"birthcountry\": \"<string>\",\n \"birthdate\": \"<string>\",\n \"birthdept\": \"<string>\",\n \"black_list\": true,\n \"consents\": [\n {\n \"id\": 1,\n \"label\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"custom_fields\": [\n {\n \"id\": 1,\n \"label\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"firstname\": \"<string>\",\n \"forms\": [\n {\n \"id\": 1,\n \"label\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"id\": 1,\n \"mail\": \"jsmith@example.com\",\n \"married_name\": \"<string>\",\n \"mobile\": \"<string>\",\n \"name_presences\": [\n {\n \"id\": 1,\n \"label\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"nationality\": \"<string>\",\n \"nationbuilderid\": 123,\n \"notes\": [\n {\n \"content\": \"<string>\",\n \"id\": 1,\n \"pinned\": true\n }\n ],\n \"phone\": \"<string>\",\n \"status\": [\n {\n \"id\": 1,\n \"label\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"surname\": \"<string>\",\n \"tags\": [\n {\n \"name\": \"<string>\"\n }\n ]\n },\n \"kind\": \"contact\"\n}"
response = http.request(request)
puts response.read_body{
"detail": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "<string>",
"status": 123,
"title": "<string>",
"type": "about:blank"
}Authorizations
OAuth2 access token. Pass the token in the Authorization header as Bearer <token>. The token is looked up in Redis to resolve the caller identity.
Body
application/json
Response
Accepted
Last modified on July 7, 2026
Was this page helpful?
⌘I

