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

# Generate signed Domain Connect URL

> Discover Domain Connect support and generate a signed apply URL for one-click DNS setup



## OpenAPI

````yaml /openapi.json post /v1/domains/domainconnect/sign
openapi: 3.0.3
info:
  title: Emailr API
  version: 1.0.0
servers:
  - url: https://api.emailr.dev
    description: Production
security: []
tags:
  - name: emails
    description: Email sending and management
  - name: contacts
    description: Contact management
  - name: templates
    description: Email template management
  - name: domains
    description: Domain verification and management
  - name: webhooks
    description: Webhook configuration
  - name: broadcasts
    description: Broadcast campaign management
  - name: segments
    description: Contact segmentation
paths:
  /v1/domains/domainconnect/sign:
    post:
      tags:
        - domains
      summary: Generate signed Domain Connect URL
      description: >-
        Discover Domain Connect support and generate a signed apply URL for
        one-click DNS setup
      operationId: signDomainConnect
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DomainConnectSignRequest'
      responses:
        '200':
          description: Domain Connect signing result
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DomainConnectSignResponse'
        '400':
          description: Invalid input
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Domain not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - bearerAuth: []
components:
  schemas:
    DomainConnectSignRequest:
      type: object
      properties:
        domain:
          type: string
          minLength: 1
          example: example.com
        serviceId:
          type: string
          enum:
            - send
            - send-receive
          description: Domain Connect template service ID
          example: send
        params:
          type: object
          additionalProperties:
            type: string
          description: Optional template variable overrides
          example:
            region: us-west-2
      required:
        - domain
        - serviceId
    DomainConnectSignResponse:
      type: object
      properties:
        supported:
          type: boolean
          example: true
        url:
          type: string
          description: Signed Domain Connect apply URL
          example: >-
            https://provider.com/v2/domainTemplates/providers/emailr.dev/services/mail/apply?domain=example.com&key=_dcpubkeyv1&sig=abc123
        urlSyncUX:
          type: string
          description: DNS provider's Domain Connect base URL
          example: https://dash.cloudflare.com/cdn-cgi/access/domain-connect
        error:
          type: string
          description: Error message when Domain Connect is not supported
          example: Domain Connect is not supported for this domain
      required:
        - supported
    Error:
      type: object
      properties:
        error:
          type: string
          example: An error occurred
        code:
          type: string
          example: VALIDATION_ERROR
        details: {}
      required:
        - error
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: API key authentication. Use your API key as the bearer token.

````