API Documentation

Manage your links programmatically using API keys. Create, update, and delete links from your applications.

Authentication

All API requests require authentication using an API key. Include your API key in the request header:

bash
x-api-key: your-api-key-here

Note: You can generate API keys from the dashboard by selecting a link and navigating to the API Keys section.

Endpoints

POST/links

Create Link

Create a new link with a name and destination URL.

Request Body

{
  "name": "string",
  "destination": "string"
}

Example Request

bash
curl -X POST https://api.qrhopr.com/links \
  -H "Content-Type: application/json" \
  -H "x-api-key: your-api-key-here" \
  -d '{
    "name": "my-link",
    "destination": "https://example.com"
  }'

Example Response

json
{
  "id": "60d5ec49f1b2c72b8c8e4f3a",
  "name": "my-link",
  "destination": "https://example.com",
  "userId": "60d5ec49f1b2c72b8c8e4f3b",
  "createdAt": "2025-11-15T10:30:00.000Z",
  "updatedAt": "2025-11-15T10:30:00.000Z"
}
PATCH/links/:linkId

Update Link

Update the destination URL of an existing link.

Request Body

{
  "destination": "string"
}

Example Request

bash
curl -X PATCH https://api.qrhopr.com/links/60d5ec49f1b2c72b8c8e4f3a \
  -H "Content-Type: application/json" \
  -H "x-api-key: your-api-key-here" \
  -d '{
    "destination": "https://new-destination.com"
  }'

Example Response

json
{
  "id": "60d5ec49f1b2c72b8c8e4f3a",
  "name": "my-link",
  "destination": "https://new-destination.com",
  "userId": "60d5ec49f1b2c72b8c8e4f3b",
  "createdAt": "2025-11-15T10:30:00.000Z",
  "updatedAt": "2025-11-15T11:45:00.000Z"
}
DELETE/links/:linkId

Delete Link

Delete a link permanently. This action cannot be undone.

Example Request

bash
curl -X DELETE https://api.qrhopr.com/links/60d5ec49f1b2c72b8c8e4f3a \
  -H "x-api-key: your-api-key-here"

Example Response

json
{
  "message": "Link deleted successfully"
}

Base URL

All API requests should be made to:

text
https://api.qrhopr.com

Error Handling

The API returns standard HTTP status codes:

  • 200 - Success
  • 201 - Created
  • 400 - Bad Request (invalid parameters)
  • 401 - Unauthorized (invalid API key)
  • 404 - Not Found
  • 429 - Too Many Requests (rate limit exceeded)
  • 500 - Internal Server Error

Rate Limits

API key authentication allows for programmatic access to your links. Please use responsibly and avoid excessive requests.