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.webhookEndpoints.delete('id');require "moonbase"
moonbase = Moonbase::Client.new(api_key: "My API Key")
result = moonbase.webhook_endpoints.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.webhook_endpoints.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.WebhookEndpoints.Delete(context.TODO(), "id")
if err != nil {
panic(err.Error())
}
}
curl --request DELETE \
--url https://api.moonbase.ai/v0/webhook_endpoints/{id} \
--header 'Authorization: Bearer <token>'{
"type": "errors",
"errors": [
{
"type": "error",
"status": "400",
"title": "Bad Request",
"detail": "The request could not be understood due to malformed syntax or invalid parameters."
}
]
}{
"type": "errors",
"errors": [
{
"type": "error",
"status": "401",
"title": "Unauthorized",
"detail": "Invalid or missing API key or JWT. You should provide your Moonbase API Key or JWT in the authorization header, in the format: \"Authorization: Bearer MOONBASE_API_KEY\""
}
]
}{
"type": "errors",
"errors": [
{
"type": "error",
"status": "403",
"title": "Forbidden"
}
]
}{
"type": "errors",
"errors": [
{
"type": "error",
"status": "404",
"title": "Not Found"
}
]
}{
"type": "errors",
"errors": [
{
"type": "error",
"status": "429",
"title": "Too Many Requests"
}
]
}{
"type": "errors",
"errors": [
{
"type": "error",
"status": "500",
"title": "Internal Server Error"
}
]
}{
"type": "errors",
"errors": [
{
"type": "error",
"status": "503",
"title": "Service Unavailable",
"detail": "The service is temporarily unavailable, please try again later."
}
]
}Endpoints
Delete an Endpoint
Permanently deletes an endpoint.
DELETE
/
webhook_endpoints
/
{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.webhookEndpoints.delete('id');require "moonbase"
moonbase = Moonbase::Client.new(api_key: "My API Key")
result = moonbase.webhook_endpoints.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.webhook_endpoints.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.WebhookEndpoints.Delete(context.TODO(), "id")
if err != nil {
panic(err.Error())
}
}
curl --request DELETE \
--url https://api.moonbase.ai/v0/webhook_endpoints/{id} \
--header 'Authorization: Bearer <token>'{
"type": "errors",
"errors": [
{
"type": "error",
"status": "400",
"title": "Bad Request",
"detail": "The request could not be understood due to malformed syntax or invalid parameters."
}
]
}{
"type": "errors",
"errors": [
{
"type": "error",
"status": "401",
"title": "Unauthorized",
"detail": "Invalid or missing API key or JWT. You should provide your Moonbase API Key or JWT in the authorization header, in the format: \"Authorization: Bearer MOONBASE_API_KEY\""
}
]
}{
"type": "errors",
"errors": [
{
"type": "error",
"status": "403",
"title": "Forbidden"
}
]
}{
"type": "errors",
"errors": [
{
"type": "error",
"status": "404",
"title": "Not Found"
}
]
}{
"type": "errors",
"errors": [
{
"type": "error",
"status": "429",
"title": "Too Many Requests"
}
]
}{
"type": "errors",
"errors": [
{
"type": "error",
"status": "500",
"title": "Internal Server Error"
}
]
}{
"type": "errors",
"errors": [
{
"type": "error",
"status": "503",
"title": "Service Unavailable",
"detail": "The service is temporarily unavailable, please try again later."
}
]
}⌘I

