> ## 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.

# Delete a saved script

> Remove a script from your company's script library. Its past runs stay in `getScriptRuns`. A script Primo uses to enforce an MDM control is refused with 403. To list the scripts and their `scriptId`, use `getScripts`.

Key: WriteScope: Company


## OpenAPI

````yaml https://api.getprimo.com/openapi.json delete /scripts/{scriptId}
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:
  /scripts/{scriptId}:
    delete:
      tags:
        - Scripts
      summary: Delete a saved script
      description: >-
        Remove a script from your company's script library. Its past runs stay
        in `getScriptRuns`. A script Primo uses to enforce an MDM control is
        refused with 403. To list the scripts and their `scriptId`, use
        `getScripts`.
      operationId: deleteScript
      parameters:
        - name: scriptId
          required: true
          in: path
          schema:
            type: string
      responses:
        default:
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeleteScript_Output'
components:
  schemas:
    DeleteScript_Output:
      type: object
      properties:
        success:
          type: boolean
          const: true
        message:
          type: string
          description: A human-readable description of the action
      required:
        - success
        - message
      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>`.

````

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