# Whitelisting redirected URLs

In order for redirection to work, it's necessary to whitelist the URL to be redirected.

To do that, you have to add your URL into this PATCH:

| **curl -X PATCH "<https://sec-id-api.securitize.io/v1/{domainID}>" -H "accept: application/json" -H "Authorization: {secret}" -H "Content-Type: application/json" -d "{body}"**&#x50; |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |

| Parameter     | Description                                       |
| ------------- | ------------------------------------------------- |
| {domainID}    | Your application client id provided by Securitize |
| Authorization | Your application secret provided by Securitize    |
| body          | looks like below                                  |

```javascript
{
"appIcon": "Icon url",
"appName": "The Name of your App or [yourdomain]",
"redirectUrls": [
"https://[yourdomain]/*"
}
```

### Example

{% tabs %}
{% tab title="Curl" %}

```
curl -X PATCH "https://sec-id-api.securitize.io/v1/{domainID}" -H "accept: application/json" -H "Authorization: {secret}" -H "Content-Type: application/json" -d "{body}"
```

where the body looks like below:

```
{
"appIcon": "Icon url",
"appName": "The Name of your App or [yourdomain]",
"redirectUrls": [
"https://[yourdomain]/*"
}
```

{% endtab %}

{% tab title="Python" %}
Python snippet to Whitelist a specific domain ***\[yourdomain]***

```python
serviceUrl = 'https://sec-id-api.sandbox.securitize.io/v1/'
ClientID   ="STRING"
Secret     ="STRING"

body = {'appIcon':'TheIcon',
       'appName':'TheAppName',
       'redirectUrls':['yourdomain']}

response = requests.patch(
   serviceUrl + ClientID ,
   headers={'Authorization': Secret},
   data= body
)

print(response.headers)

if (response.status_code == 200):
 print("Correctly updated")
else:
 print('Error: ', response.content)
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://sec-connect-api-docs.securitize.io/whitelisting/whitelisting-redirected-urls.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
