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

# Get business email purchase link

> <Info>This API is in beta. Endpoints, fields, and behavior may still change, so avoid depending on it in production.</Info>

Creates a one-time link to the checkout page for business email on one of your workspace's custom domains.

Pass a `domain` that's connected to an app in this workspace and verified. Find your domains with [List custom domains](/api-reference/list-custom-domains). The check uses the domain's last recorded status, so a domain you just connected may need to finish verifying first. The person who opens the link picks a plan and pays, and nothing is bought until they finish checkout. The new business email then appears in [Get business email status](/api-reference/get-business-email-status) as `PENDING_SETUP`.

Only the workspace owner can create the link. A workspace whose plan is paid through the App Store can't buy business email. A read-only token is refused, and workspace API keys aren't accepted.

<Note>The link signs whoever opens it in to your workspace's billing account, and it works once. Don't share it, and create a new link each time.</Note>

Each call returns a new link and buys nothing, so retrying is safe. Limited to 6 requests a minute per caller. Some workspaces have a different limit.



## OpenAPI

````yaml /developers/references/app-management/app-management-openapi.json post /api/billing/business-email/purchase-url
openapi: 3.1.0
info:
  title: Base44 App Management API
  version: 1.0.0
servers:
  - url: https://app.base44.com
security:
  - PersonalAccessTokenAuth: []
paths:
  /api/billing/business-email/purchase-url:
    post:
      summary: Get business email purchase link
      description: >-
        <Info>This API is in beta. Endpoints, fields, and behavior may still
        change, so avoid depending on it in production.</Info>


        Creates a one-time link to the checkout page for business email on one
        of your workspace's custom domains.


        Pass a `domain` that's connected to an app in this workspace and
        verified. Find your domains with [List custom
        domains](/api-reference/list-custom-domains). The check uses the
        domain's last recorded status, so a domain you just connected may need
        to finish verifying first. The person who opens the link picks a plan
        and pays, and nothing is bought until they finish checkout. The new
        business email then appears in [Get business email
        status](/api-reference/get-business-email-status) as `PENDING_SETUP`.


        Only the workspace owner can create the link. A workspace whose plan is
        paid through the App Store can't buy business email. A read-only token
        is refused, and workspace API keys aren't accepted.


        <Note>The link signs whoever opens it in to your workspace's billing
        account, and it works once. Don't share it, and create a new link each
        time.</Note>


        Each call returns a new link and buys nothing, so retrying is safe.
        Limited to 6 requests a minute per caller. Some workspaces have a
        different limit.
      operationId: get_purchase_url_api_billing_business_email_purchase_url_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BusinessEmailDomainPayload'
        required: true
      responses:
        '200':
          description: A one-time checkout link.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BillingPortalLink'
              example:
                url: >-
                  https://billing.example.com/session/7c1e9f2a4b8d4e6f9a3c5b7d1e2f4a6c
        '400':
          description: This workspace has no billing account for business email.
        '401':
          description: Missing or invalid credentials.
        '403':
          description: >-
            You aren't the workspace owner, your token is read-only, or the
            workspace's plan is paid through the App Store.
        '404':
          description: '`domain` isn''t connected to an app in this workspace.'
        '412':
          description: '`domain` isn''t verified and connected yet.'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
              example:
                detail:
                  - type: missing
                    loc:
                      - body
                      - domain
                    msg: Field required
                    input: {}
        '429':
          description: Rate limit reached. Retry later.
      security:
        - PersonalAccessTokenAuth:
            - full_access
components:
  schemas:
    BusinessEmailDomainPayload:
      properties:
        domain:
          type: string
          title: Domain
          description: Custom domain the business email is for, without `www.`.
          example: acme.com
      type: object
      required:
        - domain
      title: BusinessEmailDomainPayload
    BillingPortalLink:
      properties:
        url:
          type: string
          title: Url
          description: >-
            Link to open in the browser of the person who acts on it. Treat it
            as opaque. It works once, so create a new one each time.
          example: https://billing.example.com/session/7c1e9f2a4b8d4e6f9a3c5b7d1e2f4a6c
      type: object
      required:
        - url
      title: BillingPortalLink
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    PersonalAccessTokenAuth:
      type: http
      scheme: bearer
      description: >-
        Personal access token, sent as `Authorization: Bearer <token>`. Each
        operation lists the permission it needs: `read_only` or `full_access`. A
        full-access token can call every operation. A read-only token can call
        only the operations that list `read_only`; anything else returns 403
        `read_only_credential_route_not_allowed`.

````

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