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

# Create an inbound address

> Provisions a new address on the workspace's shared receiving domain.
The domain itself is created lazily on first call. Omit `localPart` to
get an unguessable generated one (`rcv-xxxxxxxxxx`); a caller-supplied
`localPart` must be unique on the domain.




## OpenAPI

````yaml https://www.senderkit.com/openapi.yaml post /v1/inbound/addresses
openapi: 3.1.0
info:
  title: SenderKit Public API
  version: 1.0.0
  description: >
    Public REST API for SenderKit — send transactional messages (email, SMS,

    push, web push), list message history, and read/render templates.


    ## Authentication

    All endpoints require a Bearer API key:

        Authorization: Bearer sk_live_xxx

    The `sk_live_` / `sk_test_` prefix selects the environment (live vs. test).

    The prefix is only a hint for humans; the secret is the full token. Keys are

    created in the dashboard and shown once at creation.


    ## Sends are asynchronous

    `POST /v1/send` enqueues the message and returns `202` with `status:
    "queued"`.

    Delivery happens out of band; poll `GET /v1/messages` to observe progress.


    ## Rate limits

    All endpoints are rate limited per API key. Sends and reads count against

    separate budgets, so listing messages never competes with sending them.

    A `429` response includes a `Retry-After` header (seconds).
servers:
  - url: https://api.senderkit.com
    description: Production
  - url: http://localhost:3000/api
    description: Local development
security:
  - apiKey: []
tags:
  - name: Context
    description: Inspect the workspace and environment an API key operates in.
  - name: Send
    description: Dispatch messages.
  - name: Messages
    description: Read message history and cancel pending sends.
  - name: Templates
    description: Read and render stored templates.
  - name: Inbound
    description: |
      Provision addresses on your workspace's shared receiving domain and read
      mail sent to them. Requires an API key with the `inbound` scope.
paths:
  /v1/inbound/addresses:
    post:
      tags:
        - Inbound
      summary: Create an inbound address
      description: |
        Provisions a new address on the workspace's shared receiving domain.
        The domain itself is created lazily on first call. Omit `localPart` to
        get an unguessable generated one (`rcv-xxxxxxxxxx`); a caller-supplied
        `localPart` must be unique on the domain.
      operationId: createInboundAddress
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                localPart:
                  type: string
                  minLength: 1
                  maxLength: 64
                  description: |
                    1-64 chars of `a-z 0-9 . _ -`, starting and ending
                    alphanumeric. Lowercased. Omit to auto-generate.

                    Pass `"*"` instead to create a catch-all: it receives
                    every message sent to the domain that doesn't match one
                    of your other addresses on it (an exact address always
                    wins over the catch-all), including mail to reserved
                    local parts like `postmaster` that can't be minted as
                    their own address. `"*"` is a sentinel, not a normal
                    local part — it bypasses both the character-format rule
                    above and the reserved-name check.
                description:
                  type: string
                  maxLength: 200
                forwardTo:
                  type: string
                  maxLength: 320
                  format: email
                  description: |
                    Optional address to also forward received mail to. Cannot
                    point at any inbound address (rejected as a mail loop).
                webhookEndpointId:
                  type: string
                  format: uuid
                  description: |
                    Optional webhook endpoint to bind this address to. When
                    unset, `message.received` events fan out to every endpoint
                    subscribed to that event.
                domainId:
                  type: string
                  format: uuid
                  description: |
                    Optional inbound domain to mint this address on — the `id`
                    from `GET /v1/inbound/domains`. Must be a `verified`
                    custom domain owned by this workspace. Omit to use the
                    workspace's shared receiving domain
                    (`{slug}.in.senderkit.email`), which is created lazily on
                    first call.
                livemode:
                  type: boolean
                  description: |
                    Explicit environment for the new address. Defaults to
                    `true` (live) regardless of which key environment created
                    it, matching webhook endpoints — callers state intent
                    explicitly rather than it being inferred from the key.
            examples:
              default:
                value:
                  localPart: support
                  description: Customer support intake
      responses:
        '201':
          description: The created address.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InboundAddress'
        '400':
          description: Body must be valid JSON (`invalid_request`).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          description: |
            The API key is missing the required `inbound` scope
            (`insufficient_scope`), or the workspace's plan address limit has
            been reached (`plan_limit`).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: That `localPart` already exists on the domain (`address_taken`).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '422':
          description: |
            Failed body validation (`invalid_body`), a malformed `localPart`
            (`invalid_local_part`), a reserved `localPart` such as `postmaster`
            (`reserved_local_part`), an invalid/looping `forwardTo`
            (`invalid_forward_to`), or a `domainId` that doesn't exist, isn't
            owned by this workspace, or isn't `verified` yet (`invalid_domain`).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          $ref: '#/components/responses/RateLimited'
components:
  schemas:
    InboundAddress:
      type: object
      properties:
        id:
          type: string
          description: Public inbound address ID.
          example: inb_0a1b2c3d4e5f6g7h
        address:
          type: string
          description: The full receiving address, on the workspace's shared domain.
          example: support@acme.in.senderkit.email
        description:
          type:
            - string
            - 'null'
        forwardTo:
          type:
            - string
            - 'null'
          description: Address received mail is also forwarded to, or null.
        active:
          type: boolean
        livemode:
          type: boolean
        createdAt:
          type: string
          format: date-time
    Error:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          required:
            - code
            - message
          properties:
            code:
              type: string
              description: Stable machine-readable error code.
              example: invalid_request
            message:
              type: string
            issues:
              type: array
              description: Present on validation failures (Zod issues).
              items:
                type: object
                additionalProperties: true
            limit:
              type: integer
              description: Present on rate-limit errors.
  responses:
    Unauthorized:
      description: Missing, malformed, invalid, or revoked API key.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    RateLimited:
      description: Rate limit exceeded.
      headers:
        Retry-After:
          description: Seconds to wait before retrying.
          schema:
            type: integer
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    apiKey:
      type: http
      scheme: bearer
      description: API key with an `sk_live_` or `sk_test_` prefix.

````