---
url: "https://vueda.dev/v3/reference/api/js/utils/urls/functions/setCustomUrl.md"
title: "setCustomUrl"
---

# setCustomUrl

## Overview

Sets a custom URL for a key.

## Signature

`setCustomUrl(key, url)`

### Parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| <span id="param-key">key</span> | `string` | yes | the key code uses to look up the URL |
| <span id="param-url">url</span> | `string` | yes | the routing part of the url, between the hostname and the desired viewset/view |

### Returns

`void`

## Examples

```js
setCustomUrl('modelList', '/api/v2/:app/:model/');
```

## Source

`client/lib/utils/urls.js:54`
