API referenceRules
`PUT /rules/by-key/{key}` — create the rule with this key, or make it match the body (ADR-0072 §2). A full replacement, and idempotent: a body that matches the stored rule changes nothing.
PUT
/rules/by-key/{key}Path Parameters
key*string
Rule key
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
curl -X PUT "https://example.com/rules/by-key/string" \ -H "Content-Type: application/json" \ -d '{ "name": "string" }'{ "alerting": null, "covered_through": "string", "created_at": "string", "description": "string", "enabled": true, "id": "string", "key": "string", "last_run_at": "string", "last_run_status": null, "managed_by": "string", "muted_until": "string", "name": "string", "next_run_at": "string", "org_id": "string", "owner_team_id": "string", "query": null, "schedule": "string", "status": null, "updated_at": "string"}