## Documentation Index

Fetch the complete documentation index at: [/llms.txt](https://docs.cognigy.com/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**

```bash
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**

```python
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**

```javascript
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

- **400**: Bad Request
- **401**: Unauthorized
- **402**: Payment Required
- **403**: Forbidden
- **404**: Not Found
- **405**: Method Not Allowed
- **409**: Conflict
- **413**: Payload Too Large
- **500**: Internal Server Error
- **501**: Not Implemented
- **502**: Bad Gateway
- **503**: Service Unavailable
- **504**: Gateway Timeout

### Sample Error Responses

```json
{
  "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": {}
}
```

```json
{
  "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**
- **X-API-Key** : string, header, required
  Supply the API Key in the HTTP-Header.

### Headers

- **Accept** : enum<string>  
  The `Accept` header specifies the media type that the client expects in the response. Available options: `application/json`, `application/hal+json`, `application/xml`, `text/xml`, `text/csv`. The default value is `application/json`.

### Path Parameters

- **projectId** : string, required  
  The unique identifier for the Project.  
  Required string length: `24`
  Pattern: `^[a-z0-9]{24}$`

### Body

- **details** : object[]

### Response

204  
Successfully updated the Schema.

Last modified on July 8, 2026.
