Export
Internal

Mint a secrets-bearing export token (internal-only)

Service-to-service. The dashboard server action is the only legitimate caller: it verifies the BetterAuth session, re-confirms the user's password fresh, then calls this endpoint. Returns rawToken (the credential) and tokenId — the caller assembles the user-facing download URL using its own knowledge of the public API origin. The internal route deliberately does not return a downloadUrl because it cannot know which public host the user should be sent to.

post/internal/exports/mint

Request

  • Base URL: https://api.percher.run
  • URL: https://api.percher.run/internal/exports/mint
  • Auth: API key in header X-Internal-Secret

Request body

userIdstring required
appIdstring required
includeSecretsboolean required
deliveryKind'dashboard' | 'cli' | 'mcp' | 'sunset_email'

Response

Token minted

tokenIdstring required
rawTokenstring required
expiresAtstring date-time required
ttlSecondsinteger required
includeSecretsboolean required

Changes

No recorded changes to this operation across all 1 revision of this API.