Fini Prompts API
The Prompts API from Fini — 3 operation(s) for prompts.
The Prompts API from Fini — 3 operation(s) for prompts.
openapi: 3.1.0
info:
title: Fini AI Agents Prompts API
version: v2
description: Public REST API for Fini AI, the self-improving AI agent for enterprise customer support. Manage agents, conversations, knowledge (sources, articles, folders), rules, tags, and prompts, and drive the agent loop via Generate Answer. Structure captured by API Evangelist from the published Fini API reference; not an official Fini-published OpenAPI.
contact:
name: Fini AI
url: https://docs.usefini.com/en/api-reference/authentication
x-apis-json-generated: true
servers:
- url: https://api-prod.usefini.com/v2
description: Production
security:
- bearerAuth: []
tags:
- name: Prompts
paths:
/bots/{id}/hc-prompt/history/public:
get:
operationId: getPromptHistory
summary: List saved prompt versions for one agent, newest first.
tags:
- Prompts
description: List saved prompt versions for one agent, newest first. Requires the `read` scope.
externalDocs:
url: https://docs.usefini.com/en/api-reference/get-prompt-history
responses:
'200':
description: Successful response.
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'500':
$ref: '#/components/responses/ServerError'
'404':
$ref: '#/components/responses/NotFound'
parameters:
- name: id
in: path
required: true
schema:
type: string
description: The id path parameter.
/bots/{id}/hc-prompt/public:
get:
operationId: getPrompts
summary: Fetch the current merged prompts for one agent.
tags:
- Prompts
description: Fetch the current merged prompts for one agent. Requires the `read` scope.
externalDocs:
url: https://docs.usefini.com/en/api-reference/get-prompts
responses:
'200':
description: Successful response.
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'500':
$ref: '#/components/responses/ServerError'
'404':
$ref: '#/components/responses/NotFound'
parameters:
- name: id
in: path
required: true
schema:
type: string
description: The id path parameter.
/bots/{id}/hc-prompt:
post:
operationId: updatePrompts
summary: Save a new prompt version for one agent.
tags:
- Prompts
description: Save a new prompt version for one agent. Requires the `write` scope.
externalDocs:
url: https://docs.usefini.com/en/api-reference/update-prompts
responses:
'200':
description: Successful response.
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'500':
$ref: '#/components/responses/ServerError'
'404':
$ref: '#/components/responses/NotFound'
parameters:
- name: id
in: path
required: true
schema:
type: string
description: The id path parameter.
requestBody:
required: true
content:
application/json:
schema:
type: object
description: See the Fini API reference for the request body schema.
components:
responses:
Forbidden:
description: API key lacks the required scope.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
example:
statusCode: 403
message: API key does not have the required scope for this operation
error: Forbidden
Unauthorized:
description: Missing or invalid API key.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
example:
statusCode: 401
message: Unauthorized
error: Unauthorized
ServerError:
description: Internal server error.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
example:
statusCode: 500
message: Internal Server Error
error: Internal Server Error
NotFound:
description: Resource not found.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
example:
statusCode: 404
message: Not Found
error: Not Found
schemas:
Error:
type: object
description: Standard Fini error envelope.
properties:
statusCode:
type: integer
example: 403
message:
type: string
example: API key does not have the required scope for this operation
error:
type: string
example: Forbidden
securitySchemes:
bearerAuth:
type: http
scheme: bearer
bearerFormat: fini_ API key
description: 'Bearer token containing your Fini workspace API key. Format: `Bearer fini_...`. The key carries `read` and/or `write` scope; write routes require the `write` scope.'