POST
/
api
/
prompts
/
{id}
/
versions
curl --request POST \
  --url https://app.langwatch.ai/api/prompts/{id}/versions \
  --header 'Content-Type: application/json' \
  --header 'X-Auth-Token: <api-key>' \
  --data '{
  "id": "<string>",
  "authorId": "<string>",
  "projectId": "<string>",
  "configId": "<string>",
  "schemaVersion": "<string>",
  "commitMessage": "<string>",
  "version": 123,
  "createdAt": "<string>",
  "configData": {
    "version": 2,
    "prompt": "<string>",
    "messages": [],
    "inputs": [
      {
        "identifier": "<string>",
        "type": "str"
      }
    ],
    "outputs": [
      {
        "identifier": "<string>",
        "type": "str",
        "json_schema": {
          "type": "<string>"
        }
      }
    ],
    "model": "<string>",
    "temperature": 123,
    "max_tokens": 123,
    "demonstrations": {
      "columns": [
        {
          "id": "<string>",
          "name": "<string>",
          "type": "string"
        }
      ],
      "rows": []
    }
  }
}'
{
  "id": "<string>",
  "authorId": "<string>",
  "projectId": "<string>",
  "configId": "<string>",
  "schemaVersion": "<string>",
  "commitMessage": "<string>",
  "version": 123,
  "createdAt": "<string>",
  "configData": {
    "version": 2,
    "prompt": "<string>",
    "messages": [],
    "inputs": [
      {
        "identifier": "<string>",
        "type": "str"
      }
    ],
    "outputs": [
      {
        "identifier": "<string>",
        "type": "str",
        "json_schema": {
          "type": "<string>"
        }
      }
    ],
    "model": "<string>",
    "temperature": 123,
    "max_tokens": 123,
    "demonstrations": {
      "columns": [
        {
          "id": "<string>",
          "name": "<string>",
          "type": "string"
        }
      ],
      "rows": []
    }
  }
}

Authorizations

X-Auth-Token
string
header
required

Path Parameters

id
string
required

Body

application/json

Response

200
application/json

Success

The response is of type object.