Exchange an enrollment token for a connector session token
LogsPOST /communications/registrations
Exchanges a platform-issued enrollment token for a connector identity and returns 201 with connector_id, a session token (used as a Bearer token on the job endpoints) and the tenant IDs the connector may serve. name (up to 120 characters) and at least one channel (email or push) are required. Each registration uses one of the enrollment token's allowed uses, and an expired, exhausted or unknown token returns 401. No other authentication is required.
Body application/json
tokenOne-time communication connector enrollment token
namechannelshostnameagent_version
Returns
201 Connector registered
Errors 401
curl -X POST "$CONNECTOR_API/communications/registrations" \
-H "Authorization: Bearer sk_test_..." \
-H "Content-Type: application/json" \
-d '{
"token": "token",
"name": "Ana Matsinhe",
"channels": [
"channel"
],
"hostname": "hostname",
"agent_version": "agent version"
}'
# No matching CLI command; use cURL or direct HTTP.
const res = await fetch("$CONNECTOR_API/communications/registrations", {
method: "POST",
headers: {
Authorization: "Bearer sk_test_...",
"Content-Type": "application/json"
},
body: JSON.stringify({
"token": "token",
"name": "Ana Matsinhe",
"channels": [
"channel"
],
"hostname": "hostname",
"agent_version": "agent version"
})
});
const data = await res.json();
import requests
res = requests.post(
"$CONNECTOR_API/communications/registrations",
headers={
"Authorization": "Bearer sk_test_..."
},
json={
"token": "token",
"name": "Ana Matsinhe",
"channels": [
"channel"
],
"hostname": "hostname",
"agent_version": "agent version"
}
)
data = res.json()
body := strings.NewReader(`{
"token": "token",
"name": "Ana Matsinhe",
"channels": [
"channel"
],
"hostname": "hostname",
"agent_version": "agent version"
}`)
req, _ := http.NewRequest("POST", "$CONNECTOR_API/communications/registrations", body)
req.Header.Set("Authorization", "Bearer sk_test_...")
req.Header.Set("Content-Type", "application/json")
resp, err := http.DefaultClient.Do(req)
Connector registered