---
updatedAt: 2026-09-10T06:16:17.000Z
agentTools:
  projectIndex: https://developer.vouchfor.com/llms.txt
---

# Prompt Chat

Run a prompt against a chat. Posting to /chats starts a new chat, a body without a prompt only reserves a chat id

# OpenAPI definition

```json
{
  "openapi": "3.0.3",
  "info": {
    "title": "Vouch",
    "description": "test",
    "termsOfService": "https://vouchfor.com/terms",
    "contact": {
      "name": "Vouch API Support",
      "email": "support@vouchfor.com"
    },
    "version": "1.0"
  },
  "servers": [
    {
      "url": "https://{environment}.vouchfor.com/v1",
      "variables": {
        "environment": {
          "default": "api",
          "enum": [
            "api",
            "api-staging"
          ]
        }
      }
    },
    {
      "url": "https://{environment}.vouchfor.com/v1/entities/{entityId}",
      "variables": {
        "environment": {
          "default": "api",
          "enum": [
            "api",
            "api-staging"
          ]
        },
        "entityId": {
          "default": "demo",
          "description": "Entity ID"
        }
      }
    }
  ],
  "components": {
    "requestBodies": {
      "ChatPrompt": {
        "description": "Chat Prompt",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "account": {
                  "$ref": "#/components/schemas/Account"
                },
                "name": {
                  "type": "string"
                },
                "prompt": {
                  "type": "string",
                  "description": "A body without a prompt only reserves a chat id"
                },
                "items": {
                  "type": "array",
                  "description": "Resources the prompt should reference",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "type": {
                        "type": "string",
                        "example": "VOUCH"
                      }
                    },
                    "required": [
                      "id",
                      "type"
                    ]
                  }
                }
              }
            }
          }
        }
      }
    },
    "responses": {
      "Chat": {
        "description": "Chat Object",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Chat"
            }
          }
        }
      },
      "BadRequestError": {
        "description": "Request content is invalid",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "example": {
              "error": "Bad Request."
            }
          }
        }
      },
      "NotFoundError": {
        "description": "The requested resource is not found",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "example": {
              "error": "Not Found."
            }
          }
        }
      },
      "UnauthorizedError": {
        "description": "Invalid API key",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "example": {
              "error": "Unauthorized."
            }
          }
        }
      },
      "ConflictError": {
        "description": "A prompt is already running on this chat",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "example": {
              "error": "A prompt is already running on this chat"
            }
          }
        }
      },
      "InternalServerError": {
        "description": "Internal server error",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "example": {
              "error": "Internal Server Error."
            }
          }
        }
      }
    },
    "schemas": {
      "Account": {
        "type": "object",
        "properties": {
          "email": {
            "type": "string",
            "format": "email",
            "example": "david@vouchfor.com"
          },
          "name": {
            "type": "string",
            "example": "David Stirk"
          }
        }
      },
      "Chat": {
        "type": "object",
        "properties": {
          "createddate": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "updateddate": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "id": {
            "type": "string",
            "readOnly": true,
            "example": "hhhhhhhhhh"
          },
          "name": {
            "type": "string",
            "example": "New chat"
          },
          "status": {
            "type": "string",
            "readOnly": true,
            "enum": [
              "processing",
              "complete",
              "failed"
            ],
            "example": "complete"
          },
          "response": {
            "type": "string",
            "readOnly": true,
            "description": "The last assistant response, present when status is complete"
          },
          "progress": {
            "type": "string",
            "readOnly": true,
            "description": "A summary of the current step, present when status is processing"
          },
          "error": {
            "type": "string",
            "readOnly": true,
            "description": "Present when status is failed"
          }
        }
      },
      "Error": {
        "type": "object",
        "properties": {
          "error": {
            "type": "string"
          }
        }
      }
    },
    "securitySchemes": {
      "ApiKey": {
        "type": "apiKey",
        "name": "x-api-key",
        "in": "header"
      }
    }
  },
  "security": [
    {
      "ApiKey": []
    }
  ],
  "tags": [
    {
      "name": "Chat"
    }
  ],
  "paths": {
    "/chats": {
      "post": {
        "summary": "Prompt Chat",
        "description": "Run a prompt against a chat. Posting to /chats starts a new chat, a body without a prompt only reserves a chat id",
        "tags": [
          "Chat"
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/ChatPrompt"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/Chat"
          },
          "400": {
            "$ref": "#/components/responses/BadRequestError"
          },
          "401": {
            "$ref": "#/components/responses/UnauthorizedError"
          },
          "404": {
            "$ref": "#/components/responses/NotFoundError"
          },
          "409": {
            "$ref": "#/components/responses/ConflictError"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    }
  }
}
```