Skip to content

Growth Genie API

The Growth Genie API is its MCP server and the OAuth 2.1 authorization server in front of it, both at https://auth.growthgenie.so. Every endpoint, and every tool’s arguments and results, is described in openapi.json (OpenAPI 3.1).

Growth Genie uses the OAuth 2.1 authorization code flow with PKCE. Clients register themselves, so there is no key to request and no form to fill in.

  1. Discover. A request to POST /mcp (or GET /mcp) without a token returns 401 with WWW-Authenticate: Bearer resource_metadata="https://auth.growthgenie.so/.well-known/oauth-protected-resource/mcp". That document (RFC 9728) names the authorization server, whose metadata (RFC 8414) is at /.well-known/oauth-authorization-server.
  2. Register. POST /api/auth/oauth2/register with your client_name and redirect_uris (RFC 7591). Redirect URIs are HTTPS, or http on 127.0.0.1, [::1] or localhost.
  3. Authorize. Open /api/auth/oauth2/authorize in the person’s browser with response_type=code, your client_id and redirect_uri, the scope you need, state, a PKCE code_challenge with code_challenge_method=S256, and resource=https://auth.growthgenie.so/mcp. They sign in, pick the workspaces you may read and approve.
  4. Exchange. POST /api/auth/oauth2/token with grant_type=authorization_code, the code, your redirect_uri, the code_verifier and the same resource. Ask for offline_access to get a refresh token. Refresh tokens rotate: store the new one each time.
  5. Call. Send Authorization: Bearer <access token> on every POST /mcp.

A person can disconnect your client at any time in Growth Genie under Settings → Connected AI clients, or you can revoke a token with POST /api/auth/oauth2/revoke.

Ask for the least you need. projects:read and marketing:read are required on every MCP request.

ScopeWhat it allows
projects:readList the projects in the workspaces the person approved. Required on every MCP request.
marketing:readRead saved prompts, topics, today's AI visibility, stored answers and content and keyword gaps. Required on every MCP request.
marketing:writeAdd, stop and group prompts (add_prompt, remove_prompt, create_topic, move_prompt). Granted only when the person ticks "Also let it add prompts and stop them" on the consent screen.
offline_accessReceive a refresh token, so the client stays connected without signing in again.

Requests are limited per Growth Genie account, per connected client and per IP address (IPv4, or IPv6 /64). Responses report the limits with the IETF RateLimit fields (draft-ietf-httpapi-ratelimit-headers):

  • RateLimit-Policy: "user-read";q=60;w=60 names each limit that applies to the request: its quota q (requests) per window w (seconds).
  • RateLimit: "user-read";a=57;w=42 says how many requests are available (a) and how many seconds are left in the window (w). It is sent where the count is exact, after an accepted MCP request, and with a=0 on every 429.
  • Every 429 carries Retry-After in seconds. Wait that long before you retry.

Limits counted at Cloudflare’s edge (the ip, ip-bearer and connection policies) are approximate, so they appear in RateLimit-Policy but not in RateLimit until they refuse a request.

/mcp

Policy Quota Counted per Counts
user-read 60 a minute account every message except a write tool call
user-read-day 5,000 a UTC day account every message except a write tool call
user-write 10 a minute account tools/call of add_prompt, remove_prompt, move_prompt, create_topic
user-answer 20 a minute account tools/call of get_prompt_answer
connection 120 a minute connected client POST requests with a valid token
ip-bearer 1,200 a minute IP address requests with an Authorization header
ip 120 a minute IP address requests without a token, and requests whose token is refused

Tool calls also count against their workspace: 300 reads and 30 writes a minute. Past that, the tool result is the RATE_LIMITED error with retryAfterSeconds, not an HTTP 429.

OAuth endpoints

Endpoint Policy Quota Counted per
POST /api/auth/oauth2/register ip 300 a minute IP address
ip-day 100 a UTC day IP address
global-day 10,000 a UTC day all clients together
/api/auth/oauth2/authorize ip 30 a minute IP address
POST /api/auth/oauth2/token and /revoke ip 20 a minute, shared IP address

