“API: Authentication”

Ranki’s HTTP endpoints authenticate with an API key prefixed with rk_.... This method is used in scripts, apps and direct integrations.

Get and manage a key

  • Create a key: https://app.ranki.co/api/ → Create API Key.
  • Format: prefix rk_....
  • Copy it right away: the full value is shown only once.
  • Revoking: on the same page, Revoke. It takes effect immediately.

Authenticate requests

Bearer header (recommended)

Authorization: Bearer rk_TU_CLAVE_AQUI

X-API-Key header

X-API-Key: rk_TU_CLAVE_AQUI

Both formats are accepted by the endpoints at api.ranki.co and app.ranki.co/wp-json/ranki/v1.


Access to your data

  • Each key can only view and manage resources in its own account.
  • Endpoints that use credits deduct them from the authenticated account.
  • A resource that doesn’t exist in your account returns 404 Not Found.

Security: don’t share keys rk_, store them in an environment variable or secrets manager, and revoke them if they’re exposed.


curl examples

Get Site Audit projects

curl -s \
  -H "Authorization: Bearer rk_TU_CLAVE_AQUI" \
  "https://app.ranki.co/wp-json/ranki/v1/site-audit/projects"

Check API credit balance

curl -s \
  -H "Authorization: Bearer rk_TU_CLAVE_AQUI" \
  "https://api.ranki.co/v1/credits/balance"

Looking to connect an AI assistant?

The remote MCP server uses OAuth and doesn’t require a key rk_. See the separate MCP Server page for the connection URL and available tools.