Policies
Block senders, allow only known senders, and customize the voicemail greeting with policies.
Policies are rules attached to bindings. They are checked when a message arrives, before it's routed.
| Type | Channels | Config | Effect |
|---|---|---|---|
sender-deny | SMS, Cloudflare email | deny_list: addresses or numbers | Drops messages from listed senders |
sender-allow | Cloudflare email | allow_list: addresses | Drops messages from senders not on the list |
voice-config | Voice | greeting_text | Replaces the voicemail greeting |
Denied messages aren't delivered. Their policy_result records the reason.
Sender policies aren't applied to email received on <name>@<workspace>.agentowl.dev addresses yet; that mail is always delivered. Use the sender authentication results in the event to filter it in your app.
Create a policy
Policy config is set when the policy is created, from a declarative config file or the API. agentowl policy create creates a policy with an empty config.
# acme.yaml
tenant:
slug: acme
policies:
- name: block-spam-numbers
type: sender-deny
config:
deny_list:
- "+12125550199"agentowl apply -f acme.yaml --auto-approve
agentowl policy list --tenant acmeapply creates policies that don't exist yet; it doesn't change the config of an existing policy with the same name.
Attach and publish
Attach the policy to the bindings it should apply to, then publish:
agentowl policy attach pol_abc123 --binding b_sms_001
agentowl config publish acmePolicies take effect only after you publish.
Custom voicemail greeting
policies:
- name: support-greeting
type: voice-config
config:
greeting_text: "Thanks for calling Acme support. Leave your order number and we'll call you back."Apply the file, attach the policy to the phone number's binding, and publish. Without a voice-config policy, the greeting is "You've reached Organization name. Please leave a message after the beep."
Manage policies
agentowl policy inspect pol_abc123
agentowl policy update pol_abc123 --name support-greeting-v2
agentowl policy delete pol_abc123 --confirm