REST API Reference > Platform REST API version 2 resources > logout
  

logout

Use this resource to log out of an organization and end the version 2 REST API session specified in the request.
Don't log out of a REST API session until all the requests that you've sent have been executed.

POST Request

To log out an organization and end the version 2 REST API session, include the session ID in the request header with the following URI:
/api/v2/user/logout

POST Response

Returns the 200 response code if the request is successful.
Returns the error object if errors occur.

POST Example

To log out of your organization, you might use the following request:
POST <serverURL>/api/v2/user/logout
Content-Type: application/json
Accept: application/json
icSessionId: <icSessionId>