> ## Documentation Index
> Fetch the complete documentation index at: https://www.ayrshare.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Create Boost Delegations

> Let one profile in your account, the payer, boost other profiles' posts from its ad account. Send it with your Primary Profile's API key.

A boost delegation lets one profile in your account, the payer, boost posts that other profiles in your account published. The payer is the profile whose ad account pays for the ad.

Delegations are managed with your Primary Profile's API key. Send the request without a `Profile-Key`.

## Header Parameters

**Authorization** `string` *required*

[API Key](https://www.ayrshare.com/docs/apis/overview.md#authorization) of the Primary Profile.

Format: `Authorization: Bearer API_KEY`

## Body Parameters

**owners** `array | string` *required*

The User Profiles whose posts the payer may boost. Either a list of up to 1,000 objects with a `refId`, or `"all"` for every User Profile in your account today, except the payer. Your Primary Profile cannot be an owner.

The 1,000 limit covers `"all"` too: if your account has more than 1,000 User Profiles besides the payer, the request is refused with code 101 and nothing is created. Send `owners` as lists of up to 1,000 profiles per request instead.

`"all"` does not cover profiles you create later. Send the request again to add them.

**payer** `object`

The profile that pays, as an object with a `refId`. Leave it out to use your Primary Profile.

**platforms** `array` *required*

The ads platforms to delegate, for example `["instagram"]`. Only networks that support [boosting on behalf](https://www.ayrshare.com/docs/apis/ads/delegations/boost-on-behalf.md) are accepted; any other answers `101`. You get one delegation for each owner and platform.

Profiles are named by the `refId` returned when you [create a profile](https://www.ayrshare.com/docs/apis/profiles/create-profile.md) or [get profiles](https://www.ayrshare.com/docs/apis/profiles/get-profiles.md).

Each owner and platform gets its own delegation, with its own `id`. Sending the request again creates only the delegations that are missing and returns the existing ones unchanged. One exception: if the owner refused the permission on the network, the delegation's `permission` goes back to `unknown`, so the next boost asks again. Send the request after the owner has relinked the account. A revoked delegation for an owner and platform in this request becomes active again, with the same `id`; the owner's other revoked platforms stay revoked.

```bash cURL theme={"system"}
curl \
-H "Authorization: Bearer API_KEY" \
-H "Content-Type: application/json" \
-X POST https://api.ayrshare.com/api/ads/delegations \
-d '{"owners": [{"refId": "140b8709bd6ade099b242d895e268fb886130c53"}], "platforms": ["instagram"]}'
```

```javascript JavaScript theme={"system"}
const API_KEY = "API_KEY";

fetch("https://api.ayrshare.com/api/ads/delegations", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "Authorization": `Bearer ${API_KEY}`
  },
  body: JSON.stringify({
    owners: [{ refId: "140b8709bd6ade099b242d895e268fb886130c53" }],
    platforms: ["instagram"]
  })
})
  .then((res) => res.json())
  .then((json) => console.log(json))
  .catch(console.error);
```

```json 200 theme={"system"}
{
  "status": "success",
  "delegations": [
    {
      "id": "Kx3v9QpL2mZ7tR1wYb4N",
      "owner": { "refId": "140b8709bd6ade099b242d895e268fb886130c53", "title": "Agent One" },
      "payer": { "refId": "9f1c3e7a2b4d", "title": "Agency" },
      "platform": "instagram",
      "permission": "unknown",
      "status": "active"
    }
  ]
}
```

```json 400 theme={"system"}
{
  "action": "ads",
  "status": "error",
  "code": 400,
  "message": "These owner profiles are not found in this account: 140b8709bd6ade."
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.