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

# Admin Restore Page

> Restore a deleted page from the trash, with the sections deleted along with it.

Same authorization as DELETE. The page comes back with its privacy,
draft and published tree as they were at deletion, so a published page
is served to members again. It never comes back as the hub homepage.



## OpenAPI

````yaml /openapi/mio-openapi.json post /api/v1/teams/{team_id}/hubs/{hub_id}/pages/{page_id}/restore
openapi: 3.1.0
info:
  description: >-
    Production API reference for Membership.io. Use the authored guides for
    workflows and the generated endpoint pages for exact parameters and schemas.
  title: Membership.io API
  version: 0.1.0
servers:
  - description: Production
    url: https://api.member.dev
security:
  - bearerAuth: []
paths:
  /api/v1/teams/{team_id}/hubs/{hub_id}/pages/{page_id}/restore:
    post:
      tags:
        - pages-admin
      summary: Admin Restore Page
      description: >-
        Restore a deleted page from the trash, with the sections deleted along
        with it.


        Same authorization as DELETE. The page comes back with its privacy,

        draft and published tree as they were at deletion, so a published page

        is served to members again. It never comes back as the hub homepage.
      operationId: >-
        pages_admin.post_pages_admin_post_teams_by_team_id_hubs_by_hub_id_pages_by_page_id_restore
      parameters:
        - in: path
          name: team_id
          required: true
          schema:
            title: Team Id
            type: string
        - in: path
          name: hub_id
          required: true
          schema:
            title: Hub Id
            type: string
        - in: path
          name: page_id
          required: true
          schema:
            title: Page Id
            type: string
      responses:
        '200':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/AdminPageResponse'
          description: Successful Response
        '404':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/JsonApiErrorResponse'
          description: >-
            The page is not a deleted page of this hub: it is live, does not
            exist, or belongs to another hub or team.
        '409':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/JsonApiErrorResponse'
          description: >-
            A live page of the hub would collide with the restored one.
            `errors[0].code` is `slug_taken` (`source.pointer`
            `/data/attributes/slug`): another live page uses the slug; or
            `auth_page_duplicate` / `content_page_duplicate` (`source.pointer`
            `/data/attributes/type`): the hub already has a live page of a type
            it allows only once. Nothing is changed.
          x-error-codes:
            - slug_taken
            - auth_page_duplicate
            - content_page_duplicate
        '422':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      security:
        - HTTPBearer: []
components:
  schemas:
    AdminPageResponse:
      additionalProperties: false
      description: Single-resource JSON:API response for admin page reads.
      properties:
        data:
          $ref: '#/components/schemas/AdminPageResource'
      required:
        - data
      title: AdminPageResponse
      type: object
    JsonApiErrorResponse:
      description: Error JSON:API response.
      properties:
        errors:
          items:
            $ref: '#/components/schemas/JsonApiError'
          title: Errors
          type: array
        meta:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Meta
      required:
        - errors
      title: JsonApiErrorResponse
      type: object
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          title: Detail
          type: array
      title: HTTPValidationError
      type: object
    AdminPageResource:
      additionalProperties: false
      description: JSON:API resource object for admin page reads (includes draft_version).
      properties:
        attributes:
          $ref: '#/components/schemas/AdminPageAttributes'
        id:
          title: Id
          type: string
        links:
          anyOf:
            - $ref: '#/components/schemas/JsonApiLinks'
            - type: 'null'
        type:
          const: pages
          default: pages
          title: Type
          type: string
      required:
        - id
        - attributes
      title: AdminPageResource
      type: object
    JsonApiError:
      properties:
        code:
          anyOf:
            - type: string
            - type: 'null'
          title: Code
        detail:
          anyOf:
            - type: string
            - type: 'null'
          title: Detail
        id:
          anyOf:
            - type: string
            - type: 'null'
          title: Id
        meta:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Meta
        source:
          anyOf:
            - additionalProperties:
                type: string
              type: object
            - type: 'null'
          title: Source
        status:
          title: Status
          type: string
        title:
          title: Title
          type: string
      required:
        - status
        - title
      title: JsonApiError
      type: object
    ValidationError:
      properties:
        ctx:
          title: Context
          type: object
        input:
          title: Input
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          title: Location
          type: array
        msg:
          title: Message
          type: string
        type:
          title: Error Type
          type: string
      required:
        - loc
        - msg
        - type
      title: ValidationError
      type: object
    AdminPageAttributes:
      additionalProperties: false
      properties:
        created_at:
          format: date-time
          title: Created At
          type: string
        deleted_at:
          anyOf:
            - format: date-time
              type: string
            - type: 'null'
          title: Deleted At
        draft_version:
          title: Draft Version
          type: integer
        hub_id:
          title: Hub Id
          type: string
        icon:
          anyOf:
            - type: string
            - type: 'null'
          title: Icon
        is_homepage:
          title: Is Homepage
          type: boolean
        last_published_at:
          anyOf:
            - format: date-time
              type: string
            - type: 'null'
          description: >-
            When this page was last published, by a single-page publish or a
            hub-wide publish. Discarding a draft does not change it. Null when
            the page has never been published, or was published before this
            field existed and no record of that publish's time is kept.
            Read-only: create and update requests that send it are rejected with
            422.
          title: Last Published At
        meta:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Meta
        parent_page_id:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            Id of the page this one hangs under, or null. A live page of the
            same hub; cleared when the parent is deleted.
          title: Parent Page Id
        position:
          title: Position
          type: integer
        privacy:
          title: Privacy
          type: string
        purge_at:
          anyOf:
            - format: date-time
              type: string
            - type: 'null'
          description: >-
            When a deleted page becomes eligible for permanent deletion:
            `deleted_at` plus the 30-day trash retention. Until then it can be
            restored with POST .../pages/{page_id}/restore. Null for a live
            page. Read-only.
          title: Purge At
        settings:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Settings
        slug:
          title: Slug
          type: string
        title:
          title: Title
          type: string
        type:
          title: Type
          type: string
        updated_at:
          format: date-time
          title: Updated At
          type: string
      required:
        - hub_id
        - title
        - slug
        - type
        - privacy
        - is_homepage
        - position
        - settings
        - meta
        - parent_page_id
        - created_at
        - updated_at
        - deleted_at
        - draft_version
        - last_published_at
        - icon
        - purge_at
      title: AdminPageAttributes
      type: object
    JsonApiLinks:
      properties:
        self:
          anyOf:
            - type: string
            - type: 'null'
          title: Self
      title: JsonApiLinks
      type: object
  securitySchemes:
    bearerAuth:
      bearerFormat: JWT or mio_sk API key
      description: >-
        Send platform JWTs, contact JWTs, or team API keys as `Authorization:
        Bearer <token>`.
      scheme: bearer
      type: http
    HTTPBearer:
      scheme: bearer
      type: http

````

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