---
title: "Update domain redirect URLs"
method: PUT
path: "/api/v1/domains/redirect-urls"
tags: ["Domains"]
---

# Update domain redirect URLs

`PUT /api/v1/domains/redirect-urls`

## Request

- Base URL: `https://api.aerosend.io`
- URL: `https://api.aerosend.io/api/v1/domains/redirect-urls`
- Auth: API key in header `X-API-Key`

Updates redirect URLs for one or more domains. This endpoint allows you to efficiently update
redirect URLs for multiple domains in a single request.

## Redirect URL Validation
- Redirect URLs are validated according to RFC standards (same validation as domain names)
- Protocol (http://, https://) and trailing slashes are automatically removed
- Redirect URLs are normalized to lowercase
- Each redirect URL must be a valid domain format (e.g., `mysite.com`, `example.co.in`)

## Behavior
- You can update redirect URLs for one or multiple domains in a single request
- All domain IDs must exist and belong to the authenticated client
- Duplicate domain IDs in the request are rejected
- All redirect URLs are validated before any updates are performed (atomic operation)

## Use Cases
- **Single domain**: Update redirect URL for one domain
- **Multiple domains**: Efficiently update redirect URLs for multiple domains at once
- **Bulk operations**: Update redirect URLs for up to 100 domains per request

## Request body

- UpdateDomainRedirectUrlsRequest: Request to update redirect URLs for multiple domains
  - `domains` UpdateDomainRedirectUrlItem[], required: List of domains with their redirect URLs to update
    - `domain_id` integer, required: Domain ID
    - `redirect_url` string, required: Redirect URL for the domain. Must be a valid domain format (e.g., mysite.com). Protocol and trailing slashes are automatically removed.

## Response `204`

Redirect URLs updated successfully

## Other responses

- `400`: Invalid request - validation error, invalid redirect URL format, or domain not found
- `401`: Unauthorized - Invalid or expired API key
- `429`: Rate limit exceeded

---

[API](https://skmtc.dev/aerosend/apis/aerosend-developer-api.md) · [All operations](https://skmtc.dev/aerosend/apis/aerosend-developer-api/llms.txt) · [OpenAPI document](https://skmtc.dev/aerosend/apis/aerosend-developer-api/revisions/9828eeb89b1f?raw)
