Skip to content

Redirects

This entity records all user interactions with shortened links, collecting information about the user's system, the time of the redirect, and other relevant data.

Base requirements

  • Auth: NO

CREATE

  • Method: POST
  • Url: /api/v1/redirects
nametypedata typedescription
osrequiredstringclient os
devicerequiredstringclient device
iprequiredstringclient IpV4
userKeyrequiredUUIDunique client ID (generated on client)
domainrequiredstringdomain address
subdomainstring?subdomain address
pathrequiredstringurl path

Validation

  • os
    • len: [2, 16]
  • device
    • only: Mobile Desktop
  • domain
    • len: [5, 32]
    • regex: ^[a-z0-9]+[.:][a-z0-9]{2,}$
  • subdomain
    • len: [2, 16]
    • regex: ^[a-zA-Z]{2,16}$
  • path
    • len: [2, 16]

Example

json
{
  "os": "windows",
  "device": "Mobile",
  "ip": "127.0.0.1",
  "userKey": "41c6e485-b373-4723-a31e-3ee767367fbd",
  "domain": "sh0.su",
  "subdomain": "test",
  "path": "fcaz6p"
}

Errors

GET

  • Method: GET
  • Url: /api/v1/redirects/link?{domain}=&{path}=&{subdomain}=
nametypedata typedescription
domainrequiredstringdomain address
subdomainstring?subdomain address
pathrequiredstringurl path

Validation

  • domain
    • len: [5, 32]
    • regex: ^[a-z0-9]+[.:][a-z0-9]{2,}$
  • subdomain
    • len: [2, 16]
    • regex: ^[a-zA-Z]{2,16}$
  • path
    • len: [2, 16]

Example

http
GET /api/v1/redirects/link?domain=sh0.su&path=ml6v1s
json
{
  "uid": "41c6e485-b373-4723-a31e-3ee767367fbd",
  "password": null,
  "urls": [
    "https://www.youtube.com/",
    "https://vk.com/"
  ]
}

Errors