---
title: "Create dynamic endpoint redirection"
method: POST
path: "/v1/endpoint-redirections"
tags: ["Endpoint Redirections"]
---

# Create dynamic endpoint redirection

`POST /v1/endpoint-redirections`

Initiates a dynamic endpoint redirection from a source database to a target database. Returns a redirection ID that can be used to poll the status. This is available in private preview.

## Request body

- CreateEndpointsRedirectionRequest — Dynamic endpoint redirection request
  - `sourceDatabaseId` integer, required — ID of the source database to redirect the endpoint from.
  - `targetDatabaseId` integer, required — ID of the target database to redirect the endpoint to.
  - `endpointTargetType` 'public' | 'private', required — Type of endpoint to redirect.
  - `duplicateACLs` boolean — Whether to duplicate the source database ACLs to the target database.
  - `migrationProtection` boolean, required — Must be explicitly set to true to start the migration. This is a protective measure to avoid accidental migrations.

## Response `200`

OK

- EndpointsRedirectionResponse — Dynamic endpoint redirection status response message
  - `redirectionId` string, uuid — Unique identifier of the dynamic endpoint redirection. Use it to poll the redirection status.
  - `status` 'initiated' | 'pending' | 'in-progress' | 'completed' | 'failed' | 'reverted' — Current status of the dynamic endpoint redirection.
  - `sourceDatabaseId` integer — ID of the source database the endpoint is redirected from.
  - `targetDatabaseId` integer — ID of the target database the endpoint is redirected to.
  - `isRevert` boolean — Whether this redirection reverts a previously completed redirection.
  - `duplicateACLs` boolean — Whether the source database ACLs were duplicated to the target database.
  - `startedAt` string, date-time — Timestamp when the redirection started.
  - `completedAt` string, date-time — Timestamp when the redirection completed.
  - `revertedAt` string, date-time — Timestamp when the redirection was reverted, if applicable.
  - `errorMessage` string — Error message describing why the redirection failed, if applicable.
  - `endpoints` EndpointRedirectionDTO[] — Details of the individual endpoint redirections performed.
    - `sourceEndpointName` string — Name of the source endpoint.
    - `targetEndpointName` string — Name of the target endpoint.
    - `sourceEndpointType` 'public' | 'private' — Type of the source endpoint.
    - `targetEndpointType` 'public' | 'private' — Type of the target endpoint.
    - `errorMessage` string — Error message describing why this endpoint redirection failed, if applicable.

## Other responses

- `400` — Bad Request - The server cannot process the request due to something that is perceived to be a client error
- `401` — Unauthorized - Authentication failed for requested resource
- `403` — Forbidden - Not allowed to create requested resource (primarily due to not active resource)
- `404` — Not Found - The resource you were trying to reach was not found or does not exist
- `408` — Request Timeout - The server didn't receive a complete request message within the server's allotted timeout period
- `409` — Conflict - request could not be processed because of a conflict (primarily due to another resource that exist with the new name
- `412` — Precondition Failed - Feature flag for this flow is off
- `422` — Unprocessable Entity - The server understands the request, and the syntax of the request is correct, but it was unable to process the contained instructions
- `429` — Too Many Requests - Too many resources are concurrently created / updated / deleted in the account. Please re-submit API requests after resource changes are completed)
- `500` — Internal system error - If this error persists, please contact customer support
- `503` — Service Unavailable - Server is temporarily unable to handle the request, please try again later. If this error persists, please contact customer support

---

[API](https://skmtc.net/redis/apis/redis-cloud-api.md) · [All operations](https://skmtc.net/redis/apis/redis-cloud-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/redis/redis-cloud-api/versions/01eef7f3c69f/schema)
