Delte an array of files from your account

Usage

import { PinataSDK } from "pinata";

const pinata = new PinataSDK({
  pinataJwt: process.env.PINATA_JWT!,
  pinataGateway: "example-gateway.mypinata.cloud",
});

const deletedFiles = await pinata.files.delete([
  "4ad9d3d1-4ab4-464c-a42a-3027fc39a546"
])

Returns

type DeleteResponse[] = {
  id: string;
  status: string;
};

Parameters

files

  • Type: string[]

An array of file IDs you want to delete

const unpin = await pinata.files
  .delete([
    "5e3011c0-f242-46b8-ad8d-2141bba23096",
    "e4cb100d-9065-4a08-80a3-f195f35de336"
  ])