Add Files to a Group
import { PinataSDK } from "pinata"; const pinata = new PinataSDK({ pinataJwt: process.env.PINATA_JWT!, pinataGateway: "example-gateway.mypinata.cloud", }); const group = await pinata.groups.addFiles({ groupId: "3778c10d-452e-4def-8299-ee6bc548bdb0", files: [ "7e18c4a4-9501-44de-8f81-403db7de0e39", "a606ef7e-70a0-40ad-9b8a-60563e009655" ], });
type UpdateGroupFilesResponse[] = { id: string; status: string; };
string
ID of the target Group to add files to
const group = await pinata.groups.addFiles({ groupId: "3778c10d-452e-4def-8299-ee6bc548bdb0", files: [ "7e18c4a4-9501-44de-8f81-403db7de0e39", "a606ef7e-70a0-40ad-9b8a-60563e009655" ], });
string[]
An array of file IDs as strings that you want to add to the group