Account invitations

Base URL: $BUSINESS_API

Create invitations for many accounts and send them

Logs

POST /account-invitations/bulk

Create invitations for many accounts and send them; per-item results (a delivery failure appears as the item's error)

Issues one invitation code per item, each for the account named by its account_id and sent to exactly one phone or e-mail, with holder permissions unless others are given. Between 1 and 500 items are accepted; each item gets its own result with either the invitation or an error (unknown account, invalid recipient, no delivery channel, or delivery failure), so one bad item does not fail the batch. Invitations that could not be delivered within the request are revoked and reported as errors. Requires the business:accounts:invitations:create permission.

Body application/json

invitationsarray of InvitationInput · required
Show child attributes
phonestring · optional
emailstring · optional
permissionsarray of string · optional
expires_in_hoursinteger · optional

Default 168, maximum 720

account_idstring · optional

Required in bulk requests

Returns

201 Per-account results

Permissions business:accounts:invitations:create · Roles: admin, customer_service, owner

curl -X POST "$BUSINESS_API/account-invitations/bulk" \
  -H "Authorization: Bearer sk_test_..." \
  -H "Content-Type: application/json" \
  -d '{
  "invitations": [
    {
      "phone": "+258841234567",
      "email": "ana.matsinhe@example.org",
      "permissions": [
        "permission"
      ],
      "expires_in_hours": 1,
      "account_id": "act_2JFioNDgIfvkgflk8RtcqhBaARP"
    }
  ]
}'
Response 201

Per-account results