Bandwidth · Capability

Bandwidth Messaging API — Media

Bandwidth Messaging API — Media. 4 operations. Lead operation: List media files. Self-contained Naftiko capability covering one Bandwidth business surface.

Run with Naftiko BandwidthMedia

What You Can Do

GET
Listmedia — List media files
/v1/users/{accountid}/media
PUT
Uploadmedia — Upload a media file
/v1/users/{accountid}/media/{medianame}
GET
Getmedia — Download a media file
/v1/users/{accountid}/media/{medianame}
DELETE
Deletemedia — Delete a media file
/v1/users/{accountid}/media/{medianame}

MCP Tools

list-media-files

List media files

read-only idempotent
upload-media-file

Upload a media file

idempotent
download-media-file

Download a media file

read-only idempotent
delete-media-file

Delete a media file

idempotent

Capability Spec

messaging-media.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: Bandwidth Messaging API — Media
  description: 'Bandwidth Messaging API — Media. 4 operations. Lead operation: List media files. Self-contained Naftiko capability
    covering one Bandwidth business surface.'
  tags:
  - Bandwidth
  - Media
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    BANDWIDTH_API_KEY: BANDWIDTH_API_KEY
capability:
  consumes:
  - type: http
    namespace: messaging-media
    baseUri: https://messaging.bandwidth.com/api/v2
    description: Bandwidth Messaging API — Media business capability. Self-contained, no shared references.
    resources:
    - name: users-accountId-media
      path: /users/{accountId}/media
      operations:
      - name: listmedia
        method: GET
        description: List media files
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: continuationToken
          in: query
          type: string
          description: Token for paginating through large media lists
    - name: users-accountId-media-mediaName
      path: /users/{accountId}/media/{mediaName}
      operations:
      - name: uploadmedia
        method: PUT
        description: Upload a media file
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: mediaName
          in: path
          type: string
          description: The filename to assign to the uploaded media
          required: true
        - name: Content-Type
          in: header
          type: string
          description: The MIME type of the media file being uploaded
          required: true
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
      - name: getmedia
        method: GET
        description: Download a media file
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: mediaName
          in: path
          type: string
          description: The name of the media file to download
          required: true
      - name: deletemedia
        method: DELETE
        description: Delete a media file
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: mediaName
          in: path
          type: string
          description: The name of the media file to delete
          required: true
    authentication:
      type: basic
      username: '{{env.BANDWIDTH_USER}}'
      password: '{{env.BANDWIDTH_PASS}}'
  exposes:
  - type: rest
    namespace: messaging-media-rest
    port: 8080
    description: REST adapter for Bandwidth Messaging API — Media. One Spectral-compliant resource per consumed operation,
      prefixed with /v1.
    resources:
    - path: /v1/users/{accountid}/media
      name: users-accountid-media
      description: REST surface for users-accountId-media.
      operations:
      - method: GET
        name: listmedia
        description: List media files
        call: messaging-media.listmedia
        with:
          continuationToken: rest.continuationToken
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/users/{accountid}/media/{medianame}
      name: users-accountid-media-medianame
      description: REST surface for users-accountId-media-mediaName.
      operations:
      - method: PUT
        name: uploadmedia
        description: Upload a media file
        call: messaging-media.uploadmedia
        with:
          mediaName: rest.mediaName
          Content-Type: rest.Content-Type
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
      - method: GET
        name: getmedia
        description: Download a media file
        call: messaging-media.getmedia
        with:
          mediaName: rest.mediaName
        outputParameters:
        - type: object
          mapping: $.
      - method: DELETE
        name: deletemedia
        description: Delete a media file
        call: messaging-media.deletemedia
        with:
          mediaName: rest.mediaName
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: messaging-media-mcp
    port: 9090
    transport: http
    description: MCP adapter for Bandwidth Messaging API — Media. One tool per consumed operation, routed inline through this
      capability's consumes block.
    tools:
    - name: list-media-files
      description: List media files
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: messaging-media.listmedia
      with:
        continuationToken: tools.continuationToken
      outputParameters:
      - type: object
        mapping: $.
    - name: upload-media-file
      description: Upload a media file
      hints:
        readOnly: false
        destructive: false
        idempotent: true
      call: messaging-media.uploadmedia
      with:
        mediaName: tools.mediaName
        Content-Type: tools.Content-Type
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: download-media-file
      description: Download a media file
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: messaging-media.getmedia
      with:
        mediaName: tools.mediaName
      outputParameters:
      - type: object
        mapping: $.
    - name: delete-media-file
      description: Delete a media file
      hints:
        readOnly: false
        destructive: true
        idempotent: true
      call: messaging-media.deletemedia
      with:
        mediaName: tools.mediaName
      outputParameters:
      - type: object
        mapping: $.