MechaMental
Api reference

Users

List Users

GET
/v1/users

Query Parameters

workspace_id*Workspace Id

Workspace ID (required)

search?|

Search by name or email

limit?Limit

Maximum number of items to return (1-200)

Default50
Range1 <= value <= 200
cursor?|

Cursor for pagination (from previous response's next_cursor)

Header Parameters

authorization?string|null

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://loading/v1/users?workspace_id=string"
{
  "total": 0,
  "has_more": false,
  "next_cursor": "string",
  "users": [
    {
      "user_id": "string",
      "email": "[email protected]",
      "username": "string",
      "full_name": "string",
      "auth_provider": "string",
      "is_active": true,
      "is_verified": true,
      "roles": [
        "string"
      ],
      "avatar_url": "string",
      "bio": "string",
      "timezone": "string",
      "locale": "string",
      "preferences": {},
      "settings": {},
      "created_at": "2019-08-24T14:15:22Z",
      "updated_at": "2019-08-24T14:15:22Z",
      "last_login": "2019-08-24T14:15:22Z",
      "default_workspace_id": "string"
    }
  ]
}
{
  "error": "AUTHENTICATION_FAILED",
  "message": "Authentication required",
  "details": {},
  "timestamp": "2025-01-01T00:00:00.000000",
  "status_code": 401
}
{
  "error": "FORBIDDEN",
  "message": "You don't have permission to perform this action",
  "details": {
    "required_permission": "resource:action"
  },
  "timestamp": "2025-01-01T00:00:00.000000",
  "status_code": 403
}
{
  "error": "RESOURCE_NOT_FOUND",
  "message": "The requested resource was not found",
  "details": {
    "resource_type": "example",
    "resource_id": "xxx"
  },
  "timestamp": "2025-01-01T00:00:00.000000",
  "status_code": 404
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string",
      "input": null,
      "ctx": {}
    }
  ]
}
{
  "error": "INTERNAL_SERVER_ERROR",
  "message": "An unexpected error occurred",
  "details": {},
  "timestamp": "2025-01-01T00:00:00.000000",
  "status_code": 500
}

Create User

POST
/v1/users

Header Parameters

authorization?string|null

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://loading/v1/users" \  -H "Content-Type: application/json" \  -d '{    "email": "[email protected]",    "username": "string",    "password": "stringst"  }'
{
  "user_id": "string",
  "email": "[email protected]",
  "username": "string",
  "full_name": "string",
  "auth_provider": "string",
  "is_active": true,
  "is_verified": true,
  "roles": [
    "string"
  ],
  "avatar_url": "string",
  "bio": "string",
  "timezone": "string",
  "locale": "string",
  "preferences": {},
  "settings": {},
  "created_at": "2019-08-24T14:15:22Z",
  "updated_at": "2019-08-24T14:15:22Z",
  "last_login": "2019-08-24T14:15:22Z",
  "default_workspace_id": "string"
}
{
  "error": "AUTHENTICATION_FAILED",
  "message": "Authentication required",
  "details": {},
  "timestamp": "2025-01-01T00:00:00.000000",
  "status_code": 401
}
{
  "error": "FORBIDDEN",
  "message": "You don't have permission to perform this action",
  "details": {
    "required_permission": "resource:action"
  },
  "timestamp": "2025-01-01T00:00:00.000000",
  "status_code": 403
}
{
  "error": "RESOURCE_NOT_FOUND",
  "message": "The requested resource was not found",
  "details": {
    "resource_type": "example",
    "resource_id": "xxx"
  },
  "timestamp": "2025-01-01T00:00:00.000000",
  "status_code": 404
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string",
      "input": null,
      "ctx": {}
    }
  ]
}
{
  "error": "INTERNAL_SERVER_ERROR",
  "message": "An unexpected error occurred",
  "details": {},
  "timestamp": "2025-01-01T00:00:00.000000",
  "status_code": 500
}

Get Current User Profile

GET
/v1/users/me

Header Parameters

