orakel
Docs navigation

Canonical

Destinations and push

CRUD for push destinations (Attio, HubSpot, webhook) and the push trigger.

Updated 2026-04-21

A destination is a configured push target. Config is encrypted at rest (AES-256-GCM). Push is available only to keys on tiers where canPush is true (internal, pro, enterprise — not free).

GET /api/destinations

List all destinations, sorted by name.

curl -H "Authorization: Bearer $ORAKEL_KEY" https://orakel.cloud/api/destinations

Response: array of destination objects with id, name, type, isActive, createdAt, and an encrypted config blob.

GET /api/destinations/:name

Fetch one destination by name. 404 if it does not exist.

POST /api/destinations

Create a destination.

Field Type Required Description
name string yes 1–100 chars. Unique.
type "attio" | "webhook" | "hubspot" yes Adapter implementation.
config object yes Adapter-specific keys (e.g. apiKey, workspaceId, url). Encrypted at rest.
isActive boolean no Default true.

Returns 201 with the created record. 409 if name already exists.

curl -X POST https://orakel.cloud/api/destinations \
  -H "Authorization: Bearer $ORAKEL_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"attio-prod","type":"attio","config":{"apiKey":"…","workspaceId":"…"}}'

PUT /api/destinations/:name

Update a destination. All fields optional. Returns the updated record; 404 if not found.

Field Type Description
type enum Same enum as POST.
config object Replaces the encrypted config in full.
isActive boolean Toggle without deleting.

DELETE /api/destinations/:name

Delete. Returns 204 on success, 404 if not found.

POST /api/push/:destinationName

Fetch enriched records for the given org numbers and push them through the destination adapter.

Field Type Required Description
orgNumbers string[] yes 1–100 nine-digit Norwegian org numbers.
curl -X POST https://orakel.cloud/api/push/attio-prod \
  -H "Authorization: Bearer $ORAKEL_KEY" \
  -H "Content-Type: application/json" \
  -d '{"orgNumbers":["923609016","912345678"]}'

Response shape is adapter-dependent; it typically includes per-record success counts and error detail.

Error modes

Status Meaning Action
400 Invalid body, inactive destination on push Inspect details[] or activate the destination
401 Missing or invalid API key Check the Authorization header
403 Push not available on your tier Upgrade the key, or call /api/companies/enrich and integrate client-side
404 Destination not found Verify the name
409 Destination name collision (POST) Pick a unique name
429 Rate or quota exceeded Back off
500 Adapter error Check admin logs

Rate limits

Per-key RPM per tier. A single push call counts as one request against the quota regardless of orgNumbers length.

Typical use cases

  • Provision an Attio or HubSpot destination once, then push daily from a scheduled job.
  • Webhook destinations for custom downstream pipelines.
  • Toggle isActive=false to pause pushes without deleting the config.