Provision mailboxes on owned domains (always async)
curl --request POST \
--url https://origami.chat/api/v3/account/mailboxes \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"mailboxes": [
{
"domain_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"local_part": "<string>",
"first_name": "<string>",
"last_name": "<string>"
}
],
"metadata": {}
}
'import requests
url = "https://origami.chat/api/v3/account/mailboxes"
payload = {
"mailboxes": [
{
"domain_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"local_part": "<string>",
"first_name": "<string>",
"last_name": "<string>"
}
],
"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({
mailboxes: [
{
domain_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
local_part: '<string>',
first_name: '<string>',
last_name: '<string>'
}
],
metadata: {}
})
};
fetch('https://origami.chat/api/v3/account/mailboxes', 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/account/mailboxes",
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([
'mailboxes' => [
[
'domain_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'local_part' => '<string>',
'first_name' => '<string>',
'last_name' => '<string>'
]
],
'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/account/mailboxes"
payload := strings.NewReader("{\n \"mailboxes\": [\n {\n \"domain_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"local_part\": \"<string>\",\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\"\n }\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/account/mailboxes")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"mailboxes\": [\n {\n \"domain_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"local_part\": \"<string>\",\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\"\n }\n ],\n \"metadata\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://origami.chat/api/v3/account/mailboxes")
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 \"mailboxes\": [\n {\n \"domain_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"local_part\": \"<string>\",\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\"\n }\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>"
}
}{
"error": "<string>",
"code": "<string>",
"details": {},
"handoff": {
"kind": "connect-accounts",
"url": "<string>",
"label": "<string>"
}
}Domains & mailboxes
Create mailboxes
Provision mailboxes on owned domains (always async)
POST
/
account
/
mailboxes
Provision mailboxes on owned domains (always async)
curl --request POST \
--url https://origami.chat/api/v3/account/mailboxes \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"mailboxes": [
{
"domain_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"local_part": "<string>",
"first_name": "<string>",
"last_name": "<string>"
}
],
"metadata": {}
}
'import requests
url = "https://origami.chat/api/v3/account/mailboxes"
payload = {
"mailboxes": [
{
"domain_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"local_part": "<string>",
"first_name": "<string>",
"last_name": "<string>"
}
],
"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({
mailboxes: [
{
domain_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
local_part: '<string>',
first_name: '<string>',
last_name: '<string>'
}
],
metadata: {}
})
};
fetch('https://origami.chat/api/v3/account/mailboxes', 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/account/mailboxes",
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([
'mailboxes' => [
[
'domain_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'local_part' => '<string>',
'first_name' => '<string>',
'last_name' => '<string>'
]
],
'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/account/mailboxes"
payload := strings.NewReader("{\n \"mailboxes\": [\n {\n \"domain_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"local_part\": \"<string>\",\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\"\n }\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/account/mailboxes")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"mailboxes\": [\n {\n \"domain_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"local_part\": \"<string>\",\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\"\n }\n ],\n \"metadata\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://origami.chat/api/v3/account/mailboxes")
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 \"mailboxes\": [\n {\n \"domain_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"local_part\": \"<string>\",\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\"\n }\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>"
}
}{
"error": "<string>",
"code": "<string>",
"details": {},
"handoff": {
"kind": "connect-accounts",
"url": "<string>",
"label": "<string>"
}
}Authorizations
API key: Authorization: Bearer og_live_...
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