Tell The City what URI you want data posted to
To create a new webhook URI registration, you must first have (or grant yourself) API Admin privileges. Go to Admin > Privileges > API Admin and grant an active City user API Admin privileges. This user is now able to create and manage webhook registrations for that City instance.
Go to Admin > API > Webhooks. Click "+ Create New Webhook", and associate a URI with a specific object and event. Now, whenever that event occurs, The City will send an HTTP POST to that address with appropriate data for the object that fired the event.
Callback URI - This is the web address that The City will POST data to. SSL endpoint required.
Object - The type of object in The City you are interested in.
The different objects available in this version:
- Users - The User object is used for both offline users and online users.
- Groups - The heart of The City, users belong to Groups.
- Addresses - Locations that belong to a user or group are called Addresses in The City.
- Invitations - Invitations are the objects used both for external invitations to The City, and internal invitations to join a group.
- Privileges - Admin Privileges are the different administrative security roles an Account Admin can assign to other users in The City (User Admin, Designer, Group Admin, etc).
- Checkins - If your City uses the Children's Ministry module, you can listen for events related to Checkins.
Event - The action that occurs in The City that will fire a webhook.
The different events available in this version (not all are applicable to every object):
- create - When a new object is saved to the database.
- update - When an object is updated and has changed attributes.
- destroy - Certain objects can be deleted in The City, which will trigger a destroy webhook.
- expire - An invitation expires if the invitee fails to respond in a timely manner.
- check_out - Checkins have a check_out action that fires when a child is checked out of a classroom.
You can register the same URI for any Object#event you want to listen for (they do not have to be unique). Also, you can register as many webhooks as you need to for the same Object#event.