Courier User Preferences API

The User Preferences API from Courier — 2 operation(s) for user preferences.

Operations 3

GET /users/{user_id}/preferences Get user's preferences #
GET /users/{user_id}/preferences/{topic_id} Get user subscription topic #
PUT /users/{user_id}/preferences/{topic_id} Update or Create user preferences for a specific subscription topic #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/courier-user-preferences-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

courier-user-preferences-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Courier Audiences User Preferences API
  description: The Courier REST API.
  version: '1.0'
servers:
- url: https://api.courier.com
  description: Production
tags:
- name: User Preferences
paths:
  /users/{user_id}/preferences:
    get:
      description: Fetch all user preferences.
      operationId: users_preferences_list
      tags:
      - User Preferences
      parameters:
      - name: user_id
        in: path
        description: A unique identifier associated with the user whose preferences you wish to retrieve.
        required: true
        schema:
          type: string
      - name: tenant_id
        in: query
        description: Query the preferences of a user for this specific tenant context.
        required: false
        schema:
          type:
          - string
          - 'null'
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UsersUserPreferencesListResponse'
        '400':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequest'
      summary: Get user's preferences
      security:
      - BearerAuth: []
  /users/{user_id}/preferences/{topic_id}:
    get:
      description: Fetch user preferences for a specific subscription topic.
      operationId: users_preferences_get
      tags:
      - User Preferences
      parameters:
      - name: user_id
        in: path
        description: A unique identifier associated with the user whose preferences you wish to retrieve.
        required: true
        schema:
          type: string
      - name: topic_id
        in: path
        description: A unique identifier associated with a subscription topic.
        required: true
        schema:
          type: string
      - name: tenant_id
        in: query
        description: Query the preferences of a user for this specific tenant context.
        required: false
        schema:
          type:
          - string
          - 'null'
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UsersUserPreferencesGetResponse'
        '404':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFound'
      summary: Get user subscription topic
      security:
      - BearerAuth: []
    put:
      description: Update or Create user preferences for a specific subscription topic.
      operationId: users_preferences_update
      tags:
      - User Preferences
      parameters:
      - name: user_id
        in: path
        description: A unique identifier associated with the user whose preferences you wish to retrieve.
        required: true
        schema:
          type: string
        examples:
          Example1:
            value: abc-123
      - name: topic_id
        in: path
        description: A unique identifier associated with a subscription topic.
        required: true
        schema:
          type: string
        examples:
          Example1:
            value: 74Q4QGFBEX481DP6JRPMV751H4XT
      - name: tenant_id
        in: query
        description: Update the preferences of a user for this specific tenant context.
        required: false
        schema:
          type:
          - string
          - 'null'
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UsersUserPreferencesUpdateResponse'
              examples:
                Example1:
                  value:
                    message: success
        '400':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequest'
      summary: Update or Create user preferences for a specific subscription topic
      security:
      - BearerAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                topic:
                  $ref: '#/components/schemas/UsersTopicPreferenceUpdate'
              required:
              - topic
            examples:
              Example1:
                value:
                  topic:
                    status: OPTED_IN
                    has_custom_routing: true
                    custom_routing:
                    - inbox
                    - email
components:
  schemas:
    UsersTopicPreference:
      title: UsersTopicPreference
      type: object
      properties:
        custom_routing:
          type:
          - array
          - 'null'
          items:
            $ref: '#/components/schemas/ChannelClassification'
          description: The Channels a user has chosen to receive notifications through for this topic
        default_status:
          $ref: '#/components/schemas/PreferenceStatus'
        has_custom_routing:
          type:
          - boolean
          - 'null'
        status:
          $ref: '#/components/schemas/PreferenceStatus'
        topic_id:
          type: string
        topic_name:
          type: string
      required:
      - default_status
      - status
      - topic_id
      - topic_name
    BaseError:
      title: BaseError
      type: object
      properties:
        message:
          type: string
          description: A message describing the error that occurred.
      required:
      - message
    ChannelClassification:
      title: ChannelClassification
      type: string
      enum:
      - direct_message
      - email
      - push
      - sms
      - webhook
      - inbox
    Paging:
      title: Paging
      type: object
      properties:
        cursor:
          type:
          - string
          - 'null'
        more:
          type: boolean
      required:
      - more
    UsersUserPreferencesUpdateResponse:
      title: UsersUserPreferencesUpdateResponse
      type: object
      properties:
        message:
          type: string
          example: success
      required:
      - message
    NotFound:
      title: NotFound
      type: object
      properties:
        type:
          type: string
          enum:
          - invalid_request_error
      required:
      - type
      allOf:
      - $ref: '#/components/schemas/BaseError'
    UsersTopicPreferenceUpdate:
      title: UsersTopicPreferenceUpdate
      type: object
      properties:
        status:
          $ref: '#/components/schemas/PreferenceStatus'
        custom_routing:
          type:
          - array
          - 'null'
          items:
            $ref: '#/components/schemas/ChannelClassification'
          description: The Channels a user has chosen to receive notifications through for this topic
        has_custom_routing:
          type:
          - boolean
          - 'null'
      required:
      - status
    UsersUserPreferencesGetResponse:
      title: UsersUserPreferencesGetResponse
      type: object
      properties:
        topic:
          $ref: '#/components/schemas/UsersTopicPreference'
      required:
      - topic
    PreferenceStatus:
      title: PreferenceStatus
      type: string
      enum:
      - OPTED_IN
      - OPTED_OUT
      - REQUIRED
    BadRequest:
      title: BadRequest
      type: object
      properties:
        type:
          type: string
          enum:
          - invalid_request_error
      required:
      - type
      allOf:
      - $ref: '#/components/schemas/BaseError'
    UsersUserPreferencesListResponse:
      title: UsersUserPreferencesListResponse
      type: object
      properties:
        paging:
          $ref: '#/components/schemas/Paging'
          description: Deprecated - Paging not implemented on this endpoint
        items:
          type: array
          items:
            $ref: '#/components/schemas/UsersTopicPreference'
          description: The Preferences associated with the user_id.
      required:
      - paging
      - items
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer