Policies
The Policies endpoints let you define the operational configuration for Nylas Agent Accounts, including message limits, attachment constraints, spam detection settings, and linked rules for inbound message filtering. Each policy is scoped to your application and can be assigned to one or more Agent Accounts.
Policies let you control:
- Limits — Attachment sizes, counts, allowed types, total storage, daily message quotas, and retention periods for the inbox and spam folders.
- Spam detection — DNS-based block list (DNSBL) checking, header anomaly detection, and sensitivity tuning.
- Options — Additional folder creation and CIDR-based email aliasing.
- Rules — Link filtering rules (created via the Rules API) to automatically process inbound messages based on sender criteria.
Policy limits are validated against your plan's maximum values. If a limit field is omitted, it defaults to the plan maximum. If a requested value exceeds the plan limit, the API returns an error.
GET /v3/policiesReturns a list of all policies for your application.
POST /v3/policiesCreates a policy for your application. Policies define message limits, spam detection settings, options, and linked rules for Nylas Agent Accounts. The application id and organization id are derived f...
GET /v3/policies/{policy_id}Returns the specified policy.
PUT /v3/policies/{policy_id}Updates the specified policy. All fields are optional — only provided fields are updated. The same plan-limit, spam sensitivity, and retention-period validation applies as on create.
DELETE /v3/policies/{policy_id}Deletes the specified policy. This action is irreversible.