JavaScript
import Courier from '@trycourier/courier';
const client = new Courier({
apiKey: process.env['COURIER_API_KEY'], // This is the default and can be omitted
});
await client.tenants.delete('tenant_id');import os
from courier import Courier
client = Courier(
api_key=os.environ.get("COURIER_API_KEY"), # This is the default and can be omitted
)
client.tenants.delete(
"tenant_id",
)package main
import (
"context"
"github.com/trycourier/courier-go"
"github.com/trycourier/courier-go/option"
)
func main() {
client := courier.NewClient(
option.WithAPIKey("My API Key"),
)
err := client.Tenants.Delete(context.TODO(), "tenant_id")
if err != nil {
panic(err.Error())
}
}package com.courier.example;
import com.courier.client.CourierClient;
import com.courier.client.okhttp.CourierOkHttpClient;
import com.courier.models.tenants.TenantDeleteParams;
public final class Main {
private Main() {}
public static void main(String[] args) {
CourierClient client = CourierOkHttpClient.fromEnv();
client.tenants().delete("tenant_id");
}
}require "courier"
courier = Courier::Client.new(api_key: "My API Key")
result = courier.tenants.delete("tenant_id")
puts(result)<?php
require_once dirname(__DIR__) . '/vendor/autoload.php';
use Courier\Client;
use Courier\Core\Exceptions\APIException;
$client = new Client(apiKey: getenv('COURIER_API_KEY') ?: 'My API Key');
try {
$result = $client->tenants->delete('tenant_id');
var_dump($result);
} catch (APIException $e) {
echo $e->getMessage();
}using TryCourier;
using TryCourier.Models.Tenants;
CourierClient client = new();
TenantDeleteParams parameters = new() { TenantID = "tenant_id" };
await client.Tenants.Delete(parameters);courier tenants delete \
--api-key 'My API Key' \
--tenant-id tenant_idcurl --request DELETE \
--url https://api.courier.com/tenants/{tenant_id} \
--header 'Authorization: Bearer <token>'Tenants
Delete a Tenant
DELETE
/
tenants
/
{tenant_id}
JavaScript
import Courier from '@trycourier/courier';
const client = new Courier({
apiKey: process.env['COURIER_API_KEY'], // This is the default and can be omitted
});
await client.tenants.delete('tenant_id');import os
from courier import Courier
client = Courier(
api_key=os.environ.get("COURIER_API_KEY"), # This is the default and can be omitted
)
client.tenants.delete(
"tenant_id",
)package main
import (
"context"
"github.com/trycourier/courier-go"
"github.com/trycourier/courier-go/option"
)
func main() {
client := courier.NewClient(
option.WithAPIKey("My API Key"),
)
err := client.Tenants.Delete(context.TODO(), "tenant_id")
if err != nil {
panic(err.Error())
}
}package com.courier.example;
import com.courier.client.CourierClient;
import com.courier.client.okhttp.CourierOkHttpClient;
import com.courier.models.tenants.TenantDeleteParams;
public final class Main {
private Main() {}
public static void main(String[] args) {
CourierClient client = CourierOkHttpClient.fromEnv();
client.tenants().delete("tenant_id");
}
}require "courier"
courier = Courier::Client.new(api_key: "My API Key")
result = courier.tenants.delete("tenant_id")
puts(result)<?php
require_once dirname(__DIR__) . '/vendor/autoload.php';
use Courier\Client;
use Courier\Core\Exceptions\APIException;
$client = new Client(apiKey: getenv('COURIER_API_KEY') ?: 'My API Key');
try {
$result = $client->tenants->delete('tenant_id');
var_dump($result);
} catch (APIException $e) {
echo $e->getMessage();
}using TryCourier;
using TryCourier.Models.Tenants;
CourierClient client = new();
TenantDeleteParams parameters = new() { TenantID = "tenant_id" };
await client.Tenants.Delete(parameters);courier tenants delete \
--api-key 'My API Key' \
--tenant-id tenant_idcurl --request DELETE \
--url https://api.courier.com/tenants/{tenant_id} \
--header 'Authorization: Bearer <token>'⌘I