POST
/
orchestration
/
orchestrations
Create Orchestration
curl --request POST \
  --url https://api.paxos.com/v2/orchestration/orchestrations \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "identity_id": "f1f8651f-cece-4310-92c0-9cbb9d1b3601",
  "account_id": "6506ad35-cad8-440f-b247-c4ec092c96fe",
  "ref_id": "082d38c8-c7b1-4a3b-bdf9-b3a428c1ce80",
  "source_asset": "PYUSD",
  "destination_asset": "USD",
  "source_amount": "1.5",
  "source": {
    "profile": {
      "profile_id": "1a763ac5-13d9-4568-bb8b-747c416b105c"
    }
  },
  "destination": {
    "fiat": {
      "bank_account_id": "7698b353-c1db-47fd-8978-b04ba12664b1"
    }
  },
  "metadata": {
    "purpose": "conversion"
  }
}'
{
  "id": "6506ad35-cad8-440f-b247-c4ec092c96fe",
  "profile_id": "1a763ac5-13d9-4568-bb8b-747c416b105c",
  "identity_id": "f1f8651f-cece-4310-92c0-9cbb9d1b3601",
  "account_id": "6506ad35-cad8-440f-b247-c4ec092c96fe",
  "ref_id": "082d38c8-c7b1-4a3b-bdf9-b3a428c1ce80",
  "source_asset": "PYUSD",
  "destination_asset": "USD",
  "source_amount": "1.5",
  "source_transfer": {
    "transfer_id": "35e3d34d-5552-4185-9583-d6b2856291c0",
    "status": "PENDING"
  },
  "destination_transfer": {
    "transfer_id": "91252ea9-1659-4ca2-9e3a-310612e44233",
    "status": "PENDING"
  },
  "status": "PROCESSING",
  "source": {
    "profile": {
      "profile_id": "1a763ac5-13d9-4568-bb8b-747c416b105c"
    }
  },
  "destination": {
    "fiat": {
      "bank_account_id": "7698b353-c1db-47fd-8978-b04ba12664b1"
    }
  },
  "created_at": "2024-03-20T10:00:00Z",
  "updated_at": "2024-03-20T10:00:00Z",
  "metadata": {
    "purpose": "conversion"
  }
}
OAuth Scope
orchestration:write_orchestration

Authorizations

Authorization
string
header
required

Paxos APIs use OAuth 2 with the client credentials grant flow.

Token URLs:

Body

application/json
identity_id
string
account_id
string
ref_id
string

A client or system-specified unique identifier for the orchestration - used for idempotency protection. Retries of a request should use the same ref_id to avoid duplicate transactions.

source_asset
string
destination_asset
string
source_amount
string
source
object

If not set, it uses the default profile id

destination
object

If not set, it uses the default profile id

metadata
object

Response

200 - application/json

A successful response.

An orchestration represents an intent to move a source asset via a source rail to a destination asset via a destination rail. If source asset differs from destination asset, it signals a conversion.

Orchestrations can be created directly via the CreateOrchestration endpoint, or indirectly by an incoming deposit which matches an OrchestrationRule previously defined with the CreateOrchestrationRule endpoint.

id
string
profile_id
string
identity_id
string
account_id
string
customer_id
string
ref_id
string

A client or system-specified unique identifier for the orchestration - used for idempotency protection. Retries of a request should use the same ref_id to avoid duplicate transactions. For system-initiated orchestrations generated by invocation of an orchestration rule, the ref_id is generated by the system.

source_asset
string
destination_asset
string
source_amount
string
source_transfer
object

TransferDetails refers to a specific Transfer and encodes its current status.

destination_transfer
object

TransferDetails refers to a specific Transfer and encodes its current status.

status
enum<string>

Status represents the current state of an orchestration.

Available options:
PROCESSING,
COMPLETED,
FAILED
fail_reason
object
source
object
destination
object
orchestration_rule_id
string

The ID of the orchestration rule which triggered this orchestration. Can be empty for ad-hoc orchestrations.

created_at
string<date-time>
updated_at
string<date-time>
metadata
object