Skip to content

OpenAPI / Swagger

0.link provides an interactive OpenAPI specification and Swagger UI for exploring and testing the API.

Interactive API Explorer

The Swagger UI provides a visual interface to explore all API endpoints, view request/response schemas, and make test API calls directly from your browser.

OpenAPI Specification

The OpenAPI 3.0 specification is available in JSON format:

https://api.0.link/api-docs/openapi.json

Download the Spec

You can download the specification for use in your development tools:

bash
curl -o openapi.json https://api.0.link/api-docs/openapi.json

Using the Swagger UI

Authentication

To test authenticated endpoints in Swagger UI:

  1. Click the Authorize button (🔓) at the top right
  2. Enter your API key in the format: Bearer zlk_live_...
  3. Click Authorize
  4. All subsequent requests will include your API key

WARNING

Use a development or test API key when exploring the API via Swagger UI. Avoid using production keys in interactive tools.

Making Requests

  1. Expand an endpoint section (e.g., "Domains")
  2. Click on a specific endpoint
  3. Click Try it out
  4. Fill in any required parameters
  5. Click Execute
  6. View the response below

Available Endpoints

The API is organized into the following groups:

Domains

Domain search, registration, and management operations:

EndpointDescription
POST /domains/searchSearch for available domains
POST /domains/quoteGet pricing for domains
POST /domainsRegister a new domain
GET /domainsList all your domains
GET /domains/{id}Get domain details
GET /domains/by-name/{name}Get domain by name
PUT /domains/{id}/nameserversUpdate nameservers
PUT /domains/{id}/contactsUpdate contacts
PUT /domains/{id}/autorenewUpdate auto-renew
PUT /domains/{id}/transfer-lockUpdate transfer lock
POST /domains/{id}/auth-codeGenerate auth code
POST /domains/{id}/renewRenew domain

DNS

DNS record management for your domains:

EndpointDescription
GET /domains/{id}/dns/recordsList DNS records
POST /domains/{id}/dns/recordsCreate DNS record
PUT /domains/{id}/dns/records/{record_id}Update DNS record
DELETE /domains/{id}/dns/records/{record_id}Delete DNS record

Code Generation

You can use the OpenAPI specification to generate client libraries in various programming languages using tools like:

Example: TypeScript Types

Generate TypeScript types from the OpenAPI spec:

bash
npx openapi-typescript https://api.0.link/api-docs/openapi.json -o ./types/api.d.ts

Example: Python Client

Generate a Python client:

bash
openapi-generator generate \
  -i https://api.0.link/api-docs/openapi.json \
  -g python \
  -o ./generated/python-client

Integration with Development Tools

VS Code

Use the OpenAPI (Swagger) Editor extension to browse the API spec directly in VS Code.

Postman

Import the OpenAPI spec into Postman:

  1. Open Postman
  2. Click Import
  3. Select Link
  4. Paste: https://api.0.link/api-docs/openapi.json
  5. Click ContinueImport

Insomnia

Import into Insomnia:

  1. Click CreateImport
  2. Select From URL
  3. Paste: https://api.0.link/api-docs/openapi.json
  4. Click Fetch and Import