# How to create short links with prefixes

Copy for LLM[View as Markdown](</articles/api-reference/Technical questions/how-to-create-short-links-with-prefixes.md>)

**Short.io** allows you to create via the API functionalities short links with **prefixes** (or **static values**) in the following format:

**`<Your-domain>` / `<Static-value>` / `<Slug>`**

**For example**, *mydomain.io/XmasCampaign/SomeShortLink.*

To effectively accomplish the task, follow the detailed instructions below.

Before you begin, make sure \[you have created an API key]\(/articles/api-reference/Technical questions/how-to-use-the-short.io-api#h\_69a635db5a).

## To create folder and prefix[​](#to-create-folder-and-prefix "Direct link to To create folder and prefix")

1. Open the following [Short.io API page](https://developers.short.io/reference/post_links-folders).

2. In the **Body params** panel provide the information:

   * **domainId** - the unique identifier of your domain (*you can retrieve it as described \[here]\(/articles/api-reference/Technical questions/how-to-retrieve-domain-link-and-folder-identifiers-from-the-short.io-urls-and-api)* )

   * **name** - a folder name

   * **prefix** - a static value

   ![API body params with domainId, folder name, and prefix fields highlighted](/assets/images/api-and-technical-questions-how-to-create-short-links-with-prefixes-screenshotfrom2024-11-2911-25-40-73f886cf-cdb5d11f36c27c31ba92de505c1c4220.png)

3. Navigate to the **Credentials** section and enter your authorization key:

   ![Credentials section with API key header and Try It button highlighted](/assets/images/api-and-technical-questions-how-to-create-short-links-with-prefixes-screenshotfrom2024-11-2911-29-12-bbdf64b8-309c7fa558582eec33914950048733eb.png)

4. Click on **Try it!**.

5. In the **Response** panel you can review the result:

   ![API 201 response with folder id, DomainId, name, and prefix values](/assets/images/api-and-technical-questions-how-to-create-short-links-with-prefixes-screenshotfrom2024-11-2911-30-52-3e04c161-40ce3bbb164748d92708e5e1cb1a3a3c.png)

6. Copy the folder **id** from the response.

## To create a new short link within the folder[​](#to-create-a-new-short-link-within-the-folder "Direct link to To create a new short link within the folder")

1. Open the following [Short.io API page](https://developers.short.io/reference/post_links).

2. In the **Body params** panel provide the information:

   * **originalURL** - the long link to be shortened

   * **domain** - the name of your domain

   * **folderId** - the folder identifier which you copied from the previous response

   ![Create a new link API endpoint description and method details](/assets/images/api-and-technical-questions-how-to-create-short-links-with-prefixes-screenshotfrom2024-11-2913-30-24-dcd167c5-b874db4d9f458b1850443ee4c77af82a.png)

   ![Body params with originalURL field filled in](/assets/images/api-and-technical-questions-how-to-create-short-links-with-prefixes-screenshotfrom2024-11-2911-35-47-0f1b6699-7e7e667d8b5f839868e0a039270e31d9.png)

   ![Body params with domain hostname and folderId fields filled in](/assets/images/api-and-technical-questions-how-to-create-short-links-with-prefixes-screenshotfrom2024-11-2911-36-55-33a98880-ed1efe45104c7b7b275273628127536f.png)

3. Navigate to the **Credentials** section and enter your authorization key:

   ![Credentials section with API key header and Try It button highlighted](/assets/images/api-and-technical-questions-how-to-create-short-links-with-prefixes-screenshotfrom2024-11-2911-37-36-bf8dd90b-db90664af1e39f29b28b8c67d873a249.png)

4. Click on **Try it!**.

5. In the **Response** panel you can review the result:

   ![API 200 response with short link path containing XmasCampaign prefix](/assets/images/api-and-technical-questions-how-to-create-short-links-with-prefixes-screenshotfrom2024-11-2911-38-26-7a38ae4c-e0b568ec5ffa6c77771ab7020b82d7b7.png)

6. Sign in to your [Short.io account](https://short.io/).

7. From the **Branded links** menu you can review the newly created link with the prefix within the folder:

![Short.io dashboard showing new link with XmasCampaign prefix in Archives folder](/assets/images/api-and-technical-questions-how-to-create-short-links-with-prefixes-screenshotfrom2024-11-2914-36-19-6cf00ba1-c4dbedd09b3ee6d1ccd2d75a1ec02c9c.png)
