---
updatedAt: 2026-07-10T20:59:52.000Z
---

# Attach a file

Attaches a file to a specific case. Each case can have up to ten attachments, up to 2GB each. The response includes `uploadId` necessary to [GET the status of an attachment upload](ref:get-attachment-upload-status).

# OpenAPI definition

```json
{
  "externalDocs": {
    "description": "See documentation for Akamai's Case Management API",
    "url": "https://techdocs.akamai.com/case-mgmt/reference"
  },
  "info": {
    "license": {
      "name": "Apache 2.0",
      "url": "https://www.apache.org/licenses/LICENSE-2.0.html"
    },
    "title": "Cases",
    "version": "v1"
  },
  "openapi": "3.0.0",
  "paths": {
    "/cases/{caseId}/attachments": {
      "post": {
        "description": "Attaches a file to a specific case. Each case can have up to ten attachments, up to 2GB each. The response includes `uploadId` necessary to [GET the status of an attachment upload](https://techdocs.akamai.com/case-mgmt/reference/get-attachment-upload-status).",
        "externalDocs": {
          "description": "See documentation for this operation in Akamai's Case Management API",
          "url": "https://techdocs.akamai.com/case-mgmt/reference/post-attachments"
        },
        "operationId": "post-attachments",
        "parameters": [],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "example": "POST /case-management/v3/cases/F-CS-000000/attachments HTTP/1.1\nContent-Length: 155\nContent-Type: multipart/form-data; boundary=abcde12345\n\n--abcde12345\nContent-Disposition: form-data; name=\"attachmentContent\"; filename=\"sample.txt\"\nContent-Type: text/plain\n\nThis is a sample file.\n--abcde12345",
              "schema": {
                "additionalProperties": false,
                "description": "Content of the attachment you want to add to the case.",
                "properties": {
                  "attachmentContent": {
                    "description": "Content of the attachment in the binary format.",
                    "format": "binary",
                    "maxLength": 2000000000,
                    "type": "string"
                  }
                },
                "required": [
                  "attachmentContent"
                ],
                "type": "object",
                "x-akamai": {
                  "file-path": "schemas/add-case-attachment-request.yaml"
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "example": {
                  "fileName": "sample.txt",
                  "links": [
                    {
                      "href": "/case-management/v3/cases/F-CS-000000/attachments/status/F-AUS-000000",
                      "rel": "attachment_upload_status"
                    },
                    {
                      "href": "/case-management/v3/cases/F-CS-000000",
                      "rel": "case"
                    }
                  ],
                  "uploadId": "F-AUS-000000",
                  "uploadStatus": "UPLOADING",
                  "uploadStatusMessage": "Attachment is being uploaded to case. Please use the attachment_upload_status link to check the status."
                },
                "schema": {
                  "additionalProperties": false,
                  "description": "Provides details about the status of the attachment upload.",
                  "properties": {
                    "attachmentId": {
                      "description": "Identifier for each attachment. This appears only for attachments with the `UPLOADED` status.",
                      "type": "string"
                    },
                    "fileName": {
                      "description": "Name of the attachment.",
                      "type": "string"
                    },
                    "links": {
                      "description": "Lists [navigable hypermedia links](https://techdocs.akamai.com/case-mgmt/reference/hypermedia) to resources.",
                      "items": {
                        "additionalProperties": false,
                        "properties": {
                          "href": {
                            "description": "Relative path to the resource.",
                            "type": "string"
                          },
                          "rel": {
                            "description": "Type of resource you can GET.",
                            "type": "string"
                          }
                        },
                        "type": "object"
                      },
                      "type": "array",
                      "x-akamai": {
                        "file-path": "schemas/hypermedia.yaml"
                      }
                    },
                    "uploadId": {
                      "description": "Identifier for each attachment upload request.",
                      "type": "string"
                    },
                    "uploadStatus": {
                      "description": "Status of the attachment upload. The possible options are `UPLOADING`, `UPLOADED`, or `FAILED`.",
                      "enum": [
                        "UPLOADING",
                        "UPLOADED",
                        "FAILED"
                      ],
                      "type": "string"
                    },
                    "uploadStatusMessage": {
                      "description": "Detailed status of the attachment upload.",
                      "type": "string"
                    }
                  },
                  "type": "object",
                  "x-akamai": {
                    "file-path": "schemas/case-attachment-upload-status-response.yaml"
                  }
                }
              }
            },
            "description": "Process successfully launched."
          }
        },
        "summary": "Attach a file",
        "tags": [
          "Case attachments"
        ],
        "x-akamai": {
          "supports-account-switch-key": false
        }
      },
      "parameters": [
        {
          "description": "Identifier for each case. To get this value, run the [List cases](https://techdocs.akamai.com/case-mgmt/reference/get-cases) operation.",
          "in": "path",
          "name": "caseId",
          "required": true,
          "schema": {
            "example": "F-CS-000000",
            "maxLength": 20,
            "type": "string"
          },
          "x-akamai": {
            "file-path": "parameters/case-id-path.yaml"
          }
        }
      ],
      "x-akamai": {
        "file-path": "paths/attachments.yaml",
        "path-info": "/cases/{caseId}/attachments"
      }
    }
  },
  "servers": [
    {
      "url": "https://{hostname}/case-management/v3"
    }
  ],
  "tags": [
    {
      "description": "Manage case attachments.",
      "name": "Case attachments"
    }
  ],
  "x-akamai": {
    "auth-type": "EDGE_GRID",
    "file-path": "02-cases.yaml"
  },
  "x-readme": {
    "explorer-enabled": false,
    "samples-languages": [
      "curl",
      "python",
      "node"
    ]
  }
}
```

# Sibling pages

* [List attached files](https://techdocs.akamai.com/case-mgmt/reference/get-attachments.md)
* [Get the status of an attachment upload](https://techdocs.akamai.com/case-mgmt/reference/get-attachment-upload-status.md)
* [Get an attached file](https://techdocs.akamai.com/case-mgmt/reference/get-attachment.md)