Viso.li

Create a Link

POSThttps://viso.li/api/link/create

Creates a short link from a destination URL. The response is the public URL you can share, plus the optional custom domain and alias.

Omit domain to use viso.li. Custom slugs require a verified custom domain.

Send Authorization: Bearer sk_api_your_api_key on every request. See authentication.

Request body

Send a JSON object. Extra keys are ignored by this endpoint.

Fields for creating a link

FieldTypeDescription
urlstringRequired. Destination URL to shorten. Must use http or https. Max 500 characters.
expiredAtstringOptional ISO 8601 date when the link should stop redirecting.
domainstringOptional custom hostname you have verified in Settings. Example: go.example.com.
aliasstringOptional custom back-half, 3–64 characters. Letters, numbers, hyphens, and underscores only. Requires domain.

Example request

This creates a viso.li short link that expires at the end of 2025.

1curl -X POST https://viso.li/api/link/create \
2 -H "Authorization: Bearer sk_api_your_api_key" \
3 -H "Content-Type: application/json" \
4 -d '{
5 "url": "https://mycoolwebsite.com/my-very-long-url",
6 "expiredAt": "2025-12-31T23:59:59.000Z"
7}'

Success response

Returns 201 Created. url is the full short URL.

response.json
1{
2 "url": "https://viso.li/abc123",
3 "domain": null,
4 "alias": null
5}

Response fields

FieldTypeDescription
urlstringFull public short URL.
domainstring | nullCustom hostname, or null for viso.li.
aliasstring | nullCustom back-half when one was set.

Errors

StatusErrorDescription
400Bad RequestInvalid URL, domain, or alias. Custom slugs need a verified domain.
401UnauthorizedMissing, malformed, or invalid Bearer token.
409ConflictThat alias is already taken on the chosen domain.
429Too Many RequestsMore than 10 requests per minute or 50 requests per day.
500Internal Server ErrorUnexpected server error. Retry the request.