---
title: "Set share information for alert"
method: POST
path: "/api/2.0/alerts/{objectId}/shares"
---

# Set share information for alert

`POST /api/2.0/alerts/{objectId}/shares`

## Path parameters

- `objectId` integer, required

## Response `200`

Success

- ShareInfo[]
  - `id` integer — ID of user or group to be shared to
  - `type` string, required — Share type
  - `accessLevel` integer, required — Share access level
  - `name` string — Username + name or group name to be shared to. When sharing to a user, either id field or the combination of name, externalAuthId, and ssoUser have to be specified
  - `externalAuthId` integer — External authenticate ID to be shared to
  - `ssoUser` boolean — Whether or not user is SSO user
  - `access_level` integer
  - `sso_user` boolean
  - `external_auth_id` integer

## Other responses

- `400` — Bad request
- `401` — User is not authenticated
- `403` — User is not allowed to access this resource
- `500` — Error during processing

---

[API](https://skmtc.net/knowi/apis/user-management-api.md) · [All operations](https://skmtc.net/knowi/apis/user-management-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/knowi/user-management-api/revisions/6e6982573ba6/schema)
