Show examples in:
Create a new upload collection

Body Parameters

id  string  Optional
RFC 4122 UUID of upload collection expressed in URL-safe base64 format
label  Required  string  Example: "Posts"

The label of the upload collection

position  Optional  integer  Example: 1

Ordering index

parent  Optional  null, { type: "upload_collection", id: upload_collection.id }

Parent upload collection

Returns

Returns a upload_collection resource object.

Examples

Example Basic example
import { buildClient } from '@datocms/cma-client-node';
async function run() {
const client = buildClient({ apiToken: '<YOUR_API_TOKEN>' });
const uploadCollection = await client.uploadCollections.create({
label: 'Posts'
});
console.log(uploadCollection);
}
run();