Courier · Capability

Courier — Audiences

Courier — Audiences. 5 operations. Lead operation: List all audiences. Self-contained Naftiko capability covering one Courier business surface.

Run with Naftiko CourierAudiences

What You Can Do

GET
Audienceslistaudiences — List all audiences
/v1/audiences
GET
Audiencesget — Get an audience
/v1/audiences/{audience-id}
PUT
Audiencesupdate — Update an audience
/v1/audiences/{audience-id}
DELETE
Audiencesdelete — Delete an audience
/v1/audiences/{audience-id}
GET
Audienceslistmembers — List audience members
/v1/audiences/{audience-id}/members

MCP Tools

list-all-audiences

List all audiences

read-only idempotent
get-audience

Get an audience

read-only idempotent
update-audience

Update an audience

idempotent
delete-audience

Delete an audience

idempotent
list-audience-members

List audience members

read-only idempotent

Capability Spec

courier-audiences.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: Courier — Audiences
  description: 'Courier — Audiences. 5 operations. Lead operation: List all audiences. Self-contained Naftiko capability covering
    one Courier business surface.'
  tags:
  - Courier
  - Audiences
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    COURIER_API_KEY: COURIER_API_KEY
capability:
  consumes:
  - type: http
    namespace: courier-audiences
    baseUri: https://api.courier.com
    description: Courier — Audiences business capability. Self-contained, no shared references.
    resources:
    - name: audiences
      path: /audiences
      operations:
      - name: audienceslistaudiences
        method: GET
        description: List all audiences
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: cursor
          in: query
          type: string
          description: A unique identifier that allows for fetching the next set of audiences
    - name: audiences-audience_id
      path: /audiences/{audience_id}
      operations:
      - name: audiencesget
        method: GET
        description: Get an audience
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: audience_id
          in: path
          type: string
          description: A unique identifier representing the audience_id
          required: true
      - name: audiencesupdate
        method: PUT
        description: Update an audience
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: audience_id
          in: path
          type: string
          description: A unique identifier representing the audience id
          required: true
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
      - name: audiencesdelete
        method: DELETE
        description: Delete an audience
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: audience_id
          in: path
          type: string
          description: A unique identifier representing the audience id
          required: true
    - name: audiences-audience_id-members
      path: /audiences/{audience_id}/members
      operations:
      - name: audienceslistmembers
        method: GET
        description: List audience members
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: audience_id
          in: path
          type: string
          description: A unique identifier representing the audience id
          required: true
        - name: cursor
          in: query
          type: string
          description: A unique identifier that allows for fetching the next set of members
    authentication:
      type: bearer
      token: '{{env.COURIER_API_KEY}}'
  exposes:
  - type: rest
    namespace: courier-audiences-rest
    port: 8080
    description: REST adapter for Courier — Audiences. One Spectral-compliant resource per consumed operation, prefixed with
      /v1.
    resources:
    - path: /v1/audiences
      name: audiences
      description: REST surface for audiences.
      operations:
      - method: GET
        name: audienceslistaudiences
        description: List all audiences
        call: courier-audiences.audienceslistaudiences
        with:
          cursor: rest.cursor
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/audiences/{audience-id}
      name: audiences-audience-id
      description: REST surface for audiences-audience_id.
      operations:
      - method: GET
        name: audiencesget
        description: Get an audience
        call: courier-audiences.audiencesget
        with:
          audience_id: rest.audience_id
        outputParameters:
        - type: object
          mapping: $.
      - method: PUT
        name: audiencesupdate
        description: Update an audience
        call: courier-audiences.audiencesupdate
        with:
          audience_id: rest.audience_id
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
      - method: DELETE
        name: audiencesdelete
        description: Delete an audience
        call: courier-audiences.audiencesdelete
        with:
          audience_id: rest.audience_id
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/audiences/{audience-id}/members
      name: audiences-audience-id-members
      description: REST surface for audiences-audience_id-members.
      operations:
      - method: GET
        name: audienceslistmembers
        description: List audience members
        call: courier-audiences.audienceslistmembers
        with:
          audience_id: rest.audience_id
          cursor: rest.cursor
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: courier-audiences-mcp
    port: 9090
    transport: http
    description: MCP adapter for Courier — Audiences. One tool per consumed operation, routed inline through this capability's
      consumes block.
    tools:
    - name: list-all-audiences
      description: List all audiences
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: courier-audiences.audienceslistaudiences
      with:
        cursor: tools.cursor
      outputParameters:
      - type: object
        mapping: $.
    - name: get-audience
      description: Get an audience
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: courier-audiences.audiencesget
      with:
        audience_id: tools.audience_id
      outputParameters:
      - type: object
        mapping: $.
    - name: update-audience
      description: Update an audience
      hints:
        readOnly: false
        destructive: false
        idempotent: true
      call: courier-audiences.audiencesupdate
      with:
        audience_id: tools.audience_id
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: delete-audience
      description: Delete an audience
      hints:
        readOnly: false
        destructive: true
        idempotent: true
      call: courier-audiences.audiencesdelete
      with:
        audience_id: tools.audience_id
      outputParameters:
      - type: object
        mapping: $.
    - name: list-audience-members
      description: List audience members
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: courier-audiences.audienceslistmembers
      with:
        audience_id: tools.audience_id
        cursor: tools.cursor
      outputParameters:
      - type: object
        mapping: $.