Generate Your API Key
API keys are created from your merchant dashboard. Each key is scoped to a specific store.
Log in to your zalink.ai dashboard
Navigate to Settings > API Keys
Click "Create New Key" and set permissions
Copy the key immediately (it will not be shown again)
Store the key securely in environment variables
Never expose API keys in client-side code or public repositories.
Your First API Call
Search products in your connected store with a simple GET request.
curl -X GET "https://api.zalink.ai/api/stores/YOUR_STORE_ID/products?q=headphones&limit=5" \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json"
MCP Connection (Claude Desktop)
Add zalink.ai as an MCP server in your Claude Desktop configuration file to give Claude access to your store data.
- 1
Open Claude Desktop settings
- 2
Navigate to Developer > MCP Servers
- 3
Add the configuration below with your credentials
- 4
Restart Claude Desktop to activate
claude_desktop_config.json
{
"mcpServers": {
"zalink-ai": {
"url": "https://api.zalink.ai/mcp/YOUR_STORE_ID",
"headers": {
"Authorization": "Bearer YOUR_API_KEY"
}
}
}
}OpenAPI / ChatGPT Actions
Use the ACP endpoints with an OpenAPI spec to create ChatGPT custom actions for your store.
- 1
Go to ChatGPT > My GPTs > Create/Edit
- 2
Select "Actions" and choose "Import from URL"
- 3
Use: https://api.zalink.ai/acp/stores/YOUR_STORE_ID/openapi.json
- 4
Configure authentication with your API key
OpenAPI Action Schema
{
"openapi": "3.1.0",
"info": {
"title": "zalink.ai Store API",
"version": "1.0.0"
},
"servers": [
{ "url": "https://api.zalink.ai" }
],
"paths": {
"/acp/stores/{storeId}/products/search": {
"get": {
"operationId": "searchProducts",
"summary": "Search store products",
"parameters": [
{ "name": "storeId", "in": "path", "required": true, "schema": { "type": "string" } },
{ "name": "q", "in": "query", "schema": { "type": "string" } }
]
}
}
}
}Webhook Quick Start
Register a webhook URL to receive real-time event notifications.
In your dashboard, go to Settings > Webhooks
Enter your HTTPS endpoint URL
Select the events you want to subscribe to
Copy the webhook secret for signature verification
Test the webhook with a test event from the dashboard
Authentication Snippets
Token refresh helpers to keep your integration running smoothly.
// Token refresh middleware
async function apiRequest(url, options = {}) {
let token = getStoredToken();
if (isExpiringSoon(token)) {
token = await refreshToken(token.refreshToken);
storeToken(token);
}
return fetch(url, {
...options,
headers: {
...options.headers,
"Authorization": `Bearer ${token.accessToken}`,
},
});
}