Skip to main content
POST
/
api
/
social
/
v4
/
alerts
/
{alertId}
/
share
JavaScript
async function shareAlert(alertId, userId, message, email) {  const url = `/api/social/v4/alerts/${alertId}/share`;  const payload = {    userMessage: message,    alertSubscriptions: [{ subscriberId: userId, type: 'USER' }],    sendEmail,    metaData: {},  };  const response = await fetch(url, {    body: JSON.stringify(payload),  });  return await response.json();}
"{  \"userMessage\": \"I think you'll find this alert useful\",  \"alertSubscriptions\": [{ \"subscriberId\": 12345, \"type\": \"USER\" }],  \"sendEmail\": true,  \"metaData\": {}}"

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

alertId
integer
required

The alertId

Body

application/json
  • userMessage (String) Required: The message you want to send to the person
  • alertSubscriptions (Object[]) Required: The entities you want to share the alert with. See above for entity params.
  • sendEmail (Boolean) : Whether or not to send an email to the person once the alert is shared
  • metaData (Object) :
userMessage
string
required

The message you want to send to the person

alertSubscriptions
object[]
required

The entities you want to share the alert with. See above for entity params.

sendEmail
boolean

Whether or not to send an email to the person once the alert is shared

metaData
object

Response

200 - application/json

Returns the parameter of success or error based on the alert id being valid.

The response is of type object.