authorization?string|null

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://loading/v1/users/me"
{
  "user_id": "string",
  "email": "[email protected]",
  "username": "string",
  "full_name": "string",
  "auth_provider": "string",
  "is_active": true,
  "is_verified": true,
  "roles": [
    "string"
  ],
  "avatar_url": "string",
  "bio": "string",
  "timezone": "string",
  "locale": "string",
  "preferences": {},
  "settings": {},
  "created_at": "2019-08-24T14:15:22Z",
  "updated_at": "2019-08-24T14:15:22Z",
  "last_login": "2019-08-24T14:15:22Z",
  "default_workspace_id": "string"
}
{
  "error": "AUTHENTICATION_FAILED",
  "message": "Authentication required",
  "details": {},
  "timestamp": "2025-01-01T00:00:00.000000",
  "status_code": 401
}
{
  "error": "FORBIDDEN",
  "message": "You don't have permission to perform this action",
  "details": {
    "required_permission": "resource:action"
  },
  "timestamp": "2025-01-01T00:00:00.000000",
  "status_code": 403
}
{
  "error": "RESOURCE_NOT_FOUND",
  "message": "The requested resource was not found",
  "details": {
    "resource_type": "example",
    "resource_id": "xxx"
  },
  "timestamp": "2025-01-01T00:00:00.000000",
  "status_code": 404
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string",
      "input": null,
      "ctx": {}
    }
  ]
}
{
  "error": "INTERNAL_SERVER_ERROR",
  "message": "An unexpected error occurred",
  "details": {},
  "timestamp": "2025-01-01T00:00:00.000000",
  "status_code": 500
}

Get User

GET
/v1/users/{user_id}

Path Parameters

user_id*User Id

Query Parameters

workspace_id?|

Workspace context for permission check

Header Parameters

authorization?string|null

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://loading/v1/users/string"
{
  "user_id": "string",
  "email": "[email protected]",
  "username": "string",
  "full_name": "string",
  "auth_provider": "string",
  "is_active": true,
  "is_verified": true,
  "roles": [
    "string"
  ],
  "avatar_url": "string",
  "bio": "string",
  "timezone": "string",
  "locale": "string",
  "preferences": {},
  "settings": {},
  "created_at": "2019-08-24T14:15:22Z",
  "updated_at": "2019-08-24T14:15:22Z",
  "last_login": "2019-08-24T14:15:22Z",
  "default_workspace_id": "string"
}
{
  "error": "AUTHENTICATION_FAILED",
  "message": "Authentication required",
  "details": {},
  "timestamp": "2025-01-01T00:00:00.000000",
  "status_code": 401
}
{
  "error": "FORBIDDEN",
  "message": "You don't have permission to perform this action",
  "details": {
    "required_permission": "resource:action"
  },
  "timestamp": "2025-01-01T00:00:00.000000",
  "status_code": 403
}
{
  "error": "RESOURCE_NOT_FOUND",
  "message": "The requested resource was not found",
  "details": {
    "resource_type": "example",
    "resource_id": "xxx"
  },
  "timestamp": "2025-01-01T00:00:00.000000",
  "status_code": 404
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string",
      "input": null,
      "ctx": {}
    }
  ]
}
{
  "error": "INTERNAL_SERVER_ERROR",
  "message": "An unexpected error occurred",
  "details": {},
  "timestamp": "2025-01-01T00:00:00.000000",
  "status_code": 500
}

Delete User

DELETE
/v1/users/{user_id}

Path Parameters

user_id*User Id

Header Parameters

authorization?string|null

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X DELETE "https://loading/v1/users/string"
Empty
{
  "error": "AUTHENTICATION_FAILED",
  "message": "Authentication required",
  "details": {},
  "timestamp": "2025-01-01T00:00:00.000000",
  "status_code": 401
}
{
  "error": "FORBIDDEN",
  "message": "You don't have permission to perform this action",
  "details": {
    "required_permission": "resource:action"
  },
  "timestamp": "2025-01-01T00:00:00.000000",
  "status_code": 403
}
{
  "error": "RESOURCE_NOT_FOUND",
  "message": "The requested resource was not found",
  "details": {
    "resource_type": "example",
    "resource_id": "xxx"
  },
  "timestamp": "2025-01-01T00:00:00.000000",
  "status_code": 404
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string",
      "input": null,
      "ctx": {}
    }
  ]
}
{
  "error": "INTERNAL_SERVER_ERROR",
  "message": "An unexpected error occurred",
  "details": {},
  "timestamp": "2025-01-01T00:00:00.000000",
  "status_code": 500
}

