-
Notifications
You must be signed in to change notification settings - Fork 10
Public API: Subscribe Unsubscribe to From All Events
Isaiah Fisher edited this page Dec 18, 2024
·
1 revision
Pneumatic allows you to subscribe/unsubscribe to/from all events.
To subscribe to all events at once, use the endpoint POST https://api.pneumatic.app/webhooks/subscribe
Python example:
import requests
api_key = 'your_api_key'
headers = {
'Authorization': f'Bearer {api_key}'
}
end_point = 'https://api.pneumatic.app/webhooks/subscribe'
payload = {
'url': subscription_url
}
r = requests.post(end_point, headers=headers, data=payload)
if r.ok:
print("successfully subscribed to all Pneumatic events")
To unsubscribe, no payload is needed:
import requests
api_key = 'your_api_key'
headers = {
'Authorization': f'Bearer {api_key}'
}
end_point = 'https://api.pneumatic.app/webhooks/unsubscribe'
r = requests.post(end_point, headers=headers)
if r.ok:
print("successfully unsubscribed from all Pneumatic events")