Lists

Open in ClaudeOpen in ChatGPT.md

Delete a list

http
DELETE https://smsprovider-web.vercel.app/api/v1/lists/{id}

Deletes the list and its contacts.

Authentication: Authorization: Bearer bm_live_… · Required scope: lists

Path parameters

FieldType
idstring (uuid)

Response

200 — Ok

Errors

StatusCode
404not_found
401unauthorized
403insufficient_scope
429rate_limited
500internal_error

Examples

curl

bash
curl -X DELETE "https://smsprovider-web.vercel.app/api/v1/lists/{id}" \
  -H "Authorization: Bearer $BATLER_API_KEY"

Node.js

ts
import { BatlerSMS } from "@batler/sms";

const sms = new BatlerSMS({ apiKey: process.env.BATLER_API_KEY! });
const result = await sms.lists.delete(id);

PHP

php
<?php
$ch = curl_init("https://smsprovider-web.vercel.app/api/v1/lists/{id}");
curl_setopt_array($ch, [
  CURLOPT_CUSTOMREQUEST => "DELETE",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_HTTPHEADER => [
    "Authorization: Bearer " . getenv("BATLER_API_KEY"),
    "Content-Type: application/json",
  ],
]);
$result = json_decode(curl_exec($ch), true);

Python

python
import os, uuid, requests

resp = requests.request(
    "DELETE", "https://smsprovider-web.vercel.app/api/v1/lists/{id}",
    headers={"Authorization": f"Bearer {os.environ['BATLER_API_KEY']}"},
    timeout=30,
)
resp.raise_for_status()
result = resp.json()

C#

csharp
using var http = new HttpClient();
http.DefaultRequestHeaders.Authorization = new("Bearer", Environment.GetEnvironmentVariable("BATLER_API_KEY"));
var req = new HttpRequestMessage(HttpMethod.Delete, "https://smsprovider-web.vercel.app/api/v1/lists/{id}");
var res = await http.SendAsync(req);
var result = await res.Content.ReadAsStringAsync();
☰