> ## 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.

> ## Agent Instructions
> Internal links on these pages omit the .md extension. Append .md to a docs page URL, or send an Accept: text/markdown header, to get that page as markdown.

# Update a domain registration

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

Turns automatic renewal on or off for a domain bought through Base44 for the app. Pass the domain's `domain_id` from [List domain registrations](/api-reference/list-domain-registrations).

With automatic renewal off, the domain lapses when its current period ends, at the `expires_at` that [List domain registrations](/api-reference/list-domain-registrations) reports. Turning it back on renews the domain at that point, charged to the payment method on the domain's subscription. The workspace's billing page lists that subscription.

A successful call returns no body. It means the registrar accepted the change. List domain registrations can take a short while to show it, so read it again rather than relying on the first read.

If the registrar can't be reached, the change may not have been made. Read the registration before you retry.

Only a workspace owner can change a registration, because renewal is managed for the whole workspace. Domains you own elsewhere can't be changed here. Their renewal lives with your own registrar.



## OpenAPI

````yaml /developers/references/app-management/app-management-openapi.json patch /api/apps/{app_id}/custom-domains/{domain_id}/registration
openapi: 3.1.0
info:
  title: Base44 App Management API
  version: 1.0.0
servers:
  - url: https://app.base44.com
security:
  - PersonalAccessTokenAuth: []
paths:
  /api/apps/{app_id}/custom-domains/{domain_id}/registration:
    patch:
      summary: Update a domain registration
      description: >-
        <Info>This API is in beta. Endpoints, fields, and behavior may still
        change, so avoid depending on it in production.</Info>


        Turns automatic renewal on or off for a domain bought through Base44 for
        the app. Pass the domain's `domain_id` from [List domain
        registrations](/api-reference/list-domain-registrations).


        With automatic renewal off, the domain lapses when its current period
        ends, at the `expires_at` that [List domain
        registrations](/api-reference/list-domain-registrations) reports.
        Turning it back on renews the domain at that point, charged to the
        payment method on the domain's subscription. The workspace's billing
        page lists that subscription.


        A successful call returns no body. It means the registrar accepted the
        change. List domain registrations can take a short while to show it, so
        read it again rather than relying on the first read.


        If the registrar can't be reached, the change may not have been made.
        Read the registration before you retry.


        Only a workspace owner can change a registration, because renewal is
        managed for the whole workspace. Domains you own elsewhere can't be
        changed here. Their renewal lives with your own registrar.
      operationId: >-
        update_domain_registration_api_apps__app_id__custom_domains__domain_id__registration_patch
      parameters:
        - name: app_id
          in: path
          required: true
          schema:
            type: string
            description: ID of the app the domain belongs to.
            title: App Id
          description: ID of the app the domain belongs to.
          example: 6820f3a4e7b91d003c45a1f2
        - name: domain_id
          in: path
          required: true
          schema:
            type: string
            description: >-
              ID of the custom domain. Get this from [List custom
              domains](/api-reference/list-custom-domains).
            title: Domain Id
          description: >-
            ID of the custom domain. Get this from [List custom
            domains](/api-reference/list-custom-domains).
          example: 68b1c0d4e7b91d003c45a1f7
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DomainRegistrationUpdate'
      responses:
        '204':
          description: The registrar accepted the change.
        '400':
          description: >-
            Base44 couldn't open a session with the registrar for your account,
            so nothing changed (`registrar_session_unavailable`). Try again
            later.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StandardErrorEnvelope'
        '401':
          description: Missing or invalid credentials (`unauthenticated`).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StandardErrorEnvelope'
        '402':
          description: >-
            Turning automatic renewal on needs a plan that includes custom
            domains (`custom_domains_not_in_plan`).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StandardErrorEnvelope'
        '403':
          description: >-
            You don't have write access to the app, you aren't a workspace
            owner, your personal access token is read-only, or you used a
            workspace API key (`forbidden`).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StandardErrorEnvelope'
        '404':
          description: >-
            The domain or the app isn't found (`not_found`), or the domain
            wasn't bought through Base44, so it has no registration here
            (`registration_not_found`).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StandardErrorEnvelope'
        '409':
          description: >-
            The workspace's account doesn't hold an active registration for the
            domain (`registration_not_manageable`). That happens when another
            workspace bought it, for example before the app moved workspaces, or
            when the registration has ended.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StandardErrorEnvelope'
        '422':
          description: >-
            `auto_renew` is missing or isn't a boolean, or the body has other
            fields (`invalid_request`). `error.details.errors` lists each
            problem.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StandardErrorEnvelope'
        '429':
          description: >-
            Rate limit reached (`rate_limited`). The base limit is 10 requests
            per minute per user. A successful response reports the budget in
            `X-RateLimit-Limit`, `X-RateLimit-Remaining`, and
            `X-RateLimit-Reset` (Unix seconds), and a rate-limited one adds
            `Retry-After`. See [Rate
            limits](/developers/references/apps-api/get-started/rate-limits) for
            the multiplier your plan gets.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StandardErrorEnvelope'
      security:
        - PersonalAccessTokenAuth:
            - full_access
components:
  schemas:
    DomainRegistrationUpdate:
      properties:
        auto_renew:
          type: boolean
          title: Auto Renew
          description: >-
            Whether the registration renews automatically (`true`) or lapses at
            the end of its current period (`false`).
          example: false
      additionalProperties: false
      type: object
      required:
        - auto_renew
      title: DomainRegistrationUpdate
    StandardErrorEnvelope:
      properties:
        error:
          $ref: '#/components/schemas/StandardError'
          description: What went wrong.
      type: object
      required:
        - error
      title: StandardErrorEnvelope
      description: The error body returned in the standard envelope.
    StandardError:
      properties:
        code:
          type: string
          title: Code
          description: >-
            Stable machine-readable cause of the failure. Match on this, not on
            `message`.
          example: not_found
        message:
          type: string
          title: Message
          description: Human-readable explanation. It isn't a stable contract.
          example: App not found
        details:
          additionalProperties: true
          type: object
          title: Details
          description: >-
            Structured context for the failure, or an empty object when there's
            none.
          example: {}
      type: object
      required:
        - code
        - message
      title: StandardError
  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.