Rules
Create a new Rule (async)
Creates a URL matching rule. Returns immediately after validation, then propagates globally.
How It Works
Immediate: Request validated → 202 Accepted (with Operation-Id header) or 4xx error
Async (30-60s): Propagates globally. Poll /Operations/{id} for status (pending → completed)
During Propagation
During propagation, matching webhooks may use other rules (e.g., default) until this rule is active.
Security Restrictions
Default rules (matchType: default) cannot use Basic Authentication. Use OAuth2, Digest, or create specific URL patterns instead.
post/v1/Webhooks/Rules
Request
- Base URLhttps://webhooks.twilio.com
- AuthHTTP basic
Headers
Idempotency-Keystring uuid
Idempotency key for mutation operations. Must be a UUIDv7 (other UUID versions are rejected with a 400).
Request body
Response
Rule creation accepted
Example response
{
"operation": {
"retentionPeriod": "P7D"
}
}Changes
No recorded changes to this operation across all 1 revision of this API.