Skip to main content
Welcome to the Dashlink API documentation. This guide will help you integrate Dashlink’s powerful link management features into your application.

Getting Started

To get started with the Dashlink API, you’ll need to understand the base URL structure. All API requests are made to a base URL, and individual endpoints are appended to this base URL.

Base URL

The base URL is the root address for all Dashlink API endpoints. All API requests must be made to this base URL, followed by the specific endpoint path.
Production Base URL
The base URL serves as the foundation for all API interactions. When making requests, you’ll append the specific endpoint path to this base URL. For example, to access the get shortlinks endpoint, you would use:
API Endpoint
All API endpoints in this documentation are relative to the base URL. When you see an endpoint like /api/v1/links, it should be appended to the base URL to form the complete request URL.

Authentication

All API requests to the Dashlink API require authentication using an API key. You can generate your API key from the Dashlink app dashboard. To authenticate your requests, include the X-API-Key header in all API calls with your API key as the value.
API Request Header
Here is the example of how your request have send the auth header:
cURL
Keep your API key secure and never expose it in client-side code or public repositories. Treat your API key as a password.

Error Handling

The Dashlink API returns errors in a consistent format using standard HTTP status codes. All error responses follow the same structure, making it easy to handle errors in your application. Here is the example of how error response schema looks like:
Error Response
Common HTTP Status Codes:
Always check the status_code and code fields in the error response to handle different error scenarios appropriately in your application.

Pagination & Sorting

All listing APIs in the Dashlink API support pagination and sorting to help you efficiently retrieve and organize data. Pagination Parameters:
  • page - The page number to retrieve (default: 1)
  • per_page - Number of items per page (default: 10)
  • sort_by - Field to sort by (e.g., most_recent, created_at, updated_at)
  • order - Sort order: asc for ascending or desc for descending (default: desc)
Example Request with Pagination:
cURL
The pagination parameters can be combined to customize how you retrieve data. For example, you can sort by creation date in descending order and retrieve 20 items per page.