v7

OpenAPI 3.1.02026-08-02164134155.7 KB
Library management

Update File

Update the specified parameters of a specific document in the user's library. This operation currently supports updating the publicUrl and labels parameters.

This operation overwrites the specified items with the new data you provide. If you wish to add new labels to the labels list without removing the existing ones, you must submit a labels list that includes both the current and new labels.**

For instance, if the current labels are "Label A" and "Label B", and you wish to add "New Label C" and "New Label D" to the list, you must specify "labels": ["Label A", "Label B", "New Label C", "New Label D"].

put/studio/v1/library/files/{file_id}

Path parameters

file_idstring uuid required

Request body

publicUrlstring

The public URL of the file, if any. This URL is not validated by AI21 or used in any way. It is strictly a piece of metadata that you can optionally attach to a file.

labelsstring[]

Any labels to associate with this file. Separate multiple labels with commas. If provided, will overwrite all existing labels.

Response

Successful Response

{"stackTrail":"paths:/studio/v1/library/files/{file_id}:put:responses:200:content:application/json:schema","oasType":"schema","type":"unknown"}