Invite someone to your organization
POST/v1/organization/invitations
x-scope: "team:write"
x-rate-limit-per-minute: 10
Invites a person by email as admin, member or rep, to every agent (the default) or to
the agents in agent_ids. Mojeeb emails them the invitation link, as from the person who
created the key; it is valid for 7 days, and they join when they accept it. A new
invitation to the same email replaces the open one. Someone already on the team is
409 already_member. Invitations send email, so this endpoint and resendInvitation count
in the budget of 10 requests a minute per key that the WhatsApp template endpoints and
broadcast sends and retries share.
Request
Responses
- 201
- 401
- 403
- 409
- 422
- 429
- 500
- 503
The invitation, emailed.
Response Headers
Correlation id for this request — paste into support tickets.
Authentication failed. Single code (invalid_api_key) covers every
sub-case: missing header, wrong scheme, malformed, unknown, revoked or
expired key. The message field disambiguates for humans debugging.
One exception: when the key could not be checked because of a server-side
fault, the status is still 401 but type is internal_error and code
is internal_server_error; retry with backoff.
Response Headers
Correlation id for this request — paste into support tickets.
insufficient_scope: the key lacks team:write, which full access (*) doesn't include.
insufficient_role: the key is limited to some agents, or the person who created it can't
do this in the dashboard any more (only the owner, or an admin with every agent, manages the
team, and only the owner removes someone). owner_only: the teammate is an owner, managed
in the dashboard. self_edit / self_remove: the teammate is the person who created the
key.
Response Headers
Correlation id for this request — paste into support tickets.
already_member: the person is already on the team. Nothing was sent.
Response Headers
Correlation id for this request — paste into support tickets.
invalid_request_body: the body breaks its schema, such as an owner role or
all_agents: false without agent_ids (param names the field). unknown_agent: one of
agent_ids isn't an agent of your organization. too_many_agents: more than 100 agents.
invitation_not_pending: the invitation is no longer open (accepted, or expired and its link then used).
Response Headers
Correlation id for this request — paste into support tickets.
Per-key rate limit hit. Default is 60/min/key; an endpoint with an
x-rate-limit-per-minute of its own counts in a budget of its own
(today the WhatsApp template endpoints, sendBroadcast, retryBroadcast, inviteMember
and resendInvitation, which share one that allows 10/min/key, and
sendConversationMessage, which allows 20/min/key), and its 429
reports that limit in X-RateLimit-Limit. Retry-After tells you when to retry;
X-RateLimit-Reset is the Unix timestamp of the next window.
Per-success-response
X-RateLimit-*headers are a known gap; on 2xx responses these headers are NOT currently emitted. Customers should rely on 429 +Retry-Afterfor backoff signals.
Response Headers
Correlation id for this request — paste into support tickets.
Seconds to wait before retrying.
The per-minute request limit of the endpoint called. Every key has the same limits today.
Remaining requests in the current window. 0 on rejection.
Unix timestamp at which the current window resets.
Unexpected server-side failure. Retry with exponential backoff. If
the failure persists, send us the correlation_id.
Response Headers
Correlation id for this request — paste into support tickets.
Mojeeb couldn't check access because of a temporary fault: the key's,
or on assignLead and assignConversation the teammate's. Nothing was
changed. Retry with backoff.
Response Headers
Correlation id for this request — paste into support tickets.