Aller au contenu principal

URLR API Reference (1.2)

Download OpenAPI specification:Download

API powering the features of URLR.

Note that in order to facilitate integration, we provide SDKs for various languages at https://github.com/URLR.

Key API principles:

  • All dates follow ISO-8601 format
  • Most errors follow RFC 9457 standard
  • All responses are delivered in English

Access Tokens

Get an access token

Request Body schema: application/json

You can use this endpoint to get an access token to access the API.

username
required
string

Email

password
required
string

Password

Responses

Request samples

Content type
application/json
{
  • "username": "string",
  • "password": "string"
}

Response samples

Content type
application/json
{
  • "token": "string",
  • "refresh_token": "string"
}

Refresh an access token

Request Body schema: application/json

You can use this endpoint to refresh your access token without credentials.

refresh_token
required
string

Refresh token

Responses

Request samples

Content type
application/json
{
  • "refresh_token": "string"
}

Response samples

Content type
application/json
{
  • "token": "string",
  • "refresh_token": "string"
}

QR Codes

Create a QR Code

Authorizations:
bearerAuth
Request Body schema: application/json

Info of the QR Code to create

One of
url
required
string <url>

URL of the QR Code

team_id
required
string <uuid>

Team API ID

size
integer [ 100 .. 1000 ]
Default: 600

The size of the QR code (px)

format
string
Default: "png"
Enum: "png" "webp" "svg"

The format of the QR code

margin
integer
Default: 0

The margin around the QR code (px)

background_color
string
Default: "#ffffff"

The background color of the QR code (hexadecimal)

foreground_color
string
Default: "#000000"

The foreground color of the QR code (hexadecimal)

Responses

Request samples

Content type
application/json
{
  • "link_id": "02a2c2f0-9521-47cc-9615-2e177adeebac",
  • "size": 600,
  • "format": "png",
  • "margin": 0,
  • "background_color": "#ffffff",
  • "foreground_color": "#000000"
}

Response samples

Content type
application/problem+json
{
  • "type": "string",
  • "title": "string",
  • "status": 401,
  • "detail": "string"
}

Statistics

Get statistics of a link

Authorizations:
bearerAuth
Request Body schema: application/json

Infos to provide to get statistics of a link

link_id
string <uuid>

Link API ID

from
string <date-time>

Get statistics from this date

to
string <date-time>

Get statistics until this date

include_bots
boolean
Default: false

Whether include bots or not in statistics

Responses

Request samples

Content type
application/json
{
  • "link_id": "02a2c2f0-9521-47cc-9615-2e177adeebac",
  • "from": "2019-08-24T14:15:22Z",
  • "to": "2019-08-24T14:15:22Z",
  • "include_bots": false
}

Response samples

Content type
application/json
{
  • "link_id": "02a2c2f0-9521-47cc-9615-2e177adeebac",
  • "clicks": 32,
  • "unique_clicks": 51
}

Teams

Get teams of user

Authorizations:
bearerAuth

Responses

Response samples

Content type
application/json
{
  • "teams": [
    ]
}

Folders

Get folders of team

Authorizations:
bearerAuth
path Parameters
team_id
required
string <uuid>
Example: ffefc6c4-d970-4373-a867-2a69c8be2c89

Team API ID

Responses

Response samples

Content type
application/json
{
  • "folders": [
    ]
}