---
title: "Send a file to an upload"
url: https://docs.corefinity.com/api/reference/support/upload-support-ticket-file
type: endpoint
last_updated: 2026-11-13
feature: support
related:
  - https://docs.corefinity.com/guides/support/raise-and-follow-a-ticket.md
---
# Send a file to an upload

Sends the file an upload was opened for, to the `url` the upload answered, exactly as given: the request
carries no token, and the signed address is its only credential until the upload's `url_expires_at`. Send the
whole file as the body of one request, exactly `size_bytes` long and with its `Content-Length`; the file is
taken once, and a second request is refused. At most 30 of these requests a minute are taken from one address.

```http
PUT /api/support/ticket-uploads/{upload}
```

- Rate limit: 30 a minute
- Try it in the console: off. It has not been cleared for the console. Copy the request and run it yourself when you are sure.

## Path parameters

- `upload` (string, required): The `upload_id` of the upload, as part of the `url` it answered.

## Query parameters

- `expires` (string, required): Part of the signed address. Send it as given.
- `signature` (string, required): Part of the signed address. Send it as given.

## Header parameters

- `Content-Length` (integer, required): The size of the file in bytes: exactly the upload's `size_bytes`.

## Body


## Request

### curl

```bash
curl -X PUT 'https://manage.corefinity.com/api/support/ticket-uploads/0d9c1a4e-6f1b-4f5e-9b8a-2d7c3e4f5a6b?expires=string&signature=string' \
  -H "Authorization: Bearer $COREFINITY_TOKEN" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '"string"'
```

### PHP

```php
use Illuminate\Support\Facades\Http;

$response = Http::withToken(env('COREFINITY_TOKEN'))
    ->acceptJson()
    ->put('https://manage.corefinity.com/api/support/ticket-uploads/0d9c1a4e-6f1b-4f5e-9b8a-2d7c3e4f5a6b?expires=string&signature=string', 'string');

$data = $response->json();
```

### Node

```javascript
const res = await fetch('https://manage.corefinity.com/api/support/ticket-uploads/0d9c1a4e-6f1b-4f5e-9b8a-2d7c3e4f5a6b?expires=string&signature=string', {
  method: 'PUT',
  headers: {
    Authorization: `Bearer ${process.env.COREFINITY_TOKEN}`,
    Accept: 'application/json',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify('string'),
});

// An answer with no body (204) has nothing to parse.
const text = await res.text();
const data = text && JSON.parse(text);
```

### Python

```python
import os
import requests

res = requests.put(
    "https://manage.corefinity.com/api/support/ticket-uploads/0d9c1a4e-6f1b-4f5e-9b8a-2d7c3e4f5a6b?expires=string&signature=string",
    headers={
        "Authorization": f"Bearer {os.environ['COREFINITY_TOKEN']}",
        "Accept": "application/json",
    },
    json="string",
)

data = res.json() if res.content else None
```

## Responses

### 200 The file was stored and waits for a reply to attach it.

```json
{
  "expires_at": "2026-11-04T16:40:11Z",
  "filename": "checkout-error.png",
  "mime_type": "image/png",
  "size_bytes": 184320,
  "upload_id": "0d9c1a4e-6f1b-4f5e-9b8a-2d7c3e4f5a6b"
}
```

### 403 The address was changed or has expired (`invalid_signature`). Open a new upload.

```json
{
  "code": "invalid_signature",
  "message": "This upload address has changed or expired. Open a new upload.",
  "reason": "invalid_signature"
}
```

### 404 The upload does not exist or is past its day.

```json
{
  "message": "Not found."
}
```

### 409 The upload has its file already (`already_received`). The first file is kept.

```json
{
  "code": "already_received",
  "message": "This upload has its file already. Open a new upload for another file.",
  "reason": "already_received"
}
```

### 422 The file is not the size the upload was opened for, was sent without its length, or its contents are not what its name says. `field` names `size_bytes` or `filename`. Nothing was stored.

```json
{
  "code": "invalid",
  "errors": {
    "size_bytes": [
      "Send the whole file in one request with a Content-Length of 184320 bytes."
    ]
  },
  "field": "size_bytes",
  "message": "Send the whole file in one request with a Content-Length of 184320 bytes.",
  "reason": "invalid"
}
```

### 429 Too many requests (`rate_limited`). Wait for the number of seconds in `Retry-After`, which `retry_after_seconds` repeats.

```json
{
  "code": "rate_limited",
  "message": "Too many requests. Try again in 60 seconds.",
  "reason": "rate_limited",
  "retry_after_seconds": 60
}
```

## If it is refused

| Status | Reason | What to do |
|---|---|---|
| 403 | `invalid_signature` | This upload address has changed or expired. Open a new upload. |
| 404 |  | Check the id. You see only what your account can reach. |
| 409 | `already_received` | This upload has its file already. Open a new upload for another file. |
| 422 | `invalid` | Fix the field named in `field`; `errors` says why. |
| 429 | `rate_limited` | Wait for the seconds in `Retry-After`. |

## The same task elsewhere

- Guide: [Support tickets](https://docs.corefinity.com/guides/support/raise-and-follow-a-ticket.md)
