Videos

The Videos API lets you upload video files that belong to your company. Uploaded videos can later be attached to an offer (e.g. as the optional opening video) using the dedicated /opening-video endpoint under Offers.


POST/api/videos

Store a new video

This endpoint creates a new video for the authenticated user's company. The uploaded file is stored on the public disk under the videos/ directory, and is_visible is always set to true so it is shared with other users in the same company.

Request body

Send the request as multipart/form-data because a file is uploaded.

  • name (string, required, max: 255) — Display name of the video.
  • description (string, nullable) — Optional description for the video.
  • file (file, required) — The video file to upload.

File validation

  • Allowed file extensions: .mp4, .mov, .avi, .mkv, .webm, .ogg
  • Allowed content types: video/mp4, video/quicktime, video/x-msvideo, video/x-matroska, video/webm, video/ogg
  • Maximum file size: ~250 MB (250000 KB)

Both the file extension and the detected content type must be in the lists above. If the file does not match, the request will fail with a 422 Unprocessable Entity response and a per-field error message.

The user_id and company_id are taken from the bearer token, so you do not need to send them. is_visible is always set to true on the server and cannot be overridden by the request.

Example response

{
  "data": {
    "id": "12",
    "attributes": {
      "name": "Welcome message",
      "description": "Short intro video shown at the top of the offer.",
      "is_visible": true,
      "file": "welcome.mp4",
      "file_path": "videos/welcome_1715512345.mp4",
      "file_url": "https://storage.example.com/videos/welcome_1715512345.mp4",
      "created_at": "2026-05-12T08:00:00.000000Z",
      "updated_at": "2026-05-12T08:00:00.000000Z"
    },
    "relationships": {
      "user": {
        "id": 42,
        "name": "Jane Doe",
        "email": "jane@example.com"
      },
      "company": {
        "id": 54,
        "name": "Example Company A/S"
      }
    }
  }
}

Notes

  • Authentication is required via a bearer token (auth:sanctum).
  • file stores the original filename, file_path stores the path relative to the public disk, and file_url is the absolute URL.
  • The returned id can be used in the Update opening video endpoint as the optional_opening_video value.

Was this page helpful?