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

# Restore a pitch version

> Make an earlier version the one that would be sent.



## OpenAPI

````yaml /api-reference/openapi.json post /api/v1/public/outreach/messages/{message_id}/version
openapi: 3.1.0
info:
  title: Hikoo REST API
  description: >-
    Programmatic access to your Hikoo data: AI citations, prompts, topics,
    competitors, sources, audits, site health, indexation, AI-crawler traffic,
    and outreach. Authenticate with a personal API key sent as `Authorization:
    Bearer <key>`. Create one in the dashboard under **Settings > API keys**.
  version: 1.0.0
servers:
  - url: https://api.tryhikoo.com
    description: Production
security:
  - apiKey: []
tags:
  - name: Account
    description: The user behind the API key.
  - name: Workspaces
    description: >-
      Workspaces the user belongs to. Use them to find the websites you can
      query.
  - name: Websites
    description: Every website the user can access, with its subscription status.
  - name: Website
    description: Metadata and plan of one website.
  - name: Citations
    description: >-
      Every time an AI assistant answers one of your prompts, Hikoo stores the
      answer as a citation. These endpoints list them and aggregate them by
      platform, source, sentiment and match type.
  - name: Prompts
    description: >-
      Prompts are the questions Hikoo sends to AI assistants for a website.
      Create, edit, archive and restore them, and read their visibility, answers
      and citations.
  - name: Topics
    description: Topics group prompts. Every prompt belongs to one topic.
  - name: Search queries
    description: >-
      The web searches AI assistants run internally (query fan-out) before
      answering your prompts.
  - name: URL lookup
    description: >-
      Where one URL shows up, across AI-cited sources and AI-crawler traffic, in
      one call.
  - name: Competitors
    description: >-
      Tracked competitors, their share of voice, and the competitor suggestions
      Hikoo detects in AI answers.
  - name: Source intelligence
    description: >-
      The domains and pages AI assistants cite for your prompts, and who appears
      on them.
  - name: Audits
    description: GEO audits of a full site, a list of pages or a single URL.
  - name: Health
    description: >-
      Site-level checks for AI readiness (robots.txt, llms.txt, sitemap) and
      improvement suggestions.
  - name: Indexation
    description: >-
      The pages Hikoo crawled on your website, their category, health and
      errors.
  - name: Content gaps
    description: >-
      Topics where AI assistants answer without citing you, with a content brief
      for each.
  - name: Agent analytics
    description: Traffic from AI crawlers and AI agents on your website.
  - name: Outreach
    description: >-
      The outreach agent: sources worth getting cited on, their contacts, the
      pitches waiting for approval, follow-ups, and what the agent is allowed to
      do on its own.
paths:
  /api/v1/public/outreach/messages/{message_id}/version:
    post:
      tags:
        - Outreach
      summary: Restore a pitch version
      description: Make an earlier version the one that would be sent.
      operationId: >-
        go_to_pitch_version_api_v1_public_outreach_messages__message_id__version_post
      parameters:
        - name: message_id
          in: path
          required: true
          schema:
            type: integer
            title: Message Id
        - name: website_id
          in: query
          required: true
          schema:
            type: integer
            description: Target website id
            title: Website Id
          description: Target website id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/OutreachVersionRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OutreachMessageResponse'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '429':
          $ref: '#/components/responses/RateLimited'
