myapi.rest myapi.rest

myapi.rest – Developer Documentation

Build fast with four unified APIs: URL Shortener QR Codes Barcodes Image Hosting. One key. Shared analytics.

Getting started #

  1. Sign up here.
  2. Create an API key in your dashboard.
  3. Use the Ping API to test your setup.

Ping API #

Check authentication and service availability. Returns status, service name, and current server time.

GET ping

curl --location 'https://api.myapi.rest/api/ping' \
	--header 'Authorization: Bearer <API_KEY>' \
	--data ''

200 OK Response


{
  "status": "ok",
  "service": "myapi.rest",
  "time": "2025-09-22T14:45:03Z"
}

Errors #

We use standard HTTP status codes. Error payloads are 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"
}

URL Shortener API #

Create and manage short links with branded domains and analytics.

POST shorturl

curl --location 'https://myapi.rest/api/shorturl/generate' \
	--header 'Content-Type: application/json' \
	--header 'Authorization: Bearer <API_KEY>' \
	--data '{
	"long_url":"https://www.google.com/",
	"base_url":"https://grc.pw/",
	"expires_at":"2026-10-14 16:45:00"
}'

200 OK Response


{
	"shorturl": "https://grc.pw/Z7hye8b"
}

QR Code API #

Generate PNG or SVG QR codes.

POST qrcode

curl --location 'https://myapi.rest/qrcode' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <API_KEY>' \
--data '{
    "url":"https://example.com/landingpage",
    "type":"png",
    "logo_url":"https://example.com/assets/logo.png",      // optional
    "campaign_name":"spring-campaign"                      // optional
}'

200 OK Response


{
	"qrcode": "<BASE_64_DATA>"
}

Barcode API #

Generate barcodes suitable for print and packaging.

POST barcode

curl --location 'https://myapi.rest/barcode' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <API_KEY>' \
--data '{
	"data":"1234567",
	"format":"UPC_E",
	"width":200,
	"height":50,
	"margin":0,
	"campaign_name":"spring-campaign"      // optional
}'

200 OK Response

{
	"barcode": "<BASE_64_DATA>"
}

Image Upload API #

Upload an image as Base64 and receive a hosted URL in return.

POST image

curl --location 'https://myapi.rest/image' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <API_KEY>' \
--data '{
    "imagedata":"<BASE_64_DATA>",
    "imagename":"filename.jpg"
}'

200 OK Response

{
  "imageurl": "https://myapi.rest/image?wlBG0EIbG0"
}

Support & SLAs #