Skip to content

Function: createCollection() ​

ts
function createCollection(
   client, 
   name, 
   mediaIds?
): Promise<{
[key: string]: unknown;
  collection_id: string;
  collection_media_count?: number | null;
  collection_name?: string;
  collection_type?: string;
}>;

Creates a collection, optionally holding some posts from the start.

Parameters ​

ParameterTypeDefault value
clientPrivateClientundefined
namestringundefined
mediaIds?readonly string[][]

Returns ​

Promise<{ [key: string]: unknown; collection_id: string; collection_media_count?: number | null; collection_name?: string; collection_type?: string; }>

MIT License. Not affiliated with, endorsed or sponsored by Meta or Instagram.