For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
DocsAPI ReferenceSDKs
DocsAPI ReferenceSDKs
  • Overview
    • API reference
  • Mesh API
      • GETList Templates
      • POSTCreate Template
      • GETGet Template
      • PATCHUpdate Template
      • DELDelete Template
LogoLogo
Mesh APITemplates

Create Template

||View as Markdown|
POST
https://api.meshapi.ai/v1/templates
POST
/v1/templates
$curl -X POST https://api.meshapi.ai/v1/templates \
> -H "Authorization: Bearer <token>" \
> -H "Content-Type: application/json" \
> -d '{
> "name": "Customer Support Template"
>}'
1{
2 "id": "tmpl_9f8b7c6d5e4a3b2c1d0e",
3 "name": "Customer Support Template",
4 "owner": "user_12345abcde",
5 "is_global": false,
6 "description": "Template for handling common customer support inquiries.",
7 "system": "You are a helpful assistant specialized in customer support.",
8 "messages": [
9 {}
10 ],
11 "model": "gpt-4o-mini",
12 "params": {},
13 "variables": [
14 "customer_name",
15 "issue_type"
16 ],
17 "created_at": "2024-06-01T10:15:30Z",
18 "updated_at": "2024-06-01T10:15:30Z"
19}
Create a template scoped to the authenticated user's owner.
Was this page helpful?
Previous

List Templates

Next

Get Template

Built with

Authentication

AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Request

This endpoint expects an object.
namestringRequired
descriptionstring or nullOptional
systemstring or nullOptional
messageslist of maps from strings to any or nullOptional
modelstring or nullOptional
paramsmap from strings to any or nullOptional
variableslist of strings or nullOptional

Response

Successful Response
idstring
namestring
ownerstring or null
is_globalboolean
descriptionstring or null
systemstring or null
messageslist of maps from strings to any or null
modelstring or null
paramsmap from strings to any or null
variableslist of strings or null
created_atstring
updated_atstring

Errors

422
Unprocessable Entity Error