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.jsonDownload the Spec
You can download the specification for use in your development tools:
curl -o openapi.json https://api.0.link/api-docs/openapi.jsonUsing the Swagger UI
Authentication
To test authenticated endpoints in Swagger UI:
- Click the Authorize button (🔓) at the top right
- Enter your API key in the format:
Bearer zlk_live_... - Click Authorize
- 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
- Expand an endpoint section (e.g., "Domains")
- Click on a specific endpoint
- Click Try it out
- Fill in any required parameters
- Click Execute
- View the response below
Available Endpoints
The API is organized into the following groups:
Domains
Domain search, registration, and management operations:
| Endpoint | Description |
|---|---|
POST /domains/search | Search for available domains |
POST /domains/quote | Get pricing for domains |
POST /domains | Register a new domain |
GET /domains | List all your domains |
GET /domains/{id} | Get domain details |
GET /domains/by-name/{name} | Get domain by name |
PUT /domains/{id}/nameservers | Update nameservers |
PUT /domains/{id}/contacts | Update contacts |
PUT /domains/{id}/autorenew | Update auto-renew |
PUT /domains/{id}/transfer-lock | Update transfer lock |
POST /domains/{id}/auth-code | Generate auth code |
POST /domains/{id}/renew | Renew domain |
DNS
DNS record management for your domains:
| Endpoint | Description |
|---|---|
GET /domains/{id}/dns/records | List DNS records |
POST /domains/{id}/dns/records | Create 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:
npx openapi-typescript https://api.0.link/api-docs/openapi.json -o ./types/api.d.tsExample: Python Client
Generate a Python client:
openapi-generator generate \
-i https://api.0.link/api-docs/openapi.json \
-g python \
-o ./generated/python-clientIntegration 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:
- Open Postman
- Click Import
- Select Link
- Paste:
https://api.0.link/api-docs/openapi.json - Click Continue → Import
Insomnia
Import into Insomnia:
- Click Create → Import
- Select From URL
- Paste:
https://api.0.link/api-docs/openapi.json - Click Fetch and Import
Related Resources
- API Reference - Overview of the API
- Authentication - API key authentication
- Error Codes - Error response reference
- Rate Limiting - Rate limit details