Skip to contentSkip to navigation

Invite Agency Team Member Beta

Add someone to the agency team, or invite them by email.

POST /api/v1/agency/team/invite

Requires 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
The person's email.
role string body default member
manager or member.
workspaceIds string[] body
Client workspace ids from List Agency Clients, at most 50. Required (at least one) for an email with no account.

Response

Returns a 201 status code. status says which of the two cases happened.

data object
data
status string
added or invited.
id string
Team member id (added only).
userId string
The person's user id (added only).
email string
The email, lower-cased.
role string
manager or member.
workspaceIds string[]
For added, every client workspace they can now open. For invited, the workspaces the invite covers.
expiresAt string
When the invite expires (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

StatusDescription
401Missing, invalid, revoked or expired API key
403API key does not have the required scope: write
403agency_required or agency_owner_required
400role 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
409Another change to this team was saved at the same time; try again
422email is missing or not an email, or more than 50 workspaceIds

Rate Limit

  • 120 requests per minute, shared by every write call in your workspace. Fixed 60-second window.
  • Every response includes X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset (unix epoch seconds) and X-RateLimit-Bucket (write).
  • A 429 response includes a Retry-After header (seconds until the bucket resets).

For client-side patterns, see Rate Limiting.

Was this page helpful?