Skip to main content

Overview

ShortPen’s REST API exposes the same capabilities that power the dashboard. Use it to:
  • generate branded short links and QR codes from automations or backend jobs,
  • sync domains, folders, pixels, and workspaces into your internal tools, and
  • export click analytics for reporting, BI, or attribution.
All requests are scoped to the organization and workspace attached to your API key, and they inherit the same feature limits you configured in the product.

Base URL

https://api.shortpen.com

Authentication

1

Create an API key

In the app, open Settings → Organization → API Keys and click + Create API key. Give the key a name so you can identify it later.
2

Store the secret securely

Copy the generated value immediately—it is only shown once. Save it in your secrets manager, CI/CD vault, or password manager.
3

Send bearer tokens with every request

Include the key in the Authorization header using the Bearer scheme. Tokens inherit the plan limits and workspace visibility of the creator.

Make your first request

curl https://api.shortpen.com/v1/ping

Common headers

  • Authorization: Bearer <api-key>
  • Content-Type: application/json
  • Accept: application/json

Rate limits

  • Global API limit: 60 requests per minute per access token.
  • GET /v1/ping also enforces throttle, capping the endpoint at 30 requests per minute per IP.
  • Feature-specific quotas (for example monthly short links or QR codes) return HTTP 429 with a descriptive message once exhausted.

Response envelope

Every JSON endpoint responds with the same envelope:
{
  "success": true,
  "status_code": 200,
  "data": {},
  "message": ""
}
data varies per operation—see the endpoint pages below for full schemas. Errors return the same structure with success: false, status_code mirroring the HTTP status, and a human-readable message.

Next steps