Skip to main content
API keys are required to authenticate your requests to the Dashlink API. All API requests must include the X-API-Key header with your API key as the value. To authenticate your requests, include the X-API-Key header in all API calls:
API Request Header
X-API-Key: dlk_live_••••••
Keep your API key secure and never expose it in client-side code or public repositories. Treat your API key as a password.

Create an API Key

Follow these steps to generate an API key from the Dashlink dashboard:
1

Navigate to API Settings

Log in to your Dashlink dashboard and navigate to the API Settings section.
Dashboard showing API Settings section
2

Generate New API Key

Click on the “Generate API Key” button to create a new API key. Fill in the following fields in the form:Form Fields:
  • Name - A descriptive name for your API key to help you identify it later (e.g., “Production API Key”, “Development Key”). This is for your reference only.
  • Type - Select the type of API key:
    • Organization - The API key is associated with your organization and can access organization-level resources
    • Self - The API key is associated with your personal account and can only access your personal resources
  • Permissions - Choose the permission level for the API key:
    • All - Full access to all operations (read, write, delete) for all resources
    • Read Only - Can only retrieve and view data, cannot create, update, or delete resources
    • Restricted - Limited access based on specific permissions you configure
  • Description - Optional field to add additional notes or context about the API key’s intended use case.
Generate API Key form with fields
3

Copy Your API Key

Once generated, copy your API key immediately. The key will be displayed only once for security purposes.
API key displayed in dashboard
If you lose your API key, you’ll need to generate a new one. The old key will be invalidated.
4

Use Your API Key

Include your API key in the X-API-Key header for all API requests:
cURL
curl --location 'https://dashlink.ai/api/v1/shortlinks/get_shortlinks' \
--header 'X-API-Key: dlk_live_••••••'

API Key Scope

API keys in Dashlink have different scopes that determine what resources and operations they can access. Each API key is associated with specific permissions that control its capabilities.
API key scopes help you follow the principle of least privilege by granting only the necessary permissions for each use case.
The scope of an API key defines:
  • Which endpoints can be accessed
  • What operations can be performed (read, write, delete)
  • Which resources are accessible
API key scope configuration in dashboard

API Key Permissions

API keys can have different permission levels that control their access to various features and endpoints:
PermissionDescription
AllFull access to all operations (read, write, delete) for all resources
Read OnlyCan only retrieve and view data, cannot create, update, or delete resources
RestrictedLimited access based on specific permissions you configure
You can configure specific permissions for each API key when generating it in the dashboard. This allows you to create keys with limited access for specific use cases.
API key permissions configuration