> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mailglyph.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Remove static segment members

> Remove contacts from a static segment by email

Removes one or more contacts from a **static** segment by email.

## Path parameters

* `id` (string, required): Segment ID

## Request body

```json theme={null}
{
  "emails": ["alice@example.com"]
}
```

* `emails` must be a non-empty array of valid email addresses.
* Maximum length is 500 emails per request.

## Response

```json theme={null}
{
  "removed": 1
}
```

* `removed`: Number of provided emails that matched contacts in the workspace.

## Notes

* This endpoint only works for `STATIC` segments.
* Calling it for a `DYNAMIC` segment returns `400`.


## OpenAPI

````yaml openapi.json DELETE /segments/{id}/members
openapi: 3.0.3
info:
  title: MailGlyph API
  description: >-
    Email platform API for transactional emails, campaigns, and marketing
    automation
  version: 1.0.0
  contact:
    name: MailGlyph Support
    url: https://mailglyph.com
servers:
  - url: https://api.mailglyph.com
    description: Production server
security:
  - ApiKeyAuth: []
tags:
  - name: Public API
    description: Public API endpoints for sending emails and tracking events
  - name: Events
    description: Event ingestion and querying
  - name: Contacts
    description: Contact management operations
  - name: Templates
    description: Email template management
  - name: Campaigns
    description: Email campaign management
  - name: Segments
    description: Audience segmentation
  - name: Workflows
    description: Workflow automation
paths:
  /segments/{id}/members:
    delete:
      tags:
        - Segments
      summary: Remove static segment members
      description: Remove contacts from a static segment by email
      operationId: removeStaticSegmentMembers
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - emails
              properties:
                emails:
                  type: array
                  minItems: 1
                  maxItems: 500
                  items:
                    type: string
                    format: email
            example:
              emails:
                - alice@example.com
      responses:
        '200':
          description: Contacts removed from static segment
          content:
            application/json:
              schema:
                type: object
                properties:
                  removed:
                    type: integer
        '400':
          description: Bad request
        '404':
          description: Segment not found
components:
  securitySchemes:
    ApiKeyAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: >-
        API Key authentication. **Secret keys (sk_*)** are required for all
        endpoints except `/v1/track`. **Public keys (pk_*)** only work with the
        `/v1/track` endpoint for client-side event tracking. Workspaces can have
        multiple active keys, and sender-domain operations enforce per-key
        domain scope when configured.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.