Skip to content
Skip to main content
POST
https://api.us.nylas.com/v3/policies

Create a policy

Creates a policy for your application. Policies define message limits, spam detection settings, and linked rules for Nylas Agent Accounts. The application_id and organization_id are derived from your API key, so you don't need to include them in the request body — they are read-only.

Works with an API key or an IAM API key with the policies.create permission.

Request body

name*string

A human-readable name for the policy.

Example: "Standard Agent Account Policy"
minLength: 1maxLength: 256
limitsobject

Each value must be within your plan's maximum. limit_storage_total, limit_count_daily_message_received, limit_count_daily_email_sent, limit_inbox_retention_period, and limit_spam_retention_period accept -1 for unlimited when your plan sets no limit for that field. If your plan sets a limit, -1 returns a 400 error.

rulesarray<string>

Rule IDs to link to this policy.

Example: ["c1d2e3f4-5678-4abc-9def-0123456789ab"]
spam_detectionobject

Responses

request_idstring

ID of the request.

Example: "5fa64c92-e840-4357-86b9-2aa364d35b88"
dataobject
POSThttps://api.us.nylas.com/v3/policies

Find your API key in the Nylas Dashboard under API Keys in your application settings.

Loading editor...

Autocomplete and validation come from this endpoint's request schema.