Records
Create a Record
Create a new record in the specified collection.
POST
/
apps
/
{app_id}
/
collections
/
{collection_id}
/
records
Create a Record
curl --request POST \
--url https://api.example.com/apps/{app_id}/collections/{collection_id}/records \
--header 'Content-Type: application/json' \
--data '
{
"name": "New Important Record",
"rules": {},
"run": "changed",
"tags_ids": [
"tag_xxx",
"tag_yyy"
]
}
'import requests
url = "https://api.example.com/apps/{app_id}/collections/{collection_id}/records"
payload = {
"name": "New Important Record",
"rules": {},
"run": "changed",
"tags_ids": ["tag_xxx", "tag_yyy"]
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'New Important Record',
rules: {},
run: 'changed',
tags_ids: ['tag_xxx', 'tag_yyy']
})
};
fetch('https://api.example.com/apps/{app_id}/collections/{collection_id}/records', 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.example.com/apps/{app_id}/collections/{collection_id}/records",
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([
'name' => 'New Important Record',
'rules' => [
],
'run' => 'changed',
'tags_ids' => [
'tag_xxx',
'tag_yyy'
]
]),
CURLOPT_HTTPHEADER => [
"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.example.com/apps/{app_id}/collections/{collection_id}/records"
payload := strings.NewReader("{\n \"name\": \"New Important Record\",\n \"rules\": {},\n \"run\": \"changed\",\n \"tags_ids\": [\n \"tag_xxx\",\n \"tag_yyy\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
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://api.example.com/apps/{app_id}/collections/{collection_id}/records")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"New Important Record\",\n \"rules\": {},\n \"run\": \"changed\",\n \"tags_ids\": [\n \"tag_xxx\",\n \"tag_yyy\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/apps/{app_id}/collections/{collection_id}/records")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"New Important Record\",\n \"rules\": {},\n \"run\": \"changed\",\n \"tags_ids\": [\n \"tag_xxx\",\n \"tag_yyy\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"name": "Important Record",
"status": "COMPLETED",
"source": "API",
"rules_count": 123,
"rules_pass_count": 123,
"rules_fail_count": 123,
"rules_warn_count": 123,
"rules": {},
"collection_name": "<string>",
"collection_id": "col_xxx",
"created_by": {
"id": "user_xxx",
"name": "John Doe"
},
"tags": [
{
"id": "<string>",
"name": "<string>",
"color": "<string>",
"app_id": "<string>",
"created_at": "2023-12-25",
"updated_at": "2023-12-25"
}
],
"created_at": "2023-12-25",
"updated_at": "2023-12-25",
"link": "<string>",
"config": {
"id": "<string>",
"mappings": [
{
"source_path": "LOAN_APPLICATION:income",
"destination_paths": [
"MONTHLY_INCOME:amount",
"ANNUAL_INCOME:amount"
]
}
],
"created_at": "2023-12-25",
"updated_at": "2023-12-25",
"rules": [
{
"name": "Check Business Name",
"key": "CHECK_BUSINESS_NAME",
"on_success": "PASS",
"on_fail": "WARN",
"workflow_id": "work_xxx",
"workflow_version_id": "workv_xxx",
"workflow_use_latest": true,
"workflow": {
"id": "<string>",
"name": "<string>",
"description": "<string>",
"app": {
"id": "<string>",
"name": "<string>",
"verified": true
},
"version": {
"id": "<string>",
"app_id": "<string>",
"workflow_id": "<string>",
"description": "<string>",
"version": 123,
"notes": "<string>",
"created_at": "2023-12-25",
"key": "<string>",
"input": {},
"input_default": {},
"input_options": {
"display": {
"field": "inline",
"container": "grid",
"hidden": true
}
},
"steps": [
{
"type": "note",
"key": "<string>",
"note": "<string>",
"display": "expanded",
"conditional": "<string>",
"loop": "<string>",
"throw_on_error": true,
"input_connected": true,
"destinations": [
"<string>"
],
"position": [
123
],
"size": [
101
],
"auto": {
"provider": "<string>",
"model": "<string>",
"temperature": 1
}
}
],
"rollback_version": 123,
"created_by": {
"id": "<string>",
"name": "<string>"
}
},
"tags": [
{
"id": "<string>",
"name": "<string>",
"color": "<string>",
"app_id": "<string>",
"created_at": "2023-12-25",
"updated_at": "2023-12-25"
}
],
"template_id": "<string>",
"runs_count": 0,
"retention": {
"max_age_in_seconds": 3600,
"preserve_on_failure": true
},
"enabled": true,
"deleted": false,
"created_at": "2023-12-25",
"updated_at": "2023-12-25",
"key": "<string>",
"input": {},
"input_default": {},
"input_options": {
"display": {
"field": "inline",
"container": "grid",
"hidden": true
}
},
"steps": [
{
"type": "note",
"key": "<string>",
"note": "<string>",
"display": "expanded",
"conditional": "<string>",
"loop": "<string>",
"throw_on_error": true,
"input_connected": true,
"destinations": [
"<string>"
],
"position": [
123
],
"size": [
101
],
"auto": {
"provider": "<string>",
"model": "<string>",
"temperature": 1
}
}
],
"tests_stats": {
"total_count": 123,
"running_count": 123,
"cancelled_count": 123,
"passing_count": 123,
"failing_count": 123,
"expectations_failing_count": 123,
"expectations_passing_count": 123
}
},
"workflow_version": {
"id": "<string>",
"app_id": "<string>",
"workflow_id": "<string>",
"description": "<string>",
"version": 123,
"notes": "<string>",
"created_at": "2023-12-25",
"key": "<string>",
"input": {},
"input_default": {},
"input_options": {
"display": {
"field": "inline",
"container": "grid",
"hidden": true
}
},
"steps": [
{
"type": "note",
"key": "<string>",
"note": "<string>",
"display": "expanded",
"conditional": "<string>",
"loop": "<string>",
"throw_on_error": true,
"input_connected": true,
"destinations": [
"<string>"
],
"position": [
123
],
"size": [
101
],
"auto": {
"provider": "<string>",
"model": "<string>",
"temperature": 1
}
}
],
"rollback_version": 123,
"created_by": {
"id": "<string>",
"name": "<string>"
}
},
"execution_order": "before-all",
"step_key": "<string>",
"workflow_input_default": {
"business_name": "Example Corp"
},
"disabled": false
}
]
},
"entity": {
"id": "<string>",
"entity_id": "<string>",
"status": "SYNCED",
"type": "ENCOMPASS",
"trigger_id": "<string>",
"record_id": "<string>",
"data": {},
"created_at": "2023-12-25",
"updated_at": "2023-12-25"
},
"usage": {
"total": 123,
"rules": {},
"calls": [
{
"id": "<string>",
"total": 123,
"calls": [
"<unknown>"
]
}
]
}
}Path Parameters
Query Parameters
Body
application/jsonmultipart/form-data
Provide the necessary info to create the record.
Response
200 - application/json
You will receive the newly created record details.
Detailed information about a record with the details of the trigger entity and collection configuration
Was this page helpful?
⌘I
Create a Record
curl --request POST \
--url https://api.example.com/apps/{app_id}/collections/{collection_id}/records \
--header 'Content-Type: application/json' \
--data '
{
"name": "New Important Record",
"rules": {},
"run": "changed",
"tags_ids": [
"tag_xxx",
"tag_yyy"
]
}
'import requests
url = "https://api.example.com/apps/{app_id}/collections/{collection_id}/records"
payload = {
"name": "New Important Record",
"rules": {},
"run": "changed",
"tags_ids": ["tag_xxx", "tag_yyy"]
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'New Important Record',
rules: {},
run: 'changed',
tags_ids: ['tag_xxx', 'tag_yyy']
})
};
fetch('https://api.example.com/apps/{app_id}/collections/{collection_id}/records', 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.example.com/apps/{app_id}/collections/{collection_id}/records",
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([
'name' => 'New Important Record',
'rules' => [
],
'run' => 'changed',
'tags_ids' => [
'tag_xxx',
'tag_yyy'
]
]),
CURLOPT_HTTPHEADER => [
"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.example.com/apps/{app_id}/collections/{collection_id}/records"
payload := strings.NewReader("{\n \"name\": \"New Important Record\",\n \"rules\": {},\n \"run\": \"changed\",\n \"tags_ids\": [\n \"tag_xxx\",\n \"tag_yyy\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
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://api.example.com/apps/{app_id}/collections/{collection_id}/records")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"New Important Record\",\n \"rules\": {},\n \"run\": \"changed\",\n \"tags_ids\": [\n \"tag_xxx\",\n \"tag_yyy\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/apps/{app_id}/collections/{collection_id}/records")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"New Important Record\",\n \"rules\": {},\n \"run\": \"changed\",\n \"tags_ids\": [\n \"tag_xxx\",\n \"tag_yyy\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"name": "Important Record",
"status": "COMPLETED",
"source": "API",
"rules_count": 123,
"rules_pass_count": 123,
"rules_fail_count": 123,
"rules_warn_count": 123,
"rules": {},
"collection_name": "<string>",
"collection_id": "col_xxx",
"created_by": {
"id": "user_xxx",
"name": "John Doe"
},
"tags": [
{
"id": "<string>",
"name": "<string>",
"color": "<string>",
"app_id": "<string>",
"created_at": "2023-12-25",
"updated_at": "2023-12-25"
}
],
"created_at": "2023-12-25",
"updated_at": "2023-12-25",
"link": "<string>",
"config": {
"id": "<string>",
"mappings": [
{
"source_path": "LOAN_APPLICATION:income",
"destination_paths": [
"MONTHLY_INCOME:amount",
"ANNUAL_INCOME:amount"
]
}
],
"created_at": "2023-12-25",
"updated_at": "2023-12-25",
"rules": [
{
"name": "Check Business Name",
"key": "CHECK_BUSINESS_NAME",
"on_success": "PASS",
"on_fail": "WARN",
"workflow_id": "work_xxx",
"workflow_version_id": "workv_xxx",
"workflow_use_latest": true,
"workflow": {
"id": "<string>",
"name": "<string>",
"description": "<string>",
"app": {
"id": "<string>",
"name": "<string>",
"verified": true
},
"version": {
"id": "<string>",
"app_id": "<string>",
"workflow_id": "<string>",
"description": "<string>",
"version": 123,
"notes": "<string>",
"created_at": "2023-12-25",
"key": "<string>",
"input": {},
"input_default": {},
"input_options": {
"display": {
"field": "inline",
"container": "grid",
"hidden": true
}
},
"steps": [
{
"type": "note",
"key": "<string>",
"note": "<string>",
"display": "expanded",
"conditional": "<string>",
"loop": "<string>",
"throw_on_error": true,
"input_connected": true,
"destinations": [
"<string>"
],
"position": [
123
],
"size": [
101
],
"auto": {
"provider": "<string>",
"model": "<string>",
"temperature": 1
}
}
],
"rollback_version": 123,
"created_by": {
"id": "<string>",
"name": "<string>"
}
},
"tags": [
{
"id": "<string>",
"name": "<string>",
"color": "<string>",
"app_id": "<string>",
"created_at": "2023-12-25",
"updated_at": "2023-12-25"
}
],
"template_id": "<string>",
"runs_count": 0,
"retention": {
"max_age_in_seconds": 3600,
"preserve_on_failure": true
},
"enabled": true,
"deleted": false,
"created_at": "2023-12-25",
"updated_at": "2023-12-25",
"key": "<string>",
"input": {},
"input_default": {},
"input_options": {
"display": {
"field": "inline",
"container": "grid",
"hidden": true
}
},
"steps": [
{
"type": "note",
"key": "<string>",
"note": "<string>",
"display": "expanded",
"conditional": "<string>",
"loop": "<string>",
"throw_on_error": true,
"input_connected": true,
"destinations": [
"<string>"
],
"position": [
123
],
"size": [
101
],
"auto": {
"provider": "<string>",
"model": "<string>",
"temperature": 1
}
}
],
"tests_stats": {
"total_count": 123,
"running_count": 123,
"cancelled_count": 123,
"passing_count": 123,
"failing_count": 123,
"expectations_failing_count": 123,
"expectations_passing_count": 123
}
},
"workflow_version": {
"id": "<string>",
"app_id": "<string>",
"workflow_id": "<string>",
"description": "<string>",
"version": 123,
"notes": "<string>",
"created_at": "2023-12-25",
"key": "<string>",
"input": {},
"input_default": {},
"input_options": {
"display": {
"field": "inline",
"container": "grid",
"hidden": true
}
},
"steps": [
{
"type": "note",
"key": "<string>",
"note": "<string>",
"display": "expanded",
"conditional": "<string>",
"loop": "<string>",
"throw_on_error": true,
"input_connected": true,
"destinations": [
"<string>"
],
"position": [
123
],
"size": [
101
],
"auto": {
"provider": "<string>",
"model": "<string>",
"temperature": 1
}
}
],
"rollback_version": 123,
"created_by": {
"id": "<string>",
"name": "<string>"
}
},
"execution_order": "before-all",
"step_key": "<string>",
"workflow_input_default": {
"business_name": "Example Corp"
},
"disabled": false
}
]
},
"entity": {
"id": "<string>",
"entity_id": "<string>",
"status": "SYNCED",
"type": "ENCOMPASS",
"trigger_id": "<string>",
"record_id": "<string>",
"data": {},
"created_at": "2023-12-25",
"updated_at": "2023-12-25"
},
"usage": {
"total": 123,
"rules": {},
"calls": [
{
"id": "<string>",
"total": 123,
"calls": [
"<unknown>"
]
}
]
}
}