DelegationUpdate
The request body for updating a delegation on an ad account.
Declaration
object DelegationUpdateProperties
| Name | Type | Description |
|---|---|---|
resourceId | string | The ID of the resource you’re delegating. For |
resourceType | DelegationUpdate.ResourceType | The type of resource you’re delegating. See DelegationUpdate.ResourceType. |
Discussion
You only ever send DelegationUpdate entries as part of the delegations array on Update Ad Accounts, which uses full-replacement semantics: the array you send becomes the account’s complete set of delegations. There is no separate add or remove operation. The system keeps entries you include and removes entries you omit.
Adding a new delegation: include every existing delegation plus the new entry. All delegations on an ad account must share the same resourceType. You can’t mix CONTENT_PROVIDER and BUSINESS_BRAND delegations on the same account. For example, an ad account with an existing CONTENT_PROVIDER delegation that wants to add a second CONTENT_PROVIDER delegation sends both entries:
PUT /v1/ad-accounts/{id}
{
"delegations": [
{
"resourceId": "12345678",
"resourceType": "CONTENT_PROVIDER"
},
{
"resourceId": "9876543",
"resourceType": "CONTENT_PROVIDER"
}
]
}Removing a delegation: send the array with the unwanted entry omitted. To remove the second CONTENT_PROVIDER delegation added above and keep only the first, send:
PUT /v1/ad-accounts/{id}
{
"delegations": [
{
"resourceId": "12345678",
"resourceType": "CONTENT_PROVIDER"
}
]
}To remove all delegations, send an empty array.
Example
{
"delegations": []
}