Add or fill a column from instructions (AGENT)
curl --request POST \
--url https://origami.chat/api/v3/leads/lists/{list_id}/enrich_custom \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"instructions": "<string>",
"row_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"metadata": {}
}
'import requests
url = "https://origami.chat/api/v3/leads/lists/{list_id}/enrich_custom"
payload = {
"instructions": "<string>",
"row_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"metadata": {}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
instructions: '<string>',
row_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
metadata: {}
})
};
fetch('https://origami.chat/api/v3/leads/lists/{list_id}/enrich_custom', 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://origami.chat/api/v3/leads/lists/{list_id}/enrich_custom",
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([
'instructions' => '<string>',
'row_ids' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'metadata' => [
]
]),
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;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://origami.chat/api/v3/leads/lists/{list_id}/enrich_custom"
payload := strings.NewReader("{\n \"instructions\": \"<string>\",\n \"row_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"metadata\": {}\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://origami.chat/api/v3/leads/lists/{list_id}/enrich_custom")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"instructions\": \"<string>\",\n \"row_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"metadata\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://origami.chat/api/v3/leads/lists/{list_id}/enrich_custom")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"instructions\": \"<string>\",\n \"row_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"metadata\": {}\n}"
response = http.request(request)
puts response.read_body{
"object": "job",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"operation": "<string>",
"status": "queued",
"cancel_requested": true,
"phase": "researching",
"progress": {
"done": 123,
"total": 123
},
"target": {
"type": "list",
"id": "<string>"
},
"metadata": {},
"next_poll_at": "2023-11-07T05:31:56Z",
"result": {},
"credits": {
"spent": 123,
"settled": true
},
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"needs_input": {},
"chat_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}{
"error": "<string>",
"code": "<string>",
"details": {},
"handoff": {
"kind": "connect-accounts",
"url": "<string>",
"label": "<string>"
}
}{
"error": "<string>",
"code": "<string>",
"details": {},
"handoff": {
"kind": "connect-accounts",
"url": "<string>",
"label": "<string>"
}
}{
"error": "<string>",
"code": "<string>",
"details": {},
"handoff": {
"kind": "connect-accounts",
"url": "<string>",
"label": "<string>"
}
}{
"error": "<string>",
"code": "<string>",
"details": {},
"handoff": {
"kind": "connect-accounts",
"url": "<string>",
"label": "<string>"
}
}{
"error": "<string>",
"code": "<string>",
"details": {},
"handoff": {
"kind": "connect-accounts",
"url": "<string>",
"label": "<string>"
}
}Lists
Enrich from instructions
Add or fill a column from instructions (AGENT)
POST
/
leads
/
lists
/
{list_id}
/
enrich_custom
Add or fill a column from instructions (AGENT)
curl --request POST \
--url https://origami.chat/api/v3/leads/lists/{list_id}/enrich_custom \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"instructions": "<string>",
"row_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"metadata": {}
}
'import requests
url = "https://origami.chat/api/v3/leads/lists/{list_id}/enrich_custom"
payload = {
"instructions": "<string>",
"row_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"metadata": {}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
instructions: '<string>',
row_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
metadata: {}
})
};
fetch('https://origami.chat/api/v3/leads/lists/{list_id}/enrich_custom', 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://origami.chat/api/v3/leads/lists/{list_id}/enrich_custom",
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([
'instructions' => '<string>',
'row_ids' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'metadata' => [
]
]),
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;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://origami.chat/api/v3/leads/lists/{list_id}/enrich_custom"
payload := strings.NewReader("{\n \"instructions\": \"<string>\",\n \"row_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"metadata\": {}\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://origami.chat/api/v3/leads/lists/{list_id}/enrich_custom")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"instructions\": \"<string>\",\n \"row_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"metadata\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://origami.chat/api/v3/leads/lists/{list_id}/enrich_custom")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"instructions\": \"<string>\",\n \"row_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"metadata\": {}\n}"
response = http.request(request)
puts response.read_body{
"object": "job",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"operation": "<string>",
"status": "queued",
"cancel_requested": true,
"phase": "researching",
"progress": {
"done": 123,
"total": 123
},
"target": {
"type": "list",
"id": "<string>"
},
"metadata": {},
"next_poll_at": "2023-11-07T05:31:56Z",
"result": {},
"credits": {
"spent": 123,
"settled": true
},
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"needs_input": {},
"chat_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}{
"error": "<string>",
"code": "<string>",
"details": {},
"handoff": {
"kind": "connect-accounts",
"url": "<string>",
"label": "<string>"
}
}{
"error": "<string>",
"code": "<string>",
"details": {},
"handoff": {
"kind": "connect-accounts",
"url": "<string>",
"label": "<string>"
}
}{
"error": "<string>",
"code": "<string>",
"details": {},
"handoff": {
"kind": "connect-accounts",
"url": "<string>",
"label": "<string>"
}
}{
"error": "<string>",
"code": "<string>",
"details": {},
"handoff": {
"kind": "connect-accounts",
"url": "<string>",
"label": "<string>"
}
}{
"error": "<string>",
"code": "<string>",
"details": {},
"handoff": {
"kind": "connect-accounts",
"url": "<string>",
"label": "<string>"
}
}Authorizations
API key: Authorization: Bearer og_live_...
Path Parameters
Body
application/json
Response
Job admitted
Shared Job resource returned by every async operation. Poll GET /jobs/{job_id} honoring next_poll_at, or subscribe to job.* webhooks.
Available options:
job Catalog operation id
Available options:
queued, running, needs_input, succeeded, failed, cancelled Available options:
researching, fetching, enriching, drafting, rendering Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
This Job's credit totals; null for non-spending operations. settled flips true after delivered-lead settlement writes back.
Show child attributes
Show child attributes
Show child attributes
Show child attributes