Skip to main content
All CollectionsAPI and Technical Questions
How to create short links with prefixes
How to create short links with prefixes
T
Written by Tsvetana Dimitrova
Updated this week

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.

To create folder and prefix

  1. Open the following Short.io API page.

  2. In the Body params panel provide the information:

    • domainId - the unique identifier of your domain (you can retrieve it as described here )

    • name - a folder name

    • prefix - a static value

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

  4. Click on Try it!.

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

  6. Copy the folder id from the response.

To create a new short link within the folder

  1. Open the following Short.io API page.

  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

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

  4. Click on Try it!.

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

  6. Sign in to your Short.io account.

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

Did this answer your question?