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
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 theX-API-Key header in all API calls with your API key as the value.
API Request Header
cURL
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
| Status Code | Description |
|---|---|
| 200 OK | The request was successful |
| 201 Created | The resource was successfully created |
| 400 Bad Request | The request was invalid or malformed |
| 401 Unauthorized | Authentication required or invalid API key |
| 403 Forbidden | You don’t have permission to access this resource |
| 404 Not Found | The requested resource does not exist |
| 422 Unprocessable Entity | The request was well-formed but contains validation errors |
| 429 Too Many Requests | Rate limit exceeded |
| 500 Internal Server Error | An unexpected error occurred on the server |
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:ascfor ascending ordescfor descending (default:desc)
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.