curl --request PUT \
--url https://api.tilta.io/v1/contacts/{external_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"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"
}
}
'const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
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'
}
})
};
fetch('https://api.tilta.io/v1/contacts/{external_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.tilta.io/v1/contacts/{external_id}"
payload = {
"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"
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.tilta.io/v1/contacts/{external_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'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'
]
]),
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"
}Replace a contact
Fully replace an existing contact record using PUT semantics. All fields are overwritten. The buyer association cannot be changed after creation.
curl --request PUT \
--url https://api.tilta.io/v1/contacts/{external_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"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"
}
}
'const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
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'
}
})
};
fetch('https://api.tilta.io/v1/contacts/{external_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.tilta.io/v1/contacts/{external_id}"
payload = {
"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"
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.tilta.io/v1/contacts/{external_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'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'
]
]),
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"
}PUT semantics. Every field you provide overwrites the stored value, and any field you omit will be cleared. Use this endpoint when a contact’s email address, name, or phone number changes and needs to be updated in full. Note that the buyer_external_id association is immutable – a contact always belongs to the buyer it was created for and this relationship cannot be changed via a replace operation. To update only a subset of fields, retrieve the current contact first using the Retrieve contact endpoint, apply your changes to the returned payload, and submit the complete merged object to this endpoint.
Authorizations
Your Tilta API key, sent as Bearer <key>.
Path Parameters
Unique identifier of a contact.
100^[a-zA-Z0-9-_]+$Body
Contact salutation. Send null to clear.
MR, MS, OTHER Contact first name. Send null to clear.
Contact last name. Send null to clear.
Contact email. Send null to clear.
Contact phone number (+491711010101). Send null to clear.
"+491711010101"
Whether this contact should automatically be assigned to all invoices created for the buyer.
Contact's address. Send null to clear.
Show child attributes
Show child attributes
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