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

# Unpublish Artifact

> Ends the active publication: no version is shared any more and every access grant (people, teams, workspace and the public link) is deleted, so nobody but the owner and Artifacts Manager holders can open it. Sharing again starts fresh. The owner may publish again later; an unpublish by a manager (`artifacts:manage`) cannot be undone by the owner.

Authenticate with a Tess API token in the `Authorization: Bearer` header. See the [Artifacts API guide](https://docs.tess.im/en/artifacts-api.md) for the full flow, permissions and ownership rules.

### **Code Examples**

```http cURL theme={null}
curl --request DELETE \
  --url 'https://api.tess.im/artifacts/artifact_5d1f0c2e-8a3b-4c6d-9e7f-1a2b3c4d5e6f/publish' \
  --header 'Authorization: Bearer YOUR_API_KEY' \
  --header 'x-workspace-id: YOUR_WORKSPACE_ID'
```

```json Node.js theme={null}
const axios = require('axios');

const config = {
  method: 'delete',
  url: 'https://api.tess.im/artifacts/artifact_5d1f0c2e-8a3b-4c6d-9e7f-1a2b3c4d5e6f/publish',
  headers: {
    'Authorization': 'Bearer YOUR_API_KEY',
    'x-workspace-id': 'YOUR_WORKSPACE_ID'
  }
};

try {
  const response = await axios(config);
  console.log(response.data);
} catch (error) {
  console.error(error);
}
```

```python Python theme={null}
import requests

url = "https://api.tess.im/artifacts/artifact_5d1f0c2e-8a3b-4c6d-9e7f-1a2b3c4d5e6f/publish"
headers = {
    "Authorization": "Bearer YOUR_API_KEY",
    "x-workspace-id": "YOUR_WORKSPACE_ID"
}

response = requests.delete(url, headers=headers)
print(response.status_code)
print(response.json())
```

```php PHP theme={null}
<?php
$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => "https://api.tess.im/artifacts/artifact_5d1f0c2e-8a3b-4c6d-9e7f-1a2b3c4d5e6f/publish",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_CUSTOMREQUEST => "DELETE",
  CURLOPT_HTTPHEADER => [
    "Authorization: Bearer YOUR_API_KEY",
    "x-workspace-id: YOUR_WORKSPACE_ID"
  ]
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "Error: " . $err;
} else {
  echo $response;
}
```

```java Java theme={null}
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;

HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("https://api.tess.im/artifacts/artifact_5d1f0c2e-8a3b-4c6d-9e7f-1a2b3c4d5e6f/publish"))
    .header("Authorization", "Bearer YOUR_API_KEY")
    .header("x-workspace-id", "YOUR_WORKSPACE_ID")
    .DELETE()
    .build();

HttpResponse<String> response = client.send(request,
    HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
```

```go Go theme={null}
package main

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

func main() {
    client := &http.Client{}
    req, err := http.NewRequest("DELETE", "https://api.tess.im/artifacts/artifact_5d1f0c2e-8a3b-4c6d-9e7f-1a2b3c4d5e6f/publish", nil)
    if err != nil {
        fmt.Println(err)
        return
    }

    req.Header.Add("Authorization", "Bearer YOUR_API_KEY")
    req.Header.Add("x-workspace-id", "YOUR_WORKSPACE_ID")

    resp, err := client.Do(req)
    if err != nil {
        fmt.Println(err)
        return
    }
    defer resp.Body.Close()

    body, err := ioutil.ReadAll(resp.Body)
    if err != nil {
        fmt.Println(err)
        return
    }

    fmt.Println(string(body))
}
```

```jsonnet .NET theme={null}
using System;
using System.Net.Http;
using System.Text;
using System.Threading.Tasks;

class Program
{
    static async Task Main(string[] args)
    {
        using (var client = new HttpClient())
        {
            client.DefaultRequestHeaders.Add("Authorization", "Bearer YOUR_API_KEY");
            client.DefaultRequestHeaders.Add("x-workspace-id", "YOUR_WORKSPACE_ID");

            var response = await client.DeleteAsync("https://api.tess.im/artifacts/artifact_5d1f0c2e-8a3b-4c6d-9e7f-1a2b3c4d5e6f/publish");
            string responseBody = await response.Content.ReadAsStringAsync();
            Console.WriteLine(responseBody);
        }
    }
}
```

```ruby Ruby theme={null}
require 'uri'
require 'net/http'
require 'json'

uri = URI('https://api.tess.im/artifacts/artifact_5d1f0c2e-8a3b-4c6d-9e7f-1a2b3c4d5e6f/publish')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true

request = Net::HTTP::Delete.new(uri)
request['Authorization'] = 'Bearer YOUR_API_KEY'
request['x-workspace-id'] = 'YOUR_WORKSPACE_ID'

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

### **Path Parameters**

**universal\_id** `string` *required*

The artifact ID (`universal_id`), for example `artifact_5d1f0c2e-8a3b-4c6d-9e7f-1a2b3c4d5e6f`.

### **Headers**

**x-workspace-id** `integer` *required*

Workspace ID. **Required as of 2026-09-01.** Until then, if omitted, the user's selected workspace is used (deprecated). After the cutoff, a missing header returns **422**.

### **Response**

**200**

```json theme={null}
{
  "universal_id": "artifact_5d1f0c2e-8a3b-4c6d-9e7f-1a2b3c4d5e6f",
  "title": "Weekly pipeline (final)",
  "status": "disabled",
  "unpublished": true,
  "revoked_reason": "owner",
  "revoked_targets": [],
  "head_version": 3,
  "shared_version": null,
  "latest_version_is_shared": false,
  "summary": "Latest version is v3. No version is shared yet."
}
```

### **Response fields**

**status** `string`

`disabled` after unpublishing.

**unpublished** `boolean`

`true` when a publication was ended.

**revoked\_reason** `string`

`owner` or `manager`.

**revoked\_targets** `array`

The access grants that were removed.

**head\_version** `integer`

Latest version number.

**shared\_version** `integer | null`

`null`: nothing is shared.

### **Errors**

| Status | Meaning |
| - | - |
| `401` | Missing or invalid API token. |
| `403` | `ARTIFACT_EDIT_FORBIDDEN`: you can read the artifact but you are neither its owner nor an Artifacts Manager. |
| `404` | `ARTIFACT_NOT_FOUND`: the artifact does not exist or is not yours. |
| `429` | Too many requests. Retry after a short wait. |


## OpenAPI

````yaml api-reference/tess-public-api.openapi.json DELETE /artifacts/{universal_id}/publish
openapi: 3.0.0
info:
  title: Tess API
  version: '0.1'
servers:
  - url: https://api.tess.im
security: []
paths:
  /artifacts/{universal_id}/publish:
    delete:
      tags:
        - Artifacts
      summary: Unpublish an artifact
      description: >-
        Ends the active publication: no version is shared any more, and every
        access grant (people, teams, workspace and the public link) is deleted,
        so nobody but the owner and holders of the Artifacts Manager permission
        can open it. Sharing again starts fresh: the first grant publishes the
        latest version. Allowed to the owner, who may publish again later, and
        to holders of the Artifacts Manager permission (`artifacts:manage`) in
        the artifact's workspace, whose unpublish the owner cannot undo.
      operationId: 9f8e506b45609c5935a9165ee9482fbf
      parameters:
        - name: universal_id
          in: path
          required: true
          schema:
            type: string
        - name: x-workspace-id
          in: header
          description: >-
            Workspace id. If not provided, the user's selected workspace is
            used.
          required: false
          schema:
            type: integer
      responses:
        '200':
          description: Unpublished (or nothing was published)
          content:
            application/json:
              schema:
                properties:
                  universal_id:
                    type: string
                  title:
                    type: string
                  status:
                    type: string
                  unpublished:
                    description: Whether a version was being shared until this call
                    type: boolean
                  revoked_reason:
                    description: >-
                      Who ended the publication; null when nothing was being
                      shared
                    type: string
                    enum:
                      - owner
                      - manager
                    nullable: true
                  revoked_targets:
                    description: >-
                      Access grants this call deleted: `user:<id>`, `team:<id>`,
                      `workspace:<id>` or `public`
                    type: array
                    items:
                      type: string
                  head_version:
                    type: integer
                  shared_version:
                    type: integer
                    nullable: true
                  latest_version_is_shared:
                    type: boolean
                  summary:
                    type: string
                type: object
        '403':
          description: >-
            ARTIFACT_EDIT_FORBIDDEN: the caller can read the artifact but is
            neither its owner nor an artifacts:manage holder
        '404':
          description: ARTIFACT_NOT_FOUND
        '429':
          description: Too many requests
      security:
        - token: []
components:
  securitySchemes:
    token:
      type: http
      bearerFormat: Bearer
      scheme: bearer

````

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