Set Schema - Cognigy Documentation

Documentation Index

Fetch the complete documentation index at: /llms.txt

Use this file to discover all available pages before exploring further.

Set Schema

PUT

/v2.0/profiles/schema/{projectId}

Try it

Sample cURL Request

curl --request PUT \
  --url https://api-trial.cognigy.ai/new/v2.0/profiles/schema/{projectId} \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '
{
  "details": [\
    {\
      "field": "<string>",\
      "internal": "<string>"\
    }\
  ]
}
'  

Sample Python Request

import requests

url = "https://api-trial.cognigy.ai/new/v2.0/profiles/schema/{projectId}"

payload = { "details": [\
        {\
            "field": "<string>",\
            "internal": "<string>"\
        }\
    ] }
headers = {
    "X-API-Key": "<api-key>",
    "Content-Type": "application/json"
}

response = requests.put(url, json=payload, headers=headers)

print(response.text)

Sample JavaScript Request

const options = {
  method: 'PUT',
  headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
  body: JSON.stringify({details: [{field: '<string>', internal: '<string>'}]})
};

fetch('https://api-trial.cognigy.ai/new/v2.0/profiles/schema/{projectId}', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));

Response Codes

Sample Error Responses

{
  "type": "Bad Request",
  "title": "Bad Request Error",
  "status": 400,
  "detail": "Validation failed. Missing payload.",
  "instance": "/v2.0/flows/5ce7c2d833ea1e04d7e6c432",
  "code": 1000,
  "traceId": "api--f84324f4-98eb-4f02-abdd-375a2e6c3c1f",
  "details": {}
}
{
  "type": "Unauthorized",
  "title": "Unauthorized Error",
  "status": 401,
  "detail": "<string>",
  "instance": "/v2.0/flows/5ce7c2d833ea1e04d7e6c432",
  "code": 401,
  "traceId": "api--f84324f4-98eb-4f02-abdd-375a2e6c3c1f",
  "details": {}
}

Authorizations

APIKeyHeader

Headers

Path Parameters

Body

Response

204
Successfully updated the Schema.

Last modified on July 8, 2026.