SDKs and client libraries

Official client libraries make it easier to integrate the Rebrandly API without writing HTTP boilerplate.

Python SDK

Install the official Python SDK from PyPI:

pip install rebrandly-official

Basic usage

from rebrandly_official.rebrandly_client import RebrandlyClient

client = RebrandlyClient('YOUR_API_KEY')

# Create a short link
new_link = client.links.create('https://www.brandyour.link')

# Get a link
link = client.links.get('LINK_ID')

# Delete a link
client.links.delete('LINK_ID')

For the full SDK reference — all methods, parameters, and return values — see the Python SDK documentation.

Source


Node.js / JavaScript

No official npm package is currently available for Node.js.

Node.js is the dominant runtime for API integrations. An npm package is in progress. Until then, use the REST API directly.

REST API example (Node.js)

Node.js version: This example uses the global fetch API, available natively from Node.js 18+. For older versions, install node-fetch and import it at the top of your file: import fetch from 'node-fetch'.

const REBRANDLY_API = "https://api.rebrandly.com";

async function createLink(destination, title) {
  const response = await fetch(`${REBRANDLY_API}/v1/links`, {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
      "apikey": process.env.REBRANDLY_API_KEY
    },
    body: JSON.stringify({ destination, title })
  });

  if (!response.ok) {
    throw new Error(`API error: ${response.status}`);
  }

  return response.json();
}

When the npm package ships, it will include TypeScript types, native fetch support, and automatic retry with exponential backoff.


Other languages

Multi-language code examples for core operations are available on the API custom URL shortener page.

The Rebrandly API follows REST conventions and can be called from any language that can make HTTPS requests. An OpenAPI 3.0 spec is available at /openapi for generating client libraries in any language.


MCP server

The Rebrandly MCP server enables AI coding tools (Claude Code, Cursor, and others) to manage links programmatically. See MCP server documentation.