action flat_add_score_track { label: "Add a new video or audio track to the score" description: "Use this method to add new track to the score. This track can then be played on flat.io or in an embedded score.\nThis API method support medias hosted on SoundCloud, YouTube and Vimeo.\n" provider: flat method: POST path: "/scores/{score}/tracks" encoding: json input: { type: "object" description: "Creation of a new track. This one must contain the URL of the track or the corresponding file\n" properties: { default: { type: "boolean" description: "True if the track should be used as default audio source" } state: { type: "string" description: "State of the track" enum: ["draft", "completed", "deleted"] } synchronizationPoints: { type: "array" items: { type: "object" description: "A track synchronization point" required: ["time", "type"] properties: { measureUuid: { type: "string" format: "uuid" description: "The measure unique identifier" } time: { type: "number" description: "The corresponding time in seconds" } type: { type: "string" description: "The type of the synchronization point. If the type is `measure`, the measure uuid must be present in `measureUuid`" enum: ["measure", "end"] } } } } title: { type: "string" description: "Title of the track" } url: { type: "string" description: "The URL of the track" } } } output: { type: "object" description: "An audio track for a score" properties: { creationDate: { type: "string" format: "date-time" description: "The creation date of the track" } creator: { type: "string" description: "The unique identifier of the track creator" } default: { type: "boolean" description: "True if the track should be used as default audio source" } id: { type: "string" description: "The unique identifier of the score track" } mediaId: { type: "string" description: "The unique identifier of the track when hosted on an external service.\nFor example, if the url is `https://www.youtube.com/watch?v=dQw4w9WgXcQ`, `mediaId` will be `dQw4w9WgXcQ`\n" } modificationDate: { type: "string" format: "date-time" description: "The modification date of the track" } score: { type: "string" description: "The unique identifier of the score" } state: { type: "string" description: "State of the track" enum: ["draft", "completed", "deleted"] } synchronizationPoints: { type: "array" items: { type: "object" description: "A track synchronization point" required: ["time", "type"] properties: { measureUuid: { type: "string" format: "uuid" description: "The measure unique identifier" } time: { type: "number" description: "The corresponding time in seconds" } type: { type: "string" description: "The type of the synchronization point. If the type is `measure`, the measure uuid must be present in `measureUuid`" enum: ["measure", "end"] } } } } title: { type: "string" description: "Title of the track" } type: { type: "string" description: "The type of an audio track" enum: ["audio", "soundcloud", "youtube", "vimeo"] } url: { type: "string" description: "The URL of the track" } } } }