Read a Trigger subscription
GET /v1/trigger-subscriptions/{subscription_id}
| Property | Value |
|---|---|
| Operation | get_trigger_subscription |
| Group | Triggers |
| Scope | integrations:read |
| Route class | read |
| Idempotency | No Idempotency-Key |
| Audit | Not audited: A configuration read; a subscription and a stored Trigger event hold identifiers only. |
| Released in | 1.60.0 |
| Phase 0 host | Served (the hosted api pins 1.65.0) |
Answers the subscription with subscription_token null: the token is answered once, by the create (1.60.0).
Request
Set VOCAL_API to the base URL of your API and VOCAL_API_KEY to an API key with the integrations:read scope (Authentication and keys). Replace each placeholder, such as agt_... or <name>, with your own value.
curl "$VOCAL_API/v1/trigger-subscriptions/trs_..." \
-H "Authorization: Bearer $VOCAL_API_KEY"const response = await fetch(`${process.env.VOCAL_API}/v1/trigger-subscriptions/trs_...`, {
headers: {
Authorization: `Bearer ${process.env.VOCAL_API_KEY}`,
},
});
console.log(response.status, await response.text());import os
import requests
response = requests.get(
f"{os.environ['VOCAL_API']}/v1/trigger-subscriptions/trs_...",
headers={
"Authorization": f"Bearer {os.environ['VOCAL_API_KEY']}",
},
)
print(response.status_code, response.text)Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
subscription_id | path | TriggerSubscriptionId | yes | The id of a Trigger subscription: trs_ and the row's UUIDv7 in 26 Crockford base32 characters. Opaque and safe to log. |
Responses
| Status | Content type | Shape | Error codes |
|---|---|---|---|
200 | application/json | TriggerSubscription | |
400 | application/json | ErrorEnvelope | invalid_request |
401 | application/json | ErrorEnvelope | unauthenticated |
403 | application/json | ErrorEnvelope | forbidden |
404 | application/json | ErrorEnvelope | not_found |
429 | application/json | ErrorEnvelope | rate_limited |
500 | application/json | ErrorEnvelope | internal_error |
Fields of the 200 answer
The shape is TriggerSubscription.
| Field | Type | Required | Description |
|---|---|---|---|
action | TriggerAction | yes | |
connection_id | ConnectionId | yes | |
connector_id | ConnectorId | yes | |
created_at | Timestamp | yes | |
enabled | boolean | yes | |
event_type | TriggerEventTypeName | yes | |
filter | ZenExpression or null | yes | A ZEN expression over the event's typed fields; null acts on every event. |
id | TriggerSubscriptionId | yes | |
name | string | yes | |
object | "trigger_subscription" | yes | |
organization_id | OrganizationId | yes | |
previous_token_expires_at | Timestamp or null | no | After a token rotation (1.61.0), when the previous token stops verifying, 24 hours later (a target); null otherwise, absent from an api before 1.61.0. |
rate_limit_per_minute | integer | yes | |
revision | integer | yes | |
status | TriggerSubscriptionStatus | yes | |
subscription_token | string (password) or null (password) | yes | The token of the edge path /v1/triggers/{connector_id}/{subscription_token}, 32 random bytes in base64url: answered once by the create, null in every other answer. |
token_hint | string | yes | The last characters of the subscription token. |
updated_at | Timestamp | yes |