Invite Agency Team Member Beta
Add someone to the agency team, or invite them by email.
https://api.foxreach.io/ api/ v1/ agency/ team/ inviteRequires an API key with the write and admin scopes, created by the agency workspace owner. The admin scope is opt-in: no default key carries it. Only keys of an Agency workspace can call it (403 agency_required otherwise).
Only API keys of an Agency workspace can call this endpoint (403 agency_required otherwise). The call always runs in the key's own workspace; X-Workspace-Id is ignored. Writes also need a key created by the agency workspace owner (403 agency_owner_required otherwise).
- The email belongs to a FoxReach account: they join the team at once and can open the client workspaces you pass. Workspaces of the agency they could already open stay open at the role they had. No email is sent.
- No account uses the email: FoxReach sends one invite email covering every workspace you pass (at least one is required). They join the team when they accept. Sending again to the same email replaces the earlier invite's workspaces.
A manager is an admin in their client workspaces (invites people, edits settings) and can open Agency Admin's Dashboard and Clients for them. A member is a plain workspace member.
Body Parameters
email string body required role string body default membermanager or member.workspaceIds string[] body Response
Returns a 201 status code. status says which of the two cases happened.
data object data
status string added or invited.id string added only).userId string added only).email string role string manager or member.workspaceIds string[] added, every client workspace they can now open. For invited, the workspaces the invite covers.expiresAt string invited only).Each change is recorded as audit.agency_member.* events (added or invited, then access_granted per workspace) with the key as the actor, readable through the audit log.
Errors
| Status | Description |
|---|---|
401 | Missing, invalid, revoked or expired API key |
403 | API key does not have the required scope: write |
403 | agency_required or agency_owner_required |
400 | role is not manager or member, a workspace is not the agency owner's, the email is the owner's own or already on the team, or an email with no account was sent no workspaces |
409 | Another change to this team was saved at the same time; try again |
422 | email is missing or not an email, or more than 50 workspaceIds |
Rate Limit
- 120 requests per minute, shared by every
writecall in your workspace. Fixed 60-second window. - Every response includes
X-RateLimit-Limit,X-RateLimit-Remaining,X-RateLimit-Reset(unix epoch seconds) andX-RateLimit-Bucket(write). - A
429response includes aRetry-Afterheader (seconds until the bucket resets).
For client-side patterns, see Rate Limiting.