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

# Account recovery

> Use this to recover the customer's account for a given entitlement.

Please note that the base url for this endpoint is different:
- Sandbox: https://acr-b33f-resale.eu.uat.integrator.bango.com
- Production - US region: https://acr-b33f-resale.us.integrator.bango.com
- Production - EU region: https://acr-b33f-resale.eu.integrator.bango.com
- Production - AP region: https://acr-b33f-resale.ap.integrator.bango.com 




## OpenAPI

````yaml /openapi/current/dvm/reseller-to-dvm/entitlement/openapi.yaml post /v1/entitlement/accountRecovery/{entitlementId}
openapi: 3.1.0
info:
  title: Entitlements
  version: 1.4.2
  description: >

    # Change log

    **2026-06-02** | v.1.4.2

    - Updated authentication: replaced single Basic Auth scheme with X-API-Key,
      Basic Auth, and OAuth2 (client credentials) security schemes, aligned with
      Reseller Notifications API

    **2025-06-12** | v.1.4.1

    - Overview & change log added


    **2024-09-04** | v.1.4.0

    - Top ups released


    **2023-08-14** | v.1.3.0

    - Added reseller-initiated /activationInfo endpoint

    - Added metadata to error responses to identify whether the error originated
    from Bango or the merchant. This is to help resellers resolve integration
    issues more easily.


    **2022-09-22** | v.1.2.0

    - Added Bango-generated sharedCustomerId to reseller notifications, merchant
    requests and all responses


    **2021-08-05** | v.1.1.0

    - Added extensionData for resellers

    - Added merchantExtensionData for merchants

    - Added financeData to relevant merchant-initiated API requests, reseller
    notifications and all responses

    - Added merchantBangoExtensionData for merchant requests and responses

    - Added externalEntitlementId for resellers


    **2020-11-03** | v.1.0.0

    - Initial release
servers:
  - url: https://resale.api.sandbox.bango.com
    description: Integration test environment
  - url: https://resale.api.bango.com
    description: Production environment
security:
  - XApiKey: []
  - BasicAuth: []
  - OAuth2: []
tags:
  - name: Echo
    description: Check your connection to the Bango resale API
  - name: Entitlement
    description: Manage the lifecycle of your entitlements
  - name: Top Ups
    description: >-
      Top up short-lived entitlements for automated duration extension and
      suspend/terminate flows
paths:
  /v1/entitlement/accountRecovery/{entitlementId}:
    post:
      tags:
        - Entitlement
      summary: Account recovery
      description: >
        Use this to recover the customer's account for a given entitlement.


        Please note that the base url for this endpoint is different:

        - Sandbox: https://acr-b33f-resale.eu.uat.integrator.bango.com

        - Production - US region:
        https://acr-b33f-resale.us.integrator.bango.com

        - Production - EU region:
        https://acr-b33f-resale.eu.integrator.bango.com

        - Production - AP region:
        https://acr-b33f-resale.ap.integrator.bango.com 
      operationId: account_recovery_v1_entitlement_accountRecovery__entitlement_id__post
      parameters:
        - name: x-request-id
          in: header
          description: >-
            Unique request id generated by the reseller. Useful for e2e
            trouble-shooting. While listed as an optional header, some content
            providers consider this to be mandatory.
          schema:
            type: string
        - name: x-operation-id
          in: header
          description: >-
            Reseller-generated unique id per operation. Used by some content
            providers to identify an idempotent retry. While listed as an
            optional header, some content providers consider this to be
            mandatory.
          schema:
            type: string
        - name: entitlementId
          in: path
          description: Bango generated unique identifier of the entitlement
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EntitlementAccountRecoveryRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccountRecoveryResponse'
              examples:
                Success:
                  value:
                    responseCode: Ok
                    responseMessage: Success
                    recoveryUrl: https://example.activation.url.bango.com
                    expiryTs: '2024-06-17T20:38:39Z'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AC-BadRequestResponse'
              examples:
                Bad request:
                  value:
                    responseCode: BAD_REQUEST
                    responseMessage: Invalid request.
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AC-AuthorizationErrorResponse'
              examples:
                Not authorized:
                  value:
                    responseCode: UNAUTHORIZED
                    responseMessage: >-
                      You have not provided adequate credentials to access this
                      resource.
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AC-NotFoundResponse'
              examples:
                Not found:
                  value:
                    responseCode: NOT_FOUND
                    responseMessage: Resource not found
        '409':
          description: Invalid State
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AC-InvalidStateResponse'
              examples:
                Conflict:
                  value:
                    responseCode: INVALID_STATE
                    responseMessage: >-
                      The entitlement is not in the correct state to be
                      recovered.
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AC-TooManyRequestsResponse'
              examples:
                Too many requests:
                  value:
                    responseCode: TOO_MANY_REQUESTS
                    responseMessage: Request limit has been reached
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AC-InternalErrorResponse'
              examples:
                Internal server error:
                  value:
                    responseCode: INTERNAL_ERROR
                    responseMessage: >-
                      The server encountered an unexpected condition which
                      prevented it from fulfilling the request.
        '503':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AC-ServiceUnavailableResponse'
              examples:
                Service unavailable:
                  value:
                    responseCode: SERVICE_UNAVAILABLE
                    responseMessage: null
