---
updatedAt: 2026-06-06T23:57:39.000Z
agentTools:
  projectIndex: https://docs.shipscience.com/llms.txt
---

# Attach claim documents

Attach one or more image documents (jpeg/png/tiff, max 3 per claim, 5 MB
each) by uploading the files directly as `multipart/form-data`. Each file
is validated by its byte signature — a non-image (or an image of a
disallowed type) is rejected with `422`.


# OpenAPI definition

```json
{
  "openapi": "3.0.1",
  "info": {
    "title": "Shipscience API",
    "version": "v1",
    "description": "ShipScience's REST API for partners and customers.\n\n## Authentication\n\nMost endpoints require a bearer JWT in the `Authorization` header. Tokens\nare issued by the ShipScience login flow and are valid for 4 hours.\nClients are responsible for refreshing tokens before expiry. The\n`/api/v1/tokens` endpoint is an exception — it authenticates with the\n`api-key` header rather than a bearer JWT, since its purpose is to\nissue the JWT itself.\n\n## Partner endpoints\n\nThe **Sub Accounts** section is only available to accounts explicitly\nenabled as partners. If you receive `403 Forbidden`, contact\n**support@shipscience.com** to request access.\n"
  },
  "tags": [
    {
      "name": "Claim Documents",
      "description": "Attach, list, and remove image documents on a claim."
    }
  ],
  "paths": {
    "/api/v1/simple_claims/{tracking_number}/attachments": {
      "parameters": [
        {
          "name": "tracking_number",
          "in": "path",
          "description": "The claim's id or tracking number",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "post": {
        "summary": "Attach claim documents",
        "tags": [
          "Claim Documents"
        ],
        "description": "Attach one or more image documents (jpeg/png/tiff, max 3 per claim, 5 MB\neach) by uploading the files directly as `multipart/form-data`. Each file\nis validated by its byte signature — a non-image (or an image of a\ndisallowed type) is rejected with `422`.\n",
        "security": [
          {
            "bearer_auth": []
          }
        ],
        "parameters": [],
        "responses": {
          "201": {
            "description": "created",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/attachment"
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "claim not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/api_error"
                }
              }
            }
          },
          "422": {
            "description": "unprocessable entity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/api_error"
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "files": {
                    "type": "array",
                    "description": "Up to 3 evidence images (jpeg/png/tiff), 5 MB max each.",
                    "items": {
                      "type": "string",
                      "format": "binary"
                    }
                  }
                },
                "required": [
                  "files"
                ]
              }
            }
          },
          "required": true
        }
      }
    }
  },
  "components": {
    "schemas": {
      "api_error": {
        "type": "object",
        "properties": {
          "error": {
            "type": "object",
            "properties": {
              "message": {
                "type": "string"
              },
              "details": {
                "type": "object",
                "additionalProperties": true
              }
            },
            "required": [
              "message"
            ]
          }
        },
        "required": [
          "error"
        ]
      },
      "attachment": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "example": "eyJfcmFpbHMiOnsiZGF0YSI6OTl9fQ==--a1b2c3",
            "description": "Opaque document id, returned by attach/list and passed (URL-escaped) to DELETE."
          },
          "filename": {
            "type": "string",
            "example": "damage.png"
          },
          "content_type": {
            "type": "string",
            "example": "image/png"
          },
          "byte_size": {
            "type": "integer",
            "example": 20345
          },
          "url": {
            "type": "string",
            "example": "https://s3.example.com/..."
          }
        }
      }
    },
    "securitySchemes": {
      "bearer_auth": {
        "type": "http",
        "scheme": "bearer"
      }
    }
  },
  "servers": [
    {
      "url": "https://app.shipscience.com",
      "variables": {
        "defaultHost": {
          "default": "app.shipscience.com"
        }
      }
    }
  ]
}
```