JavaScript
import Moonbase from '@moonbaseai/sdk';
const client = new Moonbase({
apiKey: process.env['MOONBASE_API_KEY'], // This is the default and can be omitted
});
await client.collections.delete('id');require "moonbase"
moonbase = Moonbase::Client.new(api_key: "My API Key")
result = moonbase.collections.delete("id")
puts(result)import os
from moonbase import Moonbase
client = Moonbase(
api_key=os.environ.get("MOONBASE_API_KEY"), # This is the default and can be omitted
)
client.collections.delete(
"id",
)package main
import (
"context"
"github.com/moonbaseai/moonbase-sdk-go"
"github.com/moonbaseai/moonbase-sdk-go/option"
)
func main() {
client := moonbase.NewClient(
option.WithAPIKey("My API Key"),
)
err := client.Collections.Delete(context.TODO(), "id")
if err != nil {
panic(err.Error())
}
}
curl --request DELETE \
--url https://api.moonbase.ai/v0/collections/{id} \
--header 'Authorization: Bearer <token>'Collections
Delete a Collection
Permanently deletes a collection.
DELETE
/
collections
/
{id}
JavaScript
import Moonbase from '@moonbaseai/sdk';
const client = new Moonbase({
apiKey: process.env['MOONBASE_API_KEY'], // This is the default and can be omitted
});
await client.collections.delete('id');require "moonbase"
moonbase = Moonbase::Client.new(api_key: "My API Key")
result = moonbase.collections.delete("id")
puts(result)import os
from moonbase import Moonbase
client = Moonbase(
api_key=os.environ.get("MOONBASE_API_KEY"), # This is the default and can be omitted
)
client.collections.delete(
"id",
)package main
import (
"context"
"github.com/moonbaseai/moonbase-sdk-go"
"github.com/moonbaseai/moonbase-sdk-go/option"
)
func main() {
client := moonbase.NewClient(
option.WithAPIKey("My API Key"),
)
err := client.Collections.Delete(context.TODO(), "id")
if err != nil {
panic(err.Error())
}
}
curl --request DELETE \
--url https://api.moonbase.ai/v0/collections/{id} \
--header 'Authorization: Bearer <token>'⌘I

