Create a velocity control on a programme
POST
/v1/programs/{id}/velocity-controlsRequires an API client bearer token.
Places a rolling-window velocity rule on this programme (`scope`/`scope_id` are derived from the path; a body that sets either is rejected). Requires an Idempotency-Key header.
Parameters
Path parameters
| Name | Required | Description |
|---|---|---|
| id | required |
Header parameters
| Name | Required | Description |
|---|---|---|
| Idempotency-Key | required | Client-chosen. An identical retry with the same key returns the stored response; reusing the key with a different payload returns 409. |
Request body
window"hour" | "day" | "month"required
max_countinteger
max_amountstring
Example
curl -X POST https://api.rigid.fi/v1/programs/{id}/velocity-controls \
-H "Authorization: Bearer $RIGID_API_TOKEN" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{
"window": "hour"
}'Responses
201The created velocity control.
window"hour" | "day" | "month"required
max_countinteger
max_amountstring
idstringrequired
400Validation error
typestringrequired
titlestringrequired
statusintegerrequired
detailstring
instancestring
401Authentication required
typestringrequired
titlestringrequired
statusintegerrequired
detailstring
instancestring
403Forbidden
typestringrequired
titlestringrequired
statusintegerrequired
detailstring
instancestring
404Programme not found
typestringrequired
titlestringrequired
statusintegerrequired
detailstring
instancestring
409Idempotency-Key reused with a different payload
typestringrequired
titlestringrequired
statusintegerrequired
detailstring
instancestring
422The body set scope or scope_id (both are derived from the path), or named neither max_count nor max_amount
typestringrequired
titlestringrequired
statusintegerrequired
detailstring
instancestring
500Internal server error
typestringrequired
titlestringrequired
statusintegerrequired
detailstring
instancestring