> For the complete documentation index, see [llms.txt](https://docs.iyzico.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.iyzico.com/en/products/paypos-app2app/paypos-app2app-integration/end-session.md).

# End Session

This service allows you to log out by invalidating the Mobile Session Key.

## POST /v1/agent/logout

> Logout

```json
{"openapi":"3.0.3","info":{"title":"PayPOS (Paynet) API","version":"1.0.0"},"tags":[{"name":"Agent"}],"servers":[{"url":"https://api.paynet.com.tr","description":"Production"},{"url":"https://pts-api.paynet.com.tr","description":"Sandbox"}],"paths":{"/v1/agent/logout":{"post":{"summary":"Logout","tags":["Agent"],"parameters":[{"$ref":"#/components/parameters/AuthorizationHeader"},{"$ref":"#/components/parameters/PaynetMobileHeader"},{"$ref":"#/components/parameters/ContentTypeHeader"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"session_key":{"type":"string","description":"Session key"}}}}}},"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"object_name":{"type":"string","description":"Object name"},"code":{"type":"integer","description":"Code"},"message":{"type":"string","description":"Message"}}}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}},"components":{"parameters":{"AuthorizationHeader":{"name":"Authorization","in":"header","required":true,"description":"Dealer-specific generated secret_key. Example: \"Basic sck_xxx\".","schema":{"type":"string"}},"PaynetMobileHeader":{"name":"PaynetMobile","in":"header","required":true,"description":"Indicates a mobile request. Example in the document; 2.","schema":{"type":"string"}},"ContentTypeHeader":{"name":"Content-Type","in":"header","required":true,"description":"Content type.","schema":{"type":"string"}}},"schemas":{"ErrorResponse":{"type":"object","properties":{"object_name":{"type":"string","description":"Object name."},"code":{"type":"integer","description":"Code."},"message":{"type":"string","description":"Message."}}}}}}
```
