Replace an event source configuration
curl --request PUT \
--url https://api.recursion.labelbox.com/managed-agents/v1/event-sources/{eventSourceId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'If-Match: <if-match>' \
--data '
{
"delivery": {
"kind": "webhook",
"verificationCredential": {
"credentialId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"vaultId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
},
"displayName": "<string>",
"type": "slack_events_api"
}
'import requests
url = "https://api.recursion.labelbox.com/managed-agents/v1/event-sources/{eventSourceId}"
payload = {
"delivery": {
"kind": "webhook",
"verificationCredential": {
"credentialId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"vaultId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
},
"displayName": "<string>",
"type": "slack_events_api"
}
headers = {
"If-Match": "<if-match>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {
'If-Match': '<if-match>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
delivery: {
kind: 'webhook',
verificationCredential: {
credentialId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
vaultId: '3c90c3cc-0d44-4b50-8888-8dd25736052a'
}
},
displayName: '<string>',
type: 'slack_events_api'
})
};
fetch('https://api.recursion.labelbox.com/managed-agents/v1/event-sources/{eventSourceId}', 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.recursion.labelbox.com/managed-agents/v1/event-sources/{eventSourceId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'delivery' => [
'kind' => 'webhook',
'verificationCredential' => [
'credentialId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'vaultId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
]
],
'displayName' => '<string>',
'type' => 'slack_events_api'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"If-Match: <if-match>"
],
]);
$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.recursion.labelbox.com/managed-agents/v1/event-sources/{eventSourceId}"
payload := strings.NewReader("{\n \"delivery\": {\n \"kind\": \"webhook\",\n \"verificationCredential\": {\n \"credentialId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"vaultId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n },\n \"displayName\": \"<string>\",\n \"type\": \"slack_events_api\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("If-Match", "<if-match>")
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.put("https://api.recursion.labelbox.com/managed-agents/v1/event-sources/{eventSourceId}")
.header("If-Match", "<if-match>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"delivery\": {\n \"kind\": \"webhook\",\n \"verificationCredential\": {\n \"credentialId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"vaultId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n },\n \"displayName\": \"<string>\",\n \"type\": \"slack_events_api\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.recursion.labelbox.com/managed-agents/v1/event-sources/{eventSourceId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["If-Match"] = '<if-match>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"delivery\": {\n \"kind\": \"webhook\",\n \"verificationCredential\": {\n \"credentialId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"vaultId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n },\n \"displayName\": \"<string>\",\n \"type\": \"slack_events_api\"\n}"
response = http.request(request)
puts response.read_body{
"createdAt": "2023-11-07T05:31:56Z",
"delivery": {
"kind": "webhook",
"webhookUrl": "<string>",
"verification": {
"type": "none",
"replayWindow": {
"header": "<string>",
"maximumAgeSeconds": 1800
},
"signatureHeader": "<string>",
"signaturePrefix": "<string>",
"signedParts": [
{
"kind": "body"
}
],
"verificationCredential": {
"credentialId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"vaultId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
},
"verificationCredential": {
"credentialId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"vaultId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
},
"displayName": "<string>",
"eventSourceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"revision": 4503599627370496,
"status": "paused",
"type": "slack_events_api",
"updatedAt": "2023-11-07T05:31:56Z"
}{
"code": "invalid_json",
"message": "<string>",
"details": {
"field": "<string>",
"issues": [
"<string>"
],
"requestId": "<string>",
"retryable": true
}
}{
"code": "unauthorized",
"message": "<string>",
"details": {
"field": "<string>",
"issues": [
"<string>"
],
"requestId": "<string>",
"retryable": true
}
}{
"code": "forbidden",
"message": "<string>",
"details": {
"field": "<string>",
"issues": [
"<string>"
],
"requestId": "<string>",
"retryable": true
}
}{
"code": "not_found",
"message": "<string>",
"details": {
"field": "<string>",
"issues": [
"<string>"
],
"requestId": "<string>",
"retryable": true
}
}{
"code": "conflict",
"message": "<string>",
"details": {
"field": "<string>",
"issues": [
"<string>"
],
"requestId": "<string>",
"retryable": true
}
}{
"code": "precondition_failed",
"message": "<string>",
"details": {
"field": "<string>",
"issues": [
"<string>"
],
"requestId": "<string>",
"retryable": true
}
}{
"code": "payload_too_large",
"message": "<string>",
"details": {
"field": "<string>",
"issues": [
"<string>"
],
"requestId": "<string>",
"retryable": true
}
}{
"code": "unsupported_media_type",
"message": "<string>",
"details": {
"field": "<string>",
"issues": [
"<string>"
],
"requestId": "<string>",
"retryable": true
}
}{
"code": "event_source_authentication_credential_invalid",
"message": "<string>",
"details": {
"field": "<string>",
"issues": [
"<string>"
],
"requestId": "<string>",
"retryable": true
}
}{
"code": "precondition_required",
"message": "<string>",
"details": {
"field": "<string>",
"issues": [
"<string>"
],
"requestId": "<string>",
"retryable": true
}
}{
"code": "rate_limit_exceeded",
"message": "<string>",
"details": {
"field": "<string>",
"issues": [
"<string>"
],
"requestId": "<string>",
"retryable": true
}
}{
"code": "internal_error",
"message": "<string>",
"details": {
"field": "<string>",
"issues": [
"<string>"
],
"requestId": "<string>",
"retryable": true
}
}{
"code": "bad_gateway",
"message": "<string>",
"details": {
"field": "<string>",
"issues": [
"<string>"
],
"requestId": "<string>",
"retryable": true
}
}{
"code": "event_sources_unconfigured",
"message": "<string>",
"details": {
"field": "<string>",
"issues": [
"<string>"
],
"requestId": "<string>",
"retryable": true
}
}{
"code": "gateway_timeout",
"message": "<string>",
"details": {
"field": "<string>",
"issues": [
"<string>"
],
"requestId": "<string>",
"retryable": true
}
}Event Sources
Replace an event source configuration
Replaces writable webhook or managed IMAP configuration while preserving lifecycle state. An IMAP server, account and mailbox cannot change under an existing checkpoint; create a new source to change mailbox identity. Its display name and authentication credential may change. Connection-managed sources cannot be replaced. Requires the latest strong ETag in If-Match.
PUT
/
managed-agents
/
v1
/
event-sources
/
{eventSourceId}
Replace an event source configuration
curl --request PUT \
--url https://api.recursion.labelbox.com/managed-agents/v1/event-sources/{eventSourceId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'If-Match: <if-match>' \
--data '
{
"delivery": {
"kind": "webhook",
"verificationCredential": {
"credentialId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"vaultId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
},
"displayName": "<string>",
"type": "slack_events_api"
}
'import requests
url = "https://api.recursion.labelbox.com/managed-agents/v1/event-sources/{eventSourceId}"
payload = {
"delivery": {
"kind": "webhook",
"verificationCredential": {
"credentialId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"vaultId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
},
"displayName": "<string>",
"type": "slack_events_api"
}
headers = {
"If-Match": "<if-match>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {
'If-Match': '<if-match>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
delivery: {
kind: 'webhook',
verificationCredential: {
credentialId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
vaultId: '3c90c3cc-0d44-4b50-8888-8dd25736052a'
}
},
displayName: '<string>',
type: 'slack_events_api'
})
};
fetch('https://api.recursion.labelbox.com/managed-agents/v1/event-sources/{eventSourceId}', 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.recursion.labelbox.com/managed-agents/v1/event-sources/{eventSourceId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'delivery' => [
'kind' => 'webhook',
'verificationCredential' => [
'credentialId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'vaultId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
]
],
'displayName' => '<string>',
'type' => 'slack_events_api'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"If-Match: <if-match>"
],
]);
$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.recursion.labelbox.com/managed-agents/v1/event-sources/{eventSourceId}"
payload := strings.NewReader("{\n \"delivery\": {\n \"kind\": \"webhook\",\n \"verificationCredential\": {\n \"credentialId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"vaultId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n },\n \"displayName\": \"<string>\",\n \"type\": \"slack_events_api\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("If-Match", "<if-match>")
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.put("https://api.recursion.labelbox.com/managed-agents/v1/event-sources/{eventSourceId}")
.header("If-Match", "<if-match>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"delivery\": {\n \"kind\": \"webhook\",\n \"verificationCredential\": {\n \"credentialId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"vaultId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n },\n \"displayName\": \"<string>\",\n \"type\": \"slack_events_api\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.recursion.labelbox.com/managed-agents/v1/event-sources/{eventSourceId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["If-Match"] = '<if-match>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"delivery\": {\n \"kind\": \"webhook\",\n \"verificationCredential\": {\n \"credentialId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"vaultId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n },\n \"displayName\": \"<string>\",\n \"type\": \"slack_events_api\"\n}"
response = http.request(request)
puts response.read_body{
"createdAt": "2023-11-07T05:31:56Z",
"delivery": {
"kind": "webhook",
"webhookUrl": "<string>",
"verification": {
"type": "none",
"replayWindow": {
"header": "<string>",
"maximumAgeSeconds": 1800
},
"signatureHeader": "<string>",
"signaturePrefix": "<string>",
"signedParts": [
{
"kind": "body"
}
],
"verificationCredential": {
"credentialId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"vaultId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
},
"verificationCredential": {
"credentialId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"vaultId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
},
"displayName": "<string>",
"eventSourceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"revision": 4503599627370496,
"status": "paused",
"type": "slack_events_api",
"updatedAt": "2023-11-07T05:31:56Z"
}{
"code": "invalid_json",
"message": "<string>",
"details": {
"field": "<string>",
"issues": [
"<string>"
],
"requestId": "<string>",
"retryable": true
}
}{
"code": "unauthorized",
"message": "<string>",
"details": {
"field": "<string>",
"issues": [
"<string>"
],
"requestId": "<string>",
"retryable": true
}
}{
"code": "forbidden",
"message": "<string>",
"details": {
"field": "<string>",
"issues": [
"<string>"
],
"requestId": "<string>",
"retryable": true
}
}{
"code": "not_found",
"message": "<string>",
"details": {
"field": "<string>",
"issues": [
"<string>"
],
"requestId": "<string>",
"retryable": true
}
}{
"code": "conflict",
"message": "<string>",
"details": {
"field": "<string>",
"issues": [
"<string>"
],
"requestId": "<string>",
"retryable": true
}
}{
"code": "precondition_failed",
"message": "<string>",
"details": {
"field": "<string>",
"issues": [
"<string>"
],
"requestId": "<string>",
"retryable": true
}
}{
"code": "payload_too_large",
"message": "<string>",
"details": {
"field": "<string>",
"issues": [
"<string>"
],
"requestId": "<string>",
"retryable": true
}
}{
"code": "unsupported_media_type",
"message": "<string>",
"details": {
"field": "<string>",
"issues": [
"<string>"
],
"requestId": "<string>",
"retryable": true
}
}{
"code": "event_source_authentication_credential_invalid",
"message": "<string>",
"details": {
"field": "<string>",
"issues": [
"<string>"
],
"requestId": "<string>",
"retryable": true
}
}{
"code": "precondition_required",
"message": "<string>",
"details": {
"field": "<string>",
"issues": [
"<string>"
],
"requestId": "<string>",
"retryable": true
}
}{
"code": "rate_limit_exceeded",
"message": "<string>",
"details": {
"field": "<string>",
"issues": [
"<string>"
],
"requestId": "<string>",
"retryable": true
}
}{
"code": "internal_error",
"message": "<string>",
"details": {
"field": "<string>",
"issues": [
"<string>"
],
"requestId": "<string>",
"retryable": true
}
}{
"code": "bad_gateway",
"message": "<string>",
"details": {
"field": "<string>",
"issues": [
"<string>"
],
"requestId": "<string>",
"retryable": true
}
}{
"code": "event_sources_unconfigured",
"message": "<string>",
"details": {
"field": "<string>",
"issues": [
"<string>"
],
"requestId": "<string>",
"retryable": true
}
}{
"code": "gateway_timeout",
"message": "<string>",
"details": {
"field": "<string>",
"issues": [
"<string>"
],
"requestId": "<string>",
"retryable": true
}
}Authorizations
Headers
Body
application/json
- Option 1
- Option 2
- Option 3
- Option 4
- Option 5
- Option 6
Closed configuration for a Slack Events API source.
Response
Configured inbound event source, including its verification policy and lifecycle state.
Configured inbound event source, including its verification policy and lifecycle state.