Skip to content
WhatSync/DocsAPI v1

Create an API key (confirm link)

Prepare a WhatSync API key for the user's own code, n8n, Make or Zapier (Max and Business plans).

POST/api/v1/tools/request_api_keyRead
Key permissions
Read chats and messages
Authentication
Authorization: Bearer $WHATSYNC_API_KEY
How keys work

How it works

  • The key is shown once on the confirm page, never in this chat.
  • permissions: read, send, messages, groups, templates, campaigns, settings, webhooks (read is always included; default read and send).
  • Returns confirm_link: nothing happens until the user opens it while signed in to WhatSync and presses the button.

Body parameters

namestringrequired

What the key is for, such as n8n or My CRM

permissionsread | send | messages | groups | templates | campaigns | settings | webhooks[]optional

See the example and input schema for this value.

Response

HTTP 200 returns this tool's JSON directly, without an MCP content wrapper. Optional provider fields may be absent or null; check pagination and coverage before treating a page as complete.

Every response includes X-Request-Id. Errors use the shared error format and retry rules.

Schemas

Input JSON Schema
Input JSON Schema
{
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "minLength": 1,
      "maxLength": 100,
      "description": "What the key is for, such as n8n or My CRM"
    },
    "permissions": {
      "type": "array",
      "items": {
        "type": "string",
        "enum": [
          "read",
          "send",
          "messages",
          "groups",
          "templates",
          "campaigns",
          "settings",
          "webhooks"
        ]
      },
      "minItems": 1,
      "maxItems": 8
    }
  },
  "required": [
    "name"
  ],
  "additionalProperties": false,
  "$schema": "http://json-schema.org/draft-07/schema#"
}
Response JSON Schema
Response JSON Schema
{
  "type": "object",
  "properties": {
    "status": {
      "type": "string",
      "enum": [
        "confirmation_needed",
        "not_on_this_plan",
        "demo_account"
      ]
    },
    "confirm_link": {
      "type": "string"
    },
    "link_expires_at": {
      "type": "string"
    },
    "what_happens": {
      "type": "string"
    },
    "note": {
      "type": "string"
    },
    "links": {
      "type": "object",
      "additionalProperties": true,
      "description": "Provider or tool-specific fields; preserve unknown fields."
    }
  },
  "required": [],
  "additionalProperties": true
}