v0 · Capability

v0 App API — chats

v0 App API — chats. 45 operations. Lead operation: Create Chat. Self-contained Naftiko capability covering one V0 business surface.

Run with Naftiko V0chats

What You Can Do

POST
Chatscreate — Create Chat
/v1/chats
GET
Chatsfind — Find Chats
/v1/chats
POST
Chatsinit — Initialize Chat
/v1/chats/init
DELETE
Chatsdelete — Delete Chat
/v1/chats/{chatid}
GET
Chatsgetbyid — Get Chat
/v1/chats/{chatid}
PATCH
Chatsupdate — Update Chat
/v1/chats/{chatid}
POST
Chatschatidagentlogscreate — chatschatidagentlogscreate
/v1/chats/{chatid}/agent/logs
GET
Chatsfinddeployments — Find Deployments
/v1/chats/{chatid}/deployments
POST
Chatsdeployments — Create Deployment
/v1/chats/{chatid}/deployments
GET
Chatsfindenvvars — Find Environment Variables
/v1/chats/{chatid}/env-vars
POST
Chatsenvvars — Create Environment Variables
/v1/chats/{chatid}/env-vars
POST
Chatschatidenvvarsdeletecreate — Delete Environment Variables
/v1/chats/{chatid}/env-vars/delete
PUT
Chatsfavorite — Favorite Chat
/v1/chats/{chatid}/favorite
POST
Chatsfork — Fork Chat
/v1/chats/{chatid}/fork
GET
Chatschatidgitactivityfind — chatschatidgitactivityfind
/v1/chats/{chatid}/git/activity
GET
Chatschatidgitconnectionfind — chatschatidgitconnectionfind
/v1/chats/{chatid}/git/connection
GET
Chatschatidgitdeploymentfind — chatschatidgitdeploymentfind
/v1/chats/{chatid}/git/deployment
POST
Chatschatidgitmergepullrequestcreate — chatschatidgitmergepullrequestcreate
/v1/chats/{chatid}/git/merge-pull-request
POST
Chatschatidgitpullchangescreate — chatschatidgitpullchangescreate
/v1/chats/{chatid}/git/pull-changes
POST
Chatschatidgitpullrequestcreate — chatschatidgitpullrequestcreate
/v1/chats/{chatid}/git/pull-request
GET
Chatschatidgitstatusfind — chatschatidgitstatusfind
/v1/chats/{chatid}/git/status
GET
Chatsfindmessages — Find Chat Messages
/v1/chats/{chatid}/messages
POST
Chatssendmessage — Send Message
/v1/chats/{chatid}/messages
GET
Chatsgetmessage — Get Chat Message
/v1/chats/{chatid}/messages/{messageid}
DELETE
Chatschatidmessagesmessageiddelete — Delete Message
/v1/chats/{chatid}/messages/{messageid}
POST
Chatsresume — Resume Message
/v1/chats/{chatid}/messages/{messageid}/resume
POST
Chatsstop — Stop Message
/v1/chats/{chatid}/messages/{messageid}/stop
GET
Chatsgetmetadata — Get Chat Metadata
/v1/chats/{chatid}/metadata
POST
Chatsresolvetask — Resolve Task
/v1/chats/{chatid}/tasks/resolve
POST
Chatsupload — Upload File
/v1/chats/{chatid}/upload
GET
Chatsfindvercel — chatsfindvercel
/v1/chats/{chatid}/vercel
POST
Chatsvercelproject — Create Vercel Project
/v1/chats/{chatid}/vercel-project
GET
Chatsfindversionpicker — chatsfindversionpicker
/v1/chats/{chatid}/version-picker
GET
Chatsfindversions — Find Chat Versions
/v1/chats/{chatid}/versions
GET
Chatsgetversion — Get Chat Version
/v1/chats/{chatid}/versions/{versionid}
PATCH
Chatsupdateversion — Update Chat Version Files
/v1/chats/{chatid}/versions/{versionid}
GET
Chatsgetversiondiffpatch — Get Version Diff Patch
/v1/chats/{chatid}/versions/{versionid}/diff-patch
GET
Chatsgetversiondiffstats — Get Version Diff Stats
/v1/chats/{chatid}/versions/{versionid}/diff-stats
GET
Chatsdownloadversion — Download version files
/v1/chats/{chatid}/versions/{versionid}/download
POST
Chatsdeleteversionfiles — Delete Chat Version Files
/v1/chats/{chatid}/versions/{versionid}/files/delete
GET
Chatsfindiframe — Get Version Iframe
/v1/chats/{chatid}/versions/{versionid}/iframe
POST
Chatsrecreate — Recreate Version VM
/v1/chats/{chatid}/versions/{versionid}/recreate
POST
Chatsrestore — Restore Block
/v1/chats/{chatid}/versions/{versionid}/restore
GET
Chatsfindvmlogs — Get Version VM Logs
/v1/chats/{chatid}/versions/{versionid}/vm-logs
DELETE
Chatsvmlogs — Clear Version VM Logs
/v1/chats/{chatid}/versions/{versionid}/vm-logs

