Clients
Assign client account
Assign a connector account to a client.
POST /teams/{teamId}/clients/{clientId}/accounts/{connectorId}/{accountId}
Assigns a connector account to the client. The account ID is provider-defined, and you send it as it is in the path.
The key holder's role must include Map accounts to clients (Owner, Admin, Deputy Admin and Data Manager include it), and the key holder must have a seat in the team. Returns { "added": true } on success.
Authentication: Bearer token · Permission:
clients:write · Team permission:client_accounts.write · Rate limit: default (120 / 60s)Path parameters
teamId
string · uuid v7 required
The team the client belongs to.
clientId
string · uuid v7 required
The ID of the client to assign the account to.
connectorId
string required
The connector the account belongs to (for example
gadw or fads).accountId
string required
The provider-defined account ID. This is not a UUID. It is the ID that the connector uses to identify the account (for example, a Google Ads customer ID or a Meta
act_… ID).A team whose plan has been cancelled cannot make changes. Write requests fail with
402 PAYMENT_REQUIRED until the subscription is reactivated.Request
curl -X POST https://api.twominutereports.com/v1/teams/0190f8b0-1a2b-7c3d-8e4f-5a6b7c8d9e0f/clients/0190f8c0-1a2b-7c3d-8e4f-5a6b7c8d9e0f/accounts/gadw/1234567890 \
-H "Authorization: Bearer tmrc_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
Response
{
"success": true,
"data": { "added": true }
}
Returned when connectorId is not a recognized connector.
{
"success": false,
"error": { "code": "BAD_REQUEST", "message": "Invalid connector ID: \"foo\"" }
}
{
"success": false,
"error": { "code": "PAYMENT_REQUIRED", "message": "Your team's plan has been cancelled. Please reactivate your subscription to continue." }
}
Returned when the key holder's role does not include Map accounts to clients.
{
"success": false,
"error": { "code": "INSUFFICIENT_ROLE", "message": "[email protected] is not allowed to use client_accounts.write. This needs a role that includes it; their role is editor." }
}
Returned when the client does not exist or does not belong to this team.
{
"success": false,
"error": { "code": "NOT_FOUND", "message": "Client not found" }
}
Returned when the account is already assigned to the client.
{
"success": false,
"error": { "code": "CONFLICT", "message": "Account already added to this client" }
}