Worked request and response samples
Copy a request body as written, substitute your own ids, and compare the response envelope. Errors follow Devotel Orbit’s{ error, meta } envelope, shown once below under Error envelope.
Create a ticket
POST /api/v1/inbox/ticketscURL
curl -X POST "https://api.orbit.devotel.io/api/v1/inbox/tickets" \
-H "X-API-Key: dv_live_sk_your_key_here" \
-H "Content-Type: application/json" \
-d '{
"subject": "Refund request",
"channel": "email",
"contact_id": "contact_4d2f6a8c1e3b5d7f9a1c3e5b",
"priority": "normal"
}'
Node.js
import { Orbit } from '@devotel-orbit/node'
const orbit = new Orbit({
apiKey: process.env.ORBIT_API_KEY!,
})
// orbit.request() handles auth, retry, and idempotency automatically
const data = await orbit.request('POST', '/inbox/tickets', {
"subject": "Refund request",
"channel": "email",
"contact_id": "contact_4d2f6a8c1e3b5d7f9a1c3e5b",
"priority": "normal"
});
console.log(data)
Python
from orbit_sdk import OrbitClient
client = OrbitClient.from_env("ORBIT_API_KEY")
body = { "subject": "Refund request", "channel": "email", "contact_id": "contact_4d2f6a8c1e3b5d7f9a1c3e5b", "priority": "normal" }
result = client.request("POST", "/inbox/tickets", json_body=body)
print(result)
Go
package main
import (
"context"
"fmt"
"os"
"time"
orbit "github.com/devotel/orbit-go/orbit"
)
func main() {
client, err := orbit.NewClient(os.Getenv("ORBIT_API_KEY"))
if err != nil {
panic(err)
}
ctx, cancel := context.WithTimeout(context.Background(), 30*time.Second)
defer cancel()
var result map[string]any
body := map[string]any{"subject": "Refund request","channel": "email","contact_id": "contact_4d2f6a8c1e3b5d7f9a1c3e5b","priority": "normal"}
if err := client.Request(ctx, "POST", "/inbox/tickets", nil, body, &result, ""); err != nil {
fmt.Fprintf(os.Stderr, "orbit: %v\n", err)
os.Exit(1)
}
fmt.Println(result)
}
Ruby
require 'orbit_sdk'
client = OrbitSdk::Client.from_env('ORBIT_API_KEY')
body = { "subject" => "Refund request", "channel" => "email", "contact_id" => "contact_4d2f6a8c1e3b5d7f9a1c3e5b", "priority" => "normal" }
result = client.request('POST', '/inbox/tickets', json_body: body)
puts result
PHP
<?php
require_once(__DIR__ . '/vendor/autoload.php');
use Devotel\Orbit\OrbitClient;
$client = OrbitClient::fromEnv('ORBIT_API_KEY');
$body = ["subject" => "Refund request", "channel" => "email", "contact_id" => "contact_4d2f6a8c1e3b5d7f9a1c3e5b", "priority" => "normal"];
$result = $client->request('POST', '/inbox/tickets', jsonBody: $body);
echo json_encode($result);
{
"data": {
"id": "tick_9e8d7c6b5a4f3021e5d6c7b8",
"subject": "Refund request",
"status": "open"
},
"meta": {
"request_id": "req_ticket",
"timestamp": "2026-08-01T12:00:00.000Z"
}
}
Add a comment to a ticket
POST /api/v1/inbox/tickets/{id}/commentscURL
curl -X POST "https://api.orbit.devotel.io/api/v1/inbox/tickets/{id}/comments" \
-H "X-API-Key: dv_live_sk_your_key_here" \
-H "Content-Type: application/json" \
-d '{
"body": "We'll refund the difference within 2 business days.",
"kind": "public"
}'
Node.js
import { Orbit } from '@devotel-orbit/node'
const orbit = new Orbit({
apiKey: process.env.ORBIT_API_KEY!,
})
// orbit.request() handles auth, retry, and idempotency automatically
const data = await orbit.request('POST', '/inbox/tickets/{id}/comments', {
"body": "We'll refund the difference within 2 business days.",
"kind": "public"
});
console.log(data)
Python
from orbit_sdk import OrbitClient
client = OrbitClient.from_env("ORBIT_API_KEY")
body = { "body": "We'll refund the difference within 2 business days.", "kind": "public" }
result = client.request("POST", "/inbox/tickets/{id}/comments", json_body=body)
print(result)
Go
package main
import (
"context"
"fmt"
"os"
"time"
orbit "github.com/devotel/orbit-go/orbit"
)
func main() {
client, err := orbit.NewClient(os.Getenv("ORBIT_API_KEY"))
if err != nil {
panic(err)
}
ctx, cancel := context.WithTimeout(context.Background(), 30*time.Second)
defer cancel()
var result map[string]any
body := map[string]any{"body": "We'll refund the difference within 2 business days.","kind": "public"}
if err := client.Request(ctx, "POST", "/inbox/tickets/{id}/comments", nil, body, &result, ""); err != nil {
fmt.Fprintf(os.Stderr, "orbit: %v\n", err)
os.Exit(1)
}
fmt.Println(result)
}
Ruby
require 'orbit_sdk'
client = OrbitSdk::Client.from_env('ORBIT_API_KEY')
body = { "body" => "We'll refund the difference within 2 business days.", "kind" => "public" }
result = client.request('POST', '/inbox/tickets/{id}/comments', json_body: body)
puts result
PHP
<?php
require_once(__DIR__ . '/vendor/autoload.php');
use Devotel\Orbit\OrbitClient;
$client = OrbitClient::fromEnv('ORBIT_API_KEY');
$body = ["body" => "We'll refund the difference within 2 business days.", "kind" => "public"];
$result = $client->request('POST', '/inbox/tickets/{id}/comments', jsonBody: $body);
echo json_encode($result);
{
"data": {
"id": "cmt_5d6c7e8f9a1b2c3d4e5f6a7b",
"kind": "public",
"body": "We'll refund the difference within 2 business days."
},
"meta": {
"request_id": "req_comment",
"timestamp": "2026-08-01T12:01:00.000Z"
}
}
List a ticket’s related tickets
GET /api/v1/inbox/tickets/{id}/linkscURL
curl -X GET "https://api.orbit.devotel.io/api/v1/inbox/tickets/{id}/links" \
-H "X-API-Key: dv_live_sk_your_key_here"
Node.js
import { Orbit } from '@devotel-orbit/node'
const orbit = new Orbit({
apiKey: process.env.ORBIT_API_KEY!,
})
// orbit.request() handles auth, retry, and idempotency automatically
const data = await orbit.request('GET', '/inbox/tickets/{id}/links');
console.log(data)
Python
from orbit_sdk import OrbitClient
client = OrbitClient.from_env("ORBIT_API_KEY")
result = client.request("GET", "/inbox/tickets/{id}/links")
print(result)
Go
package main
import (
"context"
"fmt"
"os"
"time"
orbit "github.com/devotel/orbit-go/orbit"
)
func main() {
client, err := orbit.NewClient(os.Getenv("ORBIT_API_KEY"))
if err != nil {
panic(err)
}
ctx, cancel := context.WithTimeout(context.Background(), 30*time.Second)
defer cancel()
var result map[string]any
if err := client.Request(ctx, "GET", "/inbox/tickets/{id}/links", nil, nil, &result, ""); err != nil {
fmt.Fprintf(os.Stderr, "orbit: %v\n", err)
os.Exit(1)
}
fmt.Println(result)
}
Ruby
require 'orbit_sdk'
client = OrbitSdk::Client.from_env('ORBIT_API_KEY')
result = client.request('GET', '/inbox/tickets/{id}/links')
puts result
PHP
<?php
require_once(__DIR__ . '/vendor/autoload.php');
use Devotel\Orbit\OrbitClient;
$client = OrbitClient::fromEnv('ORBIT_API_KEY');
$result = $client->request('GET', '/inbox/tickets/{id}/links');
echo json_encode($result);
{
"data": [
{
"from": "tick_9e8d7c6b5a4f3021e5d6c7b8",
"to": "tick_2b3c4d5e6f7081a2b3c4d5",
"kind": "related"
}
],
"meta": {
"request_id": "req_links",
"timestamp": "2026-08-01T11:59:00.000Z"
}
}
Error envelope
422
{
"error": {
"code": "VALIDATION_ERROR",
"status": 422,
"message": "subject: Required"
},
"meta": {
"request_id": "req_...",
"timestamp": "2026-08-01T12:00:00.000Z"
}
}
Worked sequences
The catalogue above trims every operation past the fifteenth to cURL plus Node.js (TypeScript). The two flows below re-run the inbox setup pipeline in the full six-language group; request bodies and response envelopes are the ones the catalogue publishes for each operation.Create a macro, then run it on a conversation
Macros package the reply plus side effects an agent applies in one click. Create one, then apply it to a live conversation. Create the macro —POST /api/v1/inbox/macros
cURL
curl -X POST "https://api.orbit.devotel.io/api/v1/inbox/macros" \
-H "X-API-Key: dv_live_sk_your_key_here" \
-H "Content-Type: application/json" \
-d '{}'
Node.js
import { Orbit } from '@devotel-orbit/node'
const orbit = new Orbit({
apiKey: process.env.ORBIT_API_KEY!,
})
// orbit.request() handles auth, retry, and idempotency automatically
const data = await orbit.request('POST', '/inbox/macros', {});
console.log(data)
Python
from orbit_sdk import OrbitClient
client = OrbitClient.from_env("ORBIT_API_KEY")
body = {}
result = client.request("POST", "/inbox/macros", json_body=body)
print(result)
Go
package main
import (
"context"
"fmt"
"os"
"time"
orbit "github.com/devotel/orbit-go/orbit"
)
func main() {
client, err := orbit.NewClient(os.Getenv("ORBIT_API_KEY"))
if err != nil {
panic(err)
}
ctx, cancel := context.WithTimeout(context.Background(), 30*time.Second)
defer cancel()
var result map[string]any
body := map[string]any{{}}
if err := client.Request(ctx, "POST", "/inbox/macros", nil, body, &result, ""); err != nil {
fmt.Fprintf(os.Stderr, "orbit: %v\n", err)
os.Exit(1)
}
fmt.Println(result)
}
Ruby
require 'orbit_sdk'
client = OrbitSdk::Client.from_env('ORBIT_API_KEY')
body = {}
result = client.request('POST', '/inbox/macros', json_body: body)
puts result
PHP
<?php
require_once(__DIR__ . '/vendor/autoload.php');
use Devotel\Orbit\OrbitClient;
$client = OrbitClient::fromEnv('ORBIT_API_KEY');
$body = [];
$result = $client->request('POST', '/inbox/macros', jsonBody: $body);
echo json_encode($result);
{
"data": [
{
"from": "tick_9e8d7c6b5a4f3021e5d6c7b8",
"to": "tick_2b3c4d5e6f7081a2b3c4d5",
"kind": "related"
}
],
"meta": {
"request_id": "req_links",
"timestamp": "2026-08-01T11:59:00.000Z"
}
}
POST /api/v1/inbox/conversations/{convId}/run-macro
cURL
curl -X POST "https://api.orbit.devotel.io/api/v1/inbox/conversations/{convId}/run-macro" \
-H "X-API-Key: dv_live_sk_your_key_here" \
-H "Content-Type: application/json" \
-d '{}'
Node.js
import { Orbit } from '@devotel-orbit/node'
const orbit = new Orbit({
apiKey: process.env.ORBIT_API_KEY!,
})
// orbit.request() handles auth, retry, and idempotency automatically
const data = await orbit.request('POST', '/inbox/conversations/{convId}/run-macro', {});
console.log(data)
Python
from orbit_sdk import OrbitClient
client = OrbitClient.from_env("ORBIT_API_KEY")
body = {}
result = client.request("POST", "/inbox/conversations/{convId}/run-macro", json_body=body)
print(result)
Go
package main
import (
"context"
"fmt"
"os"
"time"
orbit "github.com/devotel/orbit-go/orbit"
)
func main() {
client, err := orbit.NewClient(os.Getenv("ORBIT_API_KEY"))
if err != nil {
panic(err)
}
ctx, cancel := context.WithTimeout(context.Background(), 30*time.Second)
defer cancel()
var result map[string]any
body := map[string]any{{}}
if err := client.Request(ctx, "POST", "/inbox/conversations/{convId}/run-macro", nil, body, &result, ""); err != nil {
fmt.Fprintf(os.Stderr, "orbit: %v\n", err)
os.Exit(1)
}
fmt.Println(result)
}
Ruby
require 'orbit_sdk'
client = OrbitSdk::Client.from_env('ORBIT_API_KEY')
body = {}
result = client.request('POST', '/inbox/conversations/{convId}/run-macro', json_body: body)
puts result
PHP
<?php
require_once(__DIR__ . '/vendor/autoload.php');
use Devotel\Orbit\OrbitClient;
$client = OrbitClient::fromEnv('ORBIT_API_KEY');
$body = [];
$result = $client->request('POST', '/inbox/conversations/{convId}/run-macro', jsonBody: $body);
echo json_encode($result);
{
"data": [
{
"from": "tick_9e8d7c6b5a4f3021e5d6c7b8",
"to": "tick_2b3c4d5e6f7081a2b3c4d5",
"kind": "related"
}
],
"meta": {
"request_id": "req_links",
"timestamp": "2026-08-01T11:59:00.000Z"
}
}
Create a routing rule and read the rule list
Routing rules decide which queue or agent a new conversation lands in. Create the rule, then confirm it on the list read. Create the rule —POST /api/v1/inbox/routing-rules
cURL
curl -X POST "https://api.orbit.devotel.io/api/v1/inbox/routing-rules" \
-H "X-API-Key: dv_live_sk_your_key_here" \
-H "Content-Type: application/json" \
-d '{}'
Node.js
import { Orbit } from '@devotel-orbit/node'
const orbit = new Orbit({
apiKey: process.env.ORBIT_API_KEY!,
})
// orbit.request() handles auth, retry, and idempotency automatically
const data = await orbit.request('POST', '/inbox/routing-rules', {});
console.log(data)
Python
from orbit_sdk import OrbitClient
client = OrbitClient.from_env("ORBIT_API_KEY")
body = {}
result = client.request("POST", "/inbox/routing-rules", json_body=body)
print(result)
Go
package main
import (
"context"
"fmt"
"os"
"time"
orbit "github.com/devotel/orbit-go/orbit"
)
func main() {
client, err := orbit.NewClient(os.Getenv("ORBIT_API_KEY"))
if err != nil {
panic(err)
}
ctx, cancel := context.WithTimeout(context.Background(), 30*time.Second)
defer cancel()
var result map[string]any
body := map[string]any{{}}
if err := client.Request(ctx, "POST", "/inbox/routing-rules", nil, body, &result, ""); err != nil {
fmt.Fprintf(os.Stderr, "orbit: %v\n", err)
os.Exit(1)
}
fmt.Println(result)
}
Ruby
require 'orbit_sdk'
client = OrbitSdk::Client.from_env('ORBIT_API_KEY')
body = {}
result = client.request('POST', '/inbox/routing-rules', json_body: body)
puts result
PHP
<?php
require_once(__DIR__ . '/vendor/autoload.php');
use Devotel\Orbit\OrbitClient;
$client = OrbitClient::fromEnv('ORBIT_API_KEY');
$body = [];
$result = $client->request('POST', '/inbox/routing-rules', jsonBody: $body);
echo json_encode($result);
{
"data": [
{
"from": "tick_9e8d7c6b5a4f3021e5d6c7b8",
"to": "tick_2b3c4d5e6f7081a2b3c4d5",
"kind": "related"
}
],
"meta": {
"request_id": "req_links",
"timestamp": "2026-08-01T11:59:00.000Z"
}
}
GET /api/v1/inbox/routing-rules
cURL
curl -X GET "https://api.orbit.devotel.io/api/v1/inbox/routing-rules" \
-H "X-API-Key: dv_live_sk_your_key_here"
Node.js
import { Orbit } from '@devotel-orbit/node'
const orbit = new Orbit({
apiKey: process.env.ORBIT_API_KEY!,
})
// orbit.request() handles auth, retry, and idempotency automatically
const data = await orbit.request('GET', '/inbox/routing-rules');
console.log(data)
Python
from orbit_sdk import OrbitClient
client = OrbitClient.from_env("ORBIT_API_KEY")
result = client.request("GET", "/inbox/routing-rules")
print(result)
Go
package main
import (
"context"
"fmt"
"os"
"time"
orbit "github.com/devotel/orbit-go/orbit"
)
func main() {
client, err := orbit.NewClient(os.Getenv("ORBIT_API_KEY"))
if err != nil {
panic(err)
}
ctx, cancel := context.WithTimeout(context.Background(), 30*time.Second)
defer cancel()
var result map[string]any
if err := client.Request(ctx, "GET", "/inbox/routing-rules", nil, nil, &result, ""); err != nil {
fmt.Fprintf(os.Stderr, "orbit: %v\n", err)
os.Exit(1)
}
fmt.Println(result)
}
Ruby
require 'orbit_sdk'
client = OrbitSdk::Client.from_env('ORBIT_API_KEY')
result = client.request('GET', '/inbox/routing-rules')
puts result
PHP
<?php
require_once(__DIR__ . '/vendor/autoload.php');
use Devotel\Orbit\OrbitClient;
$client = OrbitClient::fromEnv('ORBIT_API_KEY');
$result = $client->request('GET', '/inbox/routing-rules');
echo json_encode($result);
{
"data": [
{
"from": "tick_9e8d7c6b5a4f3021e5d6c7b8",
"to": "tick_2b3c4d5e6f7081a2b3c4d5",
"kind": "related"
}
],
"meta": {
"request_id": "req_links",
"timestamp": "2026-08-01T11:59:00.000Z"
}
}