PredictAsiaX Webhooks API
HMAC-signed outbound event delivery
HMAC-signed outbound event delivery
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/predictasiax-com:predictasiax-com-webhooks-api"
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: PredictAsiaX Network Webhooks API
version: v1
description: 'The canonical REST surface for the PredictAsiaX Network. Most /v1/*
response is wrapped in an envelope `{ data, meta: { ts_ms, trace_id, is_simulated? } }`.
All timestamps are `*_at_ms` integer milliseconds; all money is decimal string.'
contact:
email: support@predictasiax.com
license:
name: PredictAsiaX Builder License
url: https://docs.predictasiax.com/legal/builder-license
servers:
- url: https://api.predictasiax.com
description: Production
security:
- bearerAuth: []
tags:
- name: Webhooks
description: HMAC-signed outbound event delivery
paths:
/v1/webhooks:
get:
tags:
- Webhooks
summary: List webhook endpoints
responses:
'200':
description: OK
operationId: getV1Webhooks
x-operation-id-source: derived
post:
tags:
- Webhooks
summary: Create webhook endpoint
parameters:
- name: Idempotency-Key
in: header
required: false
description: 'Optional. Backend does NOT enforce for this endpoint (only /v1/orders and /v1/orders/batch require it). Portal SDK auto-injects one for safety. Format: [A-Za-z0-9_\-]{8,128}.'
schema:
type: string
pattern: ^[A-Za-z0-9_\-]{8,128}$
responses:
'200':
description: Webhook created. Signing secret returned ONCE — store immediately.
content:
application/json:
schema:
type: object
properties:
data:
type: object
properties:
webhook:
type: object
properties:
id:
type: string
example: wh_175d999188ca
app_id:
type: string
url:
type: string
events:
type: array
items:
type: string
active:
type: boolean
label:
type:
- string
- 'null'
description:
type:
- string
- 'null'
created_at_ms:
type: integer
format: int64
signing_secret:
type: string
example: whsec_b841760a04a6efa1b768a0395e76ea73
description: Format whsec_<48hex>. Store this — used to verify HMAC t=,v1= on every delivery. Rotate via POST /v1/webhooks/{id}/rotate-secret.
signing_secret_notice:
type: string
meta:
type: object
properties:
ts_ms:
type: integer
trace_id:
type: string
'400':
description: VALIDATION_FAILED / WEBHOOK_URL_INVALID / WEBHOOK_EVENT_UNKNOWN
'401':
description: AUTH_INVALID
'403':
description: SCOPE_MISSING — builder:apps:write required
'404':
description: NOT_FOUND — app_id does not exist
'429':
description: RATE_LIMITED — webhooks:manage bucket
requestBody:
required: true
content:
application/json:
schema:
type: object
required:
- app_id
- url
- events
properties:
app_id:
type: string
description: Owning app id (app_*). Must belong to the caller.
example: app_9f8391eacbb0
url:
type: string
format: uri
pattern: ^https://
description: HTTPS delivery endpoint. No userinfo, no fragment.
example: https://example.com/pax-webhook
events:
type: array
minItems: 1
items:
type: string
enum:
- trade.filled
- market.resolved
- payout.available
- payout.paid
- auth.token.revoked
description: Event catalog. Unknown events return WEBHOOK_EVENT_UNKNOWN.
label:
type: string
maxLength: 200
description: Optional short label for the webhook.
description:
type: string
maxLength: 1000
description: Optional longer description.
operationId: postV1Webhooks
x-operation-id-source: derived
/v1/webhooks/{id}:
parameters:
- name: id
in: path
required: true
schema:
type: string
pattern: ^wh_[0-9a-zA-Z]{6,20}$
description: Webhook endpoint ID.
delete:
tags:
- Webhooks
summary: Disable webhook endpoint (soft-delete)
description: 'Soft-disable — the row stays with active=false, disabled_at_ms, disabled_reason=user_requested. Cannot be re-enabled by design (event ordering guarantee); register a new webhook to resume. Scope: builder:apps:write.'
responses:
'200':
description: Webhook disabled
content:
application/json:
schema:
type: object
properties:
data:
type: object
properties:
webhook:
type: object
properties:
id:
type: string
active:
type: boolean
example: false
disabled_at_ms:
type: integer
format: int64
meta:
type: object
properties:
ts_ms:
type: integer
format: int64
trace_id:
type: string
'404':
description: webhook not found
content:
application/json:
schema:
type: object
properties:
error:
type: object
properties:
code:
type: string
example: NOT_FOUND
message:
type: string
trace_id:
type: string
'403':
description: webhook belongs to a different builder
content:
application/json:
schema:
type: object
properties:
error:
type: object
properties:
code:
type: string
example: SCOPE_MISSING
message:
type: string
trace_id:
type: string
operationId: deleteV1WebhooksById
x-operation-id-source: derived
get:
tags:
- Webhooks
summary: Get webhook endpoint by ID
parameters:
- name: id
in: path
required: true
schema:
type: string
responses:
'200':
description: OK
security:
- BearerAuth:
- builder:apps:read
- ApiKeyAuth:
- builder:apps:read
operationId: getV1WebhooksById
x-operation-id-source: derived
patch:
tags:
- Webhooks
summary: Update webhook endpoint (url, events, active)
parameters:
- name: id
in: path
required: true
schema:
type: string
requestBody:
content:
application/json:
schema:
type: object
responses:
'200':
description: OK
security:
- BearerAuth:
- builder:apps:write
- ApiKeyAuth:
- builder:apps:write
operationId: patchV1WebhooksById
x-operation-id-source: derived
/v1/webhooks/{id}/test:
parameters:
- name: id
in: path
required: true
schema:
type: string
pattern: ^wh_[0-9a-zA-Z]{6,20}$
post:
tags:
- Webhooks
summary: Fire a test event to the webhook
description: 'Enqueue a synthetic delivery with is_test_event=true and event_type from the request body (default test.ping). Delivered synchronously; response includes the HTTP status your endpoint returned. Scope: builder:apps:write.'
parameters:
- name: Idempotency-Key
in: header
required: false
schema:
type: string
pattern: ^[A-Za-z0-9_\-]{8,128}$
requestBody:
required: false
content:
application/json:
schema:
type: object
properties:
event_type:
type: string
default: test.ping
description: Any string; not restricted to the catalog for test fires.
data:
type: object
description: 'Optional custom payload data (default: standard test note).'
responses:
'200':
description: Test event fired
content:
application/json:
schema:
type: object
properties:
data:
type: object
properties:
delivery_id:
type: string
status:
type: string
enum:
- delivered
- failed
- pending
response_status:
type:
- integer
- 'null'
meta:
type: object
properties:
ts_ms:
type: integer
format: int64
trace_id:
type: string
'404':
description: webhook not found
content:
application/json:
schema:
type: object
properties:
error:
type: object
properties:
code:
type: string
example: NOT_FOUND
message:
type: string
trace_id:
type: string
operationId: postV1WebhooksByIdTest
x-operation-id-source: derived
/v1/webhooks/{id}/deliveries:
get:
tags:
- Webhooks
summary: List webhook delivery attempts (paginated)
parameters:
- name: id
in: path
required: true
schema:
type: string
responses:
'200':
description: OK
security:
- BearerAuth:
- builder:apps:read
- ApiKeyAuth:
- builder:apps:read
operationId: getV1WebhooksByIdDeliveries
x-operation-id-source: derived
/v1/webhooks/{id}/rotate-secret:
post:
tags:
- Webhooks
summary: Rotate signing secret (24h dual-secret grace)
parameters:
- name: id
in: path
required: true
schema:
type: string
responses:
'200':
description: OK
security:
- BearerAuth:
- builder:apps:write
- ApiKeyAuth:
- builder:apps:write
operationId: postV1WebhooksByIdRotateSecret
x-operation-id-source: derived
components:
securitySchemes:
bearerAuth:
type: http
scheme: bearer
description: 'Send `Authorization: Bearer sk_live_*` or an OAuth 2.1 access token. `sk_live_` and OAuth tokens go through the same authenticator; capability is differentiated by tier (`sandbox` / `self_serve` / `read_live` / `trade_capped` / `trade_full` / `genesis` / `partner`). Sandbox and production share the same host and key prefix — the tier flag caps sandbox at $10/order + $100/day.'
oracleApiKey:
type: apiKey
in: header
name: X-API-Key
description: 'Oracle api-key minted via POST /v1/provider/keys. Equivalently sent as `Authorization: Bearer <api-key>`. Write endpoints additionally require the `oracle:write` scope.'
platformSession:
type: apiKey
in: header
name: X-PAX-Session
description: 'Platform login session (consumer app) or builder-portal OAuth token. Equivalently sent as `Authorization: Bearer <token>`. Used only by the /v1/provider/keys endpoints to mint, list, or revoke oracle api-keys.'