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

# Renew Domain

> Extend a domain's registration and pay for it from the account balance.

Priced at `renewal_price * years` from the RDP.sh price list, plus 19%
VAT unless the account is VAT exempt. Extensions that are no longer in
the price list -- and so never appear in `GET /domains/pricing` -- fall
back to EUR 19.99 per year. The new expiry date is the old one plus
`years`, so renewing early never loses the remaining term.




## OpenAPI

````yaml post /domains/{domain}/renew
openapi: 3.1.0
info:
  title: APIFiddle Sample Definition
  version: 0.0.0
  description: Example workspace
servers:
  - url: https://rdp.sh/api/v1
    description: Default production endpoint.
security: []
paths:
  /domains/{domain}/renew:
    post:
      summary: Renew domain
      description: |
        Extend a domain's registration and pay for it from the account balance.

        Priced at `renewal_price * years` from the RDP.sh price list, plus 19%
        VAT unless the account is VAT exempt. Extensions that are no longer in
        the price list -- and so never appear in `GET /domains/pricing` -- fall
        back to EUR 19.99 per year. The new expiry date is the old one plus
        `years`, so renewing early never loses the remaining term.
      operationId: renewDomain
      parameters:
        - $ref: '#/components/parameters/domain'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                years:
                  type: integer
                  minimum: 1
                  maximum: 10
                  default: 1
                  description: Number of years to extend the registration by.
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                title: RenewDomainOk
                required:
                  - status
                  - message
                  - invoice_id
                  - amount_charged
                  - years
                  - domain
                properties:
                  status:
                    type: boolean
                    examples:
                      - true
                  message:
                    type: string
                    examples:
                      - Domain renewed
                  invoice_id:
                    type: integer
                    description: ID of the balance invoice created for this renewal.
                    examples:
                      - 8232
                  amount_charged:
                    type: number
                    description: >-
                      Gross amount deducted from the account balance, VAT
                      included.
                    examples:
                      - 14.28
                  years:
                    type: integer
                    examples:
                      - 1
                  domain:
                    $ref: '#/components/schemas/domain'
          description: The domain was renewed and the account balance was charged.
        '400':
          content:
            application/json:
              schema:
                type: object
                title: RenewDomainInsufficientBalance
                properties:
                  status:
                    type: boolean
                    examples:
                      - false
                  error:
                    type: string
                    examples:
                      - Insufficient balance
                  required:
                    type: number
                    description: Gross amount needed, in EUR.
                    examples:
                      - 14.28
                  available:
                    type: number
                    description: Current account balance, in EUR.
                    examples:
                      - 5
          description: The account balance does not cover the renewal.
        '403':
          description: User does not own the domain, or the domain is suspended.
        '404':
          description: Domain not found.
        '422':
          description: |
            Validation error, or the domain has no expiry date on file to
            extend.
        '500':
          description: |
            The registrar could not be reached or refused the renewal. The
            charge is refunded to the account balance.
      security:
        - Authorization: []
components:
  parameters:
    domain:
      in: path
      name: domain
      schema:
        type: integer
      required: true
      description: Domain ID
  schemas:
    domain:
      type: object
      required: []
      properties:
        id:
          type: integer
          examples:
            - 1
        domain_name:
          type: string
          examples:
            - example.com
        status:
          type: string
          description: Domain lifecycle status.
          examples:
            - active
            - suspended
            - transferring
            - expired
        provider:
          type: string
          description: Registrar backing the domain.
          examples:
            - internetbs
            - netim
        auto_renew:
          type: boolean
        whois_privacy:
          type: boolean
        lock_status:
          type: boolean
          description: Whether the registrar transfer lock is enabled.
        use_rdp_nameservers:
          type: boolean
          description: Whether the domain uses RDP.sh-managed nameservers.
        nameservers:
          type: array
          items:
            type: string
          examples:
            - ns1.rdp.sh
            - ns2.rdp.rs
        registration_date:
          type: string
          nullable: true
          examples:
            - '2025-01-01T00:00:00.000000Z'
        expiry_date:
          type: string
          nullable: true
          examples:
            - '2027-01-01T00:00:00.000000Z'
        days_until_expiry:
          type: integer
          nullable: true
          examples:
            - 180
        is_expiring_soon:
          type: boolean
          description: True when the domain expires within 30 days.
        dns_records_count:
          type: integer
          examples:
            - 2
        created_at:
          type: string
          examples:
            - '2025-01-01T00:00:00.000000Z'
      description: Domain object.
  securitySchemes:
    Authorization:
      in: header
      name: Authorization
      type: apiKey

````