Customer Applicability API
Update tenant-owned lifecycle state for a customer obligation instance
PATCH
/
api
/
v1
/
customer-obligation-instances
/
{customer_obligation_instance_id}
Update tenant-owned lifecycle state for a customer obligation instance
curl --request PATCH \
--url https://api.esheria.ai/api/v1/customer-obligation-instances/{customer_obligation_instance_id} \
--header 'Content-Type: application/json' \
--header 'idempotency-key: <idempotency-key>' \
--header 'x-api-key: <api-key>' \
--data '
{
"due_date": "2026-07-31",
"lifecycle_metadata": {
"ticket_id": "COMP-42"
},
"owner_label": "Compliance lead",
"owner_user_id": "usr_123",
"priority": "high",
"status": "monitoring",
"status_reason": "Accepted into the compliance work queue."
}
'import requests
url = "https://api.esheria.ai/api/v1/customer-obligation-instances/{customer_obligation_instance_id}"
payload = {
"due_date": "2026-07-31",
"lifecycle_metadata": { "ticket_id": "COMP-42" },
"owner_label": "Compliance lead",
"owner_user_id": "usr_123",
"priority": "high",
"status": "monitoring",
"status_reason": "Accepted into the compliance work queue."
}
headers = {
"idempotency-key": "<idempotency-key>",
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {
'idempotency-key': '<idempotency-key>',
'x-api-key': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
due_date: '2026-07-31',
lifecycle_metadata: {ticket_id: 'COMP-42'},
owner_label: 'Compliance lead',
owner_user_id: 'usr_123',
priority: 'high',
status: 'monitoring',
status_reason: 'Accepted into the compliance work queue.'
})
};
fetch('https://api.esheria.ai/api/v1/customer-obligation-instances/{customer_obligation_instance_id}', 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.esheria.ai/api/v1/customer-obligation-instances/{customer_obligation_instance_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'due_date' => '2026-07-31',
'lifecycle_metadata' => [
'ticket_id' => 'COMP-42'
],
'owner_label' => 'Compliance lead',
'owner_user_id' => 'usr_123',
'priority' => 'high',
'status' => 'monitoring',
'status_reason' => 'Accepted into the compliance work queue.'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"idempotency-key: <idempotency-key>",
"x-api-key: <api-key>"
],
]);
$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.esheria.ai/api/v1/customer-obligation-instances/{customer_obligation_instance_id}"
payload := strings.NewReader("{\n \"due_date\": \"2026-07-31\",\n \"lifecycle_metadata\": {\n \"ticket_id\": \"COMP-42\"\n },\n \"owner_label\": \"Compliance lead\",\n \"owner_user_id\": \"usr_123\",\n \"priority\": \"high\",\n \"status\": \"monitoring\",\n \"status_reason\": \"Accepted into the compliance work queue.\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("idempotency-key", "<idempotency-key>")
req.Header.Add("x-api-key", "<api-key>")
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.patch("https://api.esheria.ai/api/v1/customer-obligation-instances/{customer_obligation_instance_id}")
.header("idempotency-key", "<idempotency-key>")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"due_date\": \"2026-07-31\",\n \"lifecycle_metadata\": {\n \"ticket_id\": \"COMP-42\"\n },\n \"owner_label\": \"Compliance lead\",\n \"owner_user_id\": \"usr_123\",\n \"priority\": \"high\",\n \"status\": \"monitoring\",\n \"status_reason\": \"Accepted into the compliance work queue.\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.esheria.ai/api/v1/customer-obligation-instances/{customer_obligation_instance_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["idempotency-key"] = '<idempotency-key>'
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"due_date\": \"2026-07-31\",\n \"lifecycle_metadata\": {\n \"ticket_id\": \"COMP-42\"\n },\n \"owner_label\": \"Compliance lead\",\n \"owner_user_id\": \"usr_123\",\n \"priority\": \"high\",\n \"status\": \"monitoring\",\n \"status_reason\": \"Accepted into the compliance work queue.\"\n}"
response = http.request(request)
puts response.read_body{
"status": "error",
"errors": [
{
"code": "unauthorized",
"message": "Invalid API key"
}
],
"trace_id": "trace-123"
}{
"status": "error",
"errors": [
{
"code": "credits_exhausted",
"message": "API credits exhausted"
}
],
"trace_id": "trace-123"
}{
"status": "error",
"errors": [
{
"code": "duplicate_token_name",
"message": "An active data token already uses that name."
}
],
"trace_id": "trace-123"
}{
"status": "error",
"errors": [
{
"code": "validation_error",
"message": "Invalid payload",
"field": "body.name"
}
],
"trace_id": "trace-123"
}{
"status": "error",
"errors": [
{
"code": "billing_unavailable",
"message": "Billing ledger is unavailable"
}
],
"trace_id": "trace-123"
}Authorizations
Client API key issued by Esheria.
Headers
Unique key for mutating request replay protection.
Path Parameters
Body
application/json
Available options:
candidate, accepted, not_applicable, monitoring, retired Maximum string length:
160Maximum string length:
240Maximum string length:
32Available options:
low, normal, high, urgent Maximum string length:
1000Maximum string length:
160Response
Successful Response
List workspace customer obligation instances that reference published facts
Previous
Recompute customer impacts from pack change events
Next
⌘I
Update tenant-owned lifecycle state for a customer obligation instance
curl --request PATCH \
--url https://api.esheria.ai/api/v1/customer-obligation-instances/{customer_obligation_instance_id} \
--header 'Content-Type: application/json' \
--header 'idempotency-key: <idempotency-key>' \
--header 'x-api-key: <api-key>' \
--data '
{
"due_date": "2026-07-31",
"lifecycle_metadata": {
"ticket_id": "COMP-42"
},
"owner_label": "Compliance lead",
"owner_user_id": "usr_123",
"priority": "high",
"status": "monitoring",
"status_reason": "Accepted into the compliance work queue."
}
'import requests
url = "https://api.esheria.ai/api/v1/customer-obligation-instances/{customer_obligation_instance_id}"
payload = {
"due_date": "2026-07-31",
"lifecycle_metadata": { "ticket_id": "COMP-42" },
"owner_label": "Compliance lead",
"owner_user_id": "usr_123",
"priority": "high",
"status": "monitoring",
"status_reason": "Accepted into the compliance work queue."
}
headers = {
"idempotency-key": "<idempotency-key>",
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {
'idempotency-key': '<idempotency-key>',
'x-api-key': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
due_date: '2026-07-31',
lifecycle_metadata: {ticket_id: 'COMP-42'},
owner_label: 'Compliance lead',
owner_user_id: 'usr_123',
priority: 'high',
status: 'monitoring',
status_reason: 'Accepted into the compliance work queue.'
})
};
fetch('https://api.esheria.ai/api/v1/customer-obligation-instances/{customer_obligation_instance_id}', 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.esheria.ai/api/v1/customer-obligation-instances/{customer_obligation_instance_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'due_date' => '2026-07-31',
'lifecycle_metadata' => [
'ticket_id' => 'COMP-42'
],
'owner_label' => 'Compliance lead',
'owner_user_id' => 'usr_123',
'priority' => 'high',
'status' => 'monitoring',
'status_reason' => 'Accepted into the compliance work queue.'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"idempotency-key: <idempotency-key>",
"x-api-key: <api-key>"
],
]);
$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.esheria.ai/api/v1/customer-obligation-instances/{customer_obligation_instance_id}"
payload := strings.NewReader("{\n \"due_date\": \"2026-07-31\",\n \"lifecycle_metadata\": {\n \"ticket_id\": \"COMP-42\"\n },\n \"owner_label\": \"Compliance lead\",\n \"owner_user_id\": \"usr_123\",\n \"priority\": \"high\",\n \"status\": \"monitoring\",\n \"status_reason\": \"Accepted into the compliance work queue.\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("idempotency-key", "<idempotency-key>")
req.Header.Add("x-api-key", "<api-key>")
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.patch("https://api.esheria.ai/api/v1/customer-obligation-instances/{customer_obligation_instance_id}")
.header("idempotency-key", "<idempotency-key>")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"due_date\": \"2026-07-31\",\n \"lifecycle_metadata\": {\n \"ticket_id\": \"COMP-42\"\n },\n \"owner_label\": \"Compliance lead\",\n \"owner_user_id\": \"usr_123\",\n \"priority\": \"high\",\n \"status\": \"monitoring\",\n \"status_reason\": \"Accepted into the compliance work queue.\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.esheria.ai/api/v1/customer-obligation-instances/{customer_obligation_instance_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["idempotency-key"] = '<idempotency-key>'
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"due_date\": \"2026-07-31\",\n \"lifecycle_metadata\": {\n \"ticket_id\": \"COMP-42\"\n },\n \"owner_label\": \"Compliance lead\",\n \"owner_user_id\": \"usr_123\",\n \"priority\": \"high\",\n \"status\": \"monitoring\",\n \"status_reason\": \"Accepted into the compliance work queue.\"\n}"
response = http.request(request)
puts response.read_body{
"status": "error",
"errors": [
{
"code": "unauthorized",
"message": "Invalid API key"
}
],
"trace_id": "trace-123"
}{
"status": "error",
"errors": [
{
"code": "credits_exhausted",
"message": "API credits exhausted"
}
],
"trace_id": "trace-123"
}{
"status": "error",
"errors": [
{
"code": "duplicate_token_name",
"message": "An active data token already uses that name."
}
],
"trace_id": "trace-123"
}{
"status": "error",
"errors": [
{
"code": "validation_error",
"message": "Invalid payload",
"field": "body.name"
}
],
"trace_id": "trace-123"
}{
"status": "error",
"errors": [
{
"code": "billing_unavailable",
"message": "Billing ledger is unavailable"
}
],
"trace_id": "trace-123"
}