# Process Definition Deletion with an API

**URL:** <https://forum.camunda.io/t/process-definition-deletion-with-an-api/65404>\
**Category:** Camunda 8 Topics\
**Created:** [October 22, 2025, 1:28pm UTC](https://forum.camunda.io/t/process-definition-deletion-with-an-api/65404 "2025-10-22T13:28:33Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![pepe](https://forum.camunda.io/letter_avatar_proxy/v4/letter/p/4da419/32.png) [@pepe](https://forum.camunda.io/u/pepe)\
**Post date:** [October 22, 2025, 1:28pm UTC](https://forum.camunda.io/t/process-definition-deletion-with-an-api/65404/1 "2025-10-22T13:28:33Z")

</div>

Hi,

I’m using camunda 8.8 and I’m trying to delete process definitions using the API but failing.

I have a process definition with no active instances, I send a POST request to  
`/v2/resources/${resourceKey}/deletion` where the resourceKey is the processDefinitionKey.

The request returns 200, re-running the requests rends 404 not found,

yet when calling `/v2/process-definitions/search` the process definition’s key is still there. More importantly it shows in Operate UI and (after the step with calling resource deletion on it) it is not getting deleted when performing the deletion in the UI.

Is it expected behaviour? Could you tell me whether it is possible to make a process definition disapper from UI by calling an API?

Thx,

Pepe

---

<div class="post-metadata">

**Author:** ![zee-bot](https://forum.camunda.io/user_avatar/forum.camunda.io/zee-bot/32/32886_2.png) [@zee-bot](https://forum.camunda.io/u/zee-bot)\
**Post date:** [October 23, 2025, 1:29pm UTC](https://forum.camunda.io/t/process-definition-deletion-with-an-api/65404/2 "2025-10-23T13:29:25Z")

</div>

Hi @pepe,

This is actually **expected behavior** in Camunda 8.8. What you’re experiencing is a known limitation with resource deletion via the REST API.

## What’s happening:

When you delete a process definition using the `/v2/resources/${resourceKey}/deletion` endpoint:

1. ✅ The API returns 200 (success) - this is correct
2. ✅ The resource is actually deleted from Zeebe’s state
3. ❌ **But** the process definition still appears in `/v2/process-definitions/search` and Operate UI

## Why this happens:

Resource deletions are currently **not immediately reflected in secondary storage** (Elasticsearch, which backs Operate and Tasklist). This means:

- The process definition is truly deleted from Zeebe
- But it still appears in Operate UI and search results
- If you try to start a new instance of this “deleted” process, you’ll get an error (confirming it’s actually gone)

This is documented in the [Resource deletion concept](https://docs.camunda.io/docs/components/concepts/resource-deletion/):

> Resource deletions are currently not reflected in secondary storage. As a result you still see the deleted resources in Operate and Tasklist. The resource does not actually exist. Starting an instance of the resource will yield an error.

## Current limitations:

- There’s no immediate workaround to force removal from Operate UI after API deletion
- The UI deletion might also be affected after using the API deletion (as you observed)

## Verification:

To confirm the deletion worked, try creating a new process instance with that process definition key - it should fail with an error.

This is a known limitation rather than a bug. The process definition is successfully deleted from the engine, but the UI synchronization is delayed.

Hope this clarifies the behavior you’re seeing!

---

<div class="post-metadata">

**Author:** ![system](https://forum.camunda.io/uploads/default/original/3X/5/8/58d50142eacca605d35cb1ef9e6b86ae85f49436.png) [@system](https://forum.camunda.io/u/system)\
**Post date:** [January 21, 2026, 1:29pm UTC](https://forum.camunda.io/t/process-definition-deletion-with-an-api/65404/3 "2026-01-21T13:29:57Z")

</div>

Closed on January 21, 2026, 1:29pm UTC

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
