Skip to main content
DELETE
/
profiles
/
{user_id}
/
lists
JavaScript
import Courier from '@trycourier/courier';

const client = new Courier({
  apiKey: process.env['COURIER_API_KEY'], // This is the default and can be omitted
});

const list = await client.profiles.lists.delete('user_id');

console.log(list.status);
import os
from courier import Courier

client = Courier(
api_key=os.environ.get("COURIER_API_KEY"), # This is the default and can be omitted
)
list = client.profiles.lists.delete(
"user_id",
)
print(list.status)
package main

import (
"context"
"fmt"

"github.com/trycourier/courier-go"
"github.com/trycourier/courier-go/option"
)

func main() {
client := courier.NewClient(
option.WithAPIKey("My API Key"),
)
list, err := client.Profiles.Lists.Delete(context.TODO(), "user_id")
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", list.Status)
}
package com.courier.example;

import com.courier.client.CourierClient;
import com.courier.client.okhttp.CourierOkHttpClient;
import com.courier.models.profiles.lists.ListDeleteParams;
import com.courier.models.profiles.lists.ListDeleteResponse;

public final class Main {
private Main() {}

public static void main(String[] args) {
CourierClient client = CourierOkHttpClient.fromEnv();

ListDeleteResponse list = client.profiles().lists().delete("user_id");
}
}
require "courier"

courier = Courier::Client.new(api_key: "My API Key")

list = courier.profiles.lists.delete("user_id")

puts(list)
<?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 {
$list = $client->profiles->lists->delete('user_id');

var_dump($list);
} catch (APIException $e) {
echo $e->getMessage();
}
using System;
using TryCourier;
using TryCourier.Models.Profiles.Lists;

CourierClient client = new();

ListDeleteParams parameters = new() { UserID = "user_id" };

var list = await client.Profiles.Lists.Delete(parameters);

Console.WriteLine(list);
courier profiles:lists delete \
--api-key 'My API Key' \
--user-id user_id
curl --request DELETE \
--url https://api.courier.com/profiles/{user_id}/lists \
--header 'Authorization: Bearer <token>'
{
  "status": "SUCCESS"
}
{
"message": "Example message text",
"type": "invalid_request_error"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

user_id
string
required

A unique identifier representing the user associated with the requested profile.

Response

status
enum<string>
required
Available options:
SUCCESS