Agregar ítems por tipo (atajo)
curl --request POST \
--url http://api.gu1.ai/data-lists/{type}/items \
--header 'Authorization: Bearer <token>'import requests
url = "http://api.gu1.ai/data-lists/{type}/items"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('http://api.gu1.ai/data-lists/{type}/items', 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 => "http://api.gu1.ai/data-lists/{type}/items",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "http://api.gu1.ai/data-lists/{type}/items"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("http://api.gu1.ai/data-lists/{type}/items")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("http://api.gu1.ai/data-lists/{type}/items")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_bodyReferencia API
Agregar ítems por tipo (atajo)
Atajo legacy para agregar ítems a la primera lista activa del tipo indicado; usa POST /data-lists//items si tienes múltiples listas del mismo tipo.
POST
/
data-lists
/
{type}
/
items
Agregar ítems por tipo (atajo)
curl --request POST \
--url http://api.gu1.ai/data-lists/{type}/items \
--header 'Authorization: Bearer <token>'import requests
url = "http://api.gu1.ai/data-lists/{type}/items"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('http://api.gu1.ai/data-lists/{type}/items', 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 => "http://api.gu1.ai/data-lists/{type}/items",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "http://api.gu1.ai/data-lists/{type}/items"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("http://api.gu1.ai/data-lists/{type}/items")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("http://api.gu1.ai/data-lists/{type}/items")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_bodyResumen
Agrega ítems a la primera lista activa del{type} (orden por createdAt en la implementación). Si no hay lista activa, responde 404 con indicación de crear una con POST /data-lists.
Con varias listas por tipo, usá siempre Agregar ítems con UUID explícito.
Endpoint
POST https://api.gu1.ai/data-lists/{type}/items
Autenticación
Authorization: Bearer YOUR_API_KEY
Content-Type: application/json
Cuerpo de la solicitud
Same shape as Add items:items(required): 1–1000 entries withprimaryValue, optionalsearchKeys,category,riskScore,itemData,metadata.options:batchSize,ignoreDuplicates,updateExisting.
Respuesta
201 with listId resolved by the server, plus ingest counters.Was this page helpful?