This section as Markdown: View Download

Managing Teams

Create organizations, invite members, and manage roles and permissions.

Creating, changing, deleting or restoring organizations and teams, managing members and invitations, and moving projects, agents or credit all need a signed-in user, as in the dashboard. With an API key these calls fail with HTTP 401 (see Team API Access).

POST /Organization/Create

Creates a new organization. The caller automatically becomes the organization owner, and only the owner can create teams, delete the organization, or restore it after deletion. A team named Default Team is created with it automatically: the caller is added as its admin, and it gets its own wallet (starting at $0.00), no spend limits and no Model Access rules, so it can run every model. Use /Team/Create only for additional teams.

Parameter Type Required Description
name string Yes Organization name

Response

{
  "result": true,
  "errors": [],
  "organization": [
    {
      "guid": "1b43089c-3b56-4638-b4ac-24268bb1d970",
      "name": "Acme Corp",
      "description": null,
      "owneruuid": "7a1b2c3d-4e5f-4a6b-8c7d-9e0f1a2b3c4d",
      "status": 1,
      "teams": [
        {
          "guid": "7c1e5a90-2f3b-4d8e-a6c4-9b0d1e2f3a45",
          "organizationguid": "1b43089c-3b56-4638-b4ac-24268bb1d970",
          "name": "Default Team",
          "status": 1
        }
      ]
    }
  ]
}

You can also create organizations from the Dashboard.

POST /Team/Create

Creates a team inside an organization. Only the organization owner can create teams. The team is created with its own wallet (starting at $0.00) and the caller is automatically added as an admin. To choose which models the team can run, add Model Access rules.

Parameter Type Required Description
organizationguid string Yes Organization guid
name string Yes Team name

Response

{
  "result": true,
  "errors": [],
  "team": [
    {
      "guid": "0d9aade4-d31b-4b97-88f3-a90482f080ea",
      "organizationguid": "1b43089c-3b56-4638-b4ac-24268bb1d970",
      "name": "Engineering",
      "description": null,
      "status": 1
    }
  ]
}

POST /Team/Member/Invite

Sends an email invitation to add a new member to the team. Invitations expire after 72 hours. Organization owners and team admins can invite members.

Inviting an address that already has an unexpired invitation to the team, or that belongs to an active member who joined through an invitation, fails with This email is already invited or a member. To send a new invitation, cancel the current one with /Team/Member/CancelInvite (or wait until it expires) and invite the address again.

Parameter Type Required Description
teamguid string Yes Team guid
email string Yes Invitee email address
role string No Role: "admin" or "member". Defaults to "member"; any other value is treated as "member"

Response

{
  "result": true,
  "errors": [],
  "member": [
    {
      "guid": "5f0c2b8e-7d4a-4e21-9c3b-2a6f1e8d9b10",
      "teamguid": "0d9aade4-d31b-4b97-88f3-a90482f080ea",
      "useruuid": null,
      "role": "member",
      "status": "pending",
      "inviteemail": "teammate@example.com",
      "inviteexpiry": "1757923200"
    }
  ]
}

inviteexpiry is the invitation's expiry time as a Unix timestamp in seconds. The response doesn't include the invitation token, and neither does /Team/Member/List: the token is only sent to the invitee, in the invitation email.

Invitation States

Status Description
pending Invitation sent, waiting for the user to accept. An expired invitation stays pending until it is cancelled or replaced by a new invitation
active User accepted the invitation and is an active member
removed Member was removed or invitation was cancelled

POST /Team/Member/CancelInvite

Cancels a pending invitation. Organization owners and team admins can cancel invitations. The invitation link stops working and the entry changes to removed.

Parameter Type Required Description
teammemberguid string Yes The pending invitation's guid from /Team/Member/List

POST /Team/Member/Accept

The Accept Invite button in the invitation email opens the Team Invitation page on wiro.ai. If you are signed out, the page shows who invited you and the organization and team names; choose Sign In to Accept or Create Account, and you are brought back to the invitation afterwards. If you are already signed in, the invitation is accepted automatically and you are taken to the Organizations page.

The invitation can only be accepted by a Wiro account whose email address matches the invited address. When calling the endpoint directly, send the request as the signed-in invitee. When the organization owner accepts an invitation to one of their teams, they join as an admin, whatever role the invitation set.

Parameter Type Required Description
invitetoken string Yes Invitation token: the value of the token query parameter in the invitation link
Error Cause
Please sign in or sign up to accept this invitation The request was not made by a signed-in user (error code 98)
This invitation was sent to a different email address The signed-in account's email address does not match the invited address
This invitation has expired or is no longer valid The invitation expired, was cancelled or already accepted, or its team was deleted

Member Roles

Role Run models Message agents View spending Manage settings Invite members Remove members Delete team
Owner Yes Yes Yes Yes Yes Yes Yes
Admin Yes Yes Yes Yes Yes Yes No
Member Yes Yes Yes No No No No

