Delete a segment
Delete a segment.
DELETE
https://app.usenotix.dev/api/v1/contactBooks/{contactBookId}/segments/{segmentId}Needs a full access key. Sending access keys cannot call this. Key permissions lists the extra rules some calls have.
Delete a segment. Refused with 400 while a scheduled or running campaign, or an active journey, uses it.
Path parameters
contactBookIdstringrequired
segmentIdstringrequired
Headers
Authorizationstringrequired
Bearer followed by your API key.
Errors
400
A scheduled or running campaign, or an active journey, uses the segment.
404
No segment with this id in the contact book for the calling team.
Every error has the same shape. See all error codes.
curl -X DELETE "https://app.usenotix.dev/api/v1/contactBooks/<contactBookId>/segments/<segmentId>" \
-H "Authorization: Bearer $NOTIX_API_KEY"
import { Notix } from "notix-js";
const notix = new Notix(process.env.NOTIX_API_KEY);
const { data, error } = await notix.segments.delete("cb_123", "seg_123");
from notix import Notix
notix = Notix() # reads NOTIX_API_KEY
result, _ = notix.segments.delete("cb_123", "seg_123")
use Notix\Notix;
$notix = new Notix(getenv('NOTIX_API_KEY'));
$notix->segments->delete('cb_123', 'seg_123');
Response200
{
"id": "cm1x8f3k20001qz7v5b9d2e4a",
"deleted": true
}