> ## 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 an app's redirect URI allowlist.

Replaces the app's whole redirect URI allowlist for the hosted OIDC flow. To read the list, use [Get Redirect URIs](https://docs.hopae.com/v2/api-reference/workspace/get-redirect-uris.md).

This is a configuration write. On a production app it updates Live immediately and is kept in Version History. On a sandbox app it overwrites the configuration.

## Headers

**Authorization** `string` *required*

`Bearer sk_workspace_...`, a Workspace API key of the organization that owns the app. See [Workspace API](https://docs.hopae.com/v2/api-reference/workspace/introduction.md).

**Content-Type** `string` *required* (default: application/json)

Must be `application/json`.

## Path Parameters

**appId** `string` *required*

The app ID returned by Create App or List Apps.

## Request Body

**redirectUris** `string[]` *required*

The complete allowlist. It replaces every URI saved before. Each entry must be a string. Custom URI schemes such as `myapp://callback` are accepted, and the URL format is not checked. Send `[]` to remove every redirect URI.

## Response

`204 No Content`, with no response body.

## Errors

Besides the authentication and subscription errors that every route can return (see [Workspace API](https://docs.hopae.com/v2/api-reference/workspace/introduction.md#authentication-and-base-url)), this endpoint returns:

| HTTP | Code | When |
| :- | :- | :- |
| 400 | `VALIDATION_INVALID_PARAMETER` | `redirectUris` is missing or not an array, or an entry is not a string |
| 403 | `AUTH_FORBIDDEN` | The app belongs to another organization |
| 404 | `RESOURCE_NOT_FOUND` | Unknown app, or the app was deleted |

```bash cURL theme={null}
curl --request PUT \
  --url 'https://api.hopae.com/connect/v2/apps/{appId}/redirect-uris' \
  --header 'Authorization: Bearer sk_workspace_...' \
  --header 'Content-Type: application/json' \
  --data '{
    "redirectUris": [
      "https://app.example.com/callback",
      "myapp://callback"
    ]
  }'
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.