MechaMental
Api reference

Admin

Check Admin Access

GET
/v1/admin/access

Query Parameters

organization_id*Organization Id

Organization ID to check admin access for

Header Parameters

authorization?string|null

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://loading/v1/admin/access?organization_id=string"
{
  "has_access": true,
  "user_id": "string",
  "organization_id": "string",
  "role": "string",
  "message": "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
}
{
  "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
}

Cleanup Old Tokens

POST
/v1/admin/cleanup-tokens

Header Parameters

authorization?string|null

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://loading/v1/admin/cleanup-tokens"
null
{
  "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
}
{
  "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
}

Check Platform Org Status

GET
/v1/admin/platform-status

Header Parameters

authorization?string|null

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://loading/v1/admin/platform-status"
{
  "is_platform_org": true
}
{
  "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
}
{
  "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
}

List All Platform Users

GET
/v1/admin/platform/users

Query Parameters

limit?Limit
Default50
Range1 <= value <= 200

Header Parameters

authorization?string|null

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://loading/v1/admin/platform/users"
null
{
  "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
}
{
  "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
}

List All Platform Organizations

GET
/v1/admin/platform/organizations

Query Parameters

limit?Limit
Default50
Range1 <= value <= 200

Header Parameters

authorization?string|null

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://loading/v1/admin/platform/organizations"
null
{
  "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
}
{
  "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
}

List All Platform Workspaces

GET
/v1/admin/platform/workspaces

Query Parameters

limit?Limit
Default50
Range1 <= value <= 200

Header Parameters

authorization?string|null

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://loading/v1/admin/platform/workspaces"
null
{
  "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
}
{
  "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
}