Move a personal project into a company, for good
const url = 'https://beta-api.plune.ai/v1/projects/example/transfer';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"companyId":"6f1c2b3a-0000-4000-8000-0000000000a5"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://beta-api.plune.ai/v1/projects/example/transfer \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "companyId": "6f1c2b3a-0000-4000-8000-0000000000a5" }'An owner of the project moves it into a company they own or run (ADR 0038). One way: there is no road back, and a project already in a company answers 409 — so does a default project, the place a request with no project lands. Its people stay: a member of the company takes the role their company role maps to, anybody else keeps theirs — except an owner from outside the company, who becomes a member, as does an address asked in as owner and not signed in yet. The refusals go project first: somebody who is not in the project gets the 404 an invented id gets, whatever company they name. Recorded in the project’s audit feed.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ”An id from GET /v1/projects
Request Body required
Section titled “Request Body required ”The body of POST /v1/projects/{id}/transfer — the company the project moves into, for good.
object
Example
{ "companyId": "6f1c2b3a-0000-4000-8000-0000000000a5"}Responses
Section titled “ Responses ”Moved — the project and the company it is in now
object
object
Example
{ "id": "9c4e7d10-0000-4000-8000-0000000000a4", "name": "Mobile app", "company": { "id": "6f1c2b3a-0000-4000-8000-0000000000a5", "name": "Acme" }}Invalid body — a company id
object
Example generated
{ "error": "example"}No / invalid token or session
Not an owner of the project, or not an owner or admin of the company
object
Example
{ "error": "company owner or admin only"}No such project among yours, or no such company among yours
object
Example
{ "error": "company '6f1c2b3a-0000-4000-8000-0000000000a5' not found"}A default project, or one already in a company
object
Example
{ "error": "this project is already in a company — a transfer is one-way"}Rate-limited: either the per-route throttle or a tenant quota. Retry-After carries the seconds until the window rolls over.
object
Example generated
{ "error": "example"}Headers
Section titled “Headers ”Seconds until the window rolls over