Skip to content
Docs menu

Send the file of an upload

One possible target of url from POST /v1/uploads. Always use the url from that response as it is. No API key needed.

PUThttps://api.switchfile.io/v1/uploads/{id}/content

No API key needed.

Example

curl -X PUT "https://api.switchfile.io/v1/uploads/7d1f0f7e-0b55-4a8e-8c5b-9d8e3f1a2b3c/content?expires=1762538401&signature=3f9c2a7d41e8b6c05d1f9e2a7b4c8d3e6f0a1b2c3d4e5f60718293a4b5c6d7e8" \
  --upload-file lecture.mov

Parameters

Path parameters

  • idstring (uuid)required

    upload_id

Query parameters

  • expiresnumberrequired

    Part of the signed URL

    example: 1762538401

  • signaturestringrequired

    Part of the signed URL

    at least 1 characters · example: 3f9c2a7d41e8b6c05d1f9e2a7b4c8d3e6f0a1b2c3d4e5f60718293a4b5c6d7e8

Request body

The file as the raw request body

The file as the raw request body.

Responses

  • 204Stored. Use upload_id in POST /v1/convert
  • 403The signature is wrong or the URL has expired
    403 application/problem+json
    {
      "type": "https://switchfile.io/docs/api/v1#errors-expired",
      "title": "Expired",
      "status": 403,
      "code": "EXPIRED",
      "detail": "The link has expired."
    }
  • 404Does not exist for this account
    404 application/problem+json
    {
      "type": "https://switchfile.io/docs/api/v1#errors-not-found",
      "title": "Not found",
      "status": 404,
      "code": "NOT_FOUND",
      "detail": "Upload not found."
    }
  • 413The request or the file is too large
    413 application/problem+json
    {
      "type": "https://switchfile.io/docs/api/v1#errors-file-too-large",
      "title": "File too large",
      "status": 413,
      "code": "FILE_TOO_LARGE",
      "detail": "The file is larger than the allowed maximum."
    }
  • 422Invalid data. errors names the fields
    422 application/problem+json
    {
      "type": "https://switchfile.io/docs/api/v1#errors-invalid-data",
      "title": "Invalid data",
      "status": 422,
      "code": "INVALID_DATA",
      "detail": "The request contains invalid data.",
      "errors": {
        "to": [
          "Expected string"
        ]
      }
    }
  • 429Too many requests or a daily quota is used up. See Retry-After
    429 application/problem+json
    {
      "type": "https://switchfile.io/docs/api/v1#errors-rate-limit-exceeded",
      "title": "Rate limit exceeded",
      "status": 429,
      "code": "RATE_LIMIT_EXCEEDED",
      "detail": "Too many requests. Try again in 12 seconds."
    }

Error bodies and codes are explained in Errors.