N8n api - creating workflow under specific project

I am able to use n8n api to create a workflow in another n8n account using that account’s API key and base URL, but how do i specify the project in which i want this workflow created? When i use “get workflow” API to get the json of a certain workflow it doesnt even tell me which project it belongs to…

output of “Get workflow API”

{
  "createdAt": "2025-03-18T05:46:58.647Z",
  "updatedAt": "2025-03-18T05:46:58.647Z",
  "id": "W1WpmMHUT8NLi2TX",
  "name": "lala",
  "active": false,
  "nodes": [ ],
  "connections": {},
  "settings": {
    "executionOrder": "v1"
  },
  "staticData": null,
  "meta": null,
  "pinData": {},
  "versionId": "314e7d34-ad41-4960-88bc-d08e07551060",
  "triggerCount": 0
}
`

You cannot. You’ll have to create the workflow first and then transfer it: API reference | n8n Docs

Unfortunately, I don’t have access to projects to be able to test further, so that’s just based on the API docs.

Looking at the API UI and inspecting the schema, I don’t see any way to check what project a workflow belongs to.