Releases Index
Update a semantic alert
View .md

Update a semantic alert

PATCH
/me/semantic-alerts/{id}

Signed-in semantic alerts (#2304). Stores a freeform interest and email/webhook preferences. Matching runs after release.created for releases already on the caller's follow graph: one JEV decision per release, one question per enabled alert, notify when the matches-interest probability is at least the alert threshold (default 0.80, allowed 0.50–1.00). At most 5 alerts per account. Query text is user-private and is never written to Analytics Engine. Requires a Better Auth session or a user Bearer token (relu_ or OAuth JWT); machine relk_ tokens and anonymous callers are refused. Returns 404 when semantic-alerts-enabled is off. Partial body. webhookSubscriptionId: null clears the link. An empty body returns the current alert.

Authorization

bearerAuth
headerAuthorizationBearer <relk_… | relu_… | OAuth JWT>

Machine/operator tokens use the relk_ prefix; self-serve read-only user keys use relu_; Sign in with Releases supplies an OAuth access token. Required scope depends on the endpoint.

Path Parameters

id*string

Request Body

application/json
  1. body
query?string

Freeform interest. Trimmed. User-private.

Lengthlength <= 500
enabled?boolean
threshold?number
Range0.5 <= value <= 1
deliverEmail?boolean
deliverWebhook?boolean
webhookSubscriptionId?|

One of the caller's webhook subscriptions. null clears the link on update.

Response Body

The updated alert.

application/json
  1. response
id*string

Typed id, sal_ prefix.

query*string

Freeform interest. User-private.

enabled*boolean
threshold*number
Range0.5 <= value <= 1
deliverEmail*boolean
deliverWebhook*boolean
webhookSubscriptionId*string
createdAt*string
Formatdate-time
updatedAt*string
Formatdate-time
Example Request
curl -X PATCH 'https://api.releases.sh/v1/me/semantic-alerts/string' \  -H 'Content-Type: application/json' \  -d '{}'
Example Response
{  "id": "string",  "query": "string",  "enabled": true,  "threshold": 0.5,  "deliverEmail": true,  "deliverWebhook": true,  "webhookSubscriptionId": "string",  "createdAt": "2019-08-24T14:15:22Z",  "updatedAt": "2019-08-24T14:15:22Z"}