Create prompt template

Create a prompt template and its initial draft version.

Authentication

AuthorizationBearer

Bearer authentication of the form Bearer <API_KEY>, where API_KEY is your API key.

Request

This endpoint expects an object.
namestringRequired

Human-readable template name. Must be unique among the partner templates.

typeenumRequired
The channel the template is written for. Fixed for the life of the template.
Allowed values:
promptstringRequired

The system prompt of version 1. May contain {{placeholder}} variables — declare each one in variables before the version can be published.

descriptionstringOptional
What the template is for.
firstMessagestringOptional

The call greeting of version 1. Only valid on voice templates; may also contain {{placeholder}} variables.

variableslist of objectsOptional
Definitions for the placeholders used in the prompt and firstMessage.
toolIdslist of stringsOptional
Partner tools used by this version, by ID. The tools become available when this version is assigned to a workspace.

Response

The created template and its initial draft version.
templateobject
The newly created template.
versionobject
The version 1 draft, in full detail.

Errors

400
Bad Request Error
403
Forbidden Error
409
Conflict Error
500
Internal Server Error