Back to Documentation

Developer Quick Start

Get up and running with the zalink.ai API in minutes

Generate Your API Key

API keys are created from your merchant dashboard. Each key is scoped to a specific store.

1

Log in to your zalink.ai dashboard

2

Navigate to Settings > API Keys

3

Click "Create New Key" and set permissions

4

Copy the key immediately (it will not be shown again)

5

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. 1

    Open Claude Desktop settings

  2. 2

    Navigate to Developer > MCP Servers

  3. 3

    Add the configuration below with your credentials

  4. 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. 1

    Go to ChatGPT > My GPTs > Create/Edit

  2. 2

    Select "Actions" and choose "Import from URL"

  3. 3

    Use: https://api.zalink.ai/acp/stores/YOUR_STORE_ID/openapi.json

  4. 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.

1

In your dashboard, go to Settings > Webhooks

2

Enter your HTTPS endpoint URL

3

Select the events you want to subscribe to

4

Copy the webhook secret for signature verification

5

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}`,
    },
  });
}

Next Steps