curl --request POST \
--url https://api.tela.com/prompt-application/{id}/webhooks \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "ERP sync",
"url": "https://erp.example.com/hooks/tela",
"events": [
"task.completed",
"task.approved"
],
"headers": {
"authorization": "Bearer erp-webhook-token"
},
"sensitiveHeaders": [
"authorization"
]
}
'import requests
url = "https://api.tela.com/prompt-application/{id}/webhooks"
payload = {
"name": "ERP sync",
"url": "https://erp.example.com/hooks/tela",
"events": ["task.completed", "task.approved"],
"headers": { "authorization": "Bearer erp-webhook-token" },
"sensitiveHeaders": ["authorization"]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'ERP sync',
url: 'https://erp.example.com/hooks/tela',
events: ['task.completed', 'task.approved'],
headers: {authorization: 'Bearer erp-webhook-token'},
sensitiveHeaders: ['authorization']
})
};
fetch('https://api.tela.com/prompt-application/{id}/webhooks', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.tela.com/prompt-application/{id}/webhooks",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'ERP sync',
'url' => 'https://erp.example.com/hooks/tela',
'events' => [
'task.completed',
'task.approved'
],
'headers' => [
'authorization' => 'Bearer erp-webhook-token'
],
'sensitiveHeaders' => [
'authorization'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.tela.com/prompt-application/{id}/webhooks"
payload := strings.NewReader("{\n \"name\": \"ERP sync\",\n \"url\": \"https://erp.example.com/hooks/tela\",\n \"events\": [\n \"task.completed\",\n \"task.approved\"\n ],\n \"headers\": {\n \"authorization\": \"Bearer erp-webhook-token\"\n },\n \"sensitiveHeaders\": [\n \"authorization\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.tela.com/prompt-application/{id}/webhooks")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"ERP sync\",\n \"url\": \"https://erp.example.com/hooks/tela\",\n \"events\": [\n \"task.completed\",\n \"task.approved\"\n ],\n \"headers\": {\n \"authorization\": \"Bearer erp-webhook-token\"\n },\n \"sensitiveHeaders\": [\n \"authorization\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tela.com/prompt-application/{id}/webhooks")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"ERP sync\",\n \"url\": \"https://erp.example.com/hooks/tela\",\n \"events\": [\n \"task.completed\",\n \"task.approved\"\n ],\n \"headers\": {\n \"authorization\": \"Bearer erp-webhook-token\"\n },\n \"sensitiveHeaders\": [\n \"authorization\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "7d8e9f0a-1b2c-4d3e-8f4a-5b6c7d8e9f0a",
"promptApplicationId": "c1d2e3f4-a5b6-4c7d-8e9f-0a1b2c3d4e5f",
"name": "ERP sync",
"url": "https://erp.example.com/hooks/tela",
"events": [
"task.completed",
"task.approved"
],
"headers": {
"authorization": "Bearer erp-webhook-token",
"x-source": "tela"
},
"sensitiveHeaders": [
"authorization"
],
"method": "POST",
"isActive": true,
"createdAt": "2025-06-10T08:00:00.000Z",
"updatedAt": "2025-06-10T08:00:00.000Z",
"deletedAt": null
}Create webhook subscription
Creates a webhook subscription on a Workstation application. Whenever one of the subscribed events happens on a task of that application, Tela sends an HTTP request to url with the event payload as JSON body.
curl --request POST \
--url https://api.tela.com/prompt-application/{id}/webhooks \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "ERP sync",
"url": "https://erp.example.com/hooks/tela",
"events": [
"task.completed",
"task.approved"
],
"headers": {
"authorization": "Bearer erp-webhook-token"
},
"sensitiveHeaders": [
"authorization"
]
}
'import requests
url = "https://api.tela.com/prompt-application/{id}/webhooks"
payload = {
"name": "ERP sync",
"url": "https://erp.example.com/hooks/tela",
"events": ["task.completed", "task.approved"],
"headers": { "authorization": "Bearer erp-webhook-token" },
"sensitiveHeaders": ["authorization"]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'ERP sync',
url: 'https://erp.example.com/hooks/tela',
events: ['task.completed', 'task.approved'],
headers: {authorization: 'Bearer erp-webhook-token'},
sensitiveHeaders: ['authorization']
})
};
fetch('https://api.tela.com/prompt-application/{id}/webhooks', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.tela.com/prompt-application/{id}/webhooks",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'ERP sync',
'url' => 'https://erp.example.com/hooks/tela',
'events' => [
'task.completed',
'task.approved'
],
'headers' => [
'authorization' => 'Bearer erp-webhook-token'
],
'sensitiveHeaders' => [
'authorization'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.tela.com/prompt-application/{id}/webhooks"
payload := strings.NewReader("{\n \"name\": \"ERP sync\",\n \"url\": \"https://erp.example.com/hooks/tela\",\n \"events\": [\n \"task.completed\",\n \"task.approved\"\n ],\n \"headers\": {\n \"authorization\": \"Bearer erp-webhook-token\"\n },\n \"sensitiveHeaders\": [\n \"authorization\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.tela.com/prompt-application/{id}/webhooks")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"ERP sync\",\n \"url\": \"https://erp.example.com/hooks/tela\",\n \"events\": [\n \"task.completed\",\n \"task.approved\"\n ],\n \"headers\": {\n \"authorization\": \"Bearer erp-webhook-token\"\n },\n \"sensitiveHeaders\": [\n \"authorization\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tela.com/prompt-application/{id}/webhooks")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"ERP sync\",\n \"url\": \"https://erp.example.com/hooks/tela\",\n \"events\": [\n \"task.completed\",\n \"task.approved\"\n ],\n \"headers\": {\n \"authorization\": \"Bearer erp-webhook-token\"\n },\n \"sensitiveHeaders\": [\n \"authorization\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "7d8e9f0a-1b2c-4d3e-8f4a-5b6c7d8e9f0a",
"promptApplicationId": "c1d2e3f4-a5b6-4c7d-8e9f-0a1b2c3d4e5f",
"name": "ERP sync",
"url": "https://erp.example.com/hooks/tela",
"events": [
"task.completed",
"task.approved"
],
"headers": {
"authorization": "Bearer erp-webhook-token",
"x-source": "tela"
},
"sensitiveHeaders": [
"authorization"
],
"method": "POST",
"isActive": true,
"createdAt": "2025-06-10T08:00:00.000Z",
"updatedAt": "2025-06-10T08:00:00.000Z",
"deletedAt": null
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Workstation application ID
Body
Display name of the subscription.
256Endpoint URL. Must not resolve to localhost or private network ranges; HTTPS is required in production.
2048Events to subscribe to.
Events a webhook can subscribe to:
task.completed— a task run finished successfully and is ready for review.task.approved— a task was reviewed and approved.task.approval-revoke— an approved task was sent back tovalidating.task.failed— a task run ended with a failure (errorMessageis set in the payload).
task.completed, task.approved, task.approval-revoke, task.failed Headers sent with every delivery (authentication tokens, correlation ids, ...).
Show child attributes
Show child attributes
Names of the headers you consider sensitive. Defaults to [].
HTTP method for deliveries. Defaults to POST.
10Defaults to true.
Ignored; the application is taken from the path.
Callbacks
POST{$request.body#/url}taskEvent
Body
JSON body Tela sends to your endpoint for every event. inputContent and outputContent are present
when the task has them; errorMessage is present for task.failed. outputContent is the task result:
a string for plain-text outputs, or an object/array for structured outputs.
Unique id of this notification. Use it for deduplication; resends get a new id.
Events a webhook can subscribe to:
task.completed— a task run finished successfully and is ready for review.task.approved— a task was reviewed and approved.task.approval-revoke— an approved task was sent back tovalidating.task.failed— a task run ended with a failure (errorMessageis set in the payload).
task.completed, task.approved, task.approval-revoke, task.failed When the notification was sent.
Snapshot of the task at the time of the event.
Show child attributes
Show child attributes
The input the task was executed with.
Show child attributes
Show child attributes
Task result. String, object or array depending on the canvas output format.
Failure reason, present on task.failed.
Response
Acknowledge the event. Any 2xx status marks the delivery as success.
Response
Webhook created
A webhook subscription of a Workstation application.
Application the webhook belongs to.
256Endpoint that receives the events.
2048Events a webhook can subscribe to:
task.completed— a task run finished successfully and is ready for review.task.approved— a task was reviewed and approved.task.approval-revoke— an approved task was sent back tovalidating.task.failed— a task run ended with a failure (errorMessageis set in the payload).
task.completed, task.approved, task.approval-revoke, task.failed Headers sent verbatim with every delivery. Use them for authentication (for example authorization or x-api-key).
Show child attributes
Show child attributes
Names of headers considered sensitive. Stored as provided; the API does not currently mask them in responses.
HTTP method used for deliveries. Defaults to POST.
10Inactive webhooks receive no deliveries.