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

# Deactivate a counsellor

> Deactivates the counsellor in your account only: their role here is disabled (they can no longer sign in to it, other accounts are untouched), they are set inactive in every lead pool (their existing leads stay with them), they are taken out of your IVR ring lists, and inbound calls stop being routed to them. Repeating it is harmless. Reactivate with `PATCH {"active": true}`.

Scope: `counsellors:manage`.



## OpenAPI

````yaml /api-reference/openapi.json delete /counsellors/{id}
openapi: 3.1.0
info:
  title: Telleo API
  version: 1.3.0
  description: >-
    Start AI phone calls, or connect your counsellors to contacts, from your own
    systems and get each call's outcome back. Manage your counsellors and AI
    agents from the same API.
servers:
  - url: https://api.telleo.ai/v1
security:
  - ApiKey: []
tags:
  - name: Calls
  - name: Batches
  - name: Agents
  - name: Human calls
  - name: Counsellors
  - name: Credits
  - name: Webhook
paths:
  /counsellors/{id}:
    delete:
      tags:
        - Counsellors
      summary: Deactivate a counsellor
      description: >-
        Deactivates the counsellor in your account only: their role here is
        disabled (they can no longer sign in to it, other accounts are
        untouched), they are set inactive in every lead pool (their existing
        leads stay with them), they are taken out of your IVR ring lists, and
        inbound calls stop being routed to them. Repeating it is harmless.
        Reactivate with `PATCH {"active": true}`.


        Scope: `counsellors:manage`.
      operationId: deactivateCounsellor
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: The deactivated counsellor, with `effects`.
          headers:
            X-Request-Id:
              $ref: '#/components/headers/RequestId'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CounsellorWrite'
              example:
                id: 6b7e0c2a-1d3f-4e5a-8b9c-0d1e2f3a4b5c
                object: counsellor
                name: Asha Rao
                email: asha@school.in
                roles:
                  - COUNSELLOR
                status: inactive
                can_call: false
                blocked_reason: This counsellor is deactivated.
                mobile_number: '919876543210'
                airtel_extension: null
                manageable: true
                shared_account: false
                effects:
                  role_disabled: true
                  sessions_revoked: this_account
                  pool_memberships_deactivated: 3
                  ivr_dial_steps_updated:
                    - menu_id: m-1
                      menu_name: Main
                      step_id: n-4
                      step_label: Sales
                      no_one_left: false
                  leads_reassigned: 0
        '401':
          description: The key is missing, unknown, revoked or expired.
          headers:
            X-Request-Id:
              $ref: '#/components/headers/RequestId'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                missing_api_key:
                  value:
                    error:
                      code: missing_api_key
                      message: Send your API key in the X-API-Key header.
                      request_id: req_8f2c1a7e
                invalid_api_key:
                  value:
                    error:
                      code: invalid_api_key
                      message: This API key is not valid.
                      request_id: req_8f2c1a7e
        '403':
          description: Not a counsellor the API may change.
          headers:
            X-Request-Id:
              $ref: '#/components/headers/RequestId'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                counsellor_not_manageable:
                  value:
                    error:
                      code: counsellor_not_manageable
                      message: >-
                        This person is an admin or other staff of this account
                        (ADMIN)…
                      request_id: req_8f2c1a7e
        '404':
          description: No counsellor or admin with this id in your account.
          headers:
            X-Request-Id:
              $ref: '#/components/headers/RequestId'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                counsellor_not_found:
                  value:
                    error:
                      code: counsellor_not_found
                      message: No counsellor 6b7e… in this account.
                      request_id: req_8f2c1a7e
        '429':
          description: Too many requests for this key.
          headers:
            Retry-After:
              schema:
                type: integer
              description: Seconds to wait before retrying.
            X-Request-Id:
              $ref: '#/components/headers/RequestId'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                rate_limited:
                  value:
                    error:
                      code: rate_limited
                      message: Too many requests. Retry after 12 seconds.
                      request_id: req_8f2c1a7e
        '500':
          description: The role did not change; nothing else was changed.
          headers:
            X-Request-Id:
              $ref: '#/components/headers/RequestId'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                role_update_failed:
                  value:
                    error:
                      code: role_update_failed
                      message: >-
                        The counsellor's role could not be disabled, so nothing
                        was changed…
                      request_id: req_8f2c1a7e
        '503':
          description: Your user directory could not be reached for a moment.
          headers:
            X-Request-Id:
              $ref: '#/components/headers/RequestId'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                temporarily_unavailable:
                  value:
                    error:
                      code: temporarily_unavailable
                      message: >-
                        Could not reach the account directory right now. Retry
                        shortly.
                      request_id: req_8f2c1a7e
