To set up a subscription to events and get a callback, use CaseEventSubscription, as found in the API documentation. You can set up the subscription to a template or individual case through the API (with update case).
You can put the callback on the template as the cases are created from outside to get callbacks for all of them. A common scenario is to subscribe to "Finished" to be able to follow when new cases have been signed. You can both update templates and cases with update case.
An option to subscribe to individual cases is to set it in the account's default template, see more information here. These settings apply to cases not created from a template.