> ## Documentation Index
> Fetch the complete documentation index at: https://docs.enricho.co/llms.txt
> Use this file to discover all available pages before exploring further.

# Get billing portal

> Hosted customer portal for payment methods, invoices and cancellation.

```bash theme={null}
curl 'https://mcp.enricho.co/api/billing/portal' \
  -H 'Authorization: Bearer enr_YOUR_API_KEY'
```

No input is required and no credits are consumed. `result` contains `portal_url` and `note`. Open the hosted portal to update payment methods, download invoices or cancel a self-serve subscription. This GET request itself does not cancel anything.

404 (`not_found`) means no self-serve billing customer exists yet, or the plan is managed directly by Enricho. Subscribe or buy credits to establish a self-serve customer; for managed-plan invoices or changes contact [support@enricho.co](mailto:support@enricho.co). Payment-provider failures can return 502; unavailable billing returns 503.


## OpenAPI

````yaml api-reference/openapi.json GET /api/billing/portal
openapi: 3.1.0
info:
  title: Enricho Public REST API
  version: 1.0.0
  description: >-
    Public directory search and billing APIs. Full search costs 1 credit per
    returned record; previews and usage calls use no credits. Request and
    response contracts reflect the current public gateway and service handlers.
servers:
  - url: https://mcp.enricho.co
security:
  - apiKey: []
  - headerKey: []
tags:
  - name: Directory
  - name: Billing
paths:
  /api/billing/portal:
    get:
      tags:
        - Billing
      summary: Open billing portal
      description: >-
        Free. Returns a hosted link to manage the authenticated account’s
        payment method, invoices or cancellation. Requires an existing
        self-serve payment customer.
      operationId: getBillingPortal
      responses:
        '200':
          description: Success envelope.
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    const: true
                  result:
                    $ref: '#/components/schemas/Portal'
                  message:
                    type: string
                required:
                  - success
                  - result
                  - message
        '401':
          description: 'unauthorized: missing, invalid or revoked API key.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: >-
            not_found: no billing customer yet, or an Enricho-managed plan has
            no self-serve portal.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: >-
            rate_limited: key, account or client-IP request limit exceeded; wait
            a minute before retrying.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: 'internal: unexpected server failure.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '502':
          description: >-
            upstream_unavailable: gateway could not reach the service, or
            payment provider failed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '503':
          description: >-
            upstream_unavailable: authentication or service dependency
            unavailable.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    Portal:
      type: object
      properties:
        portal_url:
          type: string
          format: uri
          description: >-
            Hosted customer portal link for payment methods, invoices and
            cancellation.
        note:
          type: string
          description: Human-readable instructions.
      required:
        - portal_url
        - note
    Error:
      type: object
      properties:
        success:
          type: boolean
          const: false
        result:
          type: object
          properties:
            code:
              type: string
              description: Machine-readable error code.
          required:
            - code
        message:
          type: string
          description: Human-readable error; do not parse this as a stable identifier.
      required:
        - success
        - result
        - message
  securitySchemes:
    apiKey:
      type: http
      scheme: bearer
      description: Enricho API key (enr_...)
    headerKey:
      type: apiKey
      in: header
      name: X-Api-Key
      description: >-
        An Enricho API key (enr_...). Use this or Authorization: Bearer, not
        both.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.