# Log out API

## **Logout API**

The Logout API allows users to securely log out from their accounts on the Majarat e-commerce platform. When users log out, their active session is terminated, ensuring that unauthorized access to their account is prevented.

<figure><img src="https://3686328336-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fd1Iq7THDAagTQzeC9rTN%2Fuploads%2FrJlVc558McBChJSTPQpl%2F8ae0438d-db7d-416b-9f48-5fea42865684.jpg?alt=media&#x26;token=c8c5ae53-02e5-4b67-a644-710a212ca9d4" alt=""><figcaption><p><strong>Log out screen</strong></p></figcaption></figure>

### **Endpoint**

* `{{baseurl}}/api/v1/customer/logout`

### **Method**

* **GET**

### **Authorization**&#x20;

The API requires a valid authentication token to be included in the request header for successful logout. Users must provide their bearer token in the "Authorization" header to log out securely.

### **Response Format**&#x20;

The API responds with a JSON object indicating the status of the logout request. It may include a success message or an appropriate status code.

Example Response:

```json
{
    "status": true,
    "message": "Successfully logout",
    "data": []
}
```

### **Features**

* The Logout API enables users to terminate their active session on the Majarat e-commerce platform, ensuring enhanced security and preventing unauthorized access to their accounts.
* By requiring an authentication token, the API ensures that only authenticated users can successfully log out from their accounts.

### **Usage**

* Users can trigger the Logout API when they want to log out from their Majarat account.
* This API is typically utilized in conjunction with the login and authentication process to provide users with a complete and secure session management experience.
