---
title: "Update advertiser share"
type: reference
method: POST
path: /rest-api/advertiserShares/update.do
tag: "Shares"
---

# Update advertiser share

`POST https://YOUR-NETWORK-DOMAIN/rest-api/advertiserShares/update.do`

Creates or updates an advertiser share entry that grants a specific user a particular access level (IS_OWNER, CAN_EDIT, or CAN_VIEW) on the specified advertiser. If no userId is provided, the share is created for the currently authenticated user. The response contains the userId, advertiserId, and the resulting shareType. Requires ALL or SHARED campaign sharing permission; at SHARED level the caller's own share must be higher than CAN_VIEW and at least as high as both the share granted and the share it replaces (unless the target is a user the caller owns), so a sharer can neither promote anyone above its own level nor demote the owner.

## Form params

| Name | Type | Required | Example | Description |
|---|---|---|---|---|
| `advertiserId` | integer | yes | `1001` | Unique identifier of the advertiser to share. Must be a positive number referencing an existing, non-deleted advertiser |
| `shareType` | string | yes | `CAN_EDIT` | Access level to grant. Allowed values: IS_OWNER (full ownership), CAN_EDIT (read/write access), CAN_VIEW (read-only access) |
| `userId` | integer | no | `5001` | Unique identifier of the user to grant the share to. If omitted, the share is created for the currently authenticated user |

## Responses

- `200` — Advertiser share updated successfully
- `400` — Invalid request data
- `401` — Authentication error
- `403` — Insufficient sharing permissions
- `500` — Internal server error

## Example request

```bash
curl --request POST \
  --url 'https://YOUR-NETWORK-DOMAIN/rest-api/advertiserShares/update.do' \
  --header 'X-Api-Key: YOUR_API_KEY' \
  --header 'Content-Type: application/x-www-form-urlencoded' \
  --data-urlencode 'advertiserId=1001' \
  --data-urlencode 'shareType=CAN_EDIT' \
  --data-urlencode 'userId=5001'
```

Source: https://epom.com/ad-server/docs/api/shares/post-advertisershares-update