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

# Create an email address

> Creates a new email sender. Creating a sender registers its domain with SparkPost and sends a verification email to the sender address. Generic email providers (e.g. `gmail.com`, `yahoo.com`, `yahoomail.com`, `aol.com`, `mac.com`, `mail.com`, `apple.com`, `facebook.com`) are rejected, and an email may only be added once per org.

Create a sender

**Not callable with an API key.** Every Senders endpoint requires org admin and returns `403 You are not authorized to access this resource` otherwise. Service accounts cannot be admin, so this is unreachable with any API key — use a signed-in admin session.

**Permission:** org **admin**. A non-admin receives HTTP 403 with the message `You are not authorized to access this resource`.



## OpenAPI

````yaml /api-reference/specs/senders.json post /api/senders
openapi: 3.1.0
info:
  title: ConveYour API — Senders
  description: Manage the email from-identities your organization sends messages from.
  version: 1.0.0
servers:
  - url: https://{subdomain}.conveyour.com
    description: Your organization's ConveYour instance
    variables:
      subdomain:
        default: acme
        description: >-
          Your organization's slug — the subdomain you sign in on. Replace
          `acme` with yours: if you sign in at `bigco.conveyour.com`, enter
          `bigco`.
security:
  - conveyourToken: []
tags:
  - name: Senders
    description: Manage the email from-identities your organization sends messages from.
paths:
  /api/senders:
    post:
      tags:
        - Senders
      summary: Create an email address
      description: >-
        Creates a new email sender. Creating a sender registers its domain with
        SparkPost and sends a verification email to the sender address. Generic
        email providers (e.g. `gmail.com`, `yahoo.com`, `yahoomail.com`,
        `aol.com`, `mac.com`, `mail.com`, `apple.com`, `facebook.com`) are
        rejected, and an email may only be added once per org.


        Create a sender


        **Not callable with an API key.** Every Senders endpoint requires org
        admin and returns `403 You are not authorized to access this resource`
        otherwise. Service accounts cannot be admin, so this is unreachable with
        any API key — use a signed-in admin session.


        **Permission:** org **admin**. A non-admin receives HTTP 403 with the
        message `You are not authorized to access this resource`.
      operationId: createASender
      parameters:
        - $ref: '#/components/parameters/teams'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - name
                - email
              properties:
                name:
                  description: Display name shown on the from-identity.
                  type: string
                email:
                  description: >-
                    The from email address. Its domain is registered with
                    SparkPost for verification. Cannot be a generic provider
                    domain, and must be unique within the org.
                  type: string
                default_sender:
                  description: Whether this sender is the org's default from-address.
                  type: boolean
                default_reply:
                  description: Whether this sender is the org's default reply-to address.
                  type: boolean
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/Envelope'
                  - type: object
                    properties:
                      data:
                        $ref: '#/components/schemas/SenderRecord'
              example:
                status: ok
                message: success
                data:
                  id: 64a1b2c3d4e5f6a7b8c9d0e1
                  org_id: 990
                  user_id: 123
                  name: Acme Recruiting
                  email: hello@acme.com
                  domain: acme.com
                  default_sender: true
                  default_reply: false
                  dkim_status: unverified
                  spf_status: unverified
                  spf_record: v=spf1 include:sparkpostmail.com ~all
                  ready: false
        '403':
          $ref: '#/components/responses/Forbidden'
components:
  parameters:
    teams:
      name: teams[]
      in: query
      description: >-
        Team scope for the request, as one or more team ObjectIds. The brackets
        are required: PHP keeps only the last value for a repeated plain key, so
        `teams=A&teams=B` silently resolves to B alone. On requests with a JSON
        body you may send `teams` (no brackets) in the body instead.


        **Values that are not valid ObjectIds are silently ignored** — a
        mistyped team ID behaves as if no team was sent. See the [teams section
        of the API conventions guide](/guides/api-conventions#team-scoping).
      style: form
      explode: true
      schema:
        type: array
        items:
          type: string
      example:
        - 64a1b2c3d4e5f6a7b8c9d0ff
  schemas:
    Envelope:
      type: object
      description: The common response envelope shared by all ConveYour endpoints.
      properties:
        status:
          type: string
          enum:
            - ok
            - failed
          description: '`ok` on success, `failed` on error.'
        message:
          type: string
          description: Human-readable description of the result.
        data:
          description: >-
            The response payload — an object or an array depending on the
            endpoint.
    SenderRecord:
      allOf:
        - $ref: '#/components/schemas/Sender'
        - type: object
          description: >-
            The stored `hash` is never returned by any Senders endpoint —
            `to_array()` removes it unconditionally.
          properties:
            hash:
              type: string
              description: >-
                Internal sender hash. Never returned — removed unconditionally
                before the response is built.
    Sender:
      type: object
      description: >-
        A sender identity (email from-address). `spf_record` and `ready` are
        computed per request. The internal `hash` is never returned. The list
        endpoint removes `hash` from the response.
      properties:
        id:
          type: string
          description: Sender ID.
        org_id:
          type: integer
          description: Owning organization.
        name:
          type: string
          description: Display name shown as the sender.
        email:
          type: string
          description: The from-address.
        domain:
          type: string
          description: Domain parsed from the address.
        default_sender:
          type: boolean
          description: Whether this is the org's default sending address.
        default_reply:
          type: boolean
          description: Whether this is the org's default reply-to address.
        dkim_public:
          type: string
          description: DKIM public key.
        dkim_selector:
          type: string
          description: DKIM selector.
        dkim_headers:
          type: string
          description: DKIM headers.
        dkim_signing_domain:
          type: string
          description: DKIM signing domain.
        dkim_status:
          type: string
          description: DKIM verification status.
        spf_status:
          type: string
          description: SPF verification status.
        spf_record:
          type: string
          description: Computed — the SPF record to publish for this domain.
        ready:
          type: boolean
          description: Computed — whether the sender is verified and usable.
        created_at:
          type: integer
          description: Unix timestamp.
        updated_at:
          type: integer
          description: Unix timestamp.
      required:
        - name
        - email
  responses:
    Forbidden:
      description: >-
        The token is missing or invalid, or the service account behind it lacks
        the permission this endpoint requires.
      content:
        application/json:
          example:
            status: failed
            message: Lacking necessary permission add_contacts
            data:
              permission: add_contacts
  securitySchemes:
    conveyourToken:
      type: apiKey
      in: header
      name: x-conveyour-token
      description: >-
        Your API key token. Contacts endpoints require a **Server-only — Full
        API** key — see [Authentication](/quickstart).

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.