GET/api/v1/external-delivery/connections
External delivery connections
List connections and credential availability without returning secrets. Pages contain up to 100 records.
curl "https://www.clonify.com/api/v1/external-delivery/connections" \
-H "Authorization: Bearer clk_live_…"
POST/api/v1/external-delivery/connections
Save external delivery connection
POST JSON to a public HTTPS URL without query, fragment or credentials. name: 2–120 characters; url: up to 500; auth: none or bearer; enabled: true by default. Without id, creates a connection. With id, updates name, enabled and token while preserving URL, auth and success contract. token (12–4096) is write-only; omission preserves it. Authorize bearer through this API, never in chat. successField and successValue must be supplied together; omission accepts any HTTP 2xx. revokeUrl (optional) is where Clonify asks to undo a grant when the rule uses refundPolicy revoke: same authorization and confirmation; it can be added once to an existing connection. Every call carries a Clonify-Delivery-Id header, identical for a grant and its revocation. The destination must support idempotent retries using Idempotency-Key; idempotencySupported must be true. Saving sends no test and grants no access. Disabling stops pending deliveries.
Write permission
Body (JSON)
authstringrequired
Values: none · bearer
successValuestring | number | boolean | null
idempotencySupportedbooleanrequired
curl -X POST "https://www.clonify.com/api/v1/external-delivery/connections" \
-H "Authorization: Bearer clk_live_…" \
-H "Content-Type: application/json" \
-d '{"name":"…","url":"…","auth":"none","idempotencySupported":true}'
{
"data": {
"id": 7,
"name": "External access",
"url": "https://service.example/api/access",
"revoke_url": "https://service.example/api/revoke",
"auth": "bearer",
"enabled": true,
"has_credential": true,
"success_field": "ok",
"success_value": true
}
}
GET/api/v1/external-delivery/rules
External delivery rules
List product-to-connection associations, payload fields and activation. Pages contain up to 100 records.
curl "https://www.clonify.com/api/v1/external-delivery/rules" \
-H "Authorization: Bearer clk_live_…"
POST/api/v1/external-delivery/rules
Save external delivery rule
Associate the exact sold product or bundle, not its components. payload has 1–32 flat JSON fields, each with source (buyer.email, buyer.name, purchase.id or product.id) or value (string, number, boolean or null). Without id, creates or replaces the product/connection rule; with id only updates that association. enabled defaults to false; activation requires an enabled, authorized connection. Future recorded purchases only, including imported external sales; no backfill, tags or manual grants. Changes do not alter the fields of queued deliveries. refundPolicy defaults to review: any refund cancels pending deliveries and flags sent or in-flight deliveries for manual review. keep preserves delivery. revoke follows access in Clonify: when that purchase's access is retired (refund without keeping access, full refund in Stripe or lost dispute) it asks revokeUrl to undo the grant, and sends the grant again if the refund is reversed. A refund that keeps access changes nothing. revoke requires a connection with revokeUrl. The policy also applies to the rule's deliveries whose purchase has no refund yet.
Write permission
Body (JSON)
connectionIdintegerrequired
refundPolicystring
Values: review · keep · revoke
curl -X POST "https://www.clonify.com/api/v1/external-delivery/rules" \
-H "Authorization: Bearer clk_live_…" \
-H "Content-Type: application/json" \
-d '{"productId":1,"connectionId":1,"payload":[{"…":"…"}]}'
GET/api/v1/external-delivery/deliveries
External delivery status
List purchases with their action and status. action is grant or revoke; status is pending, delivering, delivered, failed, review or cancelled. delivered means confirmation under the configured API contract (for revoke, that the service undid the grant; see revoked_at), not customer login. Temporary failures retry up to eight times with the same Idempotency-Key. Pages contain up to 100 records.
curl "https://www.clonify.com/api/v1/external-delivery/deliveries" \
-H "Authorization: Bearer clk_live_…"
POST/api/v1/external-delivery/deliveries/{id}/retry
Retry external delivery
Queue a failed delivery, including a failed revocation, with its original idempotency key. Requires an enabled connection and no refund awaiting review. Does not grant access in this request.
Write permission
curl -X POST "https://www.clonify.com/api/v1/external-delivery/deliveries/1/retry" \
-H "Authorization: Bearer clk_live_…" \
-H "Content-Type: application/json" \
-d '{}'