Manage Managers
API integration guide for adding and removing project managers
Manage Managers
Managing managers allows the project owner to add or remove manager access for a project. Managers are responsible for creating tasks, assessing contributor work, and overseeing day-to-day project operations. The full manager list is synced from chain to the database on confirmation, replacing the entire list.
Summary
| Property | Value |
|---|---|
| System | Project |
| Role | Owner |
| Type Key | managers_manage |
| Build Endpoint | POST /api/v2/tx/project/owner/managers/manage |
| DB Sync | Yes |
| Service Fee | 10 ADA |
| Est. Wallet Cost | ~10.3 ADA |
The estimated wallet cost breaks down as: transaction fee ~0.30 ADA + service fee 10 ADA. DB sync performs a full replacement of the manager list from chain state, not an incremental update.
Build Transaction
Endpoint
POST /api/v2/tx/project/owner/managers/manage
Request Body
{
"alias": "projectowner",
"project_id": "a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4",
"managers_to_add": ["newmanager1", "newmanager2"],
"managers_to_remove": ["oldmanager"],
"initiator_data": {
"usedAddresses": ["addr1qx2fxv2umyhttkxyxp8x0dlpdt3k6cwng5pxj3jhsydzer3n0d3vllmyqwsx5wktcd8cc3sq835lu7drv2xwl2wywfgse35a3x"],
"changeAddress": "addr1qx2fxv2umyhttkxyxp8x0dlpdt3k6cwng5pxj3jhsydzer3n0d3vllmyqwsx5wktcd8cc3sq835lu7drv2xwl2wywfgse35a3x"
}
}| Field | Type | Required | Description |
|---|---|---|---|
alias | string (Alias) | Yes | The owner's access token alias. Only the project owner can manage managers. |
project_id | string (GYMintingPolicyId) | Yes | 56-character hex policy ID returned from project creation. |
managers_to_add | string[] (Alias[]) | Yes | Aliases of users to grant manager access. Each must have a minted access token. Pass [] if only removing. |
managers_to_remove | string[] (Alias[]) | Yes | Aliases of managers to revoke access from. Pass [] if only adding. |
initiator_data | WalletData | No | Object containing usedAddresses (string[]) and changeAddress (string). Note: this field is initiator_data, not walletData. If omitted, the Gateway resolves wallet data from the authenticated session. |
Response
{
"unsigned_tx": "84a800..."
}The response contains the unsigned transaction CBOR, ready for the user's wallet to sign.
Register Transaction
After the user signs and submits the transaction, register it with the state machine:
POST /api/v2/tx/register
{
"tx_hash": "64-char hex hash from wallet.submitTx()",
"tx_type": "managers_manage"
}No metadata is required. On confirmation, the state machine reads the full manager list from chain state and replaces the database record entirely.
Related API Endpoints
| Endpoint | Description |
|---|---|
GET /api/v2/projects/{project_id} | Fetch project details including the current manager list |
Example: Full Lifecycle
const API_URL = "https://api.andamio.io";
// 1. Build
const buildRes = await fetch(`${API_URL}/api/v2/tx/project/owner/managers/manage`, {
method: "POST",
headers: {
"Content-Type": "application/json",
"X-API-Key": API_KEY,
"Authorization": `Bearer ${userJwt}`,
},
body: JSON.stringify({
alias: "projectowner",
project_id: projectId,
managers_to_add: ["newmanager1", "newmanager2"],
managers_to_remove: [],
initiator_data: {
usedAddresses: [walletAddress],
changeAddress: walletAddress,
},
}),
});
const { unsigned_tx } = await buildRes.json();
// 2. Sign
const signedTx = await wallet.signTx(unsigned_tx);
// 3. Submit
const txHash = await wallet.submitTx(signedTx);
// 4. Register
await fetch(`${API_URL}/api/v2/tx/register`, {
method: "POST",
headers: {
"Content-Type": "application/json",
"X-API-Key": API_KEY,
"Authorization": `Bearer ${userJwt}`,
},
body: JSON.stringify({
tx_hash: txHash,
tx_type: "managers_manage",
}),
});
// 5. Monitor (SSE)
const events = new EventSource(
`${API_URL}/api/v2/tx/stream/${txHash}`
);
events.addEventListener("state_change", (e) => {
const data = JSON.parse(e.data);
console.log(`State: ${data.old_state} → ${data.new_state}`);
});
events.addEventListener("complete", (e) => {
const data = JSON.parse(e.data);
console.log(`Final: ${data.final_state}`);
events.close();
});See Also
- Transaction State Machine -- Lifecycle overview
- Owner: Create Project -- Create the project first
- Manager: Manage Tasks -- What managers do once added