You can manage (i.e. create, update, delete) Test Plans directly through the JIRA's native REST API.
Xray REST API provides the following endpoints.
Test Plan Tests
To view the Test associated with a Test Plan you need to specify the key of the Test Plan you wish you view. To associate or remove a Test from a Test Plan you need to send a json with a list of the keys, when associating this keys can be Test keys or Test Set keys but when removing they can only be Test keys. To remove a Test from a Test Plan you need to specify the key of the Test you wish to remove.
Test Plan Test Executions
To view the Test executions associated with a Test Plan you need to specify the key of the Test Plan you wish you view. To associate or remove a Test Execution from a Test Plan you need to send a json with a list of the Test Execution keys. To remove a Test from a Test Plan you need to specify the key of the Test Execution you wish to remove.