The organization owner is added as an admin of every team they create, including the Default Team. The owner is always an admin of their teams: nobody, the owner included, can change the owner's role to member, and nobody but the owner can remove the owner from a team. The owner role cannot be transferred.

On a team agent whose Chat Mode is "collaborative", admins and the agent's owner can also watch the agent's Screen in the Wiro panel, or show it in an app through a team project's API key that one of them created; other members can't. Nobody can take control of a team agent's computer.

POST /Team/Member/List

Lists all members of a team, including pending invitations. Any active member of the team can call it. Use a member's guid as teammemberguid in /Team/Member/UpdateRole, /Team/Member/Remove and /Team/Member/CancelInvite.

Parameter Type Required Description
teamguid string Yes Team guid

Response

{
  "result": true,
  "errors": [],
  "member": [
    {
      "guid": "a3c9e1f2-4b7d-4c1e-9f2a-6d8b0e5c7a91",
      "teamguid": "0d9aade4-d31b-4b97-88f3-a90482f080ea",
      "useruuid": "7a1b2c3d-4e5f-4a6b-8c7d-9e0f1a2b3c4d",
      "role": "admin",
      "status": "active",
      "user": {
        "firstname": "John",
        "lastname": "Doe",
        "email": "john@example.com",
        "avatar": "https://cdn.wiro.ai/avatars/johndoe.webp",
        "avatarinitials": "JD"
      }
    },
    {
      "guid": "5f0c2b8e-7d4a-4e21-9c3b-2a6f1e8d9b10",
      "teamguid": "0d9aade4-d31b-4b97-88f3-a90482f080ea",
      "useruuid": null,
      "role": "member",
      "status": "pending",
      "inviteemail": "jane@example.com",
      "inviteexpiry": "1757923200"
    }
  ]
}

POST /Team/Member/Remove

Removes a member from the team. Organization owners and team admins can remove members. The removed member immediately loses access to the team workspace and is notified by email. Removed members can be re-invited later if needed.

  • A team must always keep at least one admin. Removing the last admin fails with Cannot remove the last admin of the team. Assign another admin first.
  • Regular members cannot remove themselves; a team admin or the organization owner has to remove them.
  • Another admin can't remove the organization owner from a team: the request fails with Only the organization owner can remove the owner from this team. The owner can remove themselves.
  • Only active members can be removed. To withdraw a pending invitation, use /Team/Member/CancelInvite.
  • Team projects stay in the team. The API keys of the projects the removed member created stop working right away, unless that member is the organization owner. Apps and agents that use those keys lose access too, so move them to a key from another member's project before you remove someone. Keys of projects other members created keep working for anyone who has them: if the removed member had one, delete that project. Changing the project's IP whitelist issues a new API secret, so old signatures stop working on a Signature-Based project, but an API Key Only project's key keeps working from any IP still on its whitelist.
Parameter Type Required Description
teammemberguid string Yes The member's guid from /Team/Member/List

POST /Team/Member/UpdateRole

Updates a member's role in the team. Team admins and the organization owner can change a member's role between admin and member. A team must always keep at least one admin: demoting the last admin fails with Cannot demote the last admin. Assign another admin first. Nobody, the owner included, can change the organization owner's role to member: the request fails with The organization owner is always an admin of their teams and can't be made a member.

Parameter Type Required Description
teammemberguid string Yes The member's guid from /Team/Member/List
role string Yes New role: "admin" or "member"

