Create a published version record for an automation
curl --request POST \
--url https://api.trycomp.ai/v1/tasks/{taskId}/automations/{automationId}/versions \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"version": 1,
"scriptKey": "org_abc123/tsk_abc123/aut_abc123.v1.js"
}
'const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({version: 1, scriptKey: 'org_abc123/tsk_abc123/aut_abc123.v1.js'})
};
fetch('https://api.trycomp.ai/v1/tasks/{taskId}/automations/{automationId}/versions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.trycomp.ai/v1/tasks/{taskId}/automations/{automationId}/versions"
payload = {
"version": 1,
"scriptKey": "org_abc123/tsk_abc123/aut_abc123.v1.js"
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)Task Automations
Create a published version record for an | Comp AI API
Create a published version record for an automation in Comp AI. Create, version, run, and inspect automated evidence collection workflows attached.
POST
/
v1
/
tasks
/
{taskId}
/
automations
/
{automationId}
/
versions
Create a published version record for an automation
curl --request POST \
--url https://api.trycomp.ai/v1/tasks/{taskId}/automations/{automationId}/versions \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"version": 1,
"scriptKey": "org_abc123/tsk_abc123/aut_abc123.v1.js"
}
'const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({version: 1, scriptKey: 'org_abc123/tsk_abc123/aut_abc123.v1.js'})
};
fetch('https://api.trycomp.ai/v1/tasks/{taskId}/automations/{automationId}/versions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.trycomp.ai/v1/tasks/{taskId}/automations/{automationId}/versions"
payload = {
"version": 1,
"scriptKey": "org_abc123/tsk_abc123/aut_abc123.v1.js"
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)Authorizations
API key for authentication
Body
application/json
Response
201 - undefined
Was this page helpful?

