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

# Create SendGrid email integration

> Store SendGrid API credentials and create a verified email domain. Assign the domain to an agent under Agent Builder → Email Settings. Returns the inbound webhook URL for SendGrid Inbound Parse.



## OpenAPI

````yaml post /api/v1/email-domains/sendgrid
openapi: 3.0.0
info:
  version: 1.0.0
  title: Feather AI API
servers:
  - url: https://prod.featherhq.com
    description: Production environment
security: []
paths:
  /api/v1/email-domains/sendgrid:
    post:
      tags:
        - Email Domains
      summary: Create SendGrid email integration
      description: >-
        Store SendGrid API credentials and create a verified email domain.
        Assign the domain to an agent under Agent Builder → Email Settings.
        Returns the inbound webhook URL for SendGrid Inbound Parse.
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                inboundEmail:
                  type: string
                  format: email
                sendFromEmail:
                  type: string
                  format: email
                sendgridApiKey:
                  type: string
                  minLength: 1
              required:
                - inboundEmail
                - sendFromEmail
                - sendgridApiKey
      responses:
        '201':
          description: SendGrid integration created
          content:
            application/json:
              schema:
                type: object
                properties:
                  emailDomain:
                    type: object
                    properties:
                      id:
                        type: string
                        format: uuid
                      organizationId:
                        type: string
                      subdomain:
                        type: string
                      domain:
                        type: string
                      fullDomain:
                        type: string
                      emailProvider:
                        type: string
                        enum:
                          - RESEND
                          - GMAIL
                          - SENDGRID
                      providerDomainId:
                        type: string
                        nullable: true
                      gmailConnectionId:
                        type: string
                        nullable: true
                      sendGridIntegrationId:
                        type: string
                        nullable: true
                        format: uuid
                      inboundWebhookUrl:
                        type: string
                        nullable: true
                      sendGridSendFromEmail:
                        type: string
                        nullable: true
                      mxRecord:
                        type: string
                        nullable: true
                      mxPriority:
                        type: integer
                        nullable: true
                      spfHostname:
                        type: string
                        nullable: true
                      spfValue:
                        type: string
                        nullable: true
                      dkimSelector:
                        type: string
                        nullable: true
                      dkimHostname:
                        type: string
                        nullable: true
                      dkimValue:
                        type: string
                        nullable: true
                      cnameValue:
                        type: string
                        nullable: true
                      cnamePriority:
                        type: integer
                        nullable: true
                      mxVerified:
                        type: boolean
                      spfVerified:
                        type: boolean
                      dkimVerified:
                        type: boolean
                      cnameVerified:
                        type: boolean
                      sendFromDomain:
                        type: string
                        nullable: true
                      sendFromDomainId:
                        type: string
                        nullable: true
                      sendFromVerified:
                        type: boolean
                      sendFromMxRecord:
                        type: string
                        nullable: true
                      sendFromMxPriority:
                        type: integer
                        nullable: true
                      sendFromSpfHostname:
                        type: string
                        nullable: true
                      sendFromSpfValue:
                        type: string
                        nullable: true
                      sendFromDkimSelector:
                        type: string
                        nullable: true
                      sendFromDkimHostname:
                        type: string
                        nullable: true
                      sendFromDkimValue:
                        type: string
                        nullable: true
                      sendFromCnameValue:
                        type: string
                        nullable: true
                      sendFromCnamePriority:
                        type: integer
                        nullable: true
                      sendFromMxVerified:
                        type: boolean
                      sendFromSpfVerified:
                        type: boolean
                      sendFromDkimVerified:
                        type: boolean
                      sendFromCnameVerified:
                        type: boolean
                      status:
                        type: string
                        enum:
                          - PENDING
                          - VERIFYING
                          - VERIFIED
                          - FAILED
                          - SUSPENDED
                      verifiedAt:
                        type: string
                        nullable: true
                      lastCheckedAt:
                        type: string
                        nullable: true
                      createdAt:
                        type: string
                      updatedAt:
                        type: string
                    required:
                      - id
                      - organizationId
                      - subdomain
                      - domain
                      - fullDomain
                      - emailProvider
                      - providerDomainId
                      - gmailConnectionId
                      - sendGridIntegrationId
                      - inboundWebhookUrl
                      - mxRecord
                      - mxPriority
                      - spfHostname
                      - spfValue
                      - dkimSelector
                      - dkimHostname
                      - dkimValue
                      - cnameValue
                      - cnamePriority
                      - mxVerified
                      - spfVerified
                      - dkimVerified
                      - cnameVerified
                      - sendFromDomain
                      - sendFromDomainId
                      - sendFromVerified
                      - sendFromMxRecord
                      - sendFromMxPriority
                      - sendFromSpfHostname
                      - sendFromSpfValue
                      - sendFromDkimSelector
                      - sendFromDkimHostname
                      - sendFromDkimValue
                      - sendFromCnameValue
                      - sendFromCnamePriority
                      - sendFromMxVerified
                      - sendFromSpfVerified
                      - sendFromDkimVerified
                      - sendFromCnameVerified
                      - status
                      - verifiedAt
                      - lastCheckedAt
                      - createdAt
                      - updatedAt
                  sendGridIntegrationId:
                    type: string
                    format: uuid
                  inboundWebhookUrl:
                    type: string
                required:
                  - emailDomain
                  - sendGridIntegrationId
                  - inboundWebhookUrl
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: integer
                    default: 400
                  message:
                    type: string
                    default: Bad request
                  code:
                    type: string
                    enum:
                      - BAD_REQUEST
                    default: BAD_REQUEST
                  success:
                    type: boolean
                    enum:
                      - false
                    default: false
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: integer
                    default: 500
                  message:
                    type: string
                    default: Internal server error
                  code:
                    type: string
                    enum:
                      - INTERNAL_SERVER_ERROR
                    default: INTERNAL_SERVER_ERROR
                  success:
                    type: boolean
                    enum:
                      - false
                    default: false
      security:
        - ApiKey: []
components:
  securitySchemes:
    ApiKey:
      type: apiKey
      in: header
      name: X-API-Key

````