Create A Collection Record
curl --request POST \
--url https://api.zixflow.com/api/v1/collection-records/{collectionId} \
--header 'Content-Type: application/json' \
--data '{
"<key>": {}
}'import requests
url = "https://api.zixflow.com/api/v1/collection-records/{collectionId}"
payload = { "<key>": {} }
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({'<key>': {}})
};
fetch('https://api.zixflow.com/api/v1/collection-records/{collectionId}', 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.zixflow.com/api/v1/collection-records/{collectionId}",
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([
'<key>' => [
]
]),
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.zixflow.com/api/v1/collection-records/{collectionId}"
payload := strings.NewReader("{\n \"<key>\": {}\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.zixflow.com/api/v1/collection-records/{collectionId}")
.header("Content-Type", "application/json")
.body("{\n \"<key>\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.zixflow.com/api/v1/collection-records/{collectionId}")
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 \"<key>\": {}\n}"
response = http.request(request)
puts response.read_body{
"status": true,
"message": "Record created successfully!",
"_id": "6551f5ff3c896c334f28d659",
"data": {
"_id": "6551f5ff3c896c334f28d659",
"<key>": "<value>"
}
}
{
"status": false,
"message": "No token provided"
}
Collection Records
Create A Collection Record
This endpoint creates a new collection record in the specified collection.
POST
/
api
/
v1
/
collection-records
/
{collectionId}
Create A Collection Record
curl --request POST \
--url https://api.zixflow.com/api/v1/collection-records/{collectionId} \
--header 'Content-Type: application/json' \
--data '{
"<key>": {}
}'import requests
url = "https://api.zixflow.com/api/v1/collection-records/{collectionId}"
payload = { "<key>": {} }
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({'<key>': {}})
};
fetch('https://api.zixflow.com/api/v1/collection-records/{collectionId}', 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.zixflow.com/api/v1/collection-records/{collectionId}",
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([
'<key>' => [
]
]),
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.zixflow.com/api/v1/collection-records/{collectionId}"
payload := strings.NewReader("{\n \"<key>\": {}\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.zixflow.com/api/v1/collection-records/{collectionId}")
.header("Content-Type", "application/json")
.body("{\n \"<key>\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.zixflow.com/api/v1/collection-records/{collectionId}")
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 \"<key>\": {}\n}"
response = http.request(request)
puts response.read_body{
"status": true,
"message": "Record created successfully!",
"_id": "6551f5ff3c896c334f28d659",
"data": {
"_id": "6551f5ff3c896c334f28d659",
"<key>": "<value>"
}
}
{
"status": false,
"message": "No token provided"
}
Description
This API endpoint enables the creation of a new collection record within a specified collection. The collection record is associated with the provided collection ID.Path
string
required
A unique identifier for the collection where the record will be added.
Body
varies
required
Key-value pairs representing data for the collection record. Keys are defined by the attribute API key name, and values depend on the input type of the attribute.
Response
boolean
Indicates the success or failure of the collection record creation. In this case,
true signifies a successful operation.
string
Provides a human-readable message accompanying the response. In this instance,
it confirms the successful creation of the collection record with the message “Record created successfully!”
string
The unique identifier for the created collection record.
object
An object containing details of the created collection record, including key-value pairs representing the record’s data.
{
"status": true,
"message": "Record created successfully!",
"_id": "6551f5ff3c896c334f28d659",
"data": {
"_id": "6551f5ff3c896c334f28d659",
"<key>": "<value>"
}
}
{
"status": false,
"message": "No token provided"
}