---
title: "Shares API endpoints"
description: "Endpoint reference for the Shares tag (6 endpoints): User access shares — grant a user access to advertisers and sites"
type: "reference"
audience: [network-manager, admin]
keywords: [api, rest, endpoints, shares]
---

Fetch the complete documentation index at: https://epom.com/ad-server/docs/llms.txt. Use this file to discover all available pages before exploring further. Append .md to any documentation page URL to get its markdown version.

# Shares API endpoints

User access shares — grant a user access to advertisers and sites. 6 endpoints, generated from the OpenAPI spec. Authentication, the response envelope, pagination and error codes are shared by all endpoints — see [REST API overview](https://epom.com/ad-server/docs/api.md). Parameters marked `form` go in an `application/x-www-form-urlencoded` request body.

### GET /rest-api/advertiserShares.do

[Request examples](https://epom.com/ad-server/docs/api/shares/get-advertisershares.md)

Get advertiser shares for user.

| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
| `basicInfo` | query | boolean | no | When true, includes additional advertiser details (active status, creation date, contact name/email, description, category IDs) in the response for each share entry |
| `basicInfoIds` | query | array&lt;string&gt; | no | Comma-separated list of advertiser IDs for which to include basic information. If omitted or empty while basicInfo is true, basic info is included for all advertisers |
| `userId` | query | integer | no | Unique identifier of the user whose advertiser shares should be retrieved. If omitted, returns shares for the currently authenticated user |

**Responses:** `200` — Advertiser shares retrieved successfully. Errors follow the [shared conventions](https://epom.com/ad-server/docs/api.md#error-codes).

### DELETE /rest-api/advertiserShares/{userId}/{advertiserId}.do

[Request examples](https://epom.com/ad-server/docs/api/shares/delete-advertisershares.md)

Remove advertiser share.

| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
| `userId` | path | integer | yes | ID of the user whose share is removed |
| `advertiserId` | path | integer | yes | ID of the advertiser the share is on |

**Responses:** `200` — Share removed: {success, userId, advertiserId} · `404` — No such user or advertiser, or the user has no share on it. Errors follow the [shared conventions](https://epom.com/ad-server/docs/api.md#error-codes).

### POST /rest-api/advertiserShares/update.do

[Request examples](https://epom.com/ad-server/docs/api/shares/post-advertisershares-update.md)

Update advertiser share.

| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
| `advertiserId` | form | integer | yes | Unique identifier of the advertiser to share. Must be a positive number referencing an existing, non-deleted advertiser |
| `shareType` | form | string | yes | Access level to grant. Allowed values: IS_OWNER (full ownership), CAN_EDIT (read/write access), CAN_VIEW (read-only access) Values: `IS_OWNER`, `CAN_EDIT`, `CAN_VIEW`. |
| `userId` | form | integer | no | 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 · `500` — Internal server error. Errors follow the [shared conventions](https://epom.com/ad-server/docs/api.md#error-codes).

### GET /rest-api/siteShares.do

[Request examples](https://epom.com/ad-server/docs/api/shares/get-siteshares.md)

Get site shares for user.

| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
| `userId` | query | integer | no | Unique identifier of the user whose site shares should be retrieved. If omitted, returns shares for the currently authenticated user |
| `basicInfo` | query | boolean | no | When true, includes additional site details (active status, creation date, contact name/email, description, category IDs) in the response for each share entry |
| `basicInfoIds` | query | array&lt;string&gt; | no | Comma-separated list of site IDs for which to include basic information. If omitted or empty while basicInfo is true, basic info is included for all sites |

**Responses:** `200` — Site shares retrieved successfully. Errors follow the [shared conventions](https://epom.com/ad-server/docs/api.md#error-codes).

### DELETE /rest-api/siteShares/{userId}/{siteId}.do

[Request examples](https://epom.com/ad-server/docs/api/shares/delete-siteshares.md)

Remove site share.

| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
| `userId` | path | integer | yes | ID of the user whose share is removed |
| `siteId` | path | integer | yes | ID of the site the share is on |

**Responses:** `200` — Share removed: {success, userId, siteId} · `404` — No such user or site, or the user has no share on it. Errors follow the [shared conventions](https://epom.com/ad-server/docs/api.md#error-codes).

### POST /rest-api/siteShares/update.do

[Request examples](https://epom.com/ad-server/docs/api/shares/post-siteshares-update.md)

Update site share.

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

**Responses:** `200` — Site share updated successfully · `500` — Internal server error. Errors follow the [shared conventions](https://epom.com/ad-server/docs/api.md#error-codes).

## Related

- [REST API overview](https://epom.com/ad-server/docs/api.md) — authentication and conventions
- [API endpoint reference by tag](https://epom.com/ad-server/docs/api/endpoints.md)
- [Network services and miscellaneous APIs](https://epom.com/ad-server/docs/api/network-and-misc.md)

<!-- Generated from the OpenAPI spec. Do not edit by hand. -->