Skip to content
TriedDocs
Account

Transfer workspace

Make another member the owner of the workspace.

POSThttps://api.tried.com.au/workspace/transfer

Makes another member the workspace owner. The target becomes an admin and their user ID is stored as owner_user_id in workspace settings. Admin only.

Request#

Field Type Required Description
member_id string One of these The target's member_id.
email string One of these The target's email. Used when member_id is not sent.
demote_self boolean No Turn the caller into a developer after the transfer. Default false. Has no effect with an API key.

Example request#

curl -X POST https://api.tried.com.au/workspace/transfer \
  -H "Authorization: Bearer $TRIED_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "email": "sam@harbourdental.com.au",
    "demote_self": true
  }'
const res = await fetch("https://api.tried.com.au/workspace/transfer", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.TRIED_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "email": "sam@harbourdental.com.au",
    "demote_self": true
  }),
});
const result = await res.json();
import os, requests

res = requests.post(
    "https://api.tried.com.au/workspace/transfer",
    headers={"Authorization": f"Bearer {os.environ['TRIED_API_KEY']}"},
    json={
        "email": "sam@harbourdental.com.au",
        "demote_self": True,
    },
)
result = res.json()

Response#

200 OK

{
  "owner": {
    "user_id": "user_7a9c1e3b5d7f9a2c4e6b8d0f",
    "email": "sam@harbourdental.com.au",
    "member_id": "member_9e7c5a3f1d2b4c6e8a0f2d4b"
  },
  "demoted_self": true
}
Field Type Description
owner object The new owner: user_id, email and member_id.
demoted_self boolean Echoes demote_self.

Errors#

Status When
400 body: member_id or email is required, or You already own this workspace when the target is you.
401 Missing or invalid API key.
403 The key's IP allowlist or scopes reject the request. This route needs the admin scope. A dashboard user without the right role gets Requires role: admin. API keys act as admin.
404 That person is not a member of this workspace.
429 Rate limit exceeded. See Rate limits.

See Errors for the body format.