> ## 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 new transactional API key

> Creates a new transactional API key for sending emails via the API



## OpenAPI

````yaml /openapi.json post /outbound/transactional-keys
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:
  /outbound/transactional-keys:
    post:
      tags:
        - Outbound
      summary: Create new transactional API key
      description: Creates a new transactional API key for sending emails via the API
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - name
              properties:
                name:
                  type: string
                  description: Name for the transactional key
                  example: Production API Key
                  minLength: 1
                  maxLength: 64
                  pattern: ^[a-zA-Z0-9-_\s]+$
                allowAllDomains:
                  type: boolean
                  description: Whether to allow sending from all verified domains
                  default: false
                approvedDomains:
                  type: array
                  items:
                    type: string
                    pattern: >-
                      ^(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?.)+[a-zA-Z]{2,}$
                  description: List of approved domains for sending
                  default: []
                  example:
                    - example.com
                    - mydomain.com
                  maxItems: 253
                quota:
                  type: integer
                  description: Email sending quota (0 for unlimited)
                  default: 0
                  example: 1000
                  minimum: 0
                  maximum: 1000000
                ipRestrictions:
                  type: array
                  items:
                    type: string
                    pattern: >-
                      ^(?:(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?).){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(?:/(?:3[0-2]|[12]?[0-9]))?)|(?:(?:[0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}(?:/(?:12[0-8]|1[01][0-9]|[1-9]?[0-9]))?|(?:[0-9a-fA-F]{1,4}:){1,7}:(?:/(?:12[0-8]|1[01][0-9]|[1-9]?[0-9]))?|(?:[0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}(?:/(?:12[0-8]|1[01][0-9]|[1-9]?[0-9]))?|(?:[0-9a-fA-F]{1,4}:){1,5}(?::[0-9a-fA-F]{1,4}){1,2}(?:/(?:12[0-8]|1[01][0-9]|[1-9]?[0-9]))?|(?:[0-9a-fA-F]{1,4}:){1,4}(?::[0-9a-fA-F]{1,4}){1,3}(?:/(?:12[0-8]|1[01][0-9]|[1-9]?[0-9]))?|(?:[0-9a-fA-F]{1,4}:){1,3}(?::[0-9a-fA-F]{1,4}){1,4}(?:/(?:12[0-8]|1[01][0-9]|[1-9]?[0-9]))?|(?:[0-9a-fA-F]{1,4}:){1,2}(?::[0-9a-fA-F]{1,4}){1,5}(?:/(?:12[0-8]|1[01][0-9]|[1-9]?[0-9]))?|[0-9a-fA-F]{1,4}:(?::[0-9a-fA-F]{1,4}){1,6}(?:/(?:12[0-8]|1[01][0-9]|[1-9]?[0-9]))?|:(?::[0-9a-fA-F]{1,4}){1,7}(?:/(?:12[0-8]|1[01][0-9]|[1-9]?[0-9]))?|::(?:/(?:12[0-8]|1[01][0-9]|[1-9]?[0-9]))?)$
                  description: List of allowed IP addresses/CIDR ranges (IPv4 and IPv6)
                  default: []
                  example:
                    - 192.168.1.1
                    - 10.0.0.0/24
                    - 2001:db8::1
                    - 2001:db8::/32
                  maxItems: 50
            examples:
              Basic Key:
                value:
                  name: Development API Key
              Full Configuration:
                value:
                  name: Production API Key
                  allowAllDomains: true
                  approvedDomains:
                    - example.com
                  quota: 10000
                  ipRestrictions:
                    - 192.168.1.1
                    - 10.0.0.0/24
      responses:
        '200':
          description: Transactional key created successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: Transactional key created successfully
                  api_token:
                    type: string
                    description: The generated API token
                    example: transactional_a1b2c3d4
        '400':
          description: Bad Request - Invalid input
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: false
                  error:
                    type: string
                    example: Name is required and must be a string
        '401':
          description: Unauthorized - User not authenticated
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: false
                  error:
                    type: string
                    example: Required information not found
        '403':
          description: Forbidden - Limit reached
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: false
                  error:
                    type: string
                    example: Free accounts are limited to 50 transactional keys
        '500':
          description: Server error
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: false
                  error:
                    type: string
                    example: Failed to create transactional key
components:
  securitySchemes:
    apiKeyAuth:
      type: http
      scheme: bearer
      description: API key for account management endpoints. Use your api_ prefixed token.

````