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

# Deprovision a SaaS identity

> Remove an employee's identity from a SaaS application.

Depending on the SaaS application capabilities, the deprovisioning is either handled **automatically** (via API integration) or **manually** (a deprovisioning ticket is created for an admin to complete).

The response indicates which path was taken via the `provisioningType` field.

<span className="badge-write">Key: Write</span><span className="badge-company">Scope: Company</span>


## OpenAPI

````yaml https://api.getprimo.com/openapi.json post /saas/{saasId}/deprovision
openapi: 3.1.1
info:
  title: Public API - BETA
  description: Read docs on https://docs.getprimo.com/
  version: '1.0'
  contact: {}
servers:
  - url: https://api.getprimo.com
security:
  - apikey: []
tags: []
paths:
  /saas/{saasId}/deprovision:
    post:
      tags:
        - Saas
      summary: Deprovision a SaaS identity
      description: >-
        Remove an employee's identity from a SaaS application.


        Depending on the SaaS application capabilities, the deprovisioning is
        either handled **automatically** (via API integration) or **manually**
        (a deprovisioning ticket is created for an admin to complete).


        The response indicates which path was taken via the `provisioningType`
        field.
      operationId: deprovisionSaasIdentity
      parameters:
        - name: saasId
          required: true
          in: path
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DeprovisionSaasIdentityBody'
      responses:
        default:
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeprovisionSaasIdentity_Output'
components:
  schemas:
    DeprovisionSaasIdentityBody:
      type: object
      properties:
        identityId:
          description: >-
            The ID of the identity to deprovision. Retrieve it from
            `getSaasById` → `identities[].id`.
          type: string
          minLength: 1
      required:
        - identityId
    DeprovisionSaasIdentity_Output:
      type: object
      properties:
        provisioningType:
          type: string
          description: >-
            Whether the deprovisioning was handled automatically via API or a
            manual ticket was created.
          enum:
            - automatic
            - manual
      required:
        - provisioningType
      additionalProperties: false
  securitySchemes:
    apikey:
      scheme: bearer
      bearerFormat: API key
      type: http
      description: >-
        Use your Primo API key in the Authorization header as `Bearer
        <API_KEY>`.

````