URLR API Reference (1.4)
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
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 |
password required | string Password |
Responses
Request samples
- Payload
{- "username": "string",
- "password": "string"
}
Response samples
- 200
- 401
{- "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
- Payload
{- "refresh_token": "string"
}
Response samples
- 200
- 401
{- "token": "string",
- "refresh_token": "string"
}
Get a link
Authorizations:
path Parameters
link_id required | string <uuid> Example: ffefc6c4-d970-4373-a867-2a69c8be2c89 Link API ID |
Responses
Response samples
- 200
- 401
- 404
- 422
{- "id": "436b5d20-e174-4363-94e5-2b3dd4e74b5f",
- "url": "string",
- "team_id": "810007d0-bec5-486c-b5d1-28fcd8a079ba",
- "folder_id": "7695bac3-9397-4ec2-9335-45a2a16f1901",
- "domain": "urlr.me",
- "code": "xxxxx",
- "label": "string",
- "qrcode": {
- "data": "string"
}, - "utm": {
- "campaign": "string",
- "medium": "string",
- "source": "string",
- "content": "string"
}, - "metatag": {
- "title": "string",
- "description": "string",
- "image": "string"
}, - "geolinks": [
- {
- "type": "string",
- "value": "string",
- "url": "string"
}
], - "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z",
- "expired_at": "2019-08-24T14:15:22Z",
- "expired_url": "string"
}
Create a link
Authorizations:
Request Body schema: application/json
Info of the link to create
url required | string URL to shorten |
team_id required | string <uuid> Team API ID |
folder_id | string <uuid> Folder API ID |
domain | string <hostname> Domain |
code | string^[a-zA-Z0-9!-]{2,50}$ Custom short code |
label | string Label |
password | string Password |
object QR Code | |
object UTM parameters | |
object Custom metadata for social previews | |
expired_at | string <date-time> Expiration date |
expired_url | string <url> Expiration URL |
Responses
Request samples
- Payload
{- "url": "string",
- "team_id": "810007d0-bec5-486c-b5d1-28fcd8a079ba",
- "folder_id": "7695bac3-9397-4ec2-9335-45a2a16f1901",
- "domain": "mybrand.com",
- "code": "xxxxx",
- "label": "string",
- "password": "string",
- "qrcode": {
- "size": 600,
- "format": "png",
- "margin": 0,
- "background_color": "#ffffff",
- "foreground_color": "#000000"
}, - "utm": {
- "campaign": "string",
- "medium": "string",
- "source": "string",
- "content": "string"
}, - "metatag": {
- "title": "string",
- "description": "string",
- "image": "string"
}, - "expired_at": "2019-08-24T14:15:22Z",
- "expired_url": "string"
}
Response samples
- 201
- 401
- 422
- 429
- 500
{- "id": "436b5d20-e174-4363-94e5-2b3dd4e74b5f",
- "url": "string",
- "team_id": "810007d0-bec5-486c-b5d1-28fcd8a079ba",
- "folder_id": "7695bac3-9397-4ec2-9335-45a2a16f1901",
- "domain": "urlr.me",
- "code": "xxxxx",
- "label": "string",
- "qrcode": {
- "data": "string"
}, - "utm": {
- "campaign": "string",
- "medium": "string",
- "source": "string",
- "content": "string"
}, - "metatag": {
- "title": "string",
- "description": "string",
- "image": "string"
}, - "geolinks": [
- {
- "type": "string",
- "value": "string",
- "url": "string"
}
], - "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z",
- "expired_at": "2019-08-24T14:15:22Z",
- "expired_url": "string"
}
Create a QR Code
Authorizations:
Request Body schema: application/json
Info of the QR Code to create
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
- Payload
{- "link_id": "02a2c2f0-9521-47cc-9615-2e177adeebac",
- "size": 600,
- "format": "png",
- "margin": 0,
- "background_color": "#ffffff",
- "foreground_color": "#000000"
}
Response samples
- 401
- 422
- 429
- 500
{- "type": "string",
- "title": "string",
- "status": 401,
- "detail": "string"
}
Get statistics of a link
Authorizations:
Request Body schema: application/json
Infos to provide to get statistics of a link
link_id required | 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
- Payload
{- "link_id": "02a2c2f0-9521-47cc-9615-2e177adeebac",
- "from": "2019-08-24T14:15:22Z",
- "to": "2019-08-24T14:15:22Z",
- "include_bots": false
}
Response samples
- 200
- 401
- 404
- 422
{- "link_id": "02a2c2f0-9521-47cc-9615-2e177adeebac",
- "clicks": 32,
- "unique_clicks": 51
}
Get folders of team
Authorizations:
path Parameters
team_id required | string <uuid> Example: ffefc6c4-d970-4373-a867-2a69c8be2c89 Team API ID |
Responses
Response samples
- 200
- 401
- 404
- 422
{- "folders": [
- {
- "id": "436b5d20-e174-4363-94e5-2b3dd4e74b5f",
- "name": "folder-campaign-google-ads"
}
]
}