# Why camundaClient.newCompleteUserTaskCommand is requesting /v2/user-tasks/:taskId/completion

**URL:** <https://forum.camunda.io/t/why-camundaclient-newcompleteusertaskcommand-is-requesting-v2-user-tasks-taskid-completion/64740>\
**Category:** Discussion & Questions\
**Created:** [September 22, 2025, 12:28pm UTC](https://forum.camunda.io/t/why-camundaclient-newcompleteusertaskcommand-is-requesting-v2-user-tasks-taskid-completion/64740 "2025-09-22T12:28:27Z")\
**Posts on this page:** 1\
**Showing post:** 2

<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:** [September 22, 2025, 12:29pm UTC](https://forum.camunda.io/t/why-camundaclient-newcompleteusertaskcommand-is-requesting-v2-user-tasks-taskid-completion/64740/2 "2025-09-22T12:29:33Z")

</div>

Hi there! 👋

Great question about the API endpoint behavior. Let me clarify what’s happening here.

## Why `/v2/user-tasks` instead of `/v1/tasks`?

The `camundaClient.newCompleteUserTaskCommand` is correctly using the **Camunda 8 REST API v2** endpoint (`/v2/user-tasks/:taskId/completion`). This is the expected behavior for Camunda 8.9, and here’s why:

### API Evolution in Camunda 8

- **v2 API** (`/v2/user-tasks`) is the current standard for Camunda/Zeebe user tasks lifecycle operations (assign, unassign, update, complete)
- **v1 API** (`/v1/tasks`) is the legacy Tasklist API that’s been deprecated since 8.8 and is scheduled for removal in 8.10

### Key Differences:

- **v2** : For Camunda user tasks (modeled as Camunda/Zeebe User Task elements)
- **v1** : For legacy job worker-based user tasks

## The Real Issue: 503 Service Unavailable

The problem isn’t the endpoint choice - it’s the 503 error indicating a connection issue with the brokers. This typically means:

1. **Gateway-to-Broker routing problem** - The gateway can’t deliver the request to a broker/partition
2. **Partition awareness issue** - The gateway isn’t aware of the partition where your task resides
3. **Configuration mismatch** - Incorrect addresses or context paths

## Troubleshooting Steps:

### 1. Check Gateway/Broker Health

```bash
# Check logs for partition/connection errors
docker logs <zeebe-broker>
docker logs <zeebe-gateway>

# Health check
curl http://localhost:9600/actuator/health

```

### 2. Verify Configuration

Make sure your Spring Boot configuration is correct:

```yaml
camunda:
  client:
    mode: self-managed
    zeebe:
      rest-address: http://{gateway-host}:{gateway-rest-port}
      # Include context path if configured (e.g., /zeebe)

```

### 3. Common Fixes:

- **Restart the gateway** if it lost partition awareness
- **Include context path** in rest-address if your gateway is configured with one
- **Ensure version compatibility** between your client (8.9.0-SNAPSHOT) and cluster
- **Check port configuration** - Use gateway’s REST port (typically 8080), not Tasklist port (8082)

## References:

- [Migration Guide: Camunda User Tasks](https://docs.camunda.io/docs/apis-tools/migration-manuals/migrate-to-camunda-user-tasks/#how-tasklist-api-v1-compares-to-camunda-8-api-v2)
- [Similar 503 issues in the forum](https://forum.camunda.io/t/63939)

The endpoint choice is correct - focus on resolving the broker connectivity issue. Let me know if you need help with any specific configuration details!

---

_[View the full topic](https://forum.camunda.io/t/why-camundaclient-newcompleteusertaskcommand-is-requesting-v2-user-tasks-taskid-completion/64740)._
