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

# Go back to an earlier version of a page

> Nothing is erased: restoring ADDS a revision whose content is the old one, so the history of a page never gets shorter. The body is optional — restoring without a word is legitimate, and the default message names the restored `sha`.



## OpenAPI

````yaml /api-reference/openapi.json post /projects/{projectId}/wiki/{pageId}/revisions/{revisionId}/restore
openapi: 3.1.0
info:
  title: Atako API
  version: 0.1.0
  description: >-
    The Atako customer API — manage AI agents, their files, integrations,
    billing, and your company/team, programmatically.


    ## Authentication


    Every non-public endpoint takes a Bearer token that is either:

    - a **programmatic API key** (`aik_…`) — create one at
    [app.atako.ai](https://app.atako.ai) → Settings → API keys (company-admin
    only), or

    - a **Supabase session JWT** — what the web app itself sends; not practical
    to obtain outside a browser session.


    ```bash

    curl https://api.atako.ai/agents -H "Authorization: Bearer aik_..."

    ```


    An API key acts as its owning user, with all of that user's permissions —
    there is no separate key scope in this release.


    ## Other Atako HTTP surfaces (not covered by this spec)


    - **Atako MCP server** — `POST /mcp` (auth: same Bearer token as above)
    exposes a read-only Model Context Protocol tool catalogue for AI clients
    (Claude Code, Claude Desktop, Cursor, ChatGPT). See
    [docs.atako.ai/developers/mcp/overview](https://docs.atako.ai/developers/mcp/overview).

    - **Content API** (`cak_…` key, `/content/*`) — a separate, more restricted
    key type for headless CMS-style access to blog/news/use-case content. Not
    documented here.


    ## Errors


    Errors use a JSON envelope: `{ "error": string, "code"?: string }`. `error`
    is either a short human-readable message or a SCREAMING_SNAKE_CASE code,
    depending on the route — treat it as an opaque string to match against, not
    a stable enum across the whole API.


    ## Rate limits


    Authenticated routes: 6000 requests/min per user (`authRateLimit`). Public
    GET routes: 60/min per IP. A handful of sensitive public POST routes
    (newsletter signup, email-exists, invitation preview) are limited to 10
    requests / 15 min per IP.


    ## Pagination


    List endpoints use either simple `limit`/`offset` query params (marketing
    content — a plain JSON array response, capped at the documented max) or
    `page`/`limit` (credit transactions). Neither returns a total count today;
    fetch until a page comes back shorter than `limit`.
servers:
  - url: https://api.atako.ai
    description: Production
security: []
tags:
  - name: Agents
  - name: Messages
  - name: Activity
  - name: Agent Options
  - name: API Keys
  - name: Files
  - name: Cron Jobs
  - name: Sub-Agents
  - name: Interagent Messages
  - name: Integrations
  - name: Subscriptions
  - name: Users
  - name: Company
  - name: Teams
  - name: Floor
  - name: Projects
  - name: Public
  - name: Marketing Content
paths:
  /projects/{projectId}/wiki/{pageId}/revisions/{revisionId}/restore:
    post:
      tags:
        - Projects
      summary: Go back to an earlier version of a page
      description: >-
        Nothing is erased: restoring ADDS a revision whose content is the old
        one, so the history of a page never gets shorter. The body is optional —
        restoring without a word is legitimate, and the default message names
        the restored `sha`.
      operationId: restoreProjectWikiRevision
      parameters:
        - name: projectId
          in: path
          required: true
          description: Project id
          schema:
            type: string
            format: uuid
        - name: pageId
          in: path
          required: true
          description: Wiki page id
          schema:
            type: string
            format: uuid
        - name: revisionId
          in: path
          required: true
          description: Revision id
          schema:
            type: string
            format: uuid
      requestBody:
        description: Optional.
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                message:
                  type: string
                  maxLength: 500
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  page:
                    $ref: '#/components/schemas/ProjectWikiPageDetail'
                required:
                  - page
        '400':
          description: >-
            Malformed project/card/page/revision id, invalid JSON body, or
            validation error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Missing, malformed, or invalid bearer token / API key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Unknown page, or a revision that does not belong to this page.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - bearerAuth: []
components:
  schemas:
    ProjectWikiPageDetail:
      type: object
      description: >-
        An open page: its current text, a page of its history (newest first) and
        its sub-pages as table-of-contents entries. Every wiki write returns
        this same shape, so an editor never has to re-read the page it just
        saved.
      properties:
        id:
          type: string
          format: uuid
        title:
          type: string
          maxLength: 200
        path:
          type: string
          maxLength: 500
        position:
          type: integer
        parentId:
          type: string
          format: uuid
          nullable: true
          description: null for a page sitting at the root of the wiki.
        content:
          type: string
          description: >-
            Always identical to `history[0].content` — the two are written in
            the same transaction and cannot diverge.
        history:
          type: array
          items:
            $ref: '#/components/schemas/ProjectWikiRevision'
          description: Newest first, capped by `limit` (50 by default).
        historyTotal:
          type: integer
          description: Revisions the page has in all, beyond the slice returned.
        children:
          type: array
          items:
            $ref: '#/components/schemas/ProjectWikiNode'
      required:
        - id
        - title
        - path
        - position
        - parentId
        - content
        - history
        - historyTotal
        - children
    Error:
      type: object
      description: >-
        Atako's standard error envelope. `error` is either a short
        human-readable message or a SCREAMING_SNAKE_CASE code (routes are
        inconsistent about which — treat it as an opaque string and match on it
        exactly if you need to branch on error type). Some routes add extra
        fields alongside `error` (see the operation's own error responses).
      properties:
        error:
          type: string
        code:
          type: string
          description: >-
            Present on some routes; a stable machine-readable code duplicating
            or refining `error`.
      required:
        - error
      additionalProperties: true
    ProjectWikiRevision:
      type: object
      description: >-
        One past state of a page, kept whole rather than as a patch, so reading
        an old version costs a single read. `sha` is a 7-character fingerprint
        unique within the page, and `author` is frozen at write time like a card
        comment's.
      properties:
        id:
          type: string
          format: uuid
        sha:
          type: string
          description: Short content fingerprint, as Git displays one.
        at:
          type: string
          format: date-time
        author:
          type: string
        message:
          type: string
          maxLength: 500
          description: Why the page was written, in the spirit of a commit message.
        content:
          type: string
          description: The page's full Markdown at that moment.
      required:
        - id
        - sha
        - at
        - author
        - message
        - content
    ProjectWikiNode:
      type: object
      description: >-
        An entry of the wiki's table of contents: where a page sits, not what it
        says. `content` appears only when the caller asked for it
        (`?withContent=true`), and `revisionCount` lets the sidebar show how
        often a page was rewritten without loading any history.
      properties:
        id:
          type: string
          format: uuid
        title:
          type: string
          maxLength: 200
        path:
          type: string
          maxLength: 500
        position:
          type: integer
          description: Rank among its siblings.
        revisionCount:
          type: integer
        content:
          type: string
        children:
          type: array
          items:
            $ref: '#/components/schemas/ProjectWikiNode'
      required:
        - id
        - title
        - path
        - position
        - revisionCount
        - children
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        An `aik_…` programmatic API key (app.atako.ai → Settings → API keys) or
        a Supabase session JWT.

````