This can be done via the Automated Workflow Integrator (AWI) rather than through the API. AWI can generate an XML file that Switch can be configured to read.
You need AWI set up in your account. It is included with Enterprise, Enterprise+, Enterprise HV, Enterprise+HV, Enterprise DS, Premier and Premier DS but still needs to be set up. You can also add AWI to other packages. Start a support ticket if you want more details.