components:
  headers:
    RequestId:
      schema:
        type: string
      description: Unique id of this request. Quote it to support.
  schemas:
    CounsellorWrite:
      allOf:
        - $ref: '#/components/schemas/Counsellor'
        - type: object
          properties:
            created:
              type: boolean
              description: >-
                `true` when this request made the person a counsellor here;
                `false` when they already were (nothing changed).
            existing_account:
              type: boolean
              description: >-
                The email already had a login on the platform: it was reused,
                its name, mobile and password were not changed, and no email was
                sent.
            welcome_email_sent:
              type: boolean
            effects:
              type: object
              additionalProperties: true
              description: >-
                On deactivation / reactivation: what else changed (see the
                counsellors guide).
            warnings:
              type: array
              items:
                $ref: '#/components/schemas/Warning'
              description: >-
                Non-fatal notes about what was (not) done, e.g.
                `mobile_number_missing`.
            idempotent_replay:
              type: boolean
    Error:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          required:
            - code
            - message
          properties:
            code:
              type: string
              description: Machine-readable code. Branch on this, not on the message.
              example: invalid_request
            message:
              type: string
              description: A sentence you can log or show to an operator.
            request_id:
              type: string
              description: Quote this when you contact support.
            details:
              type: object
              additionalProperties: true
              description: >-
                Extra context, e.g. `errors: [{field, message}]` for validation
                errors or `call_id` for conflicts.
    Counsellor:
      type: object
      properties:
        id:
          type: string
          description: Use as `counsellor_id` on `POST /human-calls`.
        object:
          type: string
          const: counsellor
        name:
          type: string
        email:
          type:
            - string
            - 'null'
        roles:
          type: array
          items:
            type: string
          example:
            - COUNSELLOR
        can_call:
          type: boolean
          description: >-
            Whether this person can take a human call right now on your calling
            provider.
        blocked_reason:
          type:
            - string
            - 'null'
          description: >-
            Why `can_call` is false, e.g. no mobile number on their profile
            (Vacademy Voice, Exotel) or no Airtel extension mapped.
        status:
          type: string
          enum:
            - active
            - invited
            - inactive
          description: >-
            `inactive` after `DELETE /counsellors/{id}` (deactivated); `GET
            /counsellors` lists active ones only.
        mobile_number:
          type:
            - string
            - 'null'
          description: >-
            Only on `GET /counsellors/{id}` (and write responses) for keys with
            `counsellors:manage`, and `null` when the login also belongs to
            another account (`shared_account`). Digits with the country code, as
            stored on the profile.
          example: '919876543210'
        airtel_extension:
          type:
            - string
            - 'null'
          description: >-
            Only on single-counsellor responses, for keys with
            `counsellors:manage`.
        manageable:
          type: boolean
          description: >-
            Only for `counsellors:manage` keys: whether the API may change this
            person (their roles here are counsellor roles only). Admins and
            other staff are `false`.
        shared_account:
          type: boolean
          description: >-
            Only for `counsellors:manage` keys: the login also belongs to
            another account on the platform, so its name and mobile number
            cannot be changed through the API.
    Warning:
      type: object
      description: >-
        Something in the request that was accepted but may not do what you
        expect.
      properties:
        field:
          type: string
          example: variables.date
        code:
          type: string
          enum:
            - reserved_variable
        message:
          type: string
          example: >-
            {{date}} in the agent's script is always filled with the current
            date and time; this value does not replace it. The agent receives it
            only as information about the contact.
  securitySchemes:
    ApiKey:
      type: apiKey
      in: header
      name: X-API-Key
      description: >-
        Your AI calling API key (`vak_call_…`). `Authorization: Bearer <key>`
        also works.

````

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