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

# DNC a Phone Number

> Marks a phone number as DNC for the authenticated user's DNC group. If neither `call_dnc` nor `sms_dnc` is provided, both default to true (DNC both channels). If either flag is provided, the other must also be provided, and at least one of the two must be true. This endpoint only adds DNC: passing `false` for a channel does not un-DNC an existing record. The DNC status applies to all companies in the group.



## OpenAPI

````yaml /Sela_API.yaml post /api/leads/dnc-phone-number/
openapi: 3.0.3
info:
  title: Sela API
  version: 1.0.2
  description: >-
    Create and manage leads, configure outbound webhook subscriptions, and use
    customer-specific lead ingestion workflows. Unless an endpoint says
    otherwise, authenticate with `Authorization: Token <api-key>`.
servers:
  - url: https://api.trysela.com/
    description: Production API
security: []
tags:
  - name: Leads
    description: Create, retrieve, update, and schedule customer leads.
  - name: Call Control
    description: Pause or resume outbound calling for an API user.
  - name: Lead Types
    description: >-
      Discover lead categories and the public metadata fields accepted for each
      one.
  - name: Webhooks
    description: >-
      Manage subscriptions that deliver lead and call events to customer
      systems.
  - name: Lead Ingestion
    description: >-
      Submit provider-specific lead payloads through ingestion URLs configured
      by Sela.
  - name: File Ingestion
    description: Request temporary upload URLs for configured CSV ingestion sources.
paths:
  /api/leads/dnc-phone-number/:
    post:
      tags:
        - Leads
      summary: DNC a Phone Number
      description: >-
        Marks a phone number as DNC for the authenticated user's DNC group. If
        neither `call_dnc` nor `sms_dnc` is provided, both default to true (DNC
        both channels). If either flag is provided, the other must also be
        provided, and at least one of the two must be true. This endpoint only
        adds DNC: passing `false` for a channel does not un-DNC an existing
        record. The DNC status applies to all companies in the group.
      operationId: leads_dnc_phone_number_create
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DncPhoneNumberRequestRequest'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/DncPhoneNumberRequestRequest'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/DncPhoneNumberRequestRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DncPhoneNumberResponse'
          description: ''
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DncPhoneNumberResponse'
          description: ''
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: ''
      security:
        - tokenAuth: []
components:
  schemas:
    DncPhoneNumberRequestRequest:
      type: object
      properties:
        phone_number:
          type: string
          minLength: 1
          description: >-
            The phone number to mark as DNC for the authenticated user's DNC
            group.
        call_dnc:
          type: boolean
          nullable: true
          description: >-
            If true, mark the phone number as DNC for outbound calls. Required
            when sms_dnc is provided. If neither flag is provided, both default
            to true.
        sms_dnc:
          type: boolean
          nullable: true
          description: >-
            If true, mark the phone number as DNC for outbound SMS. Required
            when call_dnc is provided. If neither flag is provided, both default
            to true.
      required:
        - phone_number
    DncPhoneNumberResponse:
      type: object
      properties:
        phone_number:
          type: string
        dnc_group_id:
          type: integer
        call_dnc:
          type: boolean
        sms_dnc:
          type: boolean
        created:
          type: boolean
      required:
        - call_dnc
        - created
        - dnc_group_id
        - phone_number
        - sms_dnc
    ErrorResponse:
      type: object
      properties:
        non_field_errors:
          type: array
          items:
            type: string
        phone_number:
          type: array
          items:
            type: string
        email:
          type: array
          items:
            type: string
        detail:
          type: string
        leads:
          type: array
          items:
            type: string
  securitySchemes:
    tokenAuth:
      type: apiKey
      in: header
      name: Authorization
      description: Token-based authentication with required prefix "Token"

````