MCP Tools

create-chat

Create Chat

find-chats

Find Chats

read-only idempotent
initialize-chat

Initialize Chat

delete-chat

Delete Chat

idempotent
get-chat

Get Chat

read-only idempotent
update-chat

Update Chat

idempotent
chatschatidagentlogscreate

chatschatidagentlogscreate

find-deployments

Find Deployments

read-only idempotent
create-deployment

Create Deployment

find-environment-variables

Find Environment Variables

read-only idempotent
create-environment-variables

Create Environment Variables

delete-environment-variables

Delete Environment Variables

favorite-chat

Favorite Chat

idempotent
fork-chat

Fork Chat

chatschatidgitactivityfind

chatschatidgitactivityfind

read-only idempotent
chatschatidgitconnectionfind

chatschatidgitconnectionfind

read-only idempotent
chatschatidgitdeploymentfind

chatschatidgitdeploymentfind

read-only idempotent
chatschatidgitmergepullrequestcreate

chatschatidgitmergepullrequestcreate

chatschatidgitpullchangescreate

chatschatidgitpullchangescreate

chatschatidgitpullrequestcreate

chatschatidgitpullrequestcreate

chatschatidgitstatusfind

chatschatidgitstatusfind

read-only idempotent
find-chat-messages

Find Chat Messages

read-only idempotent
send-message

Send Message

get-chat-message

Get Chat Message

read-only idempotent
delete-message

Delete Message

idempotent
resume-message

Resume Message

stop-message

Stop Message

get-chat-metadata

Get Chat Metadata

read-only idempotent
resolve-task

Resolve Task

upload-file

Upload File

chatsfindvercel

chatsfindvercel

read-only idempotent
create-vercel-project

Create Vercel Project

chatsfindversionpicker

chatsfindversionpicker

read-only idempotent
find-chat-versions

Find Chat Versions

read-only idempotent
get-chat-version

Get Chat Version

read-only idempotent
update-chat-version-files

Update Chat Version Files

idempotent
get-version-diff-patch

Get Version Diff Patch

read-only idempotent
get-version-diff-stats

Get Version Diff Stats

read-only idempotent
download-version-files

Download version files

read-only idempotent
delete-chat-version-files

Delete Chat Version Files

get-version-iframe

Get Version Iframe

read-only idempotent
recreate-version-vm

Recreate Version VM

restore-block

Restore Block

get-version-vm-logs

Get Version VM Logs

read-only idempotent
clear-version-vm-logs

Clear Version VM Logs

idempotent

Capability Spec

