Créer un contact
curl --request POST \
--url https://qwoty.app/api/contacts \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '
{
"customer_id": "<string>",
"first_name": "<string>",
"last_name": "<string>",
"email": "<string>",
"phone": "<string>",
"role": [
{}
],
"id_crm": "<string>",
"id_erp": "<string>",
"id_accounting": "<string>"
}
'import requests
url = "https://qwoty.app/api/contacts"
payload = {
"customer_id": "<string>",
"first_name": "<string>",
"last_name": "<string>",
"email": "<string>",
"phone": "<string>",
"role": [{}],
"id_crm": "<string>",
"id_erp": "<string>",
"id_accounting": "<string>"
}
headers = {
"Authorization": "<authorization>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<authorization>', 'Content-Type': 'application/json'},
body: JSON.stringify({
customer_id: '<string>',
first_name: '<string>',
last_name: '<string>',
email: '<string>',
phone: '<string>',
role: [{}],
id_crm: '<string>',
id_erp: '<string>',
id_accounting: '<string>'
})
};
fetch('https://qwoty.app/api/contacts', 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://qwoty.app/api/contacts",
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([
'customer_id' => '<string>',
'first_name' => '<string>',
'last_name' => '<string>',
'email' => '<string>',
'phone' => '<string>',
'role' => [
[
]
],
'id_crm' => '<string>',
'id_erp' => '<string>',
'id_accounting' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"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://qwoty.app/api/contacts"
payload := strings.NewReader("{\n \"customer_id\": \"<string>\",\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"email\": \"<string>\",\n \"phone\": \"<string>\",\n \"role\": [\n {}\n ],\n \"id_crm\": \"<string>\",\n \"id_erp\": \"<string>\",\n \"id_accounting\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<authorization>")
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://qwoty.app/api/contacts")
.header("Authorization", "<authorization>")
.header("Content-Type", "application/json")
.body("{\n \"customer_id\": \"<string>\",\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"email\": \"<string>\",\n \"phone\": \"<string>\",\n \"role\": [\n {}\n ],\n \"id_crm\": \"<string>\",\n \"id_erp\": \"<string>\",\n \"id_accounting\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://qwoty.app/api/contacts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<authorization>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"customer_id\": \"<string>\",\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"email\": \"<string>\",\n \"phone\": \"<string>\",\n \"role\": [\n {}\n ],\n \"id_crm\": \"<string>\",\n \"id_erp\": \"<string>\",\n \"id_accounting\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"id": "660e8400-e29b-41d4-a716-446655440001",
"workspace_id": "706eb564-6c4a-4e18-841c-bdd79be6bca7",
"customer_id": "550e8400-e29b-41d4-a716-446655440000",
"first_name": "Jean",
"last_name": "Dupont",
"email": "jean.dupont@acme.com",
"phone": "+33 6 12 34 56 78",
"role": ["buyer", "signer"],
"id_crm": null,
"id_erp": null,
"id_accounting": null,
"created_at": "2026-01-15T10:30:00Z",
"updated_at": "2026-01-15T10:30:00Z"
}
}
{
"error": "Erreur de validation",
"details": [
{ "path": "email", "message": "Adresse e-mail invalide" },
{ "path": "customer_id", "message": "customer_id doit être un UUID valide" }
]
}
Contacts
Créer un contact
Créer un nouveau contact lié à un client
POST
/
api
/
contacts
Créer un contact
curl --request POST \
--url https://qwoty.app/api/contacts \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '
{
"customer_id": "<string>",
"first_name": "<string>",
"last_name": "<string>",
"email": "<string>",
"phone": "<string>",
"role": [
{}
],
"id_crm": "<string>",
"id_erp": "<string>",
"id_accounting": "<string>"
}
'import requests
url = "https://qwoty.app/api/contacts"
payload = {
"customer_id": "<string>",
"first_name": "<string>",
"last_name": "<string>",
"email": "<string>",
"phone": "<string>",
"role": [{}],
"id_crm": "<string>",
"id_erp": "<string>",
"id_accounting": "<string>"
}
headers = {
"Authorization": "<authorization>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<authorization>', 'Content-Type': 'application/json'},
body: JSON.stringify({
customer_id: '<string>',
first_name: '<string>',
last_name: '<string>',
email: '<string>',
phone: '<string>',
role: [{}],
id_crm: '<string>',
id_erp: '<string>',
id_accounting: '<string>'
})
};
fetch('https://qwoty.app/api/contacts', 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://qwoty.app/api/contacts",
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([
'customer_id' => '<string>',
'first_name' => '<string>',
'last_name' => '<string>',
'email' => '<string>',
'phone' => '<string>',
'role' => [
[
]
],
'id_crm' => '<string>',
'id_erp' => '<string>',
'id_accounting' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"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://qwoty.app/api/contacts"
payload := strings.NewReader("{\n \"customer_id\": \"<string>\",\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"email\": \"<string>\",\n \"phone\": \"<string>\",\n \"role\": [\n {}\n ],\n \"id_crm\": \"<string>\",\n \"id_erp\": \"<string>\",\n \"id_accounting\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<authorization>")
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://qwoty.app/api/contacts")
.header("Authorization", "<authorization>")
.header("Content-Type", "application/json")
.body("{\n \"customer_id\": \"<string>\",\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"email\": \"<string>\",\n \"phone\": \"<string>\",\n \"role\": [\n {}\n ],\n \"id_crm\": \"<string>\",\n \"id_erp\": \"<string>\",\n \"id_accounting\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://qwoty.app/api/contacts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<authorization>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"customer_id\": \"<string>\",\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"email\": \"<string>\",\n \"phone\": \"<string>\",\n \"role\": [\n {}\n ],\n \"id_crm\": \"<string>\",\n \"id_erp\": \"<string>\",\n \"id_accounting\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"id": "660e8400-e29b-41d4-a716-446655440001",
"workspace_id": "706eb564-6c4a-4e18-841c-bdd79be6bca7",
"customer_id": "550e8400-e29b-41d4-a716-446655440000",
"first_name": "Jean",
"last_name": "Dupont",
"email": "jean.dupont@acme.com",
"phone": "+33 6 12 34 56 78",
"role": ["buyer", "signer"],
"id_crm": null,
"id_erp": null,
"id_accounting": null,
"created_at": "2026-01-15T10:30:00Z",
"updated_at": "2026-01-15T10:30:00Z"
}
}
{
"error": "Erreur de validation",
"details": [
{ "path": "email", "message": "Adresse e-mail invalide" },
{ "path": "customer_id", "message": "customer_id doit être un UUID valide" }
]
}
Autorisation
string
requis
Token Bearer. Format :
Bearer qwoty_your_tokenCorps de la requête
string
requis
UUID du client auquel ce contact appartient
string
requis
Prénom du contact
string
requis
Nom de famille du contact
string
requis
Adresse e-mail du contact
string
Numéro de téléphone
array
défaut:"[]"
Rôles attribués. Valeurs autorisées :
"buyer", "signer", "billing",
"shipping", "legal", "admin"string
Identifiant CRM externe
string
Identifiant ERP externe
string
Identifiant comptable externe
Exemples
curl -X POST https://qwoty.app/api/contacts \
-H "Authorization: Bearer qwoty_your_token" \
-H "Content-Type: application/json" \
-d '{
"customer_id": "550e8400-e29b-41d4-a716-446655440000",
"first_name": "Jean",
"last_name": "Dupont",
"email": "jean.dupont@acme.com",
"phone": "+33 6 12 34 56 78",
"role": ["buyer", "signer"]
}'
const response = await fetch('https://qwoty.app/api/contacts', {
method: 'POST',
headers: {
Authorization: 'Bearer qwoty_your_token',
'Content-Type': 'application/json',
},
body: JSON.stringify({
customer_id: '550e8400-e29b-41d4-a716-446655440000',
first_name: 'Jean',
last_name: 'Dupont',
email: 'jean.dupont@acme.com',
phone: '+33 6 12 34 56 78',
role: ['buyer', 'signer'],
}),
})
const data = await response.json()
import requests
response = requests.post(
'https://qwoty.app/api/contacts',
headers={
'Authorization': 'Bearer qwoty_your_token',
'Content-Type': 'application/json',
},
json={
'customer_id': '550e8400-e29b-41d4-a716-446655440000',
'first_name': 'Jean',
'last_name': 'Dupont',
'email': 'jean.dupont@acme.com',
'phone': '+33 6 12 34 56 78',
'role': ['buyer', 'signer'],
},
)
data = response.json()
Réponse
boolean
true si le contact a été crééobject
L’objet contact créé (même structure que Obtenir un
contact)
{
"success": true,
"data": {
"id": "660e8400-e29b-41d4-a716-446655440001",
"workspace_id": "706eb564-6c4a-4e18-841c-bdd79be6bca7",
"customer_id": "550e8400-e29b-41d4-a716-446655440000",
"first_name": "Jean",
"last_name": "Dupont",
"email": "jean.dupont@acme.com",
"phone": "+33 6 12 34 56 78",
"role": ["buyer", "signer"],
"id_crm": null,
"id_erp": null,
"id_accounting": null,
"created_at": "2026-01-15T10:30:00Z",
"updated_at": "2026-01-15T10:30:00Z"
}
}
{
"error": "Erreur de validation",
"details": [
{ "path": "email", "message": "Adresse e-mail invalide" },
{ "path": "customer_id", "message": "customer_id doit être un UUID valide" }
]
}
Cette page vous a-t-elle été utile ?
⌘I

