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.

POST ping

curl --location 'https://myapi.rest/ping' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <API_KEY>'

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:

{
      "error": "Details of error here"
}

URL Shortener API #

Create and manage short links with branded domains and analytics.

POST shorturl

curl --location 'https://myapi.rest/shorturl' \
		--header 'Content-Type: application/json' \
		--header 'Authorization: Bearer <API_KEY>' \
		--data '{
		  "long_url":"https://example.com/your/very/long/link",
		  "expiry_date":"2025-02-14 16:45:00",
		  "domain":"go.example.com",             // optional
		  "campaign_name":"spring-campaign"      // optional
		}'

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 #