API Reference
The rules endpoints: manage rules and attach them to products.
All endpoints use your Kora API key (Authorization: Bearer <key>). Change the host variable in the
playground to point at your own instance.
Authorization
apiKey Your Kora API key, sent as Authorization: Bearer <key>.
In: header
Query Parameters
Response Body
application/json
curl -X GET "https://example.com/rules"[ { "name": "string", "type": "version", "action": "allow", "config": {}, "message": "string", "global": true, "id": 0 }]Authorization
apiKey Your Kora API key, sent as Authorization: Bearer <key>.
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
curl -X POST "https://example.com/rules" \ -H "Content-Type: application/json" \ -d '{}'{ "name": "string", "type": "version", "action": "allow", "config": {}, "message": "string", "global": true, "id": 0}Authorization
apiKey Your Kora API key, sent as Authorization: Bearer <key>.
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
curl -X PATCH "https://example.com/rules" \ -H "Content-Type: application/json" \ -d '{}'Authorization
apiKey Your Kora API key, sent as Authorization: Bearer <key>.
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
curl -X DELETE "https://example.com/rules" \ -H "Content-Type: application/json" \ -d '{ "name": "string" }'Authorization
apiKey Your Kora API key, sent as Authorization: Bearer <key>.
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
curl -X POST "https://example.com/rules/attach" \ -H "Content-Type: application/json" \ -d '{ "rule": "string", "product": "string" }'[ "string"]Authorization
apiKey Your Kora API key, sent as Authorization: Bearer <key>.
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
curl -X POST "https://example.com/rules/detach" \ -H "Content-Type: application/json" \ -d '{ "rule": "string", "product": "string" }'[ "string"]
