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

# Get all domains

> Retrieves all domains in your team with their verification status and DNS configuration details.


**🎯 Purpose:**
Retrieve all domains configured in your SendX team with their verification status and DNS configuration details.

**💡 Use Cases:**

* Monitor domain verification status across all domains
* Review DNS configuration for multiple domains
* Check which domains are ready for sending
* Audit domain setup and compliance

**📊 Response Information:**
The response includes:

* Domain verification status (verified, dkimVerified, dmarcVerified, etc.)
* DNS record configurations (DKIM, SPF, DMARC, Return Path, Tracking)
* Domain creation and update timestamps
* Verification failure reasons (if any)

**⚡ Best Practices:**

* Regularly check domain verification status
* Use pagination for large numbers of domains
* Filter and sort domains by verification status
* Monitor domains that need attention


## OpenAPI

````yaml get /domain
openapi: 3.1.0
info:
  title: SendX REST API
  version: 1.0.0
  description: >
    # SendX REST API Documentation


    ## 🚀 Introduction


    The SendX API is organized around REST principles. Our API has predictable
    resource-oriented URLs, accepts JSON-encoded request bodies, returns
    JSON-encoded responses, and uses standard HTTP response codes,
    authentication, and verbs.


    **Key Features:**

    - 🔒 **Security**: Team-based authentication with optional member-level
    access

    - 🎯 **Resource-Oriented**: RESTful design with clear resource boundaries

    - 📊 **Rich Data Models**: Three-layer model system (Input/Output/Internal)

    - 🔗 **Relationships**: Automatic prefix handling for resource relationships

    - 📈 **Scalable**: Built for high-volume email marketing operations


    ## 🏗️ Architecture Overview


    SendX uses a three-layer model architecture:


    1. **Input Models** (`RestE*`): For API requests

    2. **Output Models** (`RestR*`): For API responses with prefixed IDs

    3. **Internal Models**: Core business logic (not exposed in API)


    ## 🔐 Security & Authentication


    SendX uses API key authentication:


    ### Team API Key

    ```http

    X-Team-ApiKey: YOUR_TEAM_API_KEY

    ```

    - **Required for all requests**

    - Team-level access to resources

    - Available in SendX Settings → Team API Key


    ## 🆔 Encrypted ID System


    SendX uses encrypted IDs for security and better developer experience:


    - **Internal IDs**: Sequential integers (not exposed)

    - **Encrypted IDs**: 22-character alphanumeric strings

    - **Prefixed IDs**: Resource-type prefixes in API responses
    (`contact_<22-char-id>`)


    ### ID Format


    **All resource IDs follow this pattern:**

    ```

    <resource_prefix>_<22_character_alphanumeric_string>

    ```


    **Example:**

    ```json

    {
      "id": "contact_BnKjkbBBS500CoBCP0oChQ",
      "lists": ["list_OcuxJHdiAvujmwQVJfd3ss", "list_0tOFLp5RgV7s3LNiHrjGYs"],
      "tags": ["tag_UhsDkjL772Qbj5lWtT62VK", "tag_fL7t9lsnZ9swvx2HrtQ9wM"]
    }

    ```


    ## 📚 Resource Prefixes


    | Resource | Prefix | Example |

    |----------|--------|---------|

    | Contact | `contact_` | `contact_BnKjkbBBS500CoBCP0oChQ` |

    | Campaign | `campaign_` | `campaign_LUE9BTxmksSmqHWbh96zsn` |

    | List | `list_` | `list_OcuxJHdiAvujmwQVJfd3ss` |

    | Tag | `tag_` | `tag_UhsDkjL772Qbj5lWtT62VK` |

    | Sender | `sender_` | `sender_4vK3WFhMgvOwUNyaL4QxCD` |

    | Template | `template_` | `template_f3lJvTEhSjKGVb5Lwc5SWS` |

    | Custom Field | `custom_field_` | `field_MnuqBAG2NPLm7PZMWbjQxt` |

    | Webhook | `webhook_` | `webhook_9l154iiXlZoPo7vngmamee` |

    | Post | `post_` | `post_XyZ123aBc456DeF789GhI` |

    | Post Category | `post_category_` | `post_category_YzS1wOU20yw87UUHKxMzwn`
    |

    | Post Tag | `post_tag_` | `post_tag_123XyZ456AbC` |

    | Member | `member_` | `member_JkL012MnO345PqR678` |

    | Domain | `domain_` | `domain_504` |


    ## 🎯 Best Practices


    ### Error Handling

    - **Always check status codes**: 2xx = success, 4xx = client error, 5xx =
    server error

    - **Read error messages**: Descriptive messages help debug issues

    - **Handle rate limits**: Respect API rate limits for optimal performance


    ### Data Validation

    - **Email format**: Must be valid email addresses

    - **Required fields**: Check documentation for mandatory fields

    - **Field lengths**: Respect maximum length constraints


    ### Performance

    - **Pagination**: Use offset/limit for large datasets

    - **Batch operations**: Process multiple items when supported

    - **Caching**: Cache responses when appropriate


    ## 🛠️ SDKs & Integration


    Official SDKs available for:

    - [Golang](https://github.com/sendx/sendx-go-sdk)

    - [Python](https://github.com/sendx/sendx-python-sdk)

    - [Ruby](https://github.com/sendx/sendx-ruby-sdk)

    - [Java](https://github.com/sendx/sendx-java-sdk)

    - [PHP](https://github.com/sendx/sendx-php-sdk)

    - [JavaScript](https://github.com/sendx/sendx-javascript-sdk)


    ## 📞 Support


    Need help? Contact us:

    - 💬 **Website Chat**: Available on sendx.io

    - 📧 **Email**: hello@sendx.io

    - 📚 **Documentation**: Full guides at help.sendx.io


    ---


    **API Endpoint:** `https://api.sendx.io/api/v1/rest`


    [<img src="https://run.pstmn.io/button.svg" alt="Run In Postman"
    style="width: 128px; height:
    32px;">](https://god.gw.postman.com/run-collection/33476323-44b198b0-5219-4619-a01f-cfc24d573885?action=collection%2Ffork&source=rip_markdown&collection-url=entityId%3D33476323-44b198b0-5219-4619-a01f-cfc24d573885%26entityType%3Dcollection%26workspaceId%3D6b1e4f65-96a9-4136-9512-6266c852517e)
  contact:
    name: SendX API Support
    email: hello@sendx.io
    url: https://sendx.io
  license:
    name: Proprietary
    url: https://sendx.io/terms
servers:
  - url: https://api.sendx.io/api/v1/rest
    description: Production server
security:
  - TeamApiKey: []
tags:
  - name: Contact
    description: >
      **Contact Management**


      Contacts are the core of your SendX account. They represent your
      customers, leads, or any person you wish to communicate with through
      marketing campaigns.


      **Key Features:**

      - ✅ Create, read, update, and delete contacts

      - 🏷️ Associate with lists and tags

      - 📝 Store custom field data

      - 📊 Track engagement metrics

      - 🔒 Team-based access control


      **Business Rules:**

      - Email addresses must be unique within a team

      - Custom fields are created automatically if they don't exist

      - Tags are created automatically when assigned

      - Soft deletes preserve historical data
  - name: Campaign
    description: >
      **Campaign Management**


      Campaigns allow you to send targeted email marketing messages to your
      contacts.


      **Key Features:**

      - 📧 Create and manage email campaigns

      - 🎯 Target specific lists and segments

      - 📊 Track campaign performance

      - ⏰ Schedule campaigns for future delivery

      - 🔄 A/B testing support
  - name: List
    description: |
      **List Management**

      Lists help you organize contacts into groups for targeted messaging.

      **Key Features:**
      - 📁 Create and manage contact lists
      - 👥 Bulk operations on list members
      - 🔗 Associate with campaigns
      - 📊 Track list growth metrics
  - name: Tag
    description: |
      **Tag Management**

      Tags provide flexible contact categorization for advanced segmentation.

      **Key Features:**
      - 🏷️ Create and manage tags
      - 🔍 Advanced contact filtering
      - 🎯 Behavior-based tagging
      - 📊 Tag-based analytics
  - name: Sender
    description: |
      **Sender Management**

      Manage verified sender addresses for your campaigns.

      **Key Features:**
      - ✉️ Add and verify sender addresses
      - 🔐 Domain authentication
      - 📧 Default sender settings
  - name: Template
    description: |
      **Email Template Management**

      Create and manage reusable email templates for campaigns.

      **Key Features:**
      - 🎨 HTML and text templates
      - 🔄 Reusable across campaigns
      - 📱 Mobile-responsive designs
      - 🏷️ Personalization support
  - name: Custom Field
    description: |
      **Custom Field Management**

      Define custom data fields for storing additional contact information.

      **Key Features:**
      - 📝 Create custom data fields
      - 🔢 Support for various data types
      - 📊 Use in segmentation
      - 🔄 Bulk updates
  - name: Webhook
    description: |
      **Webhook Management**

      Configure webhooks to receive real-time event notifications.

      **Key Features:**
      - 🔔 Real-time event notifications
      - 🎯 Event filtering
      - 🔒 Secure payload delivery
      - 📊 Delivery status tracking
  - name: Email Sending
    description: |
      **Email Sending APIs**

      Send transactional and marketing emails programmatically.

      **Key Features:**
      - 📧 Send individual emails
      - 🎨 Template-based sending
      - 📎 Attachment support
      - 🔄 Personalization variables
  - name: Events
    description: |
      **Event Tracking**

      Track custom events and revenue data for advanced analytics.

      **Key Features:**
      - 📊 Custom event tracking
      - 💰 Revenue attribution
      - 🔗 Integration with analytics
      - 📈 Conversion tracking
  - name: Tracking
    description: |
      **Contact Tracking APIs**

      Legacy tracking endpoints for backward compatibility.

      **Key Features:**
      - 👤 Identify contacts
      - 🏷️ Track contact behavior
      - 📊 Update contact properties
      - ⚠️ Consider using newer endpoints
  - name: Report
    description: |
      **Reporting APIs**

      Access detailed reports and analytics data.

      **Key Features:**
      - 📊 Campaign performance metrics
      - 📈 Engagement analytics
      - 💰 Revenue reports
      - 📉 Trend analysis
  - name: Post
    description: |
      **Blog Post Management**

      Manage blog posts and content for your marketing efforts.

      **Key Features:**
      - 📝 Create and manage posts
      - 🏷️ Categorize with tags
      - 📁 Organize by categories
      - 🔍 SEO optimization
  - name: Post Category
    description: |
      **Post Category Management**

      Organize blog posts into categories.

      **Key Features:**
      - 📁 Create categories
      - 🔗 Associate posts
      - 📊 Category analytics
  - name: Post Tag
    description: |
      **Post Tag Management**

      Tag blog posts for better organization and discovery.

      **Key Features:**
      - 🏷️ Create post tags
      - 🔍 Improve discoverability
      - 📊 Tag-based filtering
  - name: Team Member
    description: |
      **Team Member Information**

      Access team member details (read-only).

      **Key Features:**
      - 👤 View member profiles
      - 📧 Access member information
      - 🔒 Read-only access
paths:
  /domain:
    get:
      tags:
        - Domain
      summary: Get all domains
      description: >
        Retrieves all domains in your team with their verification status and
        DNS configuration details.
      operationId: getAllDomains
      parameters:
        - name: offset
          in: query
          description: Number of domains to skip
          schema:
            type: integer
            minimum: 0
            default: 0
        - name: limit
          in: query
          description: Maximum number of domains to return
          schema:
            type: integer
            default: 10
            minimum: 1
            maximum: 100
      responses:
        '200':
          description: ✅ Domains retrieved successfully
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/RestRDomain'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '500':
          $ref: '#/components/responses/InternalServerError'
      security:
        - TeamApiKey: []
components:
  schemas:
    RestRDomain:
      type: object
      properties:
        id:
          type: string
          pattern: ^domain_[a-zA-Z0-9]{22}$
          description: Unique domain identifier with domain_ prefix
          example: domain_504
        name:
          type: string
          description: Domain name
          example: sx13.email
        verified:
          type: boolean
          description: Overall domain verification status
          example: false
        returnPathVerified:
          type: boolean
          description: Return path (bounce) verification status
          example: false
        dkimVerified:
          type: boolean
          description: DKIM verification status
          example: false
        trackVerified:
          type: boolean
          description: Tracking domain verification status
          example: false
        dmarcVerified:
          type: boolean
          description: DMARC verification status
          example: false
        gptVerified:
          type: boolean
          description: GPT (Google Postmaster Tools) verification status
          example: false
        dkim:
          type: object
          description: DKIM DNS record configuration
          properties:
            host:
              type: string
              example: sp-dkim._domainkey.sx13.email
            type:
              type: string
              example: TXT
            textValue:
              type: string
              example: >-
                v=DKIM1;k=rsa;s=email;h=sha256;p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC94euUPiD9e9jO4rgnjWYSa6YOcYz24SkrNPJ6u9AaeDG8Zvwu3om4sxkGrQ3vO1hoX9RQnccBCM9y+9Z6fCFmwI6eGjtskxLPLThMSsjDACL3iI1UYTZyuSHEk67QoLsgSmcTTtVjBGdtPi2w6SsXOauXav07wB7VPuDL/Q1zOQIDAQAB
        returnPath:
          type: object
          description: Return path (bounce) DNS record configuration
          properties:
            host:
              type: string
              example: sp-bounce.sx13.email
            type:
              type: string
              example: CNAME
            textValue:
              type: string
              example: sp.sendpost.info
        track:
          type: object
          description: Tracking domain DNS record configuration
          properties:
            host:
              type: string
              example: sp-track.sx13.email
            type:
              type: string
              example: CNAME
            textValue:
              type: string
              example: track.sptrackh.com
        dmarc:
          type: object
          description: DMARC DNS record configuration
          properties:
            host:
              type: string
              example: _dmarc.sx13.email
            type:
              type: string
              example: TXT
            textValue:
              type: string
              example: v=DMARC1; p=none;
        gpt:
          type: object
          description: GPT (Google Postmaster Tools) DNS record configuration
          properties:
            host:
              type: string
              example: sx13.email
            type:
              type: string
              example: TXT
            textValue:
              type: string
              example: ''
        dkimConfig:
          type: string
          description: DKIM configuration in JSON format
          example: >-
            {"Domain":"sx13.email","PubKey":"MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC94euUPiD9e9jO4rgnjWYSa6YOcYz24SkrNPJ6u9AaeDG8Zvwu3om4sxkGrQ3vO1hoX9RQnccBCM9y+9Z6fCFmwI6eGjtskxLPLThMSsjDACL3iI1UYTZyuSHEk67QoLsgSmcTTtVjBGdtPi2w6SsXOauXav07wB7VPuDL/Q1zOQIDAQAB","PrivKey":"-----BEGIN
            RSA PRIVATE
            KEY-----\nMIICXAIBAAKBgQC94euUPiD9e9jO4rgnjWYSa6YOcYz24SkrNPJ6u9AaeDG8Zvwu\n3om4sxkGrQ3vO1hoX9RQnccBCM9y+9Z6fCFmwI6eGjtskxLPLThMSsjDACL3iI1U\nYTZyuSHEk67QoLsgSmcTTtVjBGdtPi2w6SsXOauXav07wB7VPuDL/Q1zOQIDAQAB\nAoGAH2MFvtZaO6xKFUCSsi8ETU0wALkyVOi5FmRFJJaA+q8dgYgAbXrphvdLzrey\nUvYbUf1tKfo6l+gt6lLIjCySlJFUkFbHeQlch+ZfhvyCP+2zo6JrFSRosZGYsZhb\ncBnnfzi+r6FDCiobLn8Y78eEli0RX7lvUC4VSJ6J2vTiybUCQQDJQqWqvPe8vdr+\neHioA7YeWiCInhHD6ylKMqCwFTkdjbhUoK5rZmnQJ2xmAljEz7pdpgxeg8oNFLfO\namXLKGSfAkEA8YcOmAC3sdTXYMptwnQ4Y4IOOaY/0HXM6YEnmRbN526CBRciUdj/\ndoc24g+Ibx5IVPRkQBWuWiB6OIP5wY6BJwJAA93G5vfIXpTbHyZbUwb3ObALjfRT\nbQsYePduBNPzi/DMCLwpfaCzCa+oMnF7GRTQhLoK5MntWMD8IvgCSpvVCwJAHhZY\n9w5/06NUATa2XZbkv2CgLQZMxMcn856nNCbnF4FoqQGswM1rZXSKnbaZpF39XLfl\nFSaeRZPuJcQrBLWf2QJBAKAakfXcnF3N5v37r3TMl31vrMyBBSihKTxs3y5b+JqQ\nINkXkhATSdxwZzwLHbkGmzNVgrCTX5+ZrpxS9jTAUBE=\n-----END
            RSA PRIVATE KEY-----\n","Selector":"sp-dkim","Headers":""}
        dmarcFailureReason:
          type: string
          description: Reason for DMARC verification failure (if any)
          example: ''
        created:
          type: integer
          format: int64
          description: Domain creation timestamp (nanoseconds since epoch)
          example: 1764924919882212400
        updated:
          type: integer
          format: int64
          description: Domain last update timestamp (nanoseconds since epoch)
          example: 0
    ErrorResponse:
      type: object
      properties:
        status:
          type: string
          enum:
            - error
          example: error
        message:
          type: string
          description: Human-readable error message
          example: Invalid request format
      required:
        - status
        - message
  responses:
    Unauthorized:
      description: ❌ Unauthorized - Invalid or missing API key
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            status: 401
            message: The Team ID or API Key specified is not valid
    InternalServerError:
      description: ❌ Internal Server Error - System error occurred
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            status: error
            message: Internal server error occurred
  securitySchemes:
    TeamApiKey:
      type: apiKey
      in: header
      name: X-Team-ApiKey
      description: >
        Team API key for authentication. Find your API key in SendX Settings →
        Team API Key.


        **Example:**

        ```

        X-Team-ApiKey: your_team_api_key_here

        ```

````