---
title: "Emit workflow events for preference center changes"
method: POST
path: "/v1/preference-events/"
tags: ["unsubscribe"]
---

# Emit workflow events for preference center changes

`POST /v1/preference-events/`

## Request

- Base URL: `https://api.wraps.dev`
- URL: `https://api.wraps.dev/v1/preference-events/`
- Auth: HTTP bearer

Called by the preference center after DB writes to emit topic_subscribed/topic_unsubscribed workflow events. Authenticated via unsubscribe JWT token.

## Request body

- object
  - `token` string, required
  - `contactId` string, required
  - `organizationId` string, required
  - `changes` object[], required
    - `topicId` string, required
    - `topicName` string
    - `action` union, required
      - string
      - string

## Response `200`

- object
  - `success` boolean, required
  - `subscribed` number, required
  - `unsubscribed` number, required

## Other responses

- `400`: Malformed request — unparseable body or an invalid parameter.
- `401`
- `403`: Authenticated, but the resource belongs to another organization.
- `404`: No such route, or no such resource in this organization.
- `422`: The request parsed but failed schema validation.
- `429`: Rate limit exceeded. Wait for the window named by the RateLimit headers.
- `500`: Unexpected server failure. Safe to retry with backoff; quote `requestId` if it persists.

---

[API](https://skmtc.dev/wraps/apis/wraps-platform-api.md) · [All operations](https://skmtc.dev/wraps/apis/wraps-platform-api/llms.txt) · [OpenAPI document](https://skmtc.dev/wraps/apis/wraps-platform-api/revisions/12116fb21af7?raw)
