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

# Remove emails (bulk)

> Remove individual stored email addresses from one or many persons. Only the named address is removed; the person's other emails and phone numbers stay.

Each address must already exist on its person; matching ignores letter case. If the removed address was the preferred email, no other address is starred in its place; use `POST /v1/persons/preferred-email` to choose one. Invalid rows fail individually and do not block other rows in the same request. This cannot be undone.



## OpenAPI

````yaml /api-reference/openapi-v1.json post /v1/persons/emails/delete
openapi: 3.1.0
info:
  title: Stardex API (v1)
  version: 1.0.0
  description: >-
    Stardex ATS API — manage candidates, jobs, companies, and recruiting
    workflows.
servers:
  - url: https://api.stardex.ai
    description: Production API server
security:
  - bearerAuth: []
tags:
  - name: Persons
    description: Manage person records — contacts, work history, and custom fields.
  - name: Jobs
    description: Manage job postings — pipeline stages, team members, and custom fields.
  - name: Candidates
    description: Manage candidate records and pipeline stage transitions.
  - name: Companies
    description: Browse and retrieve company records.
  - name: Lists
    description: Create, search, and retrieve saved person and company lists.
  - name: Person Activities
    description: Create and manage activity records (notes, emails, meetings) for persons.
  - name: Team Members
    description: List team members for use in search filters and assignments.
  - name: Custom Fields
    description: Retrieve custom field definitions and tag options for search filters.
paths:
  /v1/persons/emails/delete:
    post:
      tags:
        - Persons
      summary: Remove emails (bulk)
      description: >-
        Remove individual stored email addresses from one or many persons. Only
        the named address is removed; the person's other emails and phone
        numbers stay.


        Each address must already exist on its person; matching ignores letter
        case. If the removed address was the preferred email, no other address
        is starred in its place; use `POST /v1/persons/preferred-email` to
        choose one. Invalid rows fail individually and do not block other rows
        in the same request. This cannot be undone.
      operationId: deletePersonsEmails
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DeleteEmailsBulkRequest'
      responses:
        '200':
          description: Emails removed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeleteEmailsBulkResponse'
              example:
                success: true
                data:
                  deleted:
                    - person_id: 123e4567-e89b-12d3-a456-426614174000
                      email: john@gmail.com
                  failed:
                    - person_id: 123e4567-e89b-12d3-a456-426614174000
                      email: old@techcorp.com
                      error: Email is not stored on this person
                    - person_id: 00000000-0000-0000-0000-000000000001
                      email: jane@example.com
                      error: Person not found
        '400':
          description: Validation error
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    enum:
                      - false
                    description: Always false for error responses.
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                        description: >-
                          Machine-readable error code (e.g. "VALIDATION_ERROR",
                          "NOT_FOUND").
                      message:
                        type: string
                        description: Human-readable error description.
                    required:
                      - code
                      - message
                required:
                  - success
                  - error
        '404':
          description: Resource not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    enum:
                      - false
                    description: Always false for error responses.
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                        description: >-
                          Machine-readable error code (e.g. "VALIDATION_ERROR",
                          "NOT_FOUND").
                      message:
                        type: string
                        description: Human-readable error description.
                    required:
                      - code
                      - message
                required:
                  - success
                  - error
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    enum:
                      - false
                    description: Always false for error responses.
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                        description: >-
                          Machine-readable error code (e.g. "VALIDATION_ERROR",
                          "NOT_FOUND").
                      message:
                        type: string
                        description: Human-readable error description.
                    required:
                      - code
                      - message
                required:
                  - success
                  - error
components:
  schemas:
    DeleteEmailsBulkRequest:
      type: object
      properties:
        deletions:
          type: array
          items:
            type: object
            properties:
              person_id:
                type: string
                format: uuid
                description: Person UUID. Get IDs from POST /v1/persons/search.
              email:
                type: string
                minLength: 1
                description: >-
                  Email address to remove. Must already exist on that person.
                  Matching ignores letter case.
            required:
              - person_id
              - email
          minItems: 1
          maxItems: 100
          description: >-
            Email addresses to remove (1–100). Several addresses of the same
            person can be sent in one request. Invalid rows fail individually
            and do not block other rows.
      required:
        - deletions
    DeleteEmailsBulkResponse:
      type: object
      properties:
        success:
          type: boolean
          enum:
            - true
        data:
          $ref: '#/components/schemas/DeleteEmailsBulkResult'
      required:
        - success
        - data
    DeleteEmailsBulkResult:
      type: object
      properties:
        deleted:
          type: array
          items:
            type: object
            properties:
              person_id:
                type: string
                format: uuid
              email:
                type: string
            required:
              - person_id
              - email
          description: >-
            Addresses that were removed. email is the stored address that was
            deleted.
        failed:
          type: array
          items:
            type: object
            properties:
              person_id:
                type: string
                format: uuid
                description: Person UUID of the row that failed.
              email:
                type: string
                description: Email address from the failed row.
              error:
                type: string
                description: >-
                  Why this row was not applied, such as "Person not found" or
                  "Email is not stored on this person".
            required:
              - person_id
              - email
              - error
          description: >-
            Rows that could not be removed. Other valid rows in the same request
            are still processed.
      required:
        - deleted
        - failed
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        Authenticate with a Bearer token: API key, OAuth token, or session
        token.

````

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