---
title: "Remove all access restrictions from a script."
method: DELETE
path: "/api/v1/script/{script_id}/access"
---

# Remove all access restrictions from a script.

`DELETE /api/v1/script/{script_id}/access`

**Authentication**: JWT token required
**Authorization**: Admin level access required (ADMIN or SUPERADMIN)
**Purpose**: Make script accessible to all authenticated users

**Path Parameters**:
- `script_id`: Script identifier/slug or numeric ID

**Request**: No request body required

**Response Schema**:
```json
{
  "data": {
    "script_id": "12345",
    "restricted": false,
    "allowed_roles": [],
    "allowed_users": [],
    "access_type": "unrestricted"
  }
}
```

**Clearing Process**:
- Removes all role-based restrictions
- Removes all user-specific restrictions
- Makes script available to all authenticated users
- Updates script access type to "unrestricted"

**Effect**:
- Any authenticated user can discover and execute the script
- Script appears in public script listings
- No special permissions required for access
- Maintains script visibility in search results

**Use Cases**:
- Making private scripts public
- Removing outdated access restrictions
- Simplifying script access management
- Opening scripts for general use

**Security Considerations**:
- Ensure script content is appropriate for public access
- Review script parameters for sensitive data exposure
- Consider impact on system resources from increased usage
- Document decision for audit purposes

**Error Responses**:
- `401 Unauthorized`: JWT token required
- `403 Forbidden`: Admin privileges required
- `404 Not Found`: Script does not exist
- `500 Internal Server Error`: Failed to clear access restrictions

## Path parameters

- `script_id` string, required

## Response `200`

Success

- object

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `403` — Forbidden
- `404` — Not Found
- `500` — Internal Server Error

---

[API](https://skmtc.dev/trends/apis/trends-earth-api.md) · [All operations](https://skmtc.dev/trends/apis/trends-earth-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/trends/trends-earth-api/revisions/6bdbc0b84666/schema)
