# Protect one Route of Service

**URL:** <https://discuss.konghq.com/t/protect-one-route-of-service/4934>\
**Category:** Questions\
**Created:** [November 16, 2019, 9:35pm UTC](https://discuss.konghq.com/t/protect-one-route-of-service/4934 "2019-11-16T21:35:19Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![volbrene](https://avatars.discourse-cdn.com/v4/letter/v/c5a1d2/32.png) [@volbrene](https://discuss.konghq.com/u/volbrene)\
**Post date:** [November 16, 2019, 9:35pm UTC](https://discuss.konghq.com/t/protect-one-route-of-service/4934/1 "2019-11-16T21:35:19Z")

</div>

Hello, I would like to protect one route of my Service with a api key.

My Service has Endpoints like GET /posts POST /posts and so on. I Would only like to protect POST /posts. Is this possible? What is best practice to structure my service in kong?

---

<div class="post-metadata">

**Author:** ![narate](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.konghq.com/narate/32/1778_2.png) [@narate](https://discuss.konghq.com/u/narate)\
**Post date:** [November 18, 2019, 3:13am UTC](https://discuss.konghq.com/t/protect-one-route-of-service/4934/2 "2019-11-18T03:13:05Z")

</div>

Hello @volbrene

I tested with `httpbin.org` for example service

First, add service, Then add 2 routes

1. GET-anything

- paths : /anything
- methods: GET

1. POST-anything

- paths : /anything
- methods: POST

Now you have 2 routes for GET, POST at the same endpoint

Then you can enable the plugin per route

* * *

_Kong service/routes_

```auto
{
  "next": null,
  "data": [
    {
      "id": "14e4ee6e-a27c-4617-9842-37fb72f6010c",
      "tags": null,
      "updated_at": 1574046258,
      "destinations": null,
      "headers": null,
      "protocols": [
        "http",
        "https"
      ],
      "created_at": 1574046258,
      "snis": null,
      "service": {
        "id": "ec5a9133-1234-4366-84a1-081d6db793d9"
      },
      "name": "GET-anything",
      "preserve_host": false,
      "regex_priority": 0,
      "strip_path": false,
      "sources": null,
      "paths": [
        "/anything"
      ],
      "https_redirect_status_code": 426,
      "hosts": null,
      "methods": [
        "GET"
      ]
    },
    {
      "id": "f805fe41-d4a7-4f69-b9a6-d6624cee8c89",
      "tags": null,
      "updated_at": 1574046295,
      "destinations": null,
      "headers": null,
      "protocols": [
        "http",
        "https"
      ],
      "created_at": 1574046295,
      "snis": null,
      "service": {
        "id": "ec5a9133-1234-4366-84a1-081d6db793d9"
      },
      "name": "POST-anything",
      "preserve_host": false,
      "regex_priority": 0,
      "strip_path": false,
      "sources": null,
      "paths": [
        "/anything"
      ],
      "https_redirect_status_code": 426,
      "hosts": null,
      "methods": [
        "POST"
      ]
    }
  ]
}

```
