curl --request POST \
--url https://api.tilta.io/v1/contacts \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"buyer_external_id": "<string>",
"first_name": "<string>",
"last_name": "<string>",
"email": "jsmith@example.com",
"phone": "+491711010101",
"assign_to_all_invoices": true,
"address": {
"postcode": "12345",
"city": "Berlin",
"street": "Example Street",
"house": "42b",
"additional": "c/o Testimonial"
},
"external_id": "<string>"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
buyer_external_id: '<string>',
first_name: '<string>',
last_name: '<string>',
email: 'jsmith@example.com',
phone: '+491711010101',
assign_to_all_invoices: true,
address: {
postcode: '12345',
city: 'Berlin',
street: 'Example Street',
house: '42b',
additional: 'c/o Testimonial'
},
external_id: '<string>'
})
};
fetch('https://api.tilta.io/v1/contacts', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.tilta.io/v1/contacts"
payload = {
"buyer_external_id": "<string>",
"first_name": "<string>",
"last_name": "<string>",
"email": "jsmith@example.com",
"phone": "+491711010101",
"assign_to_all_invoices": True,
"address": {
"postcode": "12345",
"city": "Berlin",
"street": "Example Street",
"house": "42b",
"additional": "c/o Testimonial"
},
"external_id": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.tilta.io/v1/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([
'buyer_external_id' => '<string>',
'first_name' => '<string>',
'last_name' => '<string>',
'email' => 'jsmith@example.com',
'phone' => '+491711010101',
'assign_to_all_invoices' => true,
'address' => [
'postcode' => '12345',
'city' => 'Berlin',
'street' => 'Example Street',
'house' => '42b',
'additional' => 'c/o Testimonial'
],
'external_id' => '<string>'
]),
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;
}{
"external_id": "<string>",
"buyer_external_id": "<string>",
"assign_to_all_invoices": true,
"created_at": 1582896122,
"updated_at": 1582896122,
"salutation": "MR",
"first_name": "<string>",
"last_name": "<string>",
"email": "jsmith@example.com",
"phone": "+491711010101",
"address": {
"postcode": "12345",
"city": "Berlin",
"country": "AF",
"street": "Example Street",
"house": "42b",
"additional": "c/o Testimonial"
}
}{
"code": "BAD_REQUEST",
"error": "Request validation failed. 1 issue found.",
"issues": [
{
"code": "INVALID_TYPE",
"path": "body.registered_at",
"message": "Invalid type"
}
]
}{
"error": "Unauthorized",
"code": "UNAUTHORIZED"
}Create a contact
Register a new contact for a buyer to receive automated Tilta communications such as invoices, payment reminders, and due date notifications.
curl --request POST \
--url https://api.tilta.io/v1/contacts \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"buyer_external_id": "<string>",
"first_name": "<string>",
"last_name": "<string>",
"email": "jsmith@example.com",
"phone": "+491711010101",
"assign_to_all_invoices": true,
"address": {
"postcode": "12345",
"city": "Berlin",
"street": "Example Street",
"house": "42b",
"additional": "c/o Testimonial"
},
"external_id": "<string>"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
buyer_external_id: '<string>',
first_name: '<string>',
last_name: '<string>',
email: 'jsmith@example.com',
phone: '+491711010101',
assign_to_all_invoices: true,
address: {
postcode: '12345',
city: 'Berlin',
street: 'Example Street',
house: '42b',
additional: 'c/o Testimonial'
},
external_id: '<string>'
})
};
fetch('https://api.tilta.io/v1/contacts', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.tilta.io/v1/contacts"
payload = {
"buyer_external_id": "<string>",
"first_name": "<string>",
"last_name": "<string>",
"email": "jsmith@example.com",
"phone": "+491711010101",
"assign_to_all_invoices": True,
"address": {
"postcode": "12345",
"city": "Berlin",
"street": "Example Street",
"house": "42b",
"additional": "c/o Testimonial"
},
"external_id": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.tilta.io/v1/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([
'buyer_external_id' => '<string>',
'first_name' => '<string>',
'last_name' => '<string>',
'email' => 'jsmith@example.com',
'phone' => '+491711010101',
'assign_to_all_invoices' => true,
'address' => [
'postcode' => '12345',
'city' => 'Berlin',
'street' => 'Example Street',
'house' => '42b',
'additional' => 'c/o Testimonial'
],
'external_id' => '<string>'
]),
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;
}{
"external_id": "<string>",
"buyer_external_id": "<string>",
"assign_to_all_invoices": true,
"created_at": 1582896122,
"updated_at": 1582896122,
"salutation": "MR",
"first_name": "<string>",
"last_name": "<string>",
"email": "jsmith@example.com",
"phone": "+491711010101",
"address": {
"postcode": "12345",
"city": "Berlin",
"country": "AF",
"street": "Example Street",
"house": "42b",
"additional": "c/o Testimonial"
}
}{
"code": "BAD_REQUEST",
"error": "Request validation failed. 1 issue found.",
"issues": [
{
"code": "INVALID_TYPE",
"path": "body.registered_at",
"message": "Invalid type"
}
]
}{
"error": "Unauthorized",
"code": "UNAUTHORIZED"
}buyer_external_id in the request body. If you do not supply an external_id, Tilta automatically generates a UUID for the new contact.
buyer_external_id corresponds to a buyer
that has already been registered in Tilta.Authorizations
Your Tilta API key, sent as Bearer <key>.
Body
External identifier of the buyer this contact belongs to.
100^[a-zA-Z0-9-_]+$Contact salutation.
MR, MS, OTHER Contact first name.
Contact last name.
Contact email.
Contact phone number. (+491711010101)
"+491711010101"
Whether this contact should automatically be assigned to all invoices created for the buyer. Defaults to true.
Contact's address.
Show child attributes
Show child attributes
Unique identifier of the contact. If not provided, a UUID will be generated by the server. Must be unique per platform.
100^[a-zA-Z0-9-_]+$Response
Contact response payload.
Unique identifier of a contact.
100^[a-zA-Z0-9-_]+$External identifier of the buyer this contact belongs to.
100^[a-zA-Z0-9-_]+$Whether this contact should automatically be assigned to all invoices created for the buyer.
Timestamp indicating when the contact was created (unix time in seconds).
1582896122
Timestamp indicating the last time the contact was updated (unix time in seconds).
1582896122
Contact salutation.
MR, MS, OTHER Contact first name.
Contact last name.
Contact email.
Contact phone number in E.164 format (e.g. +491711010101).
"+491711010101"
Contact's address.
Show child attributes
Show child attributes