> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.athenaintel.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.athenaintel.com/_mcp/server.

# Remove workspace access from an asset

DELETE https://api.athenaintel.com/api/v0/assets/{asset_id}/workspace-access

Remove the workspace-wide share from an asset, so members of the workspace no longer get access through it. Needs edit access to the asset. Removing a folder's share also removes it from the assets inside the folder. People and groups the asset is shared with directly keep their access. Calling it on an asset with no workspace share, or on one in the trash, succeeds with the same answer.

Reference: https://docs.athenaintel.com/api-reference/assets/remove-workspace-access

## Authentication

- `X-API-KEY` header (required) — API Key authentication via header

## Request

### Path parameters

- `asset_id` (string, required) — Unique identifier of the asset

## Response

### 200

Workspace share removed

- `asset_id` (string, required) — ID of the asset
- `workspace_access` (string, required) — Workspace access level now on the asset: 'view', 'edit', or 'none' when the workspace-wide share was removed

## Errors

### 403 Forbidden Error

Forbidden - caller does not have edit access

- `message` (string, required)

### 404 Not Found Error

Asset not found

- `message` (string, required)

### 422 Unprocessable Entity Error

Validation Error

- `detail` (list of ValidationError, optional)

## Types

### ValidationError

- `loc` (list of ValidationErrorLocItems, required)
- `msg` (string, required)
- `type` (string, required)
- `ctx` (ValidationErrorCtx, optional)
- `input` (any, optional)

### ValidationErrorLocItems

- string
- integer

### ValidationErrorCtx

## Examples

**Response**

```json
{
  "asset_id": "asset_92492920-d118-42d3-95b4-00eccfe0754f",
  "workspace_access": "none"
}
```

**SDK Code**

```python assets_remove_workspace_access_example
import requests

url = "https://api.athenaintel.com/api/v0/assets/asset_id/workspace-access"

headers = {"X-API-KEY": "<apiKey>"}

response = requests.delete(url, headers=headers)

print(response.json())
```

```javascript assets_remove_workspace_access_example
const url = 'https://api.athenaintel.com/api/v0/assets/asset_id/workspace-access';
const options = {method: 'DELETE', headers: {'X-API-KEY': '<apiKey>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go assets_remove_workspace_access_example
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.athenaintel.com/api/v0/assets/asset_id/workspace-access"

	req, _ := http.NewRequest("DELETE", url, nil)

	req.Header.Add("X-API-KEY", "<apiKey>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby assets_remove_workspace_access_example
require 'uri'
require 'net/http'

url = URI("https://api.athenaintel.com/api/v0/assets/asset_id/workspace-access")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Delete.new(url)
request["X-API-KEY"] = '<apiKey>'

response = http.request(request)
puts response.read_body
```

```java assets_remove_workspace_access_example
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.delete("https://api.athenaintel.com/api/v0/assets/asset_id/workspace-access")
  .header("X-API-KEY", "<apiKey>")
  .asString();
```

```php assets_remove_workspace_access_example
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('DELETE', 'https://api.athenaintel.com/api/v0/assets/asset_id/workspace-access', [
  'headers' => [
    'X-API-KEY' => '<apiKey>',
  ],
]);

echo $response->getBody();
```

```csharp assets_remove_workspace_access_example
using RestSharp;

var client = new RestClient("https://api.athenaintel.com/api/v0/assets/asset_id/workspace-access");
var request = new RestRequest(Method.DELETE);
request.AddHeader("X-API-KEY", "<apiKey>");
IRestResponse response = client.Execute(request);
```

```swift assets_remove_workspace_access_example
import Foundation

let headers = ["X-API-KEY": "<apiKey>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.athenaintel.com/api/v0/assets/asset_id/workspace-access")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "DELETE"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```