Percher Internal API

The Internal API from Percher — 6 operation(s) for internal.

GitHub OpenAPI

Operations 6

POST /internal/exports/mint Mint a secrets-bearing export token (internal-only) #
POST /internal/users/create Create user (dashboard → API) #
POST /internal/users/{userId}/accept-terms Mark user as accepted terms #
POST /internal/sessions/issue-token Issue API token for user #
POST /internal/sessions/revoke-token Revoke API token #
POST /internal/device-codes/authorize Authorize device code #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/percher-app:percher-app-internal-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

percher-app-internal-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Percher Internal API
  version: 1.0.0
  description: AI-native hosting platform. Deploy apps via CLI, MCP, or API — live at name.percher.run.
  contact:
    url: https://percher.app
servers:
- url: https://api.percher.run
  description: Production
- url: http://localhost:3000
  description: Local development
tags:
- name: Internal
paths:
  /internal/exports/mint:
    post:
      tags:
      - Internal
      summary: Mint a secrets-bearing export token (internal-only)
      description: '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.'
      security:
      - internalSecret: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                userId:
                  type: string
                appId:
                  type: string
                includeSecrets:
                  type: boolean
                deliveryKind:
                  type: string
                  enum:
                  - dashboard
                  - cli
                  - mcp
                  - sunset_email
                  default: dashboard
              required:
              - userId
              - appId
              - includeSecrets
      responses:
        '201':
          description: Token minted
          content:
            application/json:
              schema:
                type: object
                properties:
                  tokenId:
                    type: string
                  rawToken:
                    type: string
                  expiresAt:
                    type: string
                    format: date-time
                  ttlSeconds:
                    type: integer
                  includeSecrets:
                    type: boolean
                required:
                - tokenId
                - rawToken
                - expiresAt
                - ttlSeconds
                - includeSecrets
        '401':
          description: Missing or invalid X-Internal-Secret
        '404':
          description: App not found for this user
        '429':
          description: Daily mint rate limit reached
      operationId: postInternalExportsMint
      x-operation-id-source: derived
  /internal/users/create:
    post:
      tags:
      - Internal
      summary: Create user (dashboard → API)
      security:
      - internalSecret: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                email:
                  type: string
                termsAccepted:
                  type: boolean
              required:
              - email
      responses:
        '200':
          description: User created
        '409':
          description: Email taken
      operationId: postInternalUsersCreate
      x-operation-id-source: derived
  /internal/users/{userId}/accept-terms:
    post:
      tags:
      - Internal
      summary: Mark user as accepted terms
      security:
      - internalSecret: []
      parameters:
      - name: userId
        in: path
        required: true
        schema:
          type: string
      responses:
        '204':
          description: Terms accepted
      operationId: postInternalUsersByUserIdAcceptTerms
      x-operation-id-source: derived
  /internal/sessions/issue-token:
    post:
      tags:
      - Internal
      summary: Issue API token for user
      security:
      - internalSecret: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                userId:
                  type: string
                name:
                  type: string
              required:
              - userId
              - name
      responses:
        '200':
          description: Token issued
      operationId: postInternalSessionsIssueToken
      x-operation-id-source: derived
  /internal/sessions/revoke-token:
    post:
      tags:
      - Internal
      summary: Revoke API token
      security:
      - internalSecret: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                tokenId:
                  type: string
              required:
              - tokenId
      responses:
        '204':
          description: Token revoked
      operationId: postInternalSessionsRevokeToken
      x-operation-id-source: derived
  /internal/device-codes/authorize:
    post:
      tags:
      - Internal
      summary: Authorize device code
      security:
      - internalSecret: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                userCode:
                  type: string
                userId:
                  type: string
              required:
              - userCode
              - userId
      responses:
        '204':
          description: Authorized
        '404':
          description: Code not found
      operationId: postInternalDeviceCodesAuthorize
      x-operation-id-source: derived
components:
  securitySchemes:
    exportPreparation:
      type: http
      scheme: bearer
      bearerFormat: pce_<43 base64url characters>
      description: Separate preparation capability. An account API/OAuth token or operation ID is not a preparation credential.
    bearer:
      type: http
      scheme: bearer
      description: API token from `percher login`
    internalSecret:
      type: apiKey
      in: header
      name: X-Internal-Secret
      description: Internal service secret