PT EN

Convites para contas

URL base: $BUSINESS_API

Criar convites para várias contas

Registos

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.

Corpo application/json

invitationsarray of InvitationInput · obrigatório
Mostrar atributos filhos
phonestring · opcional
emailstring · opcional
permissionsarray of string · opcional
expires_in_hoursinteger · opcional

Default 168, maximum 720

account_idstring · opcional

Required in bulk requests

Devolve

201 Per-account results

Permissões business:accounts:invitations:create · Funções: 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"
    }
  ]
}'
Resposta 201

Per-account results