components:
  schemas:
    EntitlementAccountRecoveryRequest:
      title: EntitlementAccountRecoveryRequest
      required:
        - resellerKey
        - requestType
      type: object
      properties:
        resellerKey:
          title: Resellerkey
          type: string
          description: Static value representing the reseller on the Bango system
          examples:
            - BANGO_TEL
        requestType:
          type: string
          enum:
            - ACCOUNT_RECOVERY
            - ACCOUNT_UNLINK
          description: The type of account recovery required
          examples:
            - ACCOUNT_RECOVERY
    AccountRecoveryResponse:
      title: AccountRecoveryResponse
      required:
        - accountRecoveryType
      type: object
      properties:
        responseCode:
          title: Responsecode
          type: string
          default: Ok
        responseMessage:
          title: Responsemessage
          type: string
          default: Success
        recoveryUrl:
          title: recoveryUrl
          type: string
          default: https://bango.com/activate
        expiryTs:
          title: expiryTs
          type: string
          default: '2024-06-17T20:38:39Z'
      description: Successful Response
    AC-BadRequestResponse:
      title: BadRequestResponse
      type: object
      properties:
        responseCode:
          title: Responsecode
          type: string
          default: BAD_REQUEST
        responseMessage:
          title: Responsemessage
          type: string
          default: Invalid request.
      description: Response model for HTTP status code 400.
    AC-AuthorizationErrorResponse:
      title: AuthorizationErrorResponse
      type: object
      properties:
        responseCode:
          title: Responsecode
          type: string
          default: UNAUTHORIZED
        responseMessage:
          title: Responsemessage
          type: string
          default: You have not provided adequate credentials to access this resource.
      description: Response model for HTTP status code 401.
    AC-NotFoundResponse:
      type: object
      properties:
        responseCode:
          title: Responsecode
          type: string
          examples:
            - NOT_FOUND
        responseMessage:
          title: Responsemessage
          type: string
          examples:
            - Resource not found
    AC-InvalidStateResponse:
      type: object
      properties:
        responseCode:
          title: Responsecode
          type: string
          default: INVALID_STATE
        responseMessage:
          title: Responsemessage
          type: string
          examples:
            - The entitlement is not in the correct state to be recovered.
    AC-TooManyRequestsResponse:
      type: object
      properties:
        responseCode:
          title: Responsecode
          type: string
          default: TOO_MANY_REQUESTS
        responseMessage:
          title: Responsemessage
          type: string
          examples:
            - Request limit has been reached
            - please retry.
    AC-InternalErrorResponse:
      type: object
      properties:
        responseCode:
          title: Responsecode
          type: string
          default: INTERNAL_ERROR
        responseMessage:
          title: Responsemessage
          type: string
          examples:
            - >-
              The server encountered an unexpected condition which prevented it
              from fulfilling the request.
    AC-ServiceUnavailableResponse:
      type: object
      properties:
        responseCode:
          title: Responsecode
          type: string
          default: SERVICE_UNAVAILABLE
        responseMessage:
          title: Responsemessage
          type: string
          examples:
            - null
  securitySchemes:
    XApiKey:
      type: apiKey
      in: header
      name: x-api-key
    BasicAuth:
      type: http
      scheme: basic
    OAuth2:
      type: oauth2
      description: >
        Bango uses
        https://www.oauth.com/oauth2-servers/access-tokens/client-credentials/.

        Please note that when requesting a token, we only support the option to
        send the client secret in the request body
      flows:
        clientCredentials:
          tokenUrl: https://auth.bango.com/oath2/token
          scopes:
            any: >-
              grants Bango access to the merchant system based on merchant
              defined rules

````