HydraCore
API by router

Approvals

List Pending Approvals

List pending approvals for a customer.

GET
/internal/v1/instances/{instance_id}/approvals/pending

Path Parameters

instance_idInstance Id
Formatuuid

Query Parameters

customer_idCustomer Id
Formatuuid

Response Body

curl -X GET "https://loading/internal/v1/instances/497f6eca-6276-4993-bfeb-53cbbbba6f08/approvals/pending?customer_id=497f6eca-6276-4993-bfeb-53cbbbba6f08"
null
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}

Create Approval Request

Create a pending approval. Called when a rule triggers require_approval.

POST
/internal/v1/instances/{instance_id}/approvals/request

Path Parameters

instance_idInstance Id
Formatuuid
actionAction
Lengthlength <= 100
approver_person_id?Approver Person Id
approver_role?Approver Role

Must be 'owner' or 'customer'

Default"customer"
Match^(owner|customer)$
customer_idCustomer Id
Formatuuid
expires_in_hours?Expires In Hours
Default24
Range1 <= value <= 168
idempotency_key?Idempotency Key

Caller-provided idempotency key for safe retries

notify_channel?Notify Channel
rule_id?Rule Id
serialized_intentSerialized Intent

Full params to replay on approval

Empty Object

skill_slugSkill Slug
Lengthlength <= 100

Response Body

curl -X POST "https://loading/internal/v1/instances/497f6eca-6276-4993-bfeb-53cbbbba6f08/approvals/request" \  -H "Content-Type: application/json" \  -d '{    "action": "string",    "customer_id": "160c0c4b-9966-4dc1-a916-8407eb10d74e",    "serialized_intent": {},    "skill_slug": "string"  }'
null
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}

Resolve Approval

Resolve a pending approval (approve or reject). Creates outbox entry on approve.

POST
/internal/v1/instances/{instance_id}/approvals/resolve

Path Parameters

instance_idInstance Id
Formatuuid
actionAction

Must be 'approve' or 'reject'

Match^(approve|reject)$
approval_refApproval Ref

APR-xxxx reference

pin_verifiedPin Verified

Whether PIN was verified by caller — required, no default

resolution_channel?Resolution Channel
resolved_by?Resolved By
resolver_person_id?Resolver Person Id

Person ID if approval targets a specific person

resolver_roleResolver Role

Role of resolver

Match^(owner|customer)$

Response Body

curl -X POST "https://loading/internal/v1/instances/497f6eca-6276-4993-bfeb-53cbbbba6f08/approvals/resolve" \  -H "Content-Type: application/json" \  -d '{    "action": "string",    "approval_ref": "string",    "pin_verified": true,    "resolver_role": "string"  }'
null
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}

Tenant List Approvals

List approvals for tenant dashboard.

GET
/v1/approvals
AuthorizationBearer <token>

In: header

Query Parameters

customer_id?Customer Id
status?Status
limit?Limit
Default50
Range1 <= value <= 200
offset?Offset
Default0
Range0 <= value

Response Body

curl -X GET "https://loading/v1/approvals?customer_id=497f6eca-6276-4993-bfeb-53cbbbba6f08&status=string&limit=50&offset=0"
null
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}