components:
  schemas:
    OutreachVersionRequest:
      properties:
        version:
          type: integer
          minimum: 1
          title: Version
      type: object
      required:
        - version
      title: OutreachVersionRequest
    OutreachMessageResponse:
      properties:
        id:
          type: integer
          title: Id
        channel:
          $ref: '#/components/schemas/OutreachChannel'
          default: email
        sequence_position:
          type: integer
          title: Sequence Position
        direction:
          $ref: '#/components/schemas/OutreachMessageDirection'
        subject:
          type: string
          title: Subject
        body:
          type: string
          title: Body
        language:
          anyOf:
            - type: string
            - type: 'null'
          title: Language
        status:
          $ref: '#/components/schemas/OutreachMessageStatus'
        scheduled_for:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Scheduled For
        sent_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Sent At
        gmail_thread_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Gmail Thread Id
        sender_email:
          anyOf:
            - type: string
            - type: 'null'
          title: Sender Email
        sender_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Sender Name
        edited_by_human:
          type: boolean
          title: Edited By Human
          default: false
        edited_by_user_id:
          anyOf:
            - type: integer
            - type: 'null'
          title: Edited By User Id
        approved_by_user_id:
          anyOf:
            - type: integer
            - type: 'null'
          title: Approved By User Id
        failure_reason:
          anyOf:
            - type: string
            - type: 'null'
          title: Failure Reason
        signature:
          anyOf:
            - type: string
            - type: 'null'
          title: Signature
        version:
          type: integer
          title: Version
          default: 1
        version_position:
          type: integer
          title: Version Position
          default: 1
        version_count:
          type: integer
          title: Version Count
          default: 1
        changed_span:
          anyOf:
            - type: object
            - type: 'null'
          title: Changed Span
        written_in:
          anyOf:
            - type: string
            - type: 'null'
          title: Written In
        linkedin_part:
          anyOf:
            - type: string
            - type: 'null'
          title: Linkedin Part
        separate:
          type: boolean
          title: Separate
          default: false
        reading:
          anyOf:
            - $ref: '#/components/schemas/OutreachReplyReadingResponse'
            - type: 'null'
        held:
          type: boolean
          title: Held
          default: false
        agent_reason:
          anyOf:
            - type: string
            - type: 'null'
          title: Agent Reason
        sent_without_asking:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Sent Without Asking
        agent_work_kind:
          anyOf:
            - type: string
            - type: 'null'
          title: Agent Work Kind
      type: object
      required:
        - id
        - sequence_position
        - direction
        - subject
        - body
        - status
      title: OutreachMessageResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    OutreachChannel:
      type: string
      enum:
        - email
        - linkedin
      title: OutreachChannel
    OutreachMessageDirection:
      type: string
      enum:
        - outbound
        - inbound
      title: OutreachMessageDirection
    OutreachMessageStatus:
      type: string
      enum:
        - draft
        - awaiting_approval
        - approved
        - scheduled
        - sending
        - sent
        - failed
        - cancelled
      title: OutreachMessageStatus
    OutreachReplyReadingResponse:
      properties:
        intent:
          type: string
          title: Intent
        related:
          type: boolean
          title: Related
          default: true
        needs_answer:
          type: boolean
          title: Needs Answer
          default: true
        summary:
          type: string
          title: Summary
          default: ''
        asks:
          items:
            type: string
          type: array
          title: Asks
        choices:
          items:
            $ref: '#/components/schemas/OutreachHandoverChoiceResponse'
          type: array
          title: Choices
        price:
          anyOf:
            - type: string
            - type: 'null'
          title: Price
        currency:
          anyOf:
            - type: string
            - type: 'null'
          title: Currency
        price_buys:
          type: string
          title: Price Buys
          default: ''
      type: object
      required:
        - intent
      title: OutreachReplyReadingResponse
    Error:
      type: object
      title: Error
      required:
        - detail
      properties:
        detail:
          type: string
          description: Human-readable explanation of the error.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    OutreachHandoverChoiceResponse:
      properties:
        choice:
          $ref: '#/components/schemas/OutreachHotReplyAnswer'
        label:
          type: string
          title: Label
        consequence:
          type: string
          title: Consequence
          default: ''
        needs_amount:
          type: boolean
          title: Needs Amount
          default: false
      type: object
      required:
        - choice
        - label
      title: OutreachHandoverChoiceResponse
    OutreachHotReplyAnswer:
      type: string
      enum:
        - ask_their_price
        - offer_up_to
        - decline_politely
        - i_will_reply
        - ask_what_it_includes
        - accept_non_money_terms
        - answer_their_question
        - instruct_agent
      title: OutreachHotReplyAnswer
  responses:
    Unauthorized:
      description: >-
        The `Authorization` header is missing, malformed, or the key is invalid,
        expired or revoked.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            detail: Invalid or expired API key
    Forbidden:
      description: >-
        The key is valid but not allowed to do this: the website has no active
        subscription, your role in the workspace is read-only for a write
        request, or your email is not verified.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            detail: >-
              This website has no active subscription, so its data is
              unavailable.
      headers:
        X-Error-Code:
          description: >-
            Stable machine-readable error code, when one applies (for example
            `rate_limited`).
          schema:
            type: string
    NotFound:
      description: >-
        The website, or the resource in the path, does not exist or is not
        visible to this key.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            detail: Website not found
    RateLimited:
      description: >-
        Too many requests for this API key. Wait for the number of seconds in
        `Retry-After`.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            detail: Too many requests. Please try again shortly.
      headers:
        Retry-After:
          description: Seconds to wait before retrying.
          schema:
            type: integer
        X-Error-Code:
          description: >-
            Stable machine-readable error code, when one applies (for example
            `rate_limited`).
          schema:
            type: string
  securitySchemes:
    apiKey:
      type: http
      scheme: bearer
      description: Personal API key created in the dashboard under Settings > API keys.

````

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