Benchling Attachment API

A file that can be set into an attachment schema field. In the V2 API the same model is named Blob.

Operations 4

POST /attachment Create Attachment #
GET /attachment/{attachment_id} Get Attachment by ID #
POST /attachment:batch-create Batch create Attachment #
POST /attachment:bulk-create Bulk create Attachment #

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/benchling:benchling-attachment-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

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

benchling-attachment-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  license:
    name: Apache 2.0
    url: http://www.apache.org/licenses/LICENSE-2.0.html
  title: Benchling Attachment API
  version: 2.0.0
  description: 'A file that can be set into an attachment schema field.


    In the V2 API the same model is named Blob.'
servers:
- url: /api/v3
security:
- oAuth: []
- basicApiKeyAuth: []
tags:
- description: 'A file that can be set into an attachment schema field.


    In the V2 API the same model is named Blob.'
  name: Attachment
  x-bnch-organization: Benchling
  x-displayName: Attachment
paths:
  /attachment:
    post:
      description: Create Attachment.
      operationId: Attachment.Create
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateAttachmentInput'
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Attachment'
          description: Created
        '400':
          $ref: '#/components/responses/BadRequest'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          $ref: '#/components/responses/Conflict'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/InternalServerError'
      summary: Create Attachment
      tags:
      - Attachment
  /attachment/{attachment_id}:
    get:
      description: Get a single Attachment by ID.
      operationId: Attachment.Get
      parameters:
      - description: ID of the Attachment.
        in: path
        name: attachment_id
        required: true
        schema:
          type: string
      - $ref: '#/components/parameters/returning'
      - $ref: '#/components/parameters/omit'
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Attachment'
          description: OK
          headers: {}
        '400':
          $ref: '#/components/responses/BadRequest'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/InternalServerError'
      summary: Get Attachment by ID
      tags:
      - Attachment
  /attachment:batch-create:
    post:
      description: Batch create Attachment synchronously in one transaction. Maximum 25 items per request.
      operationId: Attachment.BatchCreate
      requestBody:
        content:
          application/json:
            schema:
              additionalProperties: false
              properties:
                items:
                  items:
                    $ref: '#/components/schemas/CreateAttachmentInput'
                  maxItems: 25
                  minItems: 1
                  type: array
              required:
              - items
              type: object
      responses:
        '201':
          content:
            application/json:
              schema:
                additionalProperties: false
                properties:
                  items:
                    items:
                      $ref: '#/components/schemas/Attachment'
                    type: array
                required:
                - items
                type: object
          description: Created
        '400':
          $ref: '#/components/responses/BadRequest'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          $ref: '#/components/responses/Conflict'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/InternalServerError'
      summary: Batch create Attachment
      tags:
      - Attachment
  /attachment:bulk-create:
    post:
      description: Bulk create Attachment.
      operationId: Attachment.BulkCreate
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BulkImport'
      responses:
        '202':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AsyncTaskLink'
          description: Task started
        '400':
          $ref: '#/components/responses/BadRequest'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          $ref: '#/components/responses/Conflict'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/InternalServerError'
      summary: Bulk create Attachment
      tags:
      - Attachment
