---
title: Logout
slug: single-connect-api-3-0-3/logout
description: Learn how to make a flawless POST request using the curl command with this comprehensive code example. This document covers the essential steps, including specifying the URL, adding headers, and providing raw data, ensuring optimal performance and accurac
docTags: 
createdAt: 2022-11-10T14:21:49.000Z
---

{
  "id": "bHBoPTXFEWvloyhbwplXk",
  "data": {
    "url": "{{url}}/aioc-rest-web/rest/logout",
    "method": "POST",
    "request": {
      "pathParameters": [],
      "queryParameters": [],
      "headerParameters": [
        {
          "name": "Content-Type",
          "type": "string",
          "example": "application/json",
          "description": ""
        },
        {
          "name": "X-XSRF-TOKEN",
          "type": "string",
          "example": "{{csrftoken}}",
          "description": ""
        }
      ],
      "bodyDataParameters": [
        {
          "name": "body",
          "type": "string",
          "example": "",
          "description": ""
        }
      ],
      "formDataParameters": []
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "",
        "jsonExample": ""
      }
    ],
    "contentType": "application/json",
    "description": "This method provides the current logged in user to logouts from Single Connect.",
    "examples": {
      "languages": [
        {
          "id": "LP-yVyqlkpduFNOmkloHs",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request POST \\\n     --url {{url}}/aioc-rest-web/rest/logout \\\n     --header 'accept: application/json'"
        },
        {
          "id": "oEiXgKUOSHqh3NTDdoecv",
          "language": "javascript",
          "label": "javascript",
          "code": "var myHeaders = new Headers();\nmyHeaders.append(\"accept\", \"application/json\");\n\nvar requestOptions = {\n   method: 'POST',\n   headers: myHeaders,\n   redirect: 'follow'\n};\n\nfetch(\"{{url}}/aioc-rest-web/rest/logout\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "mRQzk6o96lozFcMsEepMO",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"net/http\"\n\nurl = URI(\"{{url}}/aioc-rest-web/rest/logout\")\n\nhttp = Net::HTTP.new(url.host, url.port);\nrequest = Net::HTTP::Post.new(url)\nrequest[\"accept\"] = \"application/json\"\n\nresponse = http.request(request)\nputs response.read_body\n"
        },
        {
          "id": "GW4FNJWejFjvFxoRLJx_L",
          "language": "python",
          "label": "Python",
          "code": "import requests\n\nurl = \"{{url}}/aioc-rest-web/rest/logout\"\n\npayload = {}\nheaders = {\n   'accept': 'application/json'\n}\n\nresponse = requests.request(\"POST\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "LP-yVyqlkpduFNOmkloHs"
    },
    "results": {
      "languages": [
        {
          "id": "VK7KN_KuOdC5mTXWTQdVx",
          "language": "200",
          "code": ""
        }
      ],
      "selectedLanguageId": "VK7KN_KuOdC5mTXWTQdVx"
    }
  },
  "type": "api-oas-v2",
  "children": [
    {
      "text": ""
    }
  ]
}