> ## Documentation Index
> Fetch the complete documentation index at: https://docs.blinkops.com/llms.txt
> Use this file to discover all available pages before exploring further.

> API endpoint to update an existing attachment in Blink's case management system.

# Update an Attachment



## OpenAPI

````yaml put /workspace/{ws_id}/case_management/table/attachments/{attachment_id}
openapi: 3.0.1
info:
  title: Blink REST API
  description: >-
    The Blink REST API provides programmatic access to Blink data and
    functionality, enabling the management of resources such as workflows,
    users, cases, and more. Send every request to your own tenant's host,
    https://<your-tenant>.app.blinkops.com/api/v1.
  termsOfService: https://www.blinkops.com/terms-of-use
  contact:
    name: API Support
    url: http://blinkops.com/support
    email: support@blinkops.com
  version: '1.0'
servers:
  - url: https://{tenant}.app.blinkops.com/api/v1
    description: Your Blink tenant
    variables:
      tenant:
        default: your-tenant
        description: >-
          Your Blink tenant name, the part before .app.blinkops.com in your
          browser's address bar when you're logged in to Blink.
security: []
tags:
  - name: Controller
    description: Controller health and stats
  - name: Connections
    description: Manage your connections
  - name: Integrations
    description: Manage your integrations
  - name: Invites
    description: Manage your invites
  - name: Workflows
    description: Create and execute your workflows
  - name: Executions
    description: Get information and manage executions
  - name: Runners
    description: Configure your runners
  - name: Tables
    description: Manage your tables
  - name: Case Management
    description: Manage your cases
  - name: User Settings
    description: Manage user settings
  - name: Webhook
    description: Send to webhook
  - name: workspaces
    description: Manage your workspaces
  - name: User Info
    description: Get Information on current user
  - name: Portal
    description: Manage your portal apps
  - name: Groups
    description: Manage your Groups
  - name: Users
    description: Manage your users
