## Complete a signed asset upload

**post** `/assets/{assetId}/complete`

Marks a signed asset upload as complete after the file has been uploaded. Mutating public API requests support an optional Idempotency-Key header for client retries; duplicate keys within two hours return idempotency_duplicate.

### Path Parameters

- `assetId: string`

  Asset identifier

### Returns

- `asset_id: string`

  Asset identifier

- `status: "pending_upload" or "ready" or "failed"`

  - `"pending_upload"`

  - `"ready"`

  - `"failed"`

- `url: string`

  Asset URL

- `visibility: "workspace"`

  - `"workspace"`

- `workspace_id: string`

  Workspace identifier

- `expires_at: optional string`

  Expiration time for the upload URL

- `failure_message: optional string`

  Failure message when the asset is in failed status

- `upload: optional object { content_type, file_field, form_fields, 2 more }`

  - `content_type: "multipart/form-data"`

    - `"multipart/form-data"`

  - `file_field: "file"`

    - `"file"`

  - `form_fields: map[string]`

    Upload form fields

  - `method: "POST"`

    - `"POST"`

  - `url: string`

    Upload URL

- `upload_url: optional string`

  Upload URL (serialized)

### Example

```http
curl https://app.flora.ai/api/v1/assets/$ASSET_ID/complete \
    -X POST \
    -H "Authorization: Bearer $FLORA_API_KEY"
```

#### Response

```json
{
  "asset_id": "asset_abc123",
  "status": "pending_upload",
  "url": "https://example.com",
  "visibility": "workspace",
  "workspace_id": "ws_abc123",
  "expires_at": "2019-12-27T18:11:19.117Z",
  "failure_message": "failure_message",
  "upload": {
    "content_type": "multipart/form-data",
    "file_field": "file",
    "form_fields": {
      "foo": "string"
    },
    "method": "POST",
    "url": "https://example.com"
  },
  "upload_url": "https://upload.imagekit.io/api/v1/files/upload"
}
```
