Endpoints

Subscriptions

GET/api/v1/{subject_type}/{subject_id}/subscription

The current user's subscription state. subscribed=False with no subscription means no row exists yet — the user has not been assigned, has not commented, has not been mentioned, and has never manually subscribed.

Authorization

HTTPBearer
AuthorizationBearer <token>

In: header

Path Parameters

subject_type*Subject Type

Value in

  • "issue"
  • "incident"
  • "alert"
subject_id*Subject Id
Formatuuid

Response Body

application/json

application/json

curl -X GET "https://example.com/api/v1/issue/497f6eca-6276-4993-bfeb-53cbbbba6f08/subscription"
{  "subscribed": true,  "subscription": {    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",    "org_id": "a40f5d1f-d889-42e9-94ea-b9b33585fc6b",    "subject_type": "string",    "subject_id": "80e197be-61ad-4068-b4ff-a483fb5c18f9",    "user_id": "a169451c-8525-4352-b8ca-070dd449a1a5",    "reason": "string",    "muted": true,    "created_at": "2019-08-24T14:15:22Z"  }}
PUT/api/v1/{subject_type}/{subject_id}/subscription

Subscribe, resubscribe, or mute — see this module's docstring for why there is no separate unsubscribe endpoint.

Authorization

HTTPBearer
AuthorizationBearer <token>

In: header

Path Parameters

subject_type*Subject Type

Value in

  • "issue"
  • "incident"
  • "alert"
subject_id*Subject Id
Formatuuid

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

PUT /api/v1/{subject_type}/{subject_id}/subscription body. The one manual write path — see SubscriptionService.set_muted. muted=False (the default) subscribes/resubscribes; muted=True is the explicit unsubscribe that COLLAB §7 says must survive every later automatic trigger.

Response Body

application/json

application/json

curl -X PUT "https://example.com/api/v1/issue/497f6eca-6276-4993-bfeb-53cbbbba6f08/subscription" \  -H "Content-Type: application/json" \  -d '{}'
{  "subscribed": true,  "subscription": {    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",    "org_id": "a40f5d1f-d889-42e9-94ea-b9b33585fc6b",    "subject_type": "string",    "subject_id": "80e197be-61ad-4068-b4ff-a483fb5c18f9",    "user_id": "a169451c-8525-4352-b8ca-070dd449a1a5",    "reason": "string",    "muted": true,    "created_at": "2019-08-24T14:15:22Z"  }}