Skip to main content
POST
Create an egress policy

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
name
string
required

Display name. It does not need to be unique. It must contain visible text and cannot contain tabs, line breaks, or other control characters. At most 128 characters after surrounding whitespace is trimmed.

Minimum string length: 1
Pattern: ^(?=[\t-\r\u0020\u0085\u00A0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]*[^\t-\r\u0020\u0085\u00A0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000])[\t-\r\u0020\u0085\u00A0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]*[^\u0000-\u001F\u007F-\u009F]+[\t-\r\u0020\u0085\u00A0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]*$
document
object
required

An egress policy: what a Sailbox may connect to (no_network, allowlist, and blocked) and what happens to the HTTPS requests it sends (rules). Every field is optional. The empty document {} allows every destination and applies no rules. Sail saves a normalized form (for example, host names are lowercased and defaults are filled in), so reading a policy back can return a different shape with the same behavior. At most 64 KiB when encoded. Guide: https://docs.sailresearch.com/sailboxes-egress-policy

Response

The policy.

id
string
required

Stable policy ID.

Pattern: ^(?:ep|hp)_[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$
org_id
string
required

Organization that owns the policy.

name
string
required

Display name.

document
object
required

An egress policy: what a Sailbox may connect to (no_network, allowlist, and blocked) and what happens to the HTTPS requests it sends (rules). Every field is optional. The empty document {} allows every destination and applies no rules. Sail saves a normalized form (for example, host names are lowercased and defaults are filled in), so reading a policy back can return a different shape with the same behavior. At most 64 KiB when encoded. Guide: https://docs.sailresearch.com/sailboxes-egress-policy

created_at
string<date-time>
required

When the policy was created.

updated_at
string<date-time>
required

When the policy name last changed.