API & Webhooks

Build powerful integrations with our comprehensive REST API. Automate workflows with real-time webhooks and connect to your existing tools.

API & Webhooks Dashboard

Built for developers

A developer-first API designed for reliability, performance, and ease of use.

RESTful API

Clean, predictable REST API with comprehensive endpoints for all platform features.

Webhooks

Real-time event notifications. Get notified when links are clicked, created, or modified.

API Keys

Secure API key management with scoped permissions and rotation support.

Rate Limits

Generous rate limits with burst allowances. Scale to millions of requests.

OAuth 2.0

Full OAuth 2.0 support for secure third-party integrations and user authorization.

Documentation

Comprehensive docs with code examples in multiple languages and interactive API explorer.

Simple, powerful API

Get started in minutes with our intuitive API design.

Create a Link
// Create a short link
const response = await fetch('https://api.9to.io/v1/links', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer YOUR_API_KEY',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    url: 'https://example.com/my-long-url',
    slug: 'my-custom-slug',
    tags: ['marketing', 'q1-campaign']
  })
});

const link = await response.json();
console.log(link.short_url); // https://9to.in/my-custom-slug
Webhook Payload
// Webhook payload for click events
{
  "event": "link.clicked",
  "timestamp": "2024-01-15T10:30:00Z",
  "data": {
    "link_id": "lnk_abc123",
    "short_url": "https://9to.in/my-link",
    "click": {
      "ip": "192.168.1.1",
      "country": "US",
      "city": "San Francisco",
      "device": "mobile",
      "browser": "Chrome",
      "referrer": "https://twitter.com"
    }
  }
}
99.99%
API Uptime
<50ms
Avg Response Time
10K+
Active Integrations

Ready to get started?

Create your first link in seconds. No credit card required.

Start Free