---
updatedAt: 2026-05-05T13:44:18.000Z
agentTools:
  projectIndex: https://apidocs.eightfold.ai/llms.txt
---

# Get Attachment

Given the key for an attachment, it fetches the attachment in octet-stream format

# OpenAPI definition

```json
{
  "servers": [
    {
      "url": "https://apiv2.{domain}.ai",
      "variables": {
        "domain": {
          "default": "eightfold",
          "enum": [
            "eightfold",
            "eightfold-eu",
            "eightfold-gov",
            "eightfold-ca",
            "eightfold-wu",
            "eightfold-ap"
          ]
        }
      }
    }
  ],
  "paths": {
    "/api/v2/core/profiles/{profileId}/attachments/{attachmentId}": {
      "get": {
        "description": "Given the key for an attachment, it fetches the attachment in octet-stream format",
        "operationId": "get_profile_attachments_by_id",
        "parameters": [
          {
            "description": "The secret key to access the api. It starts with the bearer token",
            "in": "header",
            "name": "Authorization",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Attachment Id",
            "in": "path",
            "name": "attachmentId",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Profile Id",
            "in": "path",
            "name": "profileId",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Exclude specific fields in the response. Possible values are the names of the top level fields present in corresponding API schema. To check API schema, expand the response section below.",
            "in": "query",
            "name": "exclude",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Allows selective control over the fields returned in the API response. If the keyList is empty, all fields will be returned. Possible values are the names of the top level fields present in corresponding API schema. To check API schema, expand the response section below.",
            "in": "query",
            "name": "keyList",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/octet-stream": {
                "schema": {
                  "format": "binary",
                  "type": "string"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "Get Attachment",
        "tags": [
          "Profile"
        ]
      }
    }
  },
  "info": {
    "title": "Api_server_v2_service Service",
    "version": "1.0.0"
  },
  "openapi": "3.0.2"
}
```