Create

To create a new content library you need to execute a POST request against the /libraries endpoint.

Two fields are available in the JSON body of the POST request, but none of them are required.

  • name - an optional text description of the library. If not set - a default one with the current date will be used - e.g. Library 07.10.2024 11:19. Please note that names cannot be duplicated.

  • external_id - an optional text field which you can use for cross referencing the library with some entity in your external integration.

In the response you will find the unique id which identifies the library and can later be used to upload files and create folders in the library.

1. Request (will auto-generate library name)

curl --request POST \
  --header "Content-Type: application/json" \
  --url https://api.digitalsamba.com/api/v1/libraries \
  --user YOUR_TEAM_ID:YOUR_DEVELOPER_KEY \
  --data '{}'

Response (200 OK)

{
    "id": "45d125d8-bac9-43a5-a6a8-311a5433239d",
    "external_id": null,
    "name": "Library 07.10.2024 11:24",
    "source": "api",
    "created_at": "2024-10-07T11:24:52Z"
}

As you can see a name was auto-generated based on the current date.

2. Request (will use the "name" you provided)

curl --request POST \
  --header "Content-Type: application/json" \
  --url https://api.digitalsamba.com/api/v1/rooms \
  --user YOUR_TEAM_ID:YOUR_DEVELOPER_KEY \
  --data '{"name": "Holiday in Greece"}'

Response (200 OK)

{
    "id": "ec463c74-b227-4bec-9c95-b3eb515b6548",
    "external_id": null,
    "name": "Holiday in Greece",
    "source": "api",
    "created_at": "2024-10-07T11:32:56Z"
}

Last updated