Update User

PUT
/v1/users/{user_id}

Path Parameters

user_id*User Id

Header Parameters

authorization?string|null

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X PUT "https://loading/v1/users/string" \  -H "Content-Type: application/json" \  -d '{}'
{
  "user_id": "string",
  "email": "[email protected]",
  "username": "string",
  "full_name": "string",
  "auth_provider": "string",
  "is_active": true,
  "is_verified": true,
  "roles": [
    "string"
  ],
  "avatar_url": "string",
  "bio": "string",
  "timezone": "string",
  "locale": "string",
  "preferences": {},
  "settings": {},
  "created_at": "2019-08-24T14:15:22Z",
  "updated_at": "2019-08-24T14:15:22Z",
  "last_login": "2019-08-24T14:15:22Z",
  "default_workspace_id": "string"
}
{
  "error": "AUTHENTICATION_FAILED",
  "message": "Authentication required",
  "details": {},
  "timestamp": "2025-01-01T00:00:00.000000",
  "status_code": 401
}
{
  "error": "FORBIDDEN",
  "message": "You don't have permission to perform this action",
  "details": {
    "required_permission": "resource:action"
  },
  "timestamp": "2025-01-01T00:00:00.000000",
  "status_code": 403
}
{
  "error": "RESOURCE_NOT_FOUND",
  "message": "The requested resource was not found",
  "details": {
    "resource_type": "example",
    "resource_id": "xxx"
  },
  "timestamp": "2025-01-01T00:00:00.000000",
  "status_code": 404
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string",
      "input": null,
      "ctx": {}
    }
  ]
}
{
  "error": "INTERNAL_SERVER_ERROR",
  "message": "An unexpected error occurred",
  "details": {},
  "timestamp": "2025-01-01T00:00:00.000000",
  "status_code": 500
}

Update My Preferences

PATCH
/v1/users/me/preferences

Header Parameters

authorization?string|null

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X PATCH "https://loading/v1/users/me/preferences" \  -H "Content-Type: application/json" \  -d '{    "preferences": {}  }'
{
  "user_id": "string",
  "email": "[email protected]",
  "username": "string",
  "full_name": "string",
  "auth_provider": "string",
  "is_active": true,
  "is_verified": true,
  "roles": [
    "string"
  ],
  "avatar_url": "string",
  "bio": "string",
  "timezone": "string",
  "locale": "string",
  "preferences": {},
  "settings": {},
  "created_at": "2019-08-24T14:15:22Z",
  "updated_at": "2019-08-24T14:15:22Z",
  "last_login": "2019-08-24T14:15:22Z",
  "default_workspace_id": "string"
}
{
  "error": "AUTHENTICATION_FAILED",
  "message": "Authentication required",
  "details": {},
  "timestamp": "2025-01-01T00:00:00.000000",
  "status_code": 401
}
{
  "error": "FORBIDDEN",
  "message": "You don't have permission to perform this action",
  "details": {
    "required_permission": "resource:action"
  },
  "timestamp": "2025-01-01T00:00:00.000000",
  "status_code": 403
}
{
  "error": "RESOURCE_NOT_FOUND",
  "message": "The requested resource was not found",
  "details": {
    "resource_type": "example",
    "resource_id": "xxx"
  },
  "timestamp": "2025-01-01T00:00:00.000000",
  "status_code": 404
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string",
      "input": null,
      "ctx": {}
    }
  ]
}
{
  "error": "INTERNAL_SERVER_ERROR",
  "message": "An unexpected error occurred",
  "details": {},
  "timestamp": "2025-01-01T00:00:00.000000",
  "status_code": 500
}