Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions api-reference/events/orchestration-status-change-object.mdx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
---
title: "orchestration_status_change"

Check warning on line 2 in api-reference/events/orchestration-status-change-object.mdx

View check run for this annotation

Mintlify / Mintlify Validation (paxos-0ac97319) - vale-spellcheck

api-reference/events/orchestration-status-change-object.mdx#L2

Did you really mean 'orchestration_status_change'?
description: "Event object returned for orchestration status change events"
---

This object is returned by the [Get Event API](/api-reference/endpoints/events/get-event) when the event type is `orchestration.processing`, `orchestration.completed`, or `orchestration.failed`.
This object is returned by the [Get Event API](/api-reference/endpoints/events/get-event) when the event type is `orchestration.pending_approval`, `orchestration.processing`, `orchestration.completed`, or `orchestration.failed`.

## Object Fields

Expand All @@ -18,10 +18,10 @@
<ResponseField name="status" type="string" required>
Status of the orchestration:

**Available options:** `PROCESSING`, `COMPLETED`, `FAILED`
**Available options:** `PENDING_APPROVAL`, `PROCESSING`, `COMPLETED`, `FAILED`
</ResponseField>

<ResponseField name="orchestration_rule_id" type="string">

Check warning on line 24 in api-reference/events/orchestration-status-change-object.mdx

View check run for this annotation

Mintlify / Mintlify Validation (paxos-0ac97319) - vale-spellcheck

api-reference/events/orchestration-status-change-object.mdx#L24

Did you really mean 'orchestration_rule_id'?
The ID of the orchestration rule that triggered this orchestration. This field will not be present for ad-hoc orchestrations. (optional)
</ResponseField>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -612,6 +612,7 @@
"OrchestrationStatus": {
"type": "string",
"enum": [
"PENDING_APPROVAL",
"PROCESSING",
"COMPLETED",
"FAILED"
Expand Down
15 changes: 15 additions & 0 deletions api-reference/webhooks/orchestration-pending-approval.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
title: "orchestration.pending_approval"
description: "Webhook triggered when an orchestration requires maker-checker approval"
openapi: "webhooks-openapi.json webhook orchestration.pending_approval"
---

Triggered when an ad-hoc orchestration requires maker-checker approval before processing can begin.

<Note>
Webhook payloads contain only event metadata. Use the [Get Event API](/api-reference/endpoints/events/get-event) with the event ID to retrieve full details.
</Note>

## Event Object Structure

The Get Event API returns an [`orchestration_status_change`](/api-reference/events/orchestration-status-change-object) object with orchestration status details.
31 changes: 30 additions & 1 deletion api-reference/webhooks/webhooks-openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,34 @@
"description": "Triggered when a KYC refresh process expires without completion. Your endpoint should respond with a 2xx status code to acknowledge receipt. Use the event ID to call the Get Event API for full details."
}
},
"orchestration.pending_approval": {
"post": {
"requestBody": {
"description": "Webhook payload containing event metadata. Use the event ID with the Get Event API to retrieve full details.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/WebhookEvent"
},
"example": {
"id": "bd019f1c-89a7-4372-9d21-eaad9280dc41",
"type": "orchestration.pending_approval",
"source": "com.paxos",
"time": "2025-01-07T14:30:02Z",
"object": "event"
}
}
}
},
"responses": {
"200": {
"description": "Webhook successfully received"
}
},
"summary": "Orchestration Pending Approval",
"description": "Triggered when an ad-hoc orchestration requires maker-checker approval before processing can begin. Your endpoint should respond with a 2xx status code to acknowledge receipt. Use the event ID to call the Get Event API for full details."
}
},
"orchestration.processing": {
"post": {
"requestBody": {
Expand Down Expand Up @@ -1577,6 +1605,7 @@
"identity.kyc_refresh.started",
"identity.kyc_refresh.completed",
"identity.kyc_refresh.expired",
"orchestration.pending_approval",
"orchestration.processing",
"orchestration.completed",
"orchestration.failed",
Expand Down Expand Up @@ -1764,7 +1793,7 @@
},
"status": {
"type": "string",
"enum": ["PROCESSING", "COMPLETED", "FAILED"],
"enum": ["PENDING_APPROVAL", "PROCESSING", "COMPLETED", "FAILED"],
"title": "Orchestration Status",
"description": "Status of the orchestration"
}
Expand Down
1 change: 1 addition & 0 deletions docs.json
Original file line number Diff line number Diff line change
Expand Up @@ -938,6 +938,7 @@
{
"group": "Hooks",
"pages": [
"api-reference/webhooks/orchestration-pending-approval",
"api-reference/webhooks/orchestration-processing",
"api-reference/webhooks/orchestration-completed",
"api-reference/webhooks/orchestration-failed"
Expand Down
7 changes: 6 additions & 1 deletion guides/developer/orchestrations/orchestrations.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -120,19 +120,24 @@ To use orchestrations, you'll need the following OAuth scopes when [authenticati

## Monitoring Orchestration Status

Orchestrations can exist in three states. To monitor them there's a few options.
Orchestrations can exist in four states. To monitor them there's a few options.

<div style={{ display: 'flex', justifyContent: 'center' }}>

```mermaid
stateDiagram-v2
[*] --> PENDING_APPROVAL: Approval Required
[*] --> PROCESSING: Orchestration Created
PENDING_APPROVAL --> PROCESSING: Approved
PENDING_APPROVAL --> FAILED: Rejected
PROCESSING --> COMPLETED: Success
PROCESSING --> FAILED: Error
```

</div>

Ad-hoc orchestrations that require maker-checker approval enter the `PENDING_APPROVAL` state before processing begins. Once approved, they transition to `PROCESSING`. If rejected, they transition directly to `FAILED`.

### Recommended: Using Webhooks

> Subscribe to orchestration webhooks for real-time status monitoring. This is the recommended approach as it provides immediate notifications without polling.
Expand Down