...
You can subscribe to a webhook topic by executing the createWebhookSubscription mutation in GraphQL.
If you do not supply a topic version, or ID, to the mutation, the latest available topic version will be used for the topic key that you supply.
...
The following example shows how to subscribe for the scenario_session/create
webhook topic (via the Scope GraphQL API).
When multiple versions are available for a given topic, each is likely to be triggered by different circumstances or behave differently in some way.
...
If you do not supply a topic version (or ID) when executing the mutation, the latest available topic version will be used for the topic key that you supply.
GraphQL Query
Code Block | ||
---|---|---|
| ||
mutation { createWebhookSubscription( webhookSubscription: { topic: { key: 'scenario_session/create' } callbackUrl: "https://my-custom-application.com/hooks/scopear" sharedSecret: "SOME SUPER SECRET STRING" } ) { errors { field message } webhookSubscription { id } } } |
...