> ## Documentation Index
> Fetch the complete documentation index at: https://jetemail.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Create account-level allowlist rule

> Creates a new allowlist rule that applies across all domains in the authenticated user's account. Supports all condition types: senders, recipients, subjects, body, headers, IPs, size, and attachments.



## OpenAPI

````yaml /openapi.json post /inbound/account/allowlist
openapi: 3.0.0
info:
  title: JetEmail API
  version: 1.0.0
  description: API documentation for JetEmail's transactional email service.
servers:
  - url: https://api.jetemail.com
    description: Production
security:
  - apiKeyAuth: []
externalDocs:
  description: Download OpenAPI Specification
  url: /openapi.json
paths:
  /inbound/account/allowlist:
    post:
      tags:
        - Inbound
      summary: Create account-level allowlist rule
      description: >-
        Creates a new allowlist rule that applies across all domains in the
        authenticated user's account. Supports all condition types: senders,
        recipients, subjects, body, headers, IPs, size, and attachments.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - name
              properties:
                name:
                  type: string
                  minLength: 1
                  maxLength: 100
                  description: >-
                    Rule name (alphanumeric, spaces, hyphens, underscores,
                    periods)
                  example: Allow partner emails
                description:
                  type: string
                  maxLength: 500
                  description: Optional rule description
                  example: Allow all emails from partner domain across all our domains
                senders:
                  type: array
                  items:
                    type: object
                    required:
                      - sender_type
                      - sender_value
                    properties:
                      sender_type:
                        type: string
                        enum:
                          - email
                          - domain
                          - pattern
                      sender_value:
                        type: string
                        example: partner.com
                recipients:
                  type: array
                  items:
                    type: object
                    required:
                      - recipient_type
                      - recipient_value
                    properties:
                      recipient_type:
                        type: string
                        enum:
                          - email
                          - domain
                          - pattern
                      recipient_value:
                        type: string
                subjects:
                  type: array
                  items:
                    type: object
                    required:
                      - match_type
                      - subject_value
                    properties:
                      match_type:
                        type: string
                        enum:
                          - exact
                          - contains
                          - starts_with
                          - ends_with
                          - regex
                      subject_value:
                        type: string
                      case_sensitive:
                        type: integer
                        enum:
                          - 0
                          - 1
                        default: 0
                body:
                  type: array
                  items:
                    type: object
                    required:
                      - match_type
                      - body_value
                    properties:
                      match_type:
                        type: string
                        enum:
                          - contains
                          - regex
                      body_value:
                        type: string
                      case_sensitive:
                        type: integer
                        enum:
                          - 0
                          - 1
                        default: 0
                headers:
                  type: array
                  items:
                    type: object
                    required:
                      - header_name
                      - match_type
                    properties:
                      header_name:
                        type: string
                      match_type:
                        type: string
                        enum:
                          - exact
                          - contains
                          - starts_with
                          - ends_with
                          - regex
                          - exists
                      header_value:
                        type: string
                        nullable: true
                      case_sensitive:
                        type: integer
                        enum:
                          - 0
                          - 1
                        default: 0
                ips:
                  type: array
                  items:
                    type: object
                    required:
                      - ip_type
                      - ip_value
                    properties:
                      ip_type:
                        type: string
                        enum:
                          - single
                          - cidr
                          - range
                      ip_value:
                        type: string
                        example: 10.0.0.1
                size:
                  type: object
                  nullable: true
                  properties:
                    min_size:
                      type: integer
                      nullable: true
                      description: Minimum size in bytes
                    max_size:
                      type: integer
                      nullable: true
                      description: Maximum size in bytes
                attachments:
                  type: array
                  items:
                    type: object
                    required:
                      - match_type
                    properties:
                      match_type:
                        type: string
                        enum:
                          - filename
                          - extension
                          - mimetype
                          - none
                      match_value:
                        type: string
                        nullable: true
                      case_sensitive:
                        type: integer
                        enum:
                          - 0
                          - 1
                        default: 0
            examples:
              Allow by sender domain:
                value:
                  name: Allow partner emails
                  description: Allow all emails from partner.com across all domains
                  senders:
                    - sender_type: domain
                      sender_value: partner.com
              Allow by IP range:
                value:
                  name: Allow office IPs
                  ips:
                    - ip_type: cidr
                      ip_value: 10.0.0.0/8
      responses:
        '200':
          description: Rule created successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: true
                  uuid:
                    type: string
                    format: uuid
                    description: UUID of the created rule
                    example: 550e8400-e29b-41d4-a716-446655440000
        '400':
          description: Bad Request - Invalid input
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: false
                  error:
                    type: string
                    example: Missing rule name
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: false
                  error:
                    type: string
                    example: Unauthorized
        '500':
          description: Server error
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: false
                  error:
                    type: string
                    example: Failed to create account allowlist rule
components:
  securitySchemes:
    apiKeyAuth:
      type: http
      scheme: bearer
      description: API key for account management endpoints. Use your api_ prefixed token.

````