platform-chats.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: v0 App API — chats
  description: 'v0 App API — chats. 45 operations. Lead operation: Create Chat. Self-contained Naftiko capability covering
    one V0 business surface.'
  tags:
  - V0
  - chats
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    V0_API_KEY: V0_API_KEY
capability:
  consumes:
  - type: http
    namespace: platform-chats
    baseUri: https://api.v0.dev/v1
    description: v0 App API — chats business capability. Self-contained, no shared references.
    resources:
    - name: chats
      path: /chats
      operations:
      - name: chatscreate
        method: POST
        description: Create Chat
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
      - name: chatsfind
        method: GET
        description: Find Chats
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: limit
          in: query
          type: number
          description: Specifies the maximum number of chat records to return in a single response. Useful for paginating
            results when there are many chats.
        - name: offset
          in: query
          type: number
          description: Determines the starting point for pagination. Used in conjunction with limit to retrieve a specific
            page of chat results.
        - name: isFavorite
          in: query
          type: string
          description: Filters chats by their "favorite" status. Accepts `"true"` or `"false"` (as strings, not booleans).
        - name: vercelProjectId
          in: query
          type: string
          description: Filters chats by the linked Vercel project ID. Only returns chats associated with the specified Vercel
            project.
        - name: branch
          in: query
          type: string
          description: Filters chats by the Git branch name. Only returns chats that have an active Git connection with the
            specified branch as the head.
    - name: chats-init
      path: /chats/init
      operations:
      - name: chatsinit
        method: POST
        description: Initialize Chat
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    - name: chats-chatId
      path: /chats/{chatId}
      operations:
      - name: chatsdelete
        method: DELETE
        description: Delete Chat
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: chatId
          in: path
          type: string
          description: The unique identifier of the chat to delete. This must be passed as a path parameter in the URL.
          required: true
      - name: chatsgetbyid
        method: GET
        description: Get Chat
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: chatId
          in: path
          type: string
          description: The unique identifier of the chat to retrieve. Must be provided as a path parameter.
          required: true
        - name: cursor
          in: query
          type: string
          description: Query parameter "cursor"
        - name: limit
          in: query
          type: number
          description: Query parameter "limit"
      - name: chatsupdate
        method: PATCH
        description: Update Chat
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: chatId
          in: path
          type: string
          description: The unique identifier of the chat to update. Provided as a path parameter.
          required: true
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    - name: chats-chatId-agent-logs
      path: /chats/{chatId}/agent/logs
      operations:
      - name: chatschatidagentlogscreate
        method: POST
        description: ''
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: chatId
          in: path
          type: string
          description: Path parameter "chatId"
          required: true
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    - name: chats-chatId-deployments
      path: /chats/{chatId}/deployments
      operations:
      - name: chatsfinddeployments
        method: GET
        description: Find Deployments
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: chatId
          in: path
          type: string
          description: The ID of the chat to find deployments for
          required: true
        - name: versionId
          in: query
          type: string
          description: The ID of the version to find deployments for
          required: true
      - name: chatsdeployments
        method: POST
        description: Create Deployment
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: chatId
          in: path
          type: string
          description: The ID of the chat to create a deployment for
          required: true
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    - name: chats-chatId-env-vars
      path: /chats/{chatId}/env-vars
      operations:
      - name: chatsfindenvvars
        method: GET
        description: Find Environment Variables
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: chatId
          in: path
          type: string
          description: The ID of the chat whose environment variables should be retrieved.
          required: true
        - name: decrypted
          in: query
          type: string
          description: Whether to return decrypted values. Defaults to false (encrypted).
      - name: chatsenvvars
        method: POST
        description: Create Environment Variables
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: chatId
          in: path
          type: string
          description: The ID of the chat where environment variables should be created.
          required: true
        - name: decrypted
          in: query
          type: string
          description: Whether to return decrypted values. Defaults to false (encrypted).
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    - name: chats-chatId-env-vars-delete
      path: /chats/{chatId}/env-vars/delete
      operations:
      - name: chatschatidenvvarsdeletecreate
        method: POST
        description: Delete Environment Variables
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: chatId
          in: path
          type: string
          description: The ID of the chat whose environment variables should be deleted.
          required: true
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    - name: chats-chatId-favorite
      path: /chats/{chatId}/favorite
      operations:
      - name: chatsfavorite
        method: PUT
        description: Favorite Chat
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: chatId
          in: path
          type: string
          description: The unique identifier of the chat to update. Provided as a path parameter.
          required: true
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    - name: chats-chatId-fork
      path: /chats/{chatId}/fork
      operations:
      - name: chatsfork
        method: POST
        description: Fork Chat
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: chatId
          in: path
          type: string
          description: The unique identifier of the chat to fork. Provided as a path parameter.
          required: true
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    - name: chats-chatId-git-activity
      path: /chats/{chatId}/git/activity
      operations:
      - name: chatschatidgitactivityfind
        method: GET
        description: ''
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: chatId
          in: path
          type: string
          description: Path parameter "chatId"
          required: true
    - name: chats-chatId-git-connection
      path: /chats/{chatId}/git/connection
      operations:
      - name: chatschatidgitconnectionfind
        method: GET
        description: ''
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: chatId
          in: path
          type: string
          description: Path parameter "chatId"
          required: true
    - name: chats-chatId-git-deployment
      path: /chats/{chatId}/git/deployment
      operations:
      - name: chatschatidgitdeploymentfind
        method: GET
        description: ''
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: chatId
          in: path
          type: string
          description: Path parameter "chatId"
          required: true
        - name: sha
          in: query
          type: string
          description: Query parameter "sha"
          required: true
    - name: chats-chatId-git-merge-pull-request
      path: /chats/{chatId}/git/merge-pull-request
      operations:
      - name: chatschatidgitmergepullrequestcreate
        method: POST
        description: ''
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: chatId
          in: path
          type: string
          description: Path parameter "chatId"
          required: true
    - name: chats-chatId-git-pull-changes
      path: /chats/{chatId}/git/pull-changes
      operations:
      - name: chatschatidgitpullchangescreate
        method: POST
        description: ''
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: chatId
          in: path
          type: string
          description: The chat ID to pull changes into.
          required: true
    - name: chats-chatId-git-pull-request
      path: /chats/{chatId}/git/pull-request
      operations:
      - name: chatschatidgitpullrequestcreate
        method: POST
        description: ''
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: chatId
          in: path
          type: string
          description: Path parameter "chatId"
          required: true
    - name: chats-chatId-git-status
      path: /chats/{chatId}/git/status
      operations:
      - name: chatschatidgitstatusfind
        method: GET
        description: ''
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: chatId
          in: path
          type: string
          description: Path parameter "chatId"
          required: true
    - name: chats-chatId-messages
      path: /chats/{chatId}/messages
      operations:
      - name: chatsfindmessages
        method: GET
        description: Find Chat Messages
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: chatId
          in: path
          type: string
          description: The unique identifier of the chat to retrieve messages for. Provided as a path parameter.
          required: true
        - name: limit
          in: query
          type: number
          description: Specifies the maximum number of message records to return in a single response. Useful for paginating
            results when there are many messages.
        - name: cursor
          in: query
          type: string
          description: Base64 encoded cursor containing pagination data
      - name: chatssendmessage
        method: POST
        description: Send Message
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: chatId
          in: path
          type: string
          description: The unique identifier of the chat to send the message to. Provided as a path parameter.
          required: true
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    - name: chats-chatId-messages-messageId
      path: /chats/{chatId}/messages/{messageId}
      operations:
      - name: chatsgetmessage
        method: GET
        description: Get Chat Message
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: chatId
          in: path
          type: string
          description: The unique identifier of the chat containing the message. Provided as a path parameter.
          required: true
        - name: messageId
          in: path
          type: string
          description: The unique identifier of the message to retrieve. Provided as a path parameter.
          required: true
      - name: chatschatidmessagesmessageiddelete
        method: DELETE
        description: Delete Message
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: chatId
          in: path
          type: string
          description: The unique identifier of the chat containing the message to delete.
          required: true
        - name: messageId
          in: path
          type: string
          description: The unique identifier of the message to delete.
          required: true
    - name: chats-chatId-messages-messageId-resume
      path: /chats/{chatId}/messages/{messageId}/resume
      operations:
      - name: chatsresume
        method: POST
        description: Resume Message
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: chatId
          in: path
          type: string
          description: The unique identifier of the chat containing the message to resume. Provided as a path parameter.
          required: true
        - name: messageId
          in: path
          type: string
          description: The identifier of the specific message to resume. Provided as a path parameter.
          required: true
    - name: chats-chatId-messages-messageId-stop
      path: /chats/{chatId}/messages/{messageId}/stop
      operations:
      - name: chatsstop
        method: POST
        description: Stop Message
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: chatId
          in: path
          type: string
          description: The unique identifier of the chat containing the message to stop. Provided as a path parameter.
          required: true
        - name: messageId
          in: path
          type: string
          description: The identifier of the specific message to stop. Provided as a path parameter.
          required: true
    - name: chats-chatId-metadata
      path: /chats/{chatId}/metadata
      operations:
      - name: chatsgetmetadata
        method: GET
        description: Get Chat Metadata
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: chatId
          in: path
          type: string
          description: Path parameter "chatId"
          required: true
    - name: chats-chatId-tasks-resolve
      path: /chats/{chatId}/tasks/resolve
      operations:
      - name: chatsresolvetask
        method: POST
        description: Resolve Task
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: chatId
          in: path
          type: string
          description: The unique identifier of the chat containing the pending task. Provided as a path parameter.
          required: true
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    - name: chats-chatId-upload
      path: /chats/{chatId}/upload
      operations:
      - name: chatsupload
        method: POST
        description: Upload File
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: chatId
          in: path
          type: string
          description: Path parameter "chatId"
          required: true
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    - name: chats-chatId-vercel
      path: /chats/{chatId}/vercel
      operations:
      - name: chatsfindvercel
        method: GET
        description: ''
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: chatId
          in: path
          type: string
          description: Path parameter "chatId"
          required: true
    - name: chats-chatId-vercel-project
      path: /chats/{chatId}/vercel-project
      operations:
      - name: chatsvercelproject
        method: POST
        description: Create Vercel Project
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: chatId
          in: path
          type: string
          description: The ID of the chat to create a Vercel project for.
          required: true
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    - name: chats-chatId-version-picker
      path: /chats/{chatId}/version-picker
      operations:
      - name: chatsfindversionpicker
        method: GET
        description: ''
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: chatId
          in: path
          type: string
          description: Path parameter "chatId"
          required: true
    - name: chats-chatId-versions
      path: /chats/{chatId}/versions
      operations:
      - name: chatsfindversions
        method: GET
        description: Find Chat Versions
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: chatId
          in: path
          type: string
          description: The unique identifier of the chat to retrieve versions for. Provided as a path parameter.
          required: true
        - name: limit
          in: query
          type: number
          description: Specifies the maximum number of version records to return in a single response. Useful for paginating
            results when there are many versions.
        - name: cursor
          in: query
          type: string
          description: Base64 encoded cursor containing pagination data
    - name: chats-chatId-versions-versionId
      path: /chats/{chatId}/versions/{versionId}
      operations:
      - name: chatsgetversion
        method: GET
        description: Get Chat Version
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: chatId
          in: path
          type: string
          description: The unique identifier of the chat containing the version. Provided as a path parameter.
          required: true
        - name: versionId
          in: path
          type: string
          description: The unique identifier of the version to retrieve. Provided as a path parameter.
          required: true
        - name: includeDefaultFiles
          in: query
          type: string
          description: When true, includes all default files (package.json, configuration files, etc.) that would be part
            of a ZIP download. When false or omitted, returns only the ge
      - name: chatsupdateversion
        method: PATCH
        description: Update Chat Version Files
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: chatId
          in: path
          type: string
          description: The unique identifier of the chat containing the version to update. Provided as a path parameter.
          required: true
        - name: versionId
          in: path
          type: string
          description: The unique identifier of the version (block) to update. Provided as a path parameter.
          required: true
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    - name: chats-chatId-versions-versionId-diff-patch
      path: /chats/{chatId}/versions/{versionId}/diff-patch
      operations:
      - name: chatsgetversiondiffpatch
        method: GET
        description: Get Version Diff Patch
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: chatId
          in: path
          type: string
          description: The unique identifier of the chat.
          required: true
        - name: versionId
          in: path
          type: string
          description: The unique identifier of the version (block) to get diff patch for.
          required: true
        - name: fileName
          in: query
          type: string
          description: The file path to get the diff patch for.
          required: true
    - name: chats-chatId-versions-versionId-diff-stats
      path: /chats/{chatId}/versions/{versionId}/diff-stats
      operations:
      - name: chatsgetversiondiffstats
        method: GET
        description: Get Version Diff Stats
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: chatId
          in: path
          type: string
          description: The unique identifier of the chat.
          required: true
        - name: versionId
          in: path
          type: string
          description: The unique identifier of the version (block) to get diff stats for.
          required: true
    - name: chats-chatId-versions-versionId-download
      path: /chats/{chatId}/versions/{versionId}/download
      operations:
      - name: chatsdownloadversion
        method: GET
        description: Download version files
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: chatId
          in: path
          type: string
          description: The unique identifier of the chat containing the version. Provided as a path parameter.
          required: true
        - name: versionId
          in: path
          type: string
          description: The unique identifier of the version to download. Provided as a path parameter.
          required: true
        - name: format
          in: query
          type: string
          description: The archive format for the download. Choose "zip" for broad compatibility or "tarball" for Unix/Linux
            systems.
        - name: includeDefaultFiles
          in: query
          type: string
          description: When true, includes all default files (package.json, configuration files, etc.) that would be part
            of a complete deployment. When false or omitted, returns only
    - name: chats-chatId-versions-versionId-files-delete
      path: /chats/{chatId}/versions/{versionId}/files/delete
      operations:
      - name: chatsdeleteversionfiles
        method: POST
        description: Delete Chat Version Files
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: chatId
          in: path
          type: string
          description: The unique identifier of the chat containing the version to delete files from.
          required: true
        - name: versionId
          in: path
          type: string
          description: The unique identifier of the version (block) to delete files from.
          required: true
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    - name: chats-chatId-versions-versionId-iframe
      path: /chats/{chatId}/versions/{versionId}/iframe
      operations:
      - name: chatsfindiframe
        method: GET
        description: Get Version Iframe
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: chatId
          in: path
          type: string
          description: Path parameter "chatId"
          required: true
        - name: versionId
          in: path
          type: string
          description: Path parameter "versionId"
          required: true
    - name: chats-chatId-versions-versionId-recreate
      path: /chats/{chatId}/versions/{versionId}/recreate
      operations:
      - name: chatsrecreate
        method: POST
        description: Recreate Version VM
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: chatId
          in: path
          type: string
          description: Path parameter "chatId"
          required: true
        - name: versionId
          in: path
          type: string
          description: Path parameter "versionId"
          required: true
    - name: chats-chatId-versions-versionId-restore
      path: /chats/{chatId}/versions/{versionId}/restore
      operations:
      - name: chatsrestore
        method: POST
        description: Restore Block
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: chatId
          in: path
          type: string
          description: The unique identifier of the chat containing the version to restore.
          required: true
        - name: versionId
          in: path
          type: string
          description: The unique identifier of the version to restore.
          required: true
    - name: chats-chatId-versions-versionId-vm-logs
      path: /chats/{chatId}/versions/{versionId}/vm-logs
      operations:
      - name: chatsfindvmlogs
        method: GET
        description: Get Version VM Logs
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: chatId
          in: path
          type: string
          description: Path parameter "chatId"
          required: true
        - name: versionId
          in: path
          type: string
          description: Path parameter "versionId"
          required: true
      - name: chatsvmlogs
        method: DELETE
        description: Clear Version VM Logs
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: chatId
          in: path
          type: string
          description: Path parameter "chatId"
          required: true
        - name: versionId
          in: path
          type: string
          description: Path parameter "versionId"
          required: true
    authentication:
      type: apikey
      key: Authorization
      value: '{{env.V0_API_KEY}}'
      placement: header
  exposes:
  - type: rest
    namespace: platform-chats-rest
    port: 8080
    description: REST adapter for v0 App API — chats. One Spectral-compliant resource per consumed operation, prefixed with
      /v1.
    resources:
    - path: /v1/chats
      name: chats
      description: REST surface for chats.
      operations:
      - method: POST
        name: chatscreate
        description: Create Chat
        call: platform-chats.chatscreate
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
      - method: GET
        name: chatsfind
        description: Find Chats
        call: platform-chats.chatsfind
        with:
          limit: rest.limit
          offset: rest.offset
          isFavorite: rest.isFavorite
          vercelProjectId: rest.vercelProjectId
          branch: rest.branch
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/chats/init
      name: chats-init
      description: REST surface for chats-init.
      operations:
      - method: POST
        name: chatsinit
        description: Initialize Chat
        call: platform-chats.chatsinit
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/chats/{chatid}
      name: chats-chatid
      description: REST surface for chats-chatId.
      operations:
      - method: DELETE
        name: chatsdelete
        description: Delete Chat
        call: platform-chats.chatsdelete
        with:
          chatId: rest.chatId
        outputParameters:
        - type: object
          mapping: $.
      - method: GET
        name: chatsgetbyid
        description: Get Chat
        call: platform-chats.chatsgetbyid
        with:
          chatId: rest.chatId
          cursor: rest.cursor
          limit: rest.limit
        outputParameters:
        - type: object
          mapping: $.
      - method: PATCH
        name: chatsupdate
        description: Update Chat
        call: platform-chats.chatsupdate
        with:
          chatId: rest.chatId
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/chats/{chatid}/agent/logs
      name: chats-chatid-agent-logs
      description: REST surface for chats-chatId-agent-logs.
      operations:
      - method: POST
        name: chatschatidagentlogscreate
  

# --- truncated at 32 KB (64 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/v0/refs/heads/main/capabilities/platform-chats.yaml