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

# Unpublish Artifact

> Take down an artifact's public page without deleting the artifact.

## `DELETE /v1/artifacts/{id}/publish`

Soft-unpublishes the public page for an artifact. The page URL stops resolving immediately. The underlying artifact is not deleted and remains accessible through the API.

This endpoint is idempotent: calling it on an already-unpublished artifact is a no-op and returns the same `page_id`.

## Authentication

Requires a Bearer token. See [Authentication](/authentication).

## Path parameters

| Parameter | Type   | Description                                                                                                                                             |
| --------- | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `id`      | string | Artifact ID (`art_...`) **or** page slug (`pg_...`). Both resolve within the caller's tenant — the public slug never authorizes cross-tenant mutations. |

## Request body

None.

## Response

```json theme={null}
{
  "page_id": "pg_aB3xK9mP1qR5sT2u",
  "unpublished": true
}
```

| Field         | Type    | Description                                |
| ------------- | ------- | ------------------------------------------ |
| `page_id`     | string  | The slug of the page that was unpublished. |
| `unpublished` | boolean | Always `true`.                             |

## Error codes

| Code                 | Status | When                                                                          |
| -------------------- | ------ | ----------------------------------------------------------------------------- |
| `artifact_not_found` | 404    | No published page found for the given artifact ID or slug within this tenant. |

## Notes

* **Artifact is preserved**: Only the public page is taken down. The artifact bytes and metadata remain accessible to authenticated callers via `GET /v1/artifacts/{id}`.
* **Artifact deletion auto-unpublishes**: Calling `DELETE /v1/artifacts/{id}` unpublishes any live page before tombstoning the artifact, so a separate unpublish call is not required before deleting.
* **Re-publish**: Calling `POST /v1/artifacts/{id}/publish` after unpublish creates a new page with the same `page_id` and URL.

## Example

```bash theme={null}
# By artifact ID
curl -X DELETE https://api.artifacta.io/v1/artifacts/art_abc123/publish \
  -H "Authorization: Bearer ak_live_..."

# By page slug
curl -X DELETE https://api.artifacta.io/v1/artifacts/pg_aB3xK9mP1qR5sT2u/publish \
  -H "Authorization: Bearer ak_live_..."
```
