myapi.rest – Developer Documentation
Getting started #
- Sign up here.
- Create an API key in your dashboard.
- Use the Ping API to test your setup.
Ping API # (GET)
curl --location 'https://api.myapi.rest/api/ping' \
--header 'Authorization: Bearer <API_KEY>' \
--data ''
200 OK Response
{
"status": "ok",
"serverTimeUtc": "2025-11-24T09:12:42.4264558Z"
}
URL Shortener API # (POST)
curl --location 'https://api.myapi.rest/api/shorturl/generate' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <API_KEY>' \
--data '{
"long_url": "https://jenturner.studio",
"expires_at": "2026-11-15T10:01:57.102Z"
}'
200 OK Response
{
"shorturl": "https://grc.pw/Z7hye8b"
}
Click Event Webhook Payload
{
"occurredAt": "2025-12-01 06:11:08",
"id": "18",
"code": "KJPwJbu",
"domain": "grc.pw",
"ip": "105.245.231.156",
"user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/142.0.0.0 Safari/537.36",
"referer": "",
"accept_language": "en-ZA,en-GB;q=0.9,en-US;q=0.8,en;q=0.7"
}
QR Code API # (POST)
curl --location 'https://api.myapi.rest/api/qrcode/generate' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <API_KEY>' \
--data '{
"data": "https://marquis.it.com",
"output_format": "PNG",
"pixels_per_module": 20,
"margin": 0,
"ecc_level": "H",
"dark_color_hex": "#000000",
"light_color_hex": "#FFFFFF",
"draw_quiet_zones": true,
"image_base64": "",
"logo_size_percent": 20
}'
200 OK Response
{
"id": 5,
"qrcode": "<BASE_64_DATA>"
}
Barcode API # (POST)
curl --location 'https://api.myapi.rest/api/barcode/generate' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <API_KEY>' \
--data '{
"data": "DEC25-45PC",
"barcode_format": "code_128",
"output_format": "SVG",
"width": 200,
"height": 50,
"margin": 0
}'
200 OK Response
{
"id": 5,
"barcode": "<BASE_64_DATA>"
}
Image Upload API # (POST)
curl --location 'https://api.myapi.rest/api/image/upload' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <API_KEY>' \
--data '{
"file_base64": "<BASE_64_DATA>",
"file_name": "logo.png"
}'
200 OK Response
{
"id": "11",
"url": "https://myapi.rest/images/11/29086085d6124aeabb7629c013563d3f.png",
"size": 1592,
"content_type": "image/png",
"ms": 67
}
Errors #
We use standard HTTP status codes. Sample JSON:
{
"type": "https://tools.ietf.org/html/rfc9110#section-15.6.1",
"title": "API Key validation error",
"status": 500,
"detail": "The API key provided could not be validated",
"instance": "/api/ping"
}