paths:
  /workspace/{ws_id}/case_management/table/attachments/{attachment_id}:
    put:
      tags:
        - Case Management
      summary: Update an Attachment
      description: Updates an Attachment record.
      operationId: UpdateAttachment
      parameters:
        - name: ws_id
          in: path
          description: Workspace ID
          required: true
          schema:
            type: string
        - name: attachment_id
          in: path
          description: Attachment ID
          required: true
          schema:
            type: string
      requestBody:
        description: Attachment Data
        content:
          '*/*':
            schema:
              $ref: '#/components/schemas/api.AttachmentObject'
        required: true
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/api.AttachmentObject'
        '400':
          description: Failed to update record
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/api_responses.ErrorWrapper'
      security:
        - ApiKeyAuth: []
      x-codeSamples:
        - lang: bash
          label: cURL
          source: |
            curl --request PUT \
              --url 'https://<your-tenant>.app.blinkops.com/api/v1/workspace/{ws_id}/case_management/table/attachments/{attachment_id}' \
              --header 'BLINK-API-KEY: <api-key>' \
              --header 'Content-Type: application/json' \
              --data '{
              "attachment": "a97cfe4c-8ce3-4f67-ad17-a17f6087663a",
              "description": "Network log file for analysis",
              "name": "Network Log File",
              "type": "Network Log"
            }'
        - lang: python
          label: Python
          source: >
            import requests


            url =
            "https://<your-tenant>.app.blinkops.com/api/v1/workspace/{ws_id}/case_management/table/attachments/{attachment_id}"


            payload = {
                "attachment": "a97cfe4c-8ce3-4f67-ad17-a17f6087663a",
                "description": "Network log file for analysis",
                "name": "Network Log File",
                "type": "Network Log"
            }


            headers = {
                "BLINK-API-KEY": "<api-key>",
                "Content-Type": "application/json"
            }


            response = requests.request("PUT", url, json=payload,
            headers=headers)


            print(response.text)
        - lang: javascript
          label: JavaScript
          source: >
            const url =
            'https://<your-tenant>.app.blinkops.com/api/v1/workspace/{ws_id}/case_management/table/attachments/{attachment_id}';

            const options = {
              method: 'PUT',
              headers: {'BLINK-API-KEY': '<api-key>', 'Content-Type': 'application/json'},
              body: JSON.stringify({
                "attachment": "a97cfe4c-8ce3-4f67-ad17-a17f6087663a",
                "description": "Network log file for analysis",
                "name": "Network Log File",
                "type": "Network Log"
              })
            };


            fetch(url, options)
              .then(res => res.json())
              .then(res => console.log(res))
              .catch(err => console.error(err));
        - lang: php
          label: PHP
          source: |
            <?php

            $curl = curl_init();

            curl_setopt_array($curl, [
              CURLOPT_URL => "https://<your-tenant>.app.blinkops.com/api/v1/workspace/{ws_id}/case_management/table/attachments/{attachment_id}",
              CURLOPT_RETURNTRANSFER => true,
              CURLOPT_ENCODING => "",
              CURLOPT_MAXREDIRS => 10,
              CURLOPT_TIMEOUT => 30,
              CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
              CURLOPT_CUSTOMREQUEST => "PUT",
              CURLOPT_POSTFIELDS => '{"attachment":"a97cfe4c-8ce3-4f67-ad17-a17f6087663a","description":"Network log file for analysis","name":"Network Log File","type":"Network Log"}',
              CURLOPT_HTTPHEADER => [
                "BLINK-API-KEY: <api-key>",
                "Content-Type: application/json"
              ],
            ]);

            $response = curl_exec($curl);
            $err = curl_error($curl);

            curl_close($curl);

            if ($err) {
              echo "cURL Error #:" . $err;
            } else {
              echo $response;
            }
        - lang: go
          label: Go
          source: "package main\n\nimport (\n\t\"fmt\"\n\t\"strings\"\n\t\"net/http\"\n\t\"io\"\n)\n\nfunc main() {\n\n\turl := \"https://<your-tenant>.app.blinkops.com/api/v1/workspace/{ws_id}/case_management/table/attachments/{attachment_id}\"\n\n\tpayload := strings.NewReader(`{\"attachment\":\"a97cfe4c-8ce3-4f67-ad17-a17f6087663a\",\"description\":\"Network log file for analysis\",\"name\":\"Network Log File\",\"type\":\"Network Log\"}`)\n\n\treq, _ := http.NewRequest(\"PUT\", url, payload)\n\n\treq.Header.Add(\"BLINK-API-KEY\", \"<api-key>\")\n\treq.Header.Add(\"Content-Type\", \"application/json\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := io.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}\n"
        - lang: java
          label: Java
          source: >
            HttpResponse<String> response =
            Unirest.put("https://<your-tenant>.app.blinkops.com/api/v1/workspace/{ws_id}/case_management/table/attachments/{attachment_id}")
              .header("BLINK-API-KEY", "<api-key>")
              .header("Content-Type", "application/json")
              .body("{\"attachment\":\"a97cfe4c-8ce3-4f67-ad17-a17f6087663a\",\"description\":\"Network log file for analysis\",\"name\":\"Network Log File\",\"type\":\"Network Log\"}")
              .asString();
        - lang: ruby
          label: Ruby
          source: >
            require 'uri'

            require 'net/http'


            url =
            URI("https://<your-tenant>.app.blinkops.com/api/v1/workspace/{ws_id}/case_management/table/attachments/{attachment_id}")


            http = Net::HTTP.new(url.host, url.port)

            http.use_ssl = true


            request = Net::HTTP::Put.new(url)

            request["BLINK-API-KEY"] = '<api-key>'

            request["Content-Type"] = 'application/json'

            request.body =
            "{\"attachment\":\"a97cfe4c-8ce3-4f67-ad17-a17f6087663a\",\"description\":\"Network
            log file for analysis\",\"name\":\"Network Log
            File\",\"type\":\"Network Log\"}"


            response = http.request(request)

            puts response.read_body
components:
  schemas:
    api.AttachmentObject:
      type: object
      properties:
        attachment:
          type: string
          example: a97cfe4c-8ce3-4f67-ad17-a17f6087663a
        description:
          type: string
          example: Network log file for analysis
        name:
          type: string
          example: Network Log File
        type:
          type: string
          example: Network Log
          enum:
            - Network Log
            - Malware Sample
            - PCAP File
            - Report
            - Screenshot
            - Document
    api_responses.ErrorWrapper:
      type: object
      properties:
        data:
          type: object
        details:
          type: string
        identifier:
          type: string
        message:
          type: string
        status:
          type: integer
          example: 404
        user_error:
          type: object
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      description: >-
        Use your API key to access BlinkOps API. To generate an API key, please
        log in to your BlinkOps account and navigate to the API Keys section in
        the user settings page. Add the generated key to your request headers as
        BLINK-API-KEY.
      name: BLINK-API-KEY
      in: header

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.