Use this endpoint to grant a user access to an ad account under an organization. If the user does not yet exist, an account is created and an invitation email is sent. The user is also granted an organization-level membership role if they don't already have one.
Request
End Point https://business.newsbreak.com/business-api/v1/ad-account/addUser
Method POST
Header
| Field | Required | Data Type | Description |
|---|---|---|---|
| Access-Token | Y | string | Authorized access token. |
Request Parameters
| Field | Required | Data Type | Description |
|---|---|---|---|
| orgId | Y | string | ID of the organization the ad account belongs to. |
| adAccountId | Y | string | ID of the ad account to grant access to. Must belong to orgId. |
| Y | string | Email address of the user to add. | |
| role | Y | string | Access role to assign on the ad account. Available values: ACC_ADMIN, ACC_OPERATOR, ACC_VIEWER. |
Example
curl --location --request POST 'https://business.newsbreak.com/business-api/v1/ad-account/addUser' \
-H 'Content-Type: application/json' \
-H 'Access-Token:{{Access-Token}}' \
-d '{
"orgId": "123456789",
"adAccountId": "987654321",
"email": "user@example.com",
"role": "ACC_VIEWER"
}'
Response
Response Parameters
| Field | Data Type | Description |
|---|---|---|
| code | int | Status code, see Return Codes. |
| errMsg | string | Error message when code!=0. |
| data | object | Response object. Empty on success. |
Example
{
"code": 0
}