Link shortener

Create a link

Create a short link with an automatically generated or custom code and retrieve its ID.

POSThttps://pqno.app/admin/api/encurtar-link/criarlink

Creates a short link for the destination provided in url. Use HTTP POST, send a JSON object, and include Content-Type: application/json.

Set the destination

url is required and accepts an HTTP or HTTPS URL up to 2,048 characters, including campaign parameters. If the protocol is omitted, pqno.app adds https://.

Use the optional titulo and descricao fields to identify the link in the dashboard. They accept up to 255 and 500 characters, respectively.

Omit codigo to generate a random code. For a custom code, send 3 to 50 characters using lowercase letters, numbers, hyphens, or underscores. The first and last characters must be a letter or number.

A code that is already in use or reserved by the site returns HTTP 409. Choose another code and retry.

Set access rules

Three optional fields control access to the destination. Each accepts null, which is the same as omitting it.

FieldDescription
expira_emA future date and time in ISO 8601 with a time zone, such as 2026-12-31T23:59:00-03:00. After that instant, the short URL returns HTTP 410 and does not open the destination.
max_cliquesAn integer from 1 to 1,000,000,000. When counted clicks reach the limit, the short URL returns HTTP 410. The count starts at zero and does not include bots or browser preloads.
senha4 to 64 characters. A page asks for the password before opening the destination, allowing up to 10 attempts every 15 minutes. The password is stored only as a hash and is never returned.

Tags

The optional etiquetas field takes a list of strings, such as ["campanha", "instagram"]. Each link accepts up to 10 tags of up to 30 characters each. Uppercase and lowercase count as the same tag. Duplicates are discarded. null is the same as omitting the field.

Tracking pixels

The optional pixels field accepts an object with IDs for meta, google, tiktok and linkedin. Browser visitors see a brief page that explains the tracking and loads the services before continuing to the destination. Bots, social media previews and HTTP clients requesting formats other than HTML receive a direct redirect.

ServiceID format
meta8 to 20 digits.
googleG-, AW- or GT- followed by 4 to 20 letters or digits, such as G-ABC123DEF4.
tiktok10 to 30 uppercase letters or digits.
linkedin4 to 12 digits.

Pixels require a Pro or Business plan and installation permission. Sending a pixel on another plan or with the option disabled returns HTTP 403. Passing null instead of an object is equivalent to omitting the field.

Creation result

HTTP 201 confirms creation. The dados object contains:

FieldDescription
idLink identifier used for retrieval and updates.
codigoCode that appears after the slash in the short URL.
url_curtaComplete short URL to share.
urlLink destination URL.
titulo / descricaoThe link title and description.
criado_emCreation timestamp, including the time zone offset.
criado_porObject containing the creator's ID and name.
expira_emExpiration instant with a time zone, or null when the link does not expire.
max_cliquesClick limit, or null when there is no limit.
cliques_contadosClicks counted toward the limit.
com_senhatrue when the link asks for a password.
etiquetasThe link's tags in alphabetical order.
pixelsObject with the IDs of configured services, or {} when empty.

Store id to retrieve, update, delete, or retrieve statistics for the link. With a company token, criado_por identifies the administrator who generated the token.

Each successful request creates a new link, even if the destination already exists. If the connection drops before you receive a response, search for the destination with busca in List links before resending the request.

Parameters

Header

Authorizationstringrequired
Send Bearer followed by your API token, for example Authorization: Bearer YOUR_TOKEN.
Content-Typestringrequired
Use application/json to send a JSON request body.

Body (JSON)

urlstringrequired
HTTP or HTTPS destination URL, up to 2,048 characters.
codigostring
Custom code of 3 to 50 characters. Use lowercase letters, numbers, hyphens, or underscores; start and end with a letter or number. If omitted, a random code is generated.
titulostring
Link title, up to 255 characters.
descricaostring
Link description, up to 500 characters.
expira_emstring
Expiration date and time in ISO 8601 with a time zone offset, such as 2026-12-31T23:59:00-03:00. After expiration, the short URL returns HTTP 410. Accepts null.
max_cliquesinteger
Limit of 1 to 1,000,000,000 clicks. Once the limit is reached, the short URL returns HTTP 410. Accepts null.
senhastring
Password of 4 to 64 characters, requested before opening the destination. It is never returned in the response. Accepts null.
etiquetasarray
Up to 10 strings of up to 30 characters each. Uppercase and lowercase count as the same tag. Accepts null.
pixelsobject
Object with the IDs of the meta, google, tiktok and linkedin services, each in the service format. Requires a Pro or Business plan and installation permission. Accepts null.