API Reference / MemberService
MemberService
Invitations and membership across ad accounts.
InviteMember
Request
| Field | Type | Validation | Description |
|---|---|---|---|
| account_id | string | min_len: 1 | |
| string | |||
| relations | string[] | .repeated.min_items = 1 |
Response
| Field | Type | Description |
|---|---|---|
| invitation | Invitation |
AcceptInvitation
Request
| Field | Type | Validation | Description |
|---|---|---|---|
| invitation_token | string | min_len: 1 | |
| password | string | — | |
| code | string | — |
Response
| Field | Type | Description |
|---|---|---|
| access_token | string | |
| refresh_token | string |
RevokeInvitation
Request
| Field | Type | Validation | Description |
|---|---|---|---|
| account_id | string | min_len: 1 | |
| invitation_id | string | min_len: 1 |
ListInvitations
Request
| Field | Type | Validation | Description |
|---|---|---|---|
| account_id | string | min_len: 1 |
Response
| Field | Type | Description |
|---|---|---|
| invitations | Invitation[] |
ListMembers
Request
| Field | Type | Validation | Description |
|---|---|---|---|
| account_id | string | min_len: 1 |
Response
| Field | Type | Description |
|---|---|---|
| members | Member[] |
ListAccountMembers
Request
| Field | Type | Validation | Description |
|---|---|---|---|
| account_id | string | min_len: 1 | |
| query | string | — | |
| filters | AccountMemberFilters | — | |
| sort | SortBy[] | — | |
| page | int32 | min_len: 1 |
Response
| Field | Type | Description |
|---|---|---|
| members | AccountMember[] | |
| page | int32 | |
| per_page | int32 | |
| total_results | int64 |
Messages
SortBy
| Field | Type | Description |
|---|---|---|
| field | string | |
| descending | bool |
Invitation
| Field | Type | Description |
|---|---|---|
| id | string | ULID of the resource |
| account_id | string | |
| string | ||
| relations | string[] | |
| status | InvitationStatus | |
| inviter_user_id | string | |
| expires_at | timestamp | |
| created_at | timestamp |
Member
| Field | Type | Description |
|---|---|---|
| user_id | string | |
| relations | string[] |
AccountMember
| Field | Type | Description |
|---|---|---|
| id | string | ULID of the resource |
| account_id | string | |
| membership_status | MembershipStatus | |
| user_id | string | |
| invitation_id | string | |
| string | ||
| first_name | string | |
| last_name | string | |
| relations | string[] | |
| expires_at | timestamp | |
| created_at | timestamp | |
| accepted_at | timestamp |
AccountMemberFilters
| Field | Type | Description |
|---|---|---|
| statuses | MembershipStatus[] | |
| relations | string[] |
Enums
InvitationStatus
| Name | Number |
|---|---|
| INVITATION_STATUS_UNSPECIFIED | 0 |
| INVITATION_STATUS_PENDING_SEND | 1 |
| INVITATION_STATUS_PENDING | 2 |
| INVITATION_STATUS_ACCEPTED | 3 |
| INVITATION_STATUS_REVOKED | 4 |
| INVITATION_STATUS_EXPIRED | 5 |
MembershipStatus
| Name | Number |
|---|---|
| MEMBERSHIP_STATUS_UNSPECIFIED | 0 |
| MEMBERSHIP_STATUS_INVITED | 1 |
| MEMBERSHIP_STATUS_ACTIVE | 2 |
| MEMBERSHIP_STATUS_INVITATION_EXPIRED | 3 |
| MEMBERSHIP_STATUS_INVITATION_REVOKED | 4 |