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

# Get domain redirect

> **Get the redirect rule configured for this domain**

Returns the current redirect configuration if one exists.
Returns 404 if no redirect has been configured.

## Example

```python
import requests

domain_id = "550e8400-e29b-41d4-a716-446655440000"

response = requests.get(
    f"https://api.coldsend.io/api/public/v1/domains/{domain_id}/redirect",
    headers={"X-API-Key": "your-api-key"}
)
print(response.json())
```



## OpenAPI

````yaml /public_openapi.json get /api/public/v1/domains/{domain_id}/redirect
openapi: 3.0.3
info:
  title: ColdSend Public API
  description: >-
    Programmatic access to ColdSend for managing cold email campaigns and sender
    accounts.
  version: 1.0.0
  contact:
    name: ColdSend Support
    email: support@coldsend.pro
    url: https://coldsend.pro
servers:
  - url: https://api.coldsend.pro
    description: Production
security:
  - ApiKeyAuth: []
paths:
  /api/public/v1/domains/{domain_id}/redirect:
    get:
      tags:
        - Domains
      summary: Get domain redirect
      description: |-
        **Get the redirect rule configured for this domain**

        Returns the current redirect configuration if one exists.
        Returns 404 if no redirect has been configured.

        ## Example

        ```python
        import requests

        domain_id = "550e8400-e29b-41d4-a716-446655440000"

        response = requests.get(
            f"https://api.coldsend.io/api/public/v1/domains/{domain_id}/redirect",
            headers={"X-API-Key": "your-api-key"}
        )
        print(response.json())
        ```
      operationId: get_domain_redirect_api_public_v1_domains__domain_id__redirect_get
      parameters:
        - name: domain_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Domain Id
      responses:
        '200':
          description: Redirect retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DomainRedirectResponse'
        '401':
          description: Missing or invalid API key
        '403':
          description: Insufficient permissions - requires 'domains:read' scope
        '404':
          description: Domain or redirect not found
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    DomainRedirectResponse:
      properties:
        redirect_id:
          type: string
          title: Redirect Id
          description: Redirect record ID
        source_domain:
          type: string
          title: Source Domain
          description: Domain being redirected (this domain)
        target_domain:
          type: string
          title: Target Domain
          description: Destination domain
        status_code:
          type: integer
          title: Status Code
          description: HTTP redirect status code
        preserve_path:
          type: boolean
          title: Preserve Path
          description: Path is preserved in redirect
        preserve_query_string:
          type: boolean
          title: Preserve Query String
          description: Query string is preserved in redirect
        is_active:
          type: boolean
          title: Is Active
          description: Whether the redirect rule is active
        setup_completed:
          type: boolean
          title: Setup Completed
          description: Whether Cloudflare setup completed
        created_at:
          type: string
          title: Created At
          description: Creation timestamp (ISO 8601)
      type: object
      required:
        - redirect_id
        - source_domain
        - target_domain
        - status_code
        - preserve_path
        - preserve_query_string
        - is_active
        - setup_completed
        - created_at
      title: DomainRedirectResponse
      description: Response for domain redirect operations.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: API key with format cs_live_xxx

````