ReplyLayer Policy API

The policy API from ReplyLayer — 5 operation(s) for policy.

GitHub OpenAPI

Operations 6

GET /v1/account/policy Read the account policy (daily cap, default mode for new mailboxes) #
PATCH /v1/account/policy Update the account daily cap / default mode (loosening requires a dashboard… #
GET /v1/mailboxes/{id}/policy Read a mailbox's effective policy (derived mode, enforcement state, what binds… #
POST /v1/mailboxes/{id}/policy/preview Dry-run a sample send against the mailbox's policy (no side effects) #
GET /v1/mailboxes/{id}/policy/revisions Paginated policy revision history with before/after diffs #
GET /v1/policy/overview Aggregated per-mailbox + account policy overview #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/replylayer-ai:replylayer-ai-policy-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

replylayer-ai-policy-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  description: 'The ReplyLayer REST API for AI agents — send, receive, read, and reply to email with built-in security scanning. Authenticate with an API key (`Authorization: Bearer rly_live_.`). This is the customer contract only; operator/admin endpoints and the session-cookie dashboard surface are not part of this spec.'
  title: ReplyLayer Policy API
  version: 1.0.0
servers:
- description: Production
  url: https://api.replylayer.ai
security:
- BearerApiKey: []
tags:
- name: Policy
paths:
  /v1/account/policy:
    get:
      operationId: getV1AccountPolicy
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  custom_daily_send_limit:
                    type:
                    - integer
                    - 'null'
                  default_policy_mode:
                    enum:
                    - read_only
                    - draft_only
                    - supervised
                    - trusted
                    - null
                    type:
                    - string
                    - 'null'
                  resolved_default_policy_mode:
                    enum:
                    - read_only
                    - draft_only
                    - supervised
                    - trusted
                    type: string
                required:
                - custom_daily_send_limit
                - default_policy_mode
                - resolved_default_policy_mode
                type: object
          description: Success
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: 'Missing or invalid API key (code: UNAUTHORIZED)'
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: 'Rate limited (code: RATE_LIMITED)'
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: 'Internal error (code: INTERNAL_ERROR)'
      summary: Read the account policy (daily cap, default mode for new mailboxes)
      tags:
      - Policy
    patch:
      operationId: patchV1AccountPolicy
      requestBody:
        content:
          application/json:
            schema:
              additionalProperties: false
              properties:
                custom_daily_send_limit:
                  maximum: 2147483647
                  minimum: 1
                  type:
                  - integer
                  - 'null'
                default_policy_mode:
                  enum:
                  - read_only
                  - draft_only
                  - supervised
                  - trusted
                  - null
                  type:
                  - string
                  - 'null'
                reauth_challenge:
                  type: string
                reauth_token:
                  type: string
              type: object
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  custom_daily_send_limit:
                    type:
                    - integer
                    - 'null'
                  default_policy_mode:
                    enum:
                    - read_only
                    - draft_only
                    - supervised
                    - trusted
                    - null
                    type:
                    - string
                    - 'null'
                  resolved_default_policy_mode:
                    enum:
                    - read_only
                    - draft_only
                    - supervised
                    - trusted
                    type: string
                required:
                - custom_daily_send_limit
                - default_policy_mode
                - resolved_default_policy_mode
                type: object
          description: Success
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Validation error
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: 'Missing or invalid API key (code: UNAUTHORIZED)'
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Not found
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: 'Rate limited (code: RATE_LIMITED)'
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: 'Internal error (code: INTERNAL_ERROR)'
      summary: Update the account daily cap / default mode (loosening requires a dashboard…
      tags:
      - Policy
  /v1/mailboxes/{id}/policy:
    get:
      operationId: getV1MailboxesByIdPolicy
      parameters:
      - in: path
        name: id
        required: true
        schema:
          maxLength: 64
          minLength: 1
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  agent_authoring_mode:
                    enum:
                    - send_and_draft
                    - draft_only
                    - read_only
                    type: string
                  agent_send_policy:
                    enum:
                    - restricted
                    - open
                    type: string
                  allow_thread_replies:
                    type: boolean
                  approval_expiry:
                    enum:
                    - 24h
                    - 72h
                    - 7d
                    - never
                    type: string
                  binding:
                    properties:
                      permitted_verbs:
                        items:
                          enum:
                          - send
                          - reply
                          - draft_create
                          - draft_update
                          - draft_send
                          type: string
                        type: array
                      scope:
                        enum:
                        - admin
                        - agent
                        type: string
                    required:
                    - scope
                    - permitted_verbs
                    type: object
                  enforcement:
                    properties:
                      risky_only:
                        enum:
                        - 'off'
                        - shadow
                        - enforce
                        type: string
                      send_window:
                        enum:
                        - 'off'
                        - shadow
                        - enforce
                        type: string
                    required:
                    - risky_only
                    - send_window
                    type: object
                  hitl_mode:
                    enum:
                    - disabled
                    - all_outbound
                    - risky_only
                    type: string
                  last_applied_policy_mode:
                    type:
                    - string
                    - 'null'
                  latest_revision_id:
                    type:
                    - string
                    - 'null'
                  mailbox_id:
                    type: string
                  policy_mode:
                    enum:
                    - read_only
                    - draft_only
                    - supervised
                    - trusted
                    - custom
                    type: string
                  recipient_policy_mode:
                    enum:
                    - blocklist
                    - allowlist
                    type: string
                  restricted_by:
                    enum:
                    - mailbox_allowlist
                    - agent_containment
                    - null
                    type:
                    - string
                    - 'null'
                  send_window:
                    additionalProperties: true
                    type:
                    - object
                    - 'null'
                required:
                - mailbox_id
                - policy_mode
                - enforcement
                - last_applied_policy_mode
                - agent_authoring_mode
                - agent_send_policy
                - restricted_by
                - hitl_mode
                - approval_expiry
                - send_window
                - allow_thread_replies
                - recipient_policy_mode
                - latest_revision_id
                - binding
                type: object
          description: Success
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: 'Missing or invalid API key (code: UNAUTHORIZED)'
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Not found
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: 'Rate limited (code: RATE_LIMITED)'
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: 'Internal error (code: INTERNAL_ERROR)'
      summary: Read a mailbox's effective policy (derived mode, enforcement state, what binds…
      tags:
      - Policy
  /v1/mailboxes/{id}/policy/preview:
    post:
      operationId: postV1MailboxesByIdPolicyPreview
      parameters:
      - in: path
        name: id
        required: true
        schema:
          maxLength: 64
          minLength: 1
          type: string
      requestBody:
        content:
          application/json:
            schema:
              additionalProperties: false
              properties:
                at_time:
                  format: date-time
                  type: string
                body:
                  maxLength: 100000
                  type: string
                run_content_scan:
                  type: boolean
                subject:
                  maxLength: 2000
                  type: string
                to:
                  format: email
                  type: string
              required:
              - to
              type: object
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  budget:
                    properties:
                      limit:
                        type: integer
                      remaining:
                        type: integer
                      warmup_applied:
                        type: boolean
                    required:
                    - limit
                    - remaining
                    - warmup_applied
                    type: object
                  content_scan_run:
                    type: boolean
                  email_effect:
                    properties:
                      effect_status:
                        enum:
                        - sent
                        - held_for_review
                        - held_infrastructure
                        - blocked
                        type: string
                      releasable:
                        type: boolean
                      retryable:
                        type: boolean
                      terminal:
                        type: boolean
                    required:
                    - effect_status
                    - releasable
                    - terminal
                    - retryable
                    type: object
                  mailbox_id:
                    type: string
                  result:
                    enum:
                    - passes_all_checks_run
                    - would_hold
                    - would_block
                    type: string
                  result_summary:
                    type: string
                  trace:
                    items:
                      properties:
                        details:
                          additionalProperties: true
                          type: object
                        gate:
                          enum:
                          - authoring
                          - recipient_authority
                          - send_window
                          - content_scan
                          - human_review
                          - send_budget
                          type: string
                        outcome:
                          enum:
                          - pass
                          - would_hold
                          - would_block
                          - not_run
                          - skipped
                          type: string
                        reason:
                          type: string
                      required:
                      - gate
                      - outcome
                      - reason
                      - details
                      type: object
                    type: array
                required:
                - mailbox_id
                - result
                - result_summary
                - content_scan_run
                - email_effect
                - trace
                - budget
                type: object
          description: Success
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Validation error
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: 'Missing or invalid API key (code: UNAUTHORIZED)'
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Not found
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: 'Rate limited (code: RATE_LIMITED)'
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: 'Internal error (code: INTERNAL_ERROR)'
      summary: Dry-run a sample send against the mailbox's policy (no side effects)
      tags:
      - Policy
  /v1/mailboxes/{id}/policy/revisions:
    get:
      operationId: getV1MailboxesByIdPolicyRevisions
      parameters:
      - in: path
        name: id
        required: true
        schema:
          maxLength: 64
          minLength: 1
          type: string
      - in: query
        name: all
        required: false
        schema:
          type: boolean
      - in: query
        name: cursor
        required: false
        schema:
          type: string
      - in: query
        name: limit
        required: false
        schema:
          maximum: 500
          minimum: 1
          type: integer
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  next_cursor:
                    type:
                    - string
                    - 'null'
                  revisions:
                    items:
                      properties:
                        actor_id:
                          type:
                          - string
                          - 'null'
                        actor_type:
                          type:
                          - string
                          - 'null'
                        containment_lever:
                          enum:
                          - 'off'
                          - shadow
                          - enforce
                          - null
                          type:
                          - string
                          - 'null'
                        correction_of:
                          type:
                          - string
                          - 'null'
                        created_at:
                          type: string
                        derived_mode:
                          type:
                          - string
                          - 'null'
                        diff:
                          additionalProperties: true
                          type: object
                        id:
                          type: string
                        kind:
                          enum:
                          - policy_change
                          - system_correction
                          type: string
                        legacy_derivation:
                          type: boolean
                        reauth_used:
                          type:
                          - boolean
                          - 'null'
                      required:
                      - id
                      - created_at
                      - actor_type
                      - actor_id
                      - reauth_used
                      - derived_mode
                      - kind
                      - legacy_derivation
                      - diff
                      type: object
                    type: array
                required:
                - revisions
                - next_cursor
                type: object
          description: Success
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: 'Missing or invalid API key (code: UNAUTHORIZED)'
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Not found
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: 'Rate limited (code: RATE_LIMITED)'
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: 'Internal error (code: INTERNAL_ERROR)'
      summary: Paginated policy revision history with before/after diffs
      tags:
      - Policy
  /v1/policy/overview:
    get:
      operationId: getV1PolicyOverview
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  account:
                    properties:
                      custom_daily_send_limit:
                        type:
                        - integer
                        - 'null'
                      default_policy_mode:
                        enum:
                        - read_only
                        - draft_only
                        - supervised
                        - trusted
                        - null
                        type:
                        - string
                        - 'null'
                      resolved_default_policy_mode:
                        enum:
                        - read_only
                        - draft_only
                        - supervised
                        - trusted
                        type: string
                    required:
                    - custom_daily_send_limit
                    - default_policy_mode
                    - resolved_default_policy_mode
                    type: object
                  enforcement:
                    properties:
                      risky_only:
                        enum:
                        - 'off'
                        - shadow
                        - enforce
                        type: string
                      send_window:
                        enum:
                        - 'off'
                        - shadow
                        - enforce
                        type: string
                    required:
                    - risky_only
                    - send_window
                    type: object
                  mailboxes:
                    items:
                      properties:
                        address:
                          type: string
                        blocked_this_week:
                          properties:
                            inbound:
                              minimum: 0
                              type: integer
                            outbound:
                              minimum: 0
                              type: integer
                          required:
                          - outbound
                          - inbound
                          type: object
                        id:
                          type: string
                        last_applied_policy_mode:
                          type:
                          - string
                          - 'null'
                        name:
                          type: string
                        pending_review_count:
                          minimum: 0
                          type: integer
                        policy_mode:
                          enum:
                          - read_only
                          - draft_only
                          - supervised
                          - trusted
                          - custom
                          type: string
                        sender_policy_mode:
                          enum:
                          - blocklist
                          - allowlist
                          type: string
                      required:
                      - id
                      - name
                      - address
                      - policy_mode
                      - last_applied_policy_mode
                      - sender_policy_mode
                      - pending_review_count
                      - blocked_this_week
                      type: object
                    type: array
                  recent_revisions:
                    items:
                      properties:
                        actor_id:
                          type:
                          - string
                          - 'null'
                        actor_type:
                          type:
                          - string
                          - 'null'
                        containment_lever:
                          enum:
                          - 'off'
                          - shadow
                          - enforce
                          - null
                          type:
                          - string
                          - 'null'
                        correction_of:
                          type:
                          - string
                          - 'null'
                        created_at:
                          type: string
                        derived_mode:
                          type:
                          - string
                          - 'null'
                        id:
                          type: string
                        kind:
                          enum:
                          - policy_change
                          - system_correction
                          type: string
                        legacy_derivation:
                          type: boolean
                        mailbox_id:
                          type:
                          - string
                          - 'null'
                        reauth_used:
                          type:
                          - boolean
                          - 'null'
                        scope:
                          enum:
                          - account
                          - mailbox
                          type: string
                      required:
                      - id
                      - scope
                      - mailbox_id
                      - derived_mode
                      - kind
                      - legacy_derivation
                      - created_at
                      type: object
                    type: array
                required:
                - mailboxes
                - account
                - enforcement
                - recent_revisions
                type: object
          description: Success
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: 'Missing or invalid API key (code: UNAUTHORIZED)'
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: 'Rate limited (code: RATE_LIMITED)'
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: 'Internal error (code: INTERNAL_ERROR)'
      summary: Aggregated per-mailbox + account policy overview
      tags:
      - Policy
components:
  schemas:
    Error:
      description: Standard error envelope. `code` is a stable machine-readable string.
      properties:
        code:
          type: string
        details:
          additionalProperties: true
          type: object
        error:
          type: string
      required:
      - error
      - code
      type: object
  securitySchemes:
    BearerApiKey:
      description: 'ReplyLayer API key: `Authorization: Bearer rly_live_<public_id>.<secret>`.'
      scheme: bearer
      type: http