The call changes only the role. To cap what a member can spend in the team, add a member limit with /SpendLimit/Set (scope: "member", with the member's useruuid as target), or under Controls > Spend Limits in the dashboard.

POST /Team/Remove

Deletes a team. Only the organization owner can delete a team. Deleting a team:

  • Soft-deletes the team (sets status to 0)
  • Removes all team members and cancels pending invitations
  • Moves each team agent back to the personal workspace of the user who deployed it; its active subscriptions move with it, the agent is restarted, and from then on its plan and its AI usage past the plan are paid from that user's personal wallet; Take Control stays off for it until that user resets its browser, as for any agent that has been in a team
  • Moves each team project back to the personal workspace of the user who created it; its API key keeps working and future tasks are billed to that user's personal wallet

The team's wallet balance is not automatically transferred. Move it out with Transfer Credit before deleting the team; after deletion, contact support to recover it.

Parameter Type Required Description
teamguid string Yes Team guid

POST /Organization/Remove

Deletes an organization. Only the organization owner can delete an organization. Deleting an organization soft-deletes it and archives the teams and members that are active at that moment, so /Organization/Restore can bring exactly those back. Each team is removed the same way as with /Team/Remove: members are removed, pending invitations are cancelled, agents go back to the personal workspace of the user who deployed them (with Take Control off until that user resets the agent's browser, as for any agent that has been in a team), and projects go back to the personal workspace of the user who created them. Team wallet balances are not moved.

Parameter Type Required Description
organizationguid string Yes Organization guid

POST /Organization/Restore

Restores a soft-deleted organization. Only the organization owner can restore it. Restoring an organization:

  • Reactivates the organization and only the teams that were active when it was deleted. Teams deleted earlier with /Team/Remove stay deleted
  • Reactivates only the members who were active in those teams when the organization was deleted. Members removed earlier stay removed
  • Invitations stay cancelled, including those that were pending when the organization was deleted; invite those people again
  • Does not move projects or agents back into the teams: they stay in the personal workspaces they were returned to when the organization was deleted. The user who created a project or deployed an agent can move it back with /Team/TransferProject or /Team/TransferAgent, provided they are an admin of the team or the organization owner

Some organizations can't be restored automatically: those deleted before Wiro started recording which teams and members were removed with them, and those whose teams had all been deleted before the organization was. For these, the call fails with This organization can't be restored automatically because we can't tell which of its teams and members were removed with it. Please contact support. and nothing changes. Contact support to have them restored.

Parameter Type Required Description
organizationguid string Yes Organization guid

POST /Organization/List

Returns all organizations you belong to, including active and deleted ones. Each organization lists the teams you are a member of, with your role and your own membership memberguid. You own an organization when its owneruuid is your user UUID.

Response

{
  "result": true,
  "errors": [],
  "organizations": [
    {
      "guid": "1b43089c-3b56-4638-b4ac-24268bb1d970",
      "name": "Acme Corp",
      "avatar": null,
      "owneruuid": "7a1b2c3d-4e5f-4a6b-8c7d-9e0f1a2b3c4d",
      "status": 1,
      "teams": [
        {
          "guid": "0d9aade4-d31b-4b97-88f3-a90482f080ea",
          "name": "Engineering",
          "status": 1,
          "role": "admin",
          "memberguid": "a3c9e1f2-4b7d-4c1e-9f2a-6d8b0e5c7a91",
          "walletbalance": 142.50
        }
      ]
    }
  ]
}

POST /Team/TransferAgent

Transfers an agent instance between workspaces: personal to team, team to personal, or team to team. On the team side you must be an admin of that team or the organization owner. On the personal side you must be the user who originally deployed the agent: only the deployer can move an agent from their personal workspace into a team, and only the deployer can move it from a team to their personal workspace.

Parameter Type Required Description
useragentguid string Yes Agent instance guid
targetteamguid string Yes Target team guid, or empty string "" for personal

When an agent is transferred:

  • The agent's teamguid is updated
  • Active subscriptions move with the agent, and its plan and its AI usage past the plan are paid from the wallet of its new workspace
  • Its chat history moves with it
  • The agent is restarted with the new context
  • Future billing is charged to the new workspace's wallet
  • When the agent's Wiro project isn't in the new workspace, the agent is disconnected from it, and its Wiro AI Models (wiro) connector is disconnected too (see wiroproject below)
  • Take Control stays off for an agent that has been in a team after it moves back to a personal workspace, until its owner resets its browser: the browser goes with it, signed in wherever the team's chats signed in

The answer's wiroproject says what happened to the agent's Wiro project, the project its model runs are paid from, and notes lists sentences to show the person who moved it:

wiroproject Meaning
none The agent has no Wiro project, or its key belongs to no project any more.
kept The project is in the new workspace, so the agent keeps it.
cleared The project isn't in the new workspace, so the agent was disconnected from it, and its wiro connection was deleted. notes holds The agent's Wiro project belongs to another workspace, so the agent was disconnected from it. Pick a project of its new workspace so the agent can run models again.
failed The project isn't in the new workspace and could not be disconnected: the agent still runs its models with it, on that workspace's wallet. notes holds The agent still runs its models with a project of another workspace, so that workspace's spend limits and Model Access rules still apply to it. Check the agent's Wiro project: it should be a project of its new workspace.

POST /Team/TransferProject

Transfers a project between workspaces. Future tasks on the project are billed to the new workspace's wallet. On the team side you must be an admin of that team or the organization owner. On the personal side you must be the user who created the project: only the creator can move a project from their personal workspace into a team, and only the creator can move it from a team to their personal workspace.

Parameter Type Required Description
projectapikey string Yes Project API key
targetteamguid string Yes Target team guid, or empty string "" for personal

When a project is transferred:

  • The project's teamguid is updated
  • Future tasks using this project's API key are billed to the new workspace
  • If the user who created the project is neither an active member of the new team nor the organization owner, the project's API key stops working

Important: Agents can only access projects in the same workspace. Transferring a project may break agent workflows that depend on it.

Transferring Credit

Credit can be transferred between your personal wallet and team wallets. Transfers preserve original deposit expiry dates and coupon tracking. See Team Billing & Spending → Credit Transfer for full details.

What's Next