# Get a signed upload URL for a new attachment (/docs/api-reference/products/ProductAttachmentsController_createUploadUrl)

`POST /api/factories/{factoryId}/products/{productId}/attachments/upload-url`

Base URL: https://api.xentr.ai

Authentication: bearer token (`Authorization: Bearer <token>`).

## Parameters

| Name | In | Required | Type | Description |
| --- | --- | --- | --- | --- |
| `factoryId` | path | yes | string |  |
| `productId` | path | yes | string |  |

## Request body

Required.

Content type: `application/json`

```json
{
  "type": "object",
  "properties": {
    "fileName": {
      "type": "string",
      "description": "Original file name",
      "example": "gasket-v3.pdf"
    },
    "mimeType": {
      "type": "string",
      "description": "MIME type",
      "example": "application/pdf"
    },
    "sizeBytes": {
      "type": "number",
      "description": "File size in bytes"
    },
    "kind": {
      "type": "string",
      "description": "Attachment kind",
      "enum": [
        "drawing",
        "spec",
        "photo",
        "file"
      ],
      "default": "file"
    }
  },
  "required": [
    "fileName"
  ]
}
```

## Responses

### 201: Signed upload URL + storage path