import requests
url = "https://platform.ankra.app/api/v1/org/applications/{application_id}/ai-config"
payload = { "lanes": [
{
"override": True,
"enabled": True,
"settings": {
"model": "<string>",
"branches": ["<string>"],
"ignore_paths": ["<string>"],
"skip_drafts": True,
"skill_ids": ["<string>"],
"custom_instructions": "<string>",
"budget": {
"max_runs_per_day": 123,
"max_input_characters": 123
}
}
}
] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
lanes: [
{
override: true,
enabled: true,
settings: {
model: '<string>',
branches: ['<string>'],
ignore_paths: ['<string>'],
skip_drafts: true,
skill_ids: ['<string>'],
custom_instructions: '<string>',
budget: {max_runs_per_day: 123, max_input_characters: 123}
}
}
]
})
};
fetch('https://platform.ankra.app/api/v1/org/applications/{application_id}/ai-config', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request PUT \
--url https://platform.ankra.app/api/v1/org/applications/{application_id}/ai-config \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"lanes": [
{
"override": true,
"enabled": true,
"settings": {
"model": "<string>",
"branches": [
"<string>"
],
"ignore_paths": [
"<string>"
],
"skip_drafts": true,
"skill_ids": [
"<string>"
],
"custom_instructions": "<string>",
"budget": {
"max_runs_per_day": 123,
"max_input_characters": 123
}
}
}
]
}
'{
"binding": {
"connected": true,
"provider": "<string>",
"binding_external_id": "<string>",
"repo_full_name": "<string>",
"reason": "<string>"
},
"lanes": [
{
"lane": "pull_request",
"capability": "<string>",
"enabled": true,
"organisation_enabled": true,
"source": "organisation",
"effective": {
"model": "<string>",
"autonomy": "comment",
"branches": [
"<string>"
],
"ignore_paths": [
"<string>"
],
"skip_drafts": true,
"skill_ids": [
"<string>"
],
"custom_instructions": "<string>",
"max_runs_per_day": 123,
"max_input_characters": 123
},
"organisation_default": {
"model": "<string>",
"autonomy": "comment",
"branches": [
"<string>"
],
"ignore_paths": [
"<string>"
],
"skip_drafts": true,
"skill_ids": [
"<string>"
],
"custom_instructions": "<string>",
"max_runs_per_day": 123,
"max_input_characters": 123
},
"overridden_for_application": true
}
]
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Update Application AI Configuration
Patch this application’s AI lane overrides and answer with the freshly resolved configuration. Lanes the body does not mention are left untouched. A lane sent with override false is removed from the application’s override so it follows the organisation again; a lane sent with override true stores whichever of enabled and settings the body carries. Overrides are stored on the ai-gateway’s per-repository binding profile, the same rows that gate the webhook events. A browser session twin is mounted at the same path without the /api/v1 prefix (cookie authentication plus the X-Ankra-CSRF header).
import requests
url = "https://platform.ankra.app/api/v1/org/applications/{application_id}/ai-config"
payload = { "lanes": [
{
"override": True,
"enabled": True,
"settings": {
"model": "<string>",
"branches": ["<string>"],
"ignore_paths": ["<string>"],
"skip_drafts": True,
"skill_ids": ["<string>"],
"custom_instructions": "<string>",
"budget": {
"max_runs_per_day": 123,
"max_input_characters": 123
}
}
}
] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
lanes: [
{
override: true,
enabled: true,
settings: {
model: '<string>',
branches: ['<string>'],
ignore_paths: ['<string>'],
skip_drafts: true,
skill_ids: ['<string>'],
custom_instructions: '<string>',
budget: {max_runs_per_day: 123, max_input_characters: 123}
}
}
]
})
};
fetch('https://platform.ankra.app/api/v1/org/applications/{application_id}/ai-config', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request PUT \
--url https://platform.ankra.app/api/v1/org/applications/{application_id}/ai-config \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"lanes": [
{
"override": true,
"enabled": true,
"settings": {
"model": "<string>",
"branches": [
"<string>"
],
"ignore_paths": [
"<string>"
],
"skip_drafts": true,
"skill_ids": [
"<string>"
],
"custom_instructions": "<string>",
"budget": {
"max_runs_per_day": 123,
"max_input_characters": 123
}
}
}
]
}
'{
"binding": {
"connected": true,
"provider": "<string>",
"binding_external_id": "<string>",
"repo_full_name": "<string>",
"reason": "<string>"
},
"lanes": [
{
"lane": "pull_request",
"capability": "<string>",
"enabled": true,
"organisation_enabled": true,
"source": "organisation",
"effective": {
"model": "<string>",
"autonomy": "comment",
"branches": [
"<string>"
],
"ignore_paths": [
"<string>"
],
"skip_drafts": true,
"skill_ids": [
"<string>"
],
"custom_instructions": "<string>",
"max_runs_per_day": 123,
"max_input_characters": 123
},
"organisation_default": {
"model": "<string>",
"autonomy": "comment",
"branches": [
"<string>"
],
"ignore_paths": [
"<string>"
],
"skip_drafts": true,
"skill_ids": [
"<string>"
],
"custom_instructions": "<string>",
"max_runs_per_day": 123,
"max_input_characters": 123
},
"overridden_for_application": true
}
]
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Body
Patches a subset of AI lanes; a lane the request does not mention keeps whatever it had.
Show child attributes
Show child attributes
Response
Successful Response
The per-application AI configuration read model backing the application detail page's AI tab.