API Reference / AccountService
AccountService
Manages ad account lifecycle and member permissions.
CreateAccount
Request
| Field | Type | Validation | Description |
|---|---|---|---|
| name | string | min_len: 1 | |
| type | AccountType | — |
Response
| Field | Type | Description |
|---|---|---|
| id | string | ULID of the resource |
| hierarchy | string[] | |
| name | string | |
| type | AccountType | |
| status | AccountStatus | |
| created_at | timestamp |
GetAccount
Request
| Field | Type | Validation | Description |
|---|---|---|---|
| id | string | min_len: 1 | ULID of the resource |
Response
| Field | Type | Description |
|---|---|---|
| account | Account |
UpdateAccount
Request
| Field | Type | Validation | Description |
|---|---|---|---|
| id | string | min_len: 1 | ULID of the resource |
| name | string | min_len: 1 |
Response
| Field | Type | Description |
|---|---|---|
| account | Account |
DeleteAccount
Request
| Field | Type | Validation | Description |
|---|---|---|---|
| id | string | min_len: 1 | ULID of the resource |
ListMyPermissions
Response
| Field | Type | Description |
|---|---|---|
| user_id | string | |
| accounts | AccountPermissions[] | |
| root_permissions | string[] |
Messages
Account
| Field | Type | Description |
|---|---|---|
| id | string | ULID of the resource |
| hierarchy | string[] | |
| name | string | |
| type | AccountType | |
| status | AccountStatus | |
| created_at | timestamp | |
| updated_at | timestamp |
AccountPermissions
| Field | Type | Description |
|---|---|---|
| account_id | string | |
| name | string | |
| type | AccountType | |
| permissions | string[] |
Enums
AccountType
| Name | Number |
|---|---|
| ACCOUNT_TYPE_UNSPECIFIED | 0 |
| ACCOUNT_TYPE_AD_ACCOUNT | 1 |
| ACCOUNT_TYPE_BUSINESS_MANAGER | 2 |
| ACCOUNT_TYPE_ENTERPRISE | 3 |
| ACCOUNT_TYPE_AGENCY | 4 |
AccountStatus
| Name | Number |
|---|---|
| ACCOUNT_STATUS_UNSPECIFIED | 0 |
| ACCOUNT_STATUS_UNVERIFIED | 1 |
| ACCOUNT_STATUS_PENDING | 2 |
| ACCOUNT_STATUS_VERIFIED | 3 |