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

# Replace Redirect URIs

> Replace the full redirect URI list for an app.

Replaces the entire redirect URI list for an app. Idempotent.

## Request

<ParamField header="Authorization" type="string" required>
  `Bearer <API_KEY>` from Console > Developers > Workspace API Keys.
</ParamField>

<ParamField header="Content-Type" type="string">
  `application/json`
</ParamField>

### Path parameters

<ParamField path="client_id" type="string" required>
  Client identifier of the app.
</ParamField>

### Request body

<ParamField body="redirectUris" type="string[]" required>
  Full replacement list of redirect URIs.
</ParamField>

## Response

Returns the stored redirect URIs.

<RequestExample>
  ```bash theme={null}
  curl -X PUT \
    -H "Authorization: Bearer sk_workspace_test_..." \
    -H "Content-Type: application/json" \
    -d '{"redirectUris":["https://app.example.com/callback","https://app.example.com/alt"]}' \
    "https://sandbox.api.hopae.com/connect/v1/apps/abc123/redirect-uris"
  ```
</RequestExample>

<ResponseExample>
  ```json theme={null}
  {
    "redirectUris": [
      "https://app.example.com/callback"
    ]
  }
  ```
</ResponseExample>

<Info>
  Validation: HTTPS required in production (HTTP only allowed for <code>localhost</code>), no fragments, length ≤ 2048, host required, duplicates removed, host lowercased, max 20 URIs.
</Info>
