OctoURL logoOctoURL

API & Developer Docs

Integrate OctoURL into any application using our RESTful API. Available on Pro, Business, and Enterprise plans.

Authentication

All API requests require an API key passed in the Authorization header.

Authorization: Bearer YOUR_API_KEY

Generate your API key in Dashboard → API Keys.

Endpoints

POST/api/v1/redirects

Create a new short link

Request Body

{
  "url": "https://example.com/long-url",
  "alias": "my-link",
  "label": "internal name for your reference",  // optional
  "expires_at": "2026-12-31"                    // optional
}

Response

{
  "id": "12345",
  "uuid": "550e8400-e29b-41d4-a716-446655440000",
  "short_url": "octourl.com/my-link",
  "full_url": "https://octourl.com/my-link",
  "label": "internal name for your reference",
  "alias": "my-link",
  "url": "https://example.com/long-url",
  "visits_count": 1024,
  "expires_at": "2026-02-24T10:00:00Z",
  "created_at": "2026-02-24T10:00:00Z",
  "updated_at": "2026-02-24T10:00:00Z",
}
GET/api/v1/redirects

Paginated list all your short links

Response


{
  "data": [
    {
      "id": 1,
      "uuid": "019ca153-e4e0-70c9-a92e-de2c5dc461c9",
      "short_url": "octourl.com/google",
      "full_url": "https://octourl.com/google",
      "label": "Google",
      "alias": "google",
      "url": "https://www.google.com",
      "visits_count": null,
      "expires_at": "2026-12-31 23:59:59",
      "created_at": "2026-02-27T22:59:15.000000Z",
      "updated_at": "2026-02-27T22:59:15.000000Z"
    },
    .........
  ],
  "links": {
    "first": "https://octourl.com/api/v1/redirects?p=1",
    "last": "https://octourl.com/api/v1/redirects?p=1",
    "prev": null,
    "next": null
  },
  "meta": {
    "current_page": 1,
    "from": 1,
    "last_page": 1,
    "links": [
      {
        "url": null,
        "label": "<",
        "page": null,
        "active": false
      },
      {
        "url": "https://octourl.com/api/v1/redirects?p=1",
        "label": "1",
        "page": 1,
        "active": true
      },
      {
        "url": null,
        "label": ">",
        "page": null,
        "active": false
      }
    ],
    "path": "https://octourl.com/api/v1/redirects",
    "per_page": 10,
    "to": 3,
    "total": 3
  }
}
GET/api/v1/redirects/:uuid/stats

Get analytics for a specific link

Response

{
  "clicks": 1024,
  "countries": [...],
  "browsers": [...],
  "devices": [...]
}
DELETE/api/v1/redirects/:uuid

Delete a short link

Response

{ "success": true }

Build anything on top of OctoURL

The OctoURL API gives developers full programmatic access to every feature available in the dashboard. Create short links, retrieve analytics, manage custom domains, and delete links, all from your own application using standard HTTP requests. The RESTful design means it works with any programming language, any framework, and any platform that can make HTTP calls.

Whether you are building an internal tool, a SaaS product, a mobile app, or automating your marketing workflows, the API removes every manual step between your system and shorter, cleaner links. With rate limits starting at 100 requests per minute on the Pro plan and scaling to unlimited on Enterprise, the API is designed to handle production workloads without bottlenecks.

All responses are returned as JSON and all dates are in ISO 8601 format. Authentication uses API key Bearer tokens, which you can generate and rotate from the dashboard at any time.

Who uses the OctoURL API?

  • SaaS platforms

    Embed link shortening directly into your product so users can create branded short links without leaving your app.

  • CMS and publishing workflows

    Automatically shorten article URLs when content is published, then pull click analytics back into your editorial dashboard.

  • Marketing automation tools

    Integrate with Zapier, Make, or your own workflow engine to create short links as part of automated campaign pipelines.

  • Mobile apps

    Let users share content via short links generated on the fly, with your custom domain, directly from within your mobile application.

Frequently Asked Questions

Which plans include API access?

API access is available on Pro (100 req/min), Business (500 req/min), and Enterprise (unlimited) plans. The Free plan does not include API access.

How do I authenticate API requests?

Include your API key in the Authorization header as a Bearer token: Authorization: Bearer YOUR_API_KEY. Generate and manage API keys from the API Keys section of your dashboard.

Can I use the API with my custom domain?

Yes. Pass the domain field in your POST /api/v1/links request to create short links on your own custom domain instead of the default octourl.com domain.

What happens if I exceed my rate limit?

If you exceed your plan's rate limit, the API returns a 429 Too Many Requests response with a Retry-After header indicating how long to wait before retrying. Upgrading your plan immediately increases your limit.

Is there an SDK or client library?

Official SDKs for Node.js, Python, and PHP are on our roadmap. In the meantime, the API is straightforward to use with any HTTP client like fetch, axios, requests, or Guzzle.

Ready to start building?

The API is available on Pro, Business, and Enterprise plans. Get your API key and start integrating custom domains and advanced analytics into your applications.

We use cookies to enhance your browsing experience and analyze our traffic.
By clicking "Accept All", you consent to our use of cookies. Learn more in our Cookie Policy