Secret API key bound to an environment.
In: header
Header Parameters
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/capabilities"{ "schema_supported": [ "string" ], "execution_supported": [ "string" ], "program_schemas": [ "string" ], "state_schemas": [ "string" ], "feature_versions": { "property1": "string", "property2": "string" }}Secret API key bound to an environment.
In: header
Query Parameters
1 <= value <= 20050length <= 2048Value in
- "draft"
- "published"
- "paused"
- "archived"
Header Parameters
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/rules"{ "data": [ { "id": "string", "key": "string", "name": "string", "campaign_id": "string", "status": "draft", "priority": 0, "active_version": { "id": "string", "number": 0, "definition": null, "created_at": "2019-08-24T14:15:22Z" }, "draft_definition": null, "version": 0, "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z" } ], "next_cursor": "string", "has_more": true}Secret API key bound to an environment.
In: header
Header Parameters
Required. Official clients generate a UUID when omitted by the caller.
1 <= length <= 255Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/rules" \ -H "Idempotency-Key: string" \ -H "Content-Type: application/json" \ -d '{ "name": "Purchase points", "definition": { "schema": "orishare.rule/v1", "trigger": { "event": "purchase" }, "actions": [ { "type": "points.award", "currency": "points", "amount": 10 } ] } }'{ "id": "string", "key": "string", "name": "string", "campaign_id": "string", "status": "draft", "priority": 0, "active_version": { "id": "string", "number": 0, "definition": null, "created_at": "2019-08-24T14:15:22Z" }, "draft_definition": null, "version": 0, "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z"}Secret API key bound to an environment.
In: header
Path Parameters
1 <= lengthHeader Parameters
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/rules/string"{ "id": "string", "key": "string", "name": "string", "campaign_id": "string", "status": "draft", "priority": 0, "active_version": { "id": "string", "number": 0, "definition": null, "created_at": "2019-08-24T14:15:22Z" }, "draft_definition": null, "version": 0, "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z"}Secret API key bound to an environment.
In: header
Path Parameters
1 <= lengthHeader Parameters
Optional legacy revision. Missing or malformed values follow the existing route parser.
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X PATCH "https://example.com/rules/string" \ -H "Content-Type: application/json" \ -d '{ "name": "Updated rule" }'{ "id": "string", "key": "string", "name": "string", "campaign_id": "string", "status": "draft", "priority": 0, "active_version": { "id": "string", "number": 0, "definition": null, "created_at": "2019-08-24T14:15:22Z" }, "draft_definition": null, "version": 0, "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z"}Secret API key bound to an environment.
In: header
Path Parameters
1 <= lengthHeader Parameters
Optional legacy revision. Missing or malformed values follow the existing route parser.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/rules/string/publish"{ "id": "string", "key": "string", "name": "string", "campaign_id": "string", "status": "draft", "priority": 0, "active_version": { "id": "string", "number": 0, "definition": null, "created_at": "2019-08-24T14:15:22Z" }, "draft_definition": null, "version": 0, "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z"}Secret API key bound to an environment.
In: header
Path Parameters
1 <= lengthHeader Parameters
Optional legacy revision. Missing or malformed values follow the existing route parser.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/rules/string/pause"{ "id": "string", "key": "string", "name": "string", "campaign_id": "string", "status": "draft", "priority": 0, "active_version": { "id": "string", "number": 0, "definition": null, "created_at": "2019-08-24T14:15:22Z" }, "draft_definition": null, "version": 0, "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z"}Secret API key bound to an environment.
In: header
Path Parameters
1 <= lengthHeader Parameters
Optional legacy revision. Missing or malformed values follow the existing route parser.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/rules/string/resume"{ "id": "string", "key": "string", "name": "string", "campaign_id": "string", "status": "draft", "priority": 0, "active_version": { "id": "string", "number": 0, "definition": null, "created_at": "2019-08-24T14:15:22Z" }, "draft_definition": null, "version": 0, "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z"}Secret API key bound to an environment.
In: header
Path Parameters
1 <= lengthHeader Parameters
Optional legacy revision. Missing or malformed values follow the existing route parser.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/rules/string/archive"{ "id": "string", "key": "string", "name": "string", "campaign_id": "string", "status": "draft", "priority": 0, "active_version": { "id": "string", "number": 0, "definition": null, "created_at": "2019-08-24T14:15:22Z" }, "draft_definition": null, "version": 0, "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z"}Secret API key bound to an environment.
In: header
Path Parameters
1 <= lengthQuery Parameters
1 <= value <= 20050length <= 2048Header Parameters
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/rules/string/versions"{ "data": [ { "id": "string", "rule_id": "string", "number": 0, "definition": null, "created_by": "string", "created_at": "2019-08-24T14:15:22Z" } ], "next_cursor": "string", "has_more": true}Secret API key bound to an environment.
In: header
Path Parameters
1 <= lengthHeader Parameters
Required. Official clients generate a UUID when omitted by the caller.
1 <= length <= 255Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/rules/string/rollback" \ -H "Idempotency-Key: string" \ -H "Content-Type: application/json" \ -d '{ "number": 1 }'{ "id": "string", "key": "string", "name": "string", "campaign_id": "string", "status": "draft", "priority": 0, "active_version": { "id": "string", "number": 0, "definition": null, "created_at": "2019-08-24T14:15:22Z" }, "draft_definition": null, "version": 0, "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z"}Secret API key bound to an environment.
In: header
Path Parameters
1 <= lengthHeader Parameters
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/rules/string/simulate" \ -H "Content-Type: application/json" \ -d '{ "event": { "name": "purchase" }, "customer_id": "cust_00000000000000000000000000000042" }'{ "simulated": true, "plan": [ null ], "trace": null}