1. Profile
Treek-Public
  • Authentication
    • User login with email and password
      POST
  • Orders
    • Create Order
      POST
    • List Orders
      GET
    • Order Details
      GET
    • Update Order
      PUT
    • Cancel Order
      POST
    • Reset Order
      POST
    • Get Statuses
      GET
    • Verify Item
      POST
    • Verify Order
      POST
    • Order Price
      GET
  • Shipments
    • Create Shipment
      POST
    • Return Shipment
      POST
    • Print Invoice
      GET
  • Boxes
    • Create Box
      POST
    • Get Boxes
      GET
    • Box Details
      GET
    • Update Box
      PUT
  • Merchants
    • Merchants Details
      GET
  • Profile
    • User Details
      GET
    • Update User
      PUT
    • Change Password
      PUT
  • Utilities
    • Countries List
      GET
    • Cities List
      GET
    • Couriers List
      GET
  • Warehouses
    • Warehouses List
    • Create warehouse
    • warehouse Details
  • Price Calculator
    • Price Calculator
  • Packaging Type
    • Packaging Types List
    • Packaging Type Details
  • statistics
    • Statistics
  • Schemas
    • LoginRequest
    • CreateOrderRequest
    • UpdateOrderRequest
    • Price Calculator
    • VerifyItem
    • CreateWarehouseRequest
    • Shipment Package
    • Create Reverse Shipment
    • OrderPackages
    • OrderItem
    • Order
    • City
    • Country
    • User
    • OrderItem
    • CreateOrderItemRequest
    • CalculateRatesRequest
    • BoxDimensions
    • OrderShippingRate
    • RateCalculationParams
    • Warehouse
    • Box
    • CreateBoxRequest
    • UpdateBoxRequest
    • ValidationError
    • NotFoundError
    • UnauthorizedError
    • ForbiddenError
    • PaginationMeta
    • PaginationLinks
  1. Profile

Change Password

PUT
https://app.gotreek.com/api/profile/password
Profile
Last modified:2025-12-22 11:57:54
💡
Authentication
Bearer token authentication is required.
The password is changed only for the currently authenticated user; no user ID can be provided in the request.
💡
Behavior
The endpoint checks that the user is authenticated; otherwise it returns an authentication error.
It verifies the current password before updating to the new one, and returns an error if the current password is incorrect.
On success, the password is updated securely and no password details are exposed in the response.

Request

Authorization
OAuth 2.0
Client Credentials
Add the parameter
Authorization
to Headers
,whose value is to concatenate the Token after the Bearer.
Example:
Authorization: Bearer ********************
Token URL: https://app.gotreek.com/api/auth/login
or
Header Params

Body Params application/jsonRequired

Examples

Responses

🟢200
application/json
Password changed successfully
Body

🟠400
🟠401
🟠422
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request PUT 'https://app.gotreek.com/api/profile/password' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data-raw '{
    "current_password": "current_password123",
    "new_password": "new_secure_password123",
    "new_password_confirmation": "new_secure_password123"
}'
Response Response Example
200 - Example 1
{
    "success": true,
    "message": "Password changed successfully"
}
Modified at 2025-12-22 11:57:54
Previous
Update User
Next
Countries List
Built with