Skip to main content
PATCH

Overview

Makes a few targeted changes to a finished project. Each one is saved to the project’s editor timeline the same way the Hooked editor saves it, so the project opens in the dashboard with your changes. What you can edit through the API: Everything else is edited in the dashboard: clips and images, the voice and the script, timing, text layers, transitions, colours and fonts of a caption style. A field this endpoint does not know is refused with a 400 that names it, and nothing is saved. Editing is free and does not render anything. When you are done, call Render Project to get a new video.

How each edit is applied

  • Caption text. The line keeps its start and end time; its words share that time evenly, as when you retype a line in the editor. Read the lines first with Get Project Captions: index counts from 0 across the whole video.
  • Caption style. A project made from a template has one caption layer per scene; the style, alignment and switch apply to all of them. A new style re-cuts the lines to its box, so line numbers change: read the captions again before correcting text. In one request, captionSegments is applied first, with the indexes you read.
  • Music. The new track takes the old one’s place and timing, and plays from its start. A project without music gets the track from start to end at volume 0.5. A track shorter than the video stops when it ends. The song of a Music to Video project cannot be swapped (its volume can).
  • Logo. The new image replaces the logo where it is. Without a logo yet, logoMediaId adds one over the whole video, bottom-right at 100 px unless you say otherwise. The image must be COMPLETED in your library.
If the project is open in the dashboard editor, its autosave can overwrite what you change here. Close it, or reload it after editing.

When it is refused

Response

data shows the editable parts of the project after the edit: caption, music and branding are null when the project has none. changed lists what this request changed. branding.logoMediaId is null for a logo added when the project was created.

Errors

Authorizations

x-api-key
string
header
required

Path Parameters

projectId
string
required

The projectId a create endpoint answered, or one from GET /v1/project/list.

Body

application/json

Send at least one of the four groups. A field that is not listed here is refused with a 400: edit anything else in the dashboard.

caption
object

The captions' style, position and on/off switch. Applies to every caption layer of the project (a template project has one per scene).

captionSegments
object[]

New text for caption lines, by the index Get Project Captions answered (each index once). The line keeps its start and end; its words share that time evenly, as when you retype a line in the editor. Applied before caption.preset, so the indexes are the ones you read.

Required array length: 1 - 500 elements
music
object

The background music. Not available for the song of a Music to Video project.

branding
object

The logo over the video (the branding logo a create request can add). Without a logo yet, logoMediaId adds one over the whole video.

Response

The project was edited

success
boolean
message
string
data
object