API ReferenceapicommunityPOST /v1/feed/subscriptions

POST /v1/feed/subscriptions

Service: community · operationId: (none)

Required scopes

(no scope declared — review service config)

Request body

{
  "type": "object",
  "properties": {
    "subscriber_id": {
      "type": "string",
      "minLength": 1
    },
    "target_type": {
      "type": "string",
      "enum": [
        "user",
        "topic"
      ]
    },
    "target_id": {
      "type": "string",
      "minLength": 1
    },
    "brand_id": {
      "type": "string",
      "minLength": 1
    }
  },
  "required": [
    "subscriber_id",
    "target_type",
    "target_id",
    "brand_id"
  ]
}

Responses

201 Subscription created

{
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "subscriber_id": {
      "type": "string"
    },
    "target_type": {
      "type": "string"
    },
    "target_id": {
      "type": "string"
    },
    "brand_id": {
      "type": "string"
    },
    "created_at": {
      "type": "string"
    }
  },
  "required": [
    "id",
    "subscriber_id",
    "target_type",
    "target_id",
    "brand_id",
    "created_at"
  ]
}

409 Already subscribed

{
  "type": "object",
  "properties": {
    "error": {
      "type": "string"
    },
    "message": {
      "type": "string"
    }
  },
  "required": [
    "error",
    "message"
  ]
}

Example

curl -X POST https://community.platform.loop.health/v1/feed/subscriptions \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ ... }'