components:
  schemas:
    Attachment:
      description: 'A file that can be set into an attachment schema field.


        In the V2 API the same model is named Blob.'
      properties:
        __typename:
          type: string
        createdAt:
          format: datetime
          type: string
        creator:
          oneOf:
          - $ref: '#/components/schemas/PrincipalRef'
          - type: 'null'
        downloadUrl:
          description: A pre-signed download URL. The URL may be null if the file did not upload successfully.
          type:
          - 'null'
          - string
        id:
          type: string
        mimeType:
          description: The MIME type of the file, e.g. 'image/jpeg'
          type: string
        name:
          type: string
        uploadStatus:
          description: Whether the attachment uploaded successfully, failed to upload or is still uploading.
          enum:
          - SUCCEEDED
          - FAILED_VALIDATION
          - IN_PROGRESS
          - NOT_UPLOADED
          type: string
      type: object
    GeneralError:
      properties:
        detail:
          type:
          - 'null'
          - string
          - object
        instance:
          type: string
        invalidId:
          type: string
        status:
          type: integer
        title:
          type:
          - 'null'
          - string
        type:
          type: string
      required:
      - type
      - title
      - detail
      - status
      - instance
      type: object
    CreateAttachmentInput:
      additionalProperties: false
      properties:
        generateImagePreview:
          description: Whether to generate an image preview for the attachment. Defaults to false.
          type: boolean
        generatePdfPreview:
          description: Whether to generate a PDF preview for the attachment. Defaults to false.
          type: boolean
        scratchFileId:
          description: ID of the ScratchFile to copy into the Attachment.
          type: string
      required:
      - scratchFileId
      type: object
    PrincipalRef:
      properties:
        __typename:
          type: string
        id:
          format: api_id
          type: string
      type: object
    AsyncTaskLink:
      properties:
        pollingUri:
          format: uri
          type: string
        taskId:
          type: string
      type: object
    InternalServerError:
      properties:
        detail:
          type:
          - 'null'
          - string
          - object
        errorId:
          type: string
        instance:
          type: string
        status:
          type: integer
        title:
          type:
          - 'null'
          - string
        type:
          type: string
      required:
      - type
      - title
      - detail
      - status
      - instance
      type: object
    BulkImport:
      example:
        fileId: scrfile_jdf8BV24kLmN
      properties:
        fileId:
          description: The API ID of the scratch file (`scrfile_XXXXXXXX`) containing the items to import. The referenced file must be a scratch file whose upload has completed successfully.
          type: string
      required:
      - fileId
      type: object
    TooManyRequestsError:
      properties:
        detail:
          type:
          - 'null'
          - string
          - object
        instance:
          type: string
        invalidId:
          type: string
        status:
          type: integer
        title:
          type:
          - 'null'
          - string
        type:
          type: string
      required:
      - type
      - title
      - detail
      - status
      - instance
      type: object
  parameters:
    omit:
      description: Comma-separated list of top-level fields to omit from each returned item. Cannot overlap with returning.
      explode: false
      in: query
      name: omit
      schema:
        items:
          type: string
        type: array
    returning:
      description: Comma-separated list of top-level fields to include in each returned item. Cannot overlap with omit.
      explode: false
      in: query
      name: returning
      schema:
        items:
          type: string
        type: array
  responses:
    Forbidden:
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/GeneralError'
      description: Forbidden
    BadRequest:
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/GeneralError'
      description: Bad Request
    TooManyRequests:
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/TooManyRequestsError'
      description: Too Many Requests
      headers:
        Retry-After:
          description: Minimum number of seconds to wait before retrying. Only included when the request exceeded a rate limit specific to the caller. Limits shared with other callers, such as tenant-wide limits, omit this header because the wait depends on their traffic.
          required: false
          schema:
            minimum: 1
            type: integer
    NotFound:
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/GeneralError'
      description: Not Found
    InternalServerError:
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/InternalServerError'
      description: Internal Server Error
    Conflict:
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/GeneralError'
      description: Conflict
  securitySchemes:
    BearerAuth:
      description: Use a short-lived V3 API Explorer token.
      scheme: bearer
      type: http
      x-fern-playground-description: Copy a short-lived V3 API Explorer token from the user's settings page
    basicApiKeyAuth:
      description: Use issued API key for standard access to the API
      scheme: basic
      type: http
    basicClientIdSecretAuth:
      description: Auth used as part of client credentials OAuth flow prior to receiving a bearer token.
      scheme: basic
      type: http
    oAuth:
      description: OAuth2 Client Credentials flow intended for service access
      flows:
        clientCredentials:
          scopes: {}
          tokenUrl: /oauth/token
      type: oauth2