Team Management
Invite employees, assign roles, and control what each person can do inside the corporation.
Before You Start
Read the following guides before proceeding:
| Guide | Why |
|---|---|
| Getting Started | Platform overview and setup |
| Api Basics | Required headers and request configuration |
| Authentication | How an employee obtains a corporation token |
| Permissions | What each permission unlocks |
A corporation acts through its employees. Each employee record carries the person's identity — the name
embossed on their cards, the email they log in with, and the wallet address they sign with — and one
role, which resolves into the permission set carried by their corporation token.
Employees are created by invitation and claimed by login. The invite writes a record in status
Invited; the invited person calls POST /api/v1/corporations/login with their own wallet address and
email, which binds those values and activates the record. There is no separate accept-invitation call,
and no password anywhere in the flow.
Roles come in two kinds. Six default roles are seeded platform-wide, from Owner (full access) down to
Viewer (read-only). Custom roles are created per corporation and may grant any combination of
permissions except Su.
Permissions are resolved at login and frozen into the token. A role change reaches an employee only
when they next log in.
Employee Lifecycle (Simplified)
sequenceDiagram
participant Admin as Corporation Admin
participant Corp as Wirex Corporate API
participant Employee
Admin->>Corp: 1. GET /api/v1/roles
Corp-->>Admin: roles[]
Admin->>Corp: 2. POST /api/v1/employees/invite
Corp-->>Admin: 200 — record created as Invited
Note over Employee,Corp: The employee claims the record
Employee->>Corp: 3. POST /api/v1/corporations/login
Corp-->>Employee: corporation_token — record becomes Active
Admin->>Corp: 4. PUT /api/v1/employees/{employeeId}/role
Corp-->>Admin: 200
Note over Employee,Corp: New permissions apply at next login
Employee->>Corp: 5. POST /api/v1/corporations/login
Corp-->>Employee: corporation_token with the new permission set
| Step | Action | Description |
|---|---|---|
| 1 | GET /api/v1/roles | Pick the role id to assign |
| 2 | POST /api/v1/employees/invite | Create the employee record with personal data and role |
| 3 | POST /api/v1/corporations/login | The employee binds their wallet and email, and gets a token |
| 4 | PUT /api/v1/employees/{employeeId}/role | Move the employee to a different role |
| 5 | POST /api/v1/corporations/login | The new permissions take effect |
Guides
Updated 20 days ago

