Bunq Attachments API

Bunq Attachments API is a tool that allows developers to easily integrate file attachments into their applications. With this API, users can upload and download various types of files, such as images, documents, and videos, directly from their Bunq accounts. This feature enhances the user experience by providing a seamless way to manage and access important attachments within the Bunq platform.

OpenAPI Specification

bunq-user-userid-attachment-openapi-original.yml Raw ↑
openapi: 3.0.0
info:
  title: 'Bunq user/{userID}/attachment'
  description: Needs description.
  termsOfService: http://bunq.com/terms-api/
  contact:
    name: bunq Developer Support
    url: http://bunq.com/developer
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0.html
  version: '1.0'
servers:
  - url: https://public-api.sandbox.bunq.com/{basePath}
    description: Sandbox server
    variables:
      basePath:
        default: v1
  - url: https://api.bunq.com/{basePath}
    description: Production server
    variables:
      basePath:
        default: v1
components:
  schemas:
    AttachmentUserRead:
      type: object
      properties:
        id:
          type: integer
          description: The id of the attachment.
          readOnly: true
          writeOnly: false
        created:
          type: string
          description: The timestamp of the attachment's creation.
          readOnly: true
          writeOnly: false
        updated:
          type: string
          description: The timestamp of the attachment's last update.
          readOnly: true
          writeOnly: false
        attachment:
          type: object
          description: The attachment.
          readOnly: true
          writeOnly: false
          $ref: '#/components/schemas/Attachment'
paths:
  /user/{userID}/attachment/{itemId}:
    get:
      tags:
        - User
      summary: ''
      operationId: READ_Attachment_for_User
      description: >-
        Get a specific attachment. The header of the response contains the
        content-type of the attachment.
      parameters:
        - in: path
          name: userID
          description: ''
          required: true
          schema:
            type: integer
        - in: path
          name: itemId
          description: ''
          required: true
          schema:
            type: integer
        - $ref: '#/components/parameters/Cache-Control'
        - $ref: '#/components/parameters/User-Agent'
        - $ref: '#/components/parameters/X-Bunq-Language'
        - $ref: '#/components/parameters/X-Bunq-Region'
        - $ref: '#/components/parameters/X-Bunq-Client-Request-Id'
        - $ref: '#/components/parameters/X-Bunq-Geolocation'
        - $ref: '#/components/parameters/X-Bunq-Client-Authentication'
      responses:
        '200':
          description: >-
            This call is used to upload an attachment that is accessible only by
            a specific user. This can be used for example to upload passport
            scans or other documents. Attachments supported are png, jpg and
            gif.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AttachmentUserRead'
          headers:
            X-Bunq-Client-Response-Id:
              $ref: '#/components/headers/X-Bunq-Client-Response-Id'
            X-Bunq-Client-Request-Id:
              $ref: '#/components/headers/X-Bunq-Client-Request-Id'
            X-Bunq-Server-Signature:
              $ref: '#/components/headers/X-Bunq-Server-Signature'
        '400':
          $ref: '#/components/responses/GenericError'
  /user/{userID}/attachment/{attachmentID}/content:
    get:
      tags:
        - User
      summary: ''
      operationId: List_all_Content_for_User_Attachment
      description: Get the raw content of a specific attachment.
      parameters:
        - in: path
          name: userID
          description: ''
          required: true
          schema:
            type: integer
        - in: path
          name: attachmentID
          description: ''
          required: true
          schema:
            type: integer
        - $ref: '#/components/parameters/Cache-Control'
        - $ref: '#/components/parameters/User-Agent'
        - $ref: '#/components/parameters/X-Bunq-Language'
        - $ref: '#/components/parameters/X-Bunq-Region'
        - $ref: '#/components/parameters/X-Bunq-Client-Request-Id'
        - $ref: '#/components/parameters/X-Bunq-Geolocation'
        - $ref: '#/components/parameters/X-Bunq-Client-Authentication'
      responses:
        '200':
          description: >-
            Fetch the raw content of a user attachment with given ID. The raw
            content is the binary representation of a file, without any JSON
            wrapping.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/AttachmentUserContentListing'
          headers:
            X-Bunq-Client-Response-Id:
              $ref: '#/components/headers/X-Bunq-Client-Response-Id'
            X-Bunq-Client-Request-Id:
              $ref: '#/components/headers/X-Bunq-Client-Request-Id'
            X-Bunq-Server-Signature:
              $ref: '#/components/headers/X-Bunq-Server-Signature'
        '400':
          $ref: '#/components/responses/GenericError'
tags:
  - name: User