Skip to main content
POST
/
template
Create template or folder
curl --request POST \
  --url https://api.promptmetrics.dev/template \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "workspace_id": "<string>"
}
'
{
  "responseData": {
    "data": {
      "_id": "<string>",
      "workspace_id": "<string>",
      "parent_id": "<string>",
      "name": "<string>",
      "description": "<string>",
      "is_folder": true,
      "created_at": "2023-11-07T05:31:56Z",
      "updated_at": "2023-11-07T05:31:56Z"
    }
  }
}

Authorizations

Authorization
string
header
required

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

Body

application/json
workspace_id
string
required
parent_id
string | null
name
string
description
string
is_folder
boolean
default:false
version
object

Response

Template created successfully

responseData
object