Create Custom Data Record
curl --request PUT \
--url https://api.usesimple.ai/api/v1/data/{table_name} \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '{}'import requests
url = "https://api.usesimple.ai/api/v1/data/{table_name}"
payload = {}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({})
};
fetch('https://api.usesimple.ai/api/v1/data/{table_name}', 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.usesimple.ai/api/v1/data/{table_name}",
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([
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"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://api.usesimple.ai/api/v1/data/{table_name}"
payload := strings.NewReader("{}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "<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.put("https://api.usesimple.ai/api/v1/data/{table_name}")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.usesimple.ai/api/v1/data/{table_name}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{}"
response = http.request(request)
puts response.read_body{
"record": {
"id": 123,
"organization_id": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
}{
"status": "error",
"success": false,
"error": "<string>",
"errors": [
"<string>"
]
}{
"status": "error",
"success": false,
"error": "<string>",
"errors": [
"<string>"
]
}{
"status": "error",
"success": false,
"error": "<string>",
"errors": [
"<string>"
]
}{
"status": "error",
"success": false,
"error": "<string>",
"errors": [
"<string>"
]
}Custom Data
Create a Custom Data Record with the API
Create a record in a Simple AI custom data table by supplying values for the columns defined in that table schema.
PUT
/
data
/
{table_name}
Create Custom Data Record
curl --request PUT \
--url https://api.usesimple.ai/api/v1/data/{table_name} \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '{}'import requests
url = "https://api.usesimple.ai/api/v1/data/{table_name}"
payload = {}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({})
};
fetch('https://api.usesimple.ai/api/v1/data/{table_name}', 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.usesimple.ai/api/v1/data/{table_name}",
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([
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"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://api.usesimple.ai/api/v1/data/{table_name}"
payload := strings.NewReader("{}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "<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.put("https://api.usesimple.ai/api/v1/data/{table_name}")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.usesimple.ai/api/v1/data/{table_name}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{}"
response = http.request(request)
puts response.read_body{
"record": {
"id": 123,
"organization_id": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
}{
"status": "error",
"success": false,
"error": "<string>",
"errors": [
"<string>"
]
}{
"status": "error",
"success": false,
"error": "<string>",
"errors": [
"<string>"
]
}{
"status": "error",
"success": false,
"error": "<string>",
"errors": [
"<string>"
]
}{
"status": "error",
"success": false,
"error": "<string>",
"errors": [
"<string>"
]
}Before writing records, create a custom data table with the columns your application needs.
Send values for declared table columns. Managed columns such as
Contact references must identify an active contact in your organization. Responses return contact and call references as UUIDs. The same UUID support applies to updates and reference filters.
id, organization_id, created_at, and updated_at are controlled by Simple AI.
For REFERENCE columns targeting contacts or calls, send the resource’s public UUID. A contact UUID is returned as contact.id by Upsert Synced Contact. Numeric IDs remain accepted for compatibility. Other custom-table references use numeric row IDs.
Use the stored reference column name, which ends in _ref. For example:
{
"contact_ref": "11111111-1111-4111-8111-111111111111"
}
Order source updates
For a table with a business key, add?sourceUpdatedAtColumn=source_updated_at to compare the supplied timestamp with the stored value atomically. The named column must have type TIMESTAMP, and every request using this option must include a non-null timestamp and the business key.
A new key is inserted. An existing key is updated only when its stored timestamp is null or the supplied timestamp is newer. Equal or older timestamps return 409 without changing the record. After a retry returns 409, read the record to check its current state. Omitting this option preserves normal upsert behavior.
This option is available on individual PUT and PATCH requests.Authorizations
Path Parameters
Custom data table name.
Pattern:
^[A-Za-z0-9_-]+$Query Parameters
Name of a TIMESTAMP column supplied with a non-null value. Atomically apply only if the stored timestamp is null or older. Equal/older values return 409. Ordered PUT also requires a configured business key and its value. Omit for normal write behavior.
Maximum string length:
63Pattern:
^[a-z][a-z0-9_]*$Body
application/json
Object containing values for declared table columns. Managed columns and unknown columns are ignored.
Response
Custom Data Record Created
Show child attributes
Show child attributes
Last modified on September 16, 2026