Xray uses Jira issues for implementing Test, Pre-Condition, Test Set, Test Execution and Test Plan entities. Therefore, these entities may be created or updated using Jira's native REST API, taking into consideration Xray's custom fields.
The authentication is based on Jira's REST API authentication, so you can use HTTP basic authentication using some user credentials. It should also be possible to use other authentication methods such as cookie-based or OAuth (see more information here).
The Xray REST API provides additional endpoints specifically made for dealing with test management.
Feel free to contribute!