Skip to content

Queue first portal invitations for pending client members

POST
/clients/portal-invitations
Code sample: Shell / cURL
curl --request POST \
--url https://example.com/api/v1/clients/portal-invitations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "clientIds": [ "example" ] }'

Queues one first portal invitation per client member still waiting for one, spaced about one second apart so the mail provider is never hit in a burst. A member already queued is left alone. Requires the clients.edit permission. clientIds limits the invite to specific clients – every id must be one the caller’s scope reaches, or the request is refused with 404; omit it to cover every reachable active client.

Media typeapplication/json
object
clientIds

Client IDs to queue invitations for. Every id must be a client the caller’s scope reaches, or the request is refused. Omit to cover every pending member across every client the caller’s scope reaches.

Array<string>
<= 500 items

Example generated

{
"clientIds": [
"example"
]
}

How many invitations were queued and how many were already waiting.

Media typeapplication/json
object
data
required
object
alreadyQueued
required

Pending members that already had an invitation waiting in the queue.

integer
>= -9007199254740991 <= 9007199254740991
queued
required

Invitations newly enqueued by this call.

integer
>= -9007199254740991 <= 9007199254740991

Example generated

{
"data": {
"alreadyQueued": 1,
"queued": 1
}
}

Validation error. Parse failures include field paths and expectations.

Media typeapplication/json

Validation error with safe field paths and expected values; submitted values are never returned.

object
error
required
object
code
required

Stable machine-readable error code.

string
issues
Array<object>
object
expected
required
string
message
required
string
path
required
Array<string | number>
message
required

Human-readable error message.

string
status
required

HTTP status code, mirrored in the body.

integer
>= -9007199254740991 <= 9007199254740991

Example

{
"error": {
"code": "UNAUTHORIZED"
}
}

Unauthorized.

Media typeapplication/json

Standard error envelope.

object
error
required
object
code
required

Stable machine-readable error code.

string
message
required

Human-readable error message.

string
status
required

HTTP status code, mirrored in the body.

integer
>= -9007199254740991 <= 9007199254740991

Example

{
"error": {
"code": "UNAUTHORIZED"
}
}

Forbidden.

Media typeapplication/json

Standard error envelope.

object
error
required
object
code
required

Stable machine-readable error code.

string
message
required

Human-readable error message.

string
status
required

HTTP status code, mirrored in the body.

integer
>= -9007199254740991 <= 9007199254740991

Example

{
"error": {
"code": "UNAUTHORIZED"
}
}

One or more clients not found.

Media typeapplication/json

Standard error envelope.

object
error
required
object
code
required

Stable machine-readable error code.

string
message
required

Human-readable error message.

string
status
required

HTTP status code, mirrored in the body.

integer
>= -9007199254740991 <= 9007199254740991

Example

{
"error": {
"code": "UNAUTHORIZED"
}
}

Rate limit exceeded. Wait for Retry-After before retrying.

Media typeapplication/json

Standard error envelope.

object
error
required
object
code
required

Stable machine-readable error code.

string
message
required

Human-readable error message.

string
status
required

HTTP status code, mirrored in the body.

integer
>= -9007199254740991 <= 9007199254740991

Example

{
"error": {
"code": "UNAUTHORIZED"
}
}
RateLimit-Limit
string
/^\d+$/

Maximum requests in the current quota window.

RateLimit-Policy
string

Quota policy in requests and window seconds, for example 60;w=60.

RateLimit-Remaining
string
/^\d+$/

Requests left in this quota window (zero when blocked).

RateLimit-Reset
string
/^\d+$/

Seconds until the current quota window resets, when available from the rate-limit store.

Retry-After
string
/^\d+$/

Seconds until another request may be attempted.

Failed to queue portal invitations.

Media typeapplication/json

Standard error envelope.

object
error
required
object
code
required

Stable machine-readable error code.

string
message
required

Human-readable error message.

string
status
required

HTTP status code, mirrored in the body.

integer
>= -9007199254740991 <= 9007199254740991

Example

{
"error": {
"code": "UNAUTHORIZED"
}
}