{
 "openapi": "3.1.0",
 "info": {
  "title": "Service Accounts (Platform)",
  "version": "20261030b",
  "description": "Identities for software. They hold roles like a person but cannot sign in to the console and are never asked for a second step: a secret, shown once, is exchanged for a short-lived token."
 },
 "servers": [
  {
   "url": "https://{tenant}.tranxact.ai",
   "variables": {
    "tenant": {
     "default": "demo"
    }
   }
  }
 ],
 "components": {
  "securitySchemes": {
   "bearer": {
    "type": "http",
    "scheme": "bearer"
   }
  },
  "schemas": {}
 },
 "security": [
  {
   "bearer": []
  }
 ],
 "paths": {
  "/api/platform/service-accounts": {
   "get": {
    "summary": "Read service accounts",
    "operationId": "action_service_accounts_0_4",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "post": {
    "summary": "Post service accounts",
    "operationId": "action_service_accounts_1_4",
    "description": "Body keys: roles, email, name, description, tokenMinutes, allowedIps, expiresAt",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/platform/service-accounts/{id}": {
   "put": {
    "summary": "Put service accounts",
    "operationId": "action_service_accounts_0_5",
    "description": "Body keys: roles, description, allowedIps, tokenMinutes, expiresAt, name, active",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "delete": {
    "summary": "Delete service accounts",
    "operationId": "action_service_accounts_1_5",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/platform/service-accounts/{id}/rotate": {
   "post": {
    "summary": "Rotate",
    "operationId": "action_service_accounts_0_6",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/platform/service-accounts/{id}/revoke": {
   "post": {
    "summary": "Revoke",
    "operationId": "action_service_accounts_0_6",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  }
 }
}