HOW to Create Deployment from string(xml content) with REST API

Hello everyone , i am new to Camunda .
i want to know if there a way to Create Deployment from string with REST API ( POST /deployment/create) ?
I saw that there always upload a .bpmn file in those examples 。

Hi, what is the motivation / usage scenario for your question?

The appropriate way to transfer a large String (as a bpmn file can potentially be) and its meta data is a multi-part form.

If you absolutely wanted to work with a String then you could just write the String to a httpRequestBodyWriter as described here:

Thanks for your reply .
I want to Integrate Oracle apex with camunda use REST API .
I use bpmn-js as my web modeler to design workflow .
I want to allow specified users to design and deployment process by themself .
Do you have any suggestions ?
Thank you .

below will be work . thanks alot @rob2universe

var settings = {
“url”: “”,
“method”: “POST”,
“timeout”: 0,
“headers”: {
“Content-Type”: “multipart/form-data; boundary=gc0p4Jq0M2Yt08jU534c0p678”
“data”: “–gc0p4Jq0M2Yt08jU534c0p678\r\nContent-Disposition: form-data; name=“deployment-name”\r\n\r\ndepname\r\n–gc0p4Jq0M2Yt08jU534c0p678\r\nContent-Disposition: form-data; name=“data”;filename=“ps1.bpmn”\r\n\r\n**{here is bpmn xml contents }**\r\n–gc0p4Jq0M2Yt08jU534c0p678–”,

$.ajax(settings).done(function (response) {

the docs is right , but i didn’t understand it clearly before .