Users / api-key

Return current API key for the authenticated user.

Back to API Docs

API Overview

Path: /api/users/api-key — Method: GET

Auth: header — Accepts NextAuth session cookie or Authorization Bearer token.

Header: Authorization (e.g., Bearer <JWT>)

Example: curl -X GET https://www.advancelytics.com/api/users/api-key -H 'Authorization: Bearer <JWT>'

Request Details

Headers

  • Authorization(string)Bearer <JWT>
  • Cookie(string)next-auth.session-token=<token>

No path params required

No query required

No body required

Responses

  • 200Success
    {"success":true,"apiKey":"<opaque_or_null>"}
  • 401Authorization token not found or invalid
  • 404User not found
  • 500Server error

Notes & Tips

  • Ensure headers match exactly (e.g., x-apikey).
  • Use Content-Type: application/json for JSON bodies.
  • For Bearer auth, you can provide either a session JWT or an opaque API key where supported.
Advancelytics | Detect Silent Churn, Surface Growth Signals