# Kong 3.3.1 \`targets\` endpoint returns 405 to PUT

**URL:** <https://discuss.konghq.com/t/kong-3-3-1-targets-endpoint-returns-405-to-put/13590>\
**Category:** Questions\
**Tags:** kong-gateway\
**Created:** [July 2, 2025, 1:54pm UTC](https://discuss.konghq.com/t/kong-3-3-1-targets-endpoint-returns-405-to-put/13590 "2025-07-02T13:54:29Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jgrammen-agilitypr](https://avatars.discourse-cdn.com/v4/letter/j/da6949/32.png) [@jgrammen-agilitypr](https://discuss.konghq.com/u/jgrammen-agilitypr)\
**Post date:** [July 2, 2025, 1:54pm UTC](https://discuss.konghq.com/t/kong-3-3-1-targets-endpoint-returns-405-to-put/13590/1 "2025-07-02T13:54:29Z")

</div>

Hello,

we recently upgraded to kong 3.3.1 and are having an issue with changing the weight of targets. Previously your could POST to the /targets endpoint with an updated weight. this now returns and error `unique constraint violation`. I found the following documentation indicating that a change to the endpoint was made:

> **[Kong Gateway changelog - Kong Gateway | Kong Docs](https://developer.konghq.com/gateway/changelog/#3-0-0-0-breaking-change-admin-api)**
>
> Changelog for supported Kong Gateway Enterprise versions.

```auto
POST requests on /targets endpoints are no longer able to update existing entities. They are only able to create new ones.#8596, #8798. If you have scripts that use POST requests to modify /targets, change them to PUT requests to the appropriate endpoints before updating to Kong Gateway 3.0.

```

Which seems to indicate that I should now be using the PUT method. Attempting to use PUT results in the following:

```auto
10.xx.xx.xx - - [02/Jul/2025:09:37:25 -0400] "PUT /upstreams/my-service/targets HTTP/1.1" 405 32 "-" "curl/7.81.0"

```

full request

```auto
 curl --location --request PUT 'hostname.internal:8001/upstreams/my-service/targets' --header 'Content-Type: application/json' --data-raw '{"target": "hostname.internal:3000","weight": 0 }'

```

with response

```auto
{"message":"Method not allowed"}

```

Based on the documentation the PUT method should work to update the weight of a target, but instead I just get a 405.
