Skip to main content

Add files to collection

POST 

/api/v1/collections/:collection-id/files

To add files to the collection, provide a URL for each file. The URL can be public or private. For private files, upload them using the Files API and use the generated URL.

Request

Path Parameters

    collection-id stringrequired

    Collection ID

Body

    files

    object[]

    required

    Possible values: >= 1, <= 100

    List of files to add to the collection

  • Array [

  • name stringrequired

    File name

    url urirequired

    File URL

  • ]

Responses

Successful response

Schema

    result

    object[]

    required

    List of files added to the collection

  • Array [

  • id stringrequired

    File ID

    name stringrequired

    File name

    type stringrequired

    File's MIME type

    status stringrequired

    Possible values: [pending, indexed, error]

    File status

    error stringnullable

    Error message if the file indexing failed

    created_at stringrequired

    Timestamp when the file was created

    user_id stringrequired

    ID of creating user

    url urirequired

    File URL

    size numbernullable

    File size in bytes

    md5_hash stringnullable

    MD5 hash of the file

    connector_id stringnullable

    ID of the connector managing the file

  • ]

Loading...