The authorize, token and revoke windows end a minute after the last request they accepted.

A request body may be at most 32 KiB, and one tool result carries at most 48 KiB: page with cursor and ask for one project, prompt or answer at a time.

The write tools (add_prompt, remove_prompt, move_prompt, create_topic) take an idempotencyKey, a UUID you choose for each change. Retry a change with the same key: if it already happened, you get its first result again with receipt.replayed: true, and nothing changes twice. A key you already used for a different change returns IDEMPOTENCY_CONFLICT.

You can send the key as an Idempotency-Key header on the POST /mcp instead of the argument. If you send both, they must be equal, or the call fails with VALIDATION_FAILED. Other tools and messages ignore the header.

Every error is JSON with a stable code.

OAuth endpoints answer with the standard OAuth 2.0 error object: {"error": "invalid_grant", "error_description": "…"}. The codes are invalid_request, invalid_client, invalid_grant, invalid_scope, invalid_target (the resource is not https://auth.growthgenie.so/mcp) and, at registration, invalid_client_metadata.

The MCP endpoint, before a message reaches the server, answers with {"error": "<code>"}:

Status Code What to do
401 UNAUTHORIZED Get a token: follow WWW-Authenticate to the metadata and authorize. Refresh an expired token.
403 INSUFFICIENT_SCOPE Authorize again with the scopes WWW-Authenticate names.
403 FORBIDDEN The request came from a browser origin that may not call the server.
405 METHOD_NOT_ALLOWED Send JSON-RPC messages with POST. The server opens no event stream, so GET with a valid token gets 405.
413 REQUEST_TOO_LARGE Send a body under 32 KiB.
429 RATE_LIMITED Wait for Retry-After seconds. RateLimit names the limit you reached.
503 DATABASE_BUSY Retry shortly; retryable is true.

Any other path on auth.growthgenie.so returns 404 with {"error": "NOT_FOUND"}.

Tool calls that fail return a result with isError: true whose content is { requestId, code, message, retryable }, plus retryAfterSeconds, currentVersion, reason or limit when they help:

Code Meaning and what to do
VALIDATION_FAILED An argument is wrong, often a name or URL slug where an ID belongs. Use the IDs list_projects and list_prompts return. Also when an Idempotency-Key header differs from the idempotencyKey argument.
NOT_FOUND The project, prompt or answer does not exist, or is not in a workspace the person approved.
FORBIDDEN The token lacks the scope for this tool, or the person no longer has access.
VERSION_CONFLICT The prompt changed since you read it. List prompts again and retry with currentVersion.
IDEMPOTENCY_CONFLICT That idempotencyKey was used for a different change. Use a new key for a new change.
PLAN_LIMIT The plan’s limit or billing state stops the change; reason says which (inventory_limit, billing_paused, …). Stopping prompts still works.
CURSOR_EXPIRED The data changed since that page. Start again from the first page.
READ_BUDGET_EXCEEDED The result would be too large. Ask for less at once.
RATE_LIMITED Wait retryAfterSeconds, then retry.
DATABASE_BUSY A temporary failure. Retry.

Protocol versions. The MCP server speaks the protocol revisions 2025-11-25, 2025-06-18, 2025-03-26. initialize negotiates one; send it in the MCP-Protocol-Version header on every later request.

How changes are announced. Changes to the API are announced in the changelog. A breaking change, such as removing or renaming a tool, an argument or a result field, dropping a protocol revision or changing an OAuth endpoint, is announced there at least 90 days before it takes effect.

How a deprecation is signalled. Until a deprecated endpoint, tool or protocol revision is removed, the responses that use it carry Deprecation (RFC 9745, the date it was deprecated, for example Deprecation: @1798761600) and Sunset (RFC 8594, the date it stops working, for example Sunset: Thu, 01 Apr 2027 00:00:00 GMT). Nothing is deprecated today.

The OpenAPI description links this policy in info.x-api-lifecycle.