{
    "openapi":"3.0.1",
    "info":{
        "title":"Construction and Engineering Lobby REST API",
        "version":"2026.01.28",
        "description":"The Construction and Engineering Lobby REST API provides a flexible interface to functionality in the Lobby.",
        "x-summary":"The Construction and Engineering Lobby REST API provides a flexible interface to functionality in the Lobby."
    },
    "servers":[
        {
            "url":"/api"
        }
    ],
    "tags":[
        {
            "name":"User API - Public",
            "description":"The User service enables you to to create a Lobby account and optionally Aconex accounts."
        }
    ],
    "paths":{
        "/user":{
            "post":{
                "tags":[
                    "User API - Public"
                ],
                "summary":"Create a user account",
                "description":"Create a new Lobby user account.  Additionally, can create and link Aconex accounts to the new Lobby account.",
                "operationId":"createUser",
                "requestBody":{
                    "content":{
                        "application/json":{
                            "schema":{
                                "$ref":"#/components/schemas/CreateUserRequest"
                            }
                        }
                    }
                },
                "responses":{
                    "200":{
                        "description":"Successful Operation.",
                        "content":{
                            "application/json":{
                                "schema":{
                                    "$ref":"#/components/schemas/CreateUserResponse"
                                }
                            }
                        }
                    },
                    "401":{
                        "description":"You do not have privileges to perform this action."
                    },
                    "400":{
                        "description":"One or more required fields are missing."
                    },
                    "500":{
                        "description":"Unable to create user."
                    }
                },
                "x-internal-id":"user-post",
                "x-filename-id":"user-post"
            },
            "patch":{
                "tags":[
                    "User API - Public"
                ],
                "summary":"Create a new Aconex profile",
                "description":"Create a new Aconex profile and link to existing Lobby account.",
                "operationId":"patchUser",
                "requestBody":{
                    "content":{
                        "application/json":{
                            "schema":{
                                "$ref":"#/components/schemas/PatchUserRequest"
                            }
                        }
                    }
                },
                "responses":{
                    "200":{
                        "description":"Successful Operation.",
                        "content":{
                            "application/json":{
                                "schema":{
                                    "$ref":"#/components/schemas/CreateUserResponse"
                                }
                            }
                        }
                    },
                    "401":{
                        "description":"You do not have privileges to perform this action."
                    },
                    "400":{
                        "description":"One or more required fields are missing."
                    },
                    "500":{
                        "description":"Unable to create Aconex profile."
                    }
                },
                "x-internal-id":"user-patch",
                "x-filename-id":"user-patch"
            }
        },
        "/user/organizations":{
            "get":{
                "tags":[
                    "User API - Public"
                ],
                "summary":"Get my organizations",
                "description":"Returns a list of organizations the requested user has Lobby Admin access to.",
                "operationId":"getOrgsForWhichUserIsAdmin",
                "requestBody":{
                    "content":{
                        "application/json":{
                            "schema":{
                                "$ref":"#/components/schemas/LobbyRequestContext"
                            }
                        }
                    }
                },
                "responses":{
                    "500":{
                        "description":"An unexpected error occurred."
                    },
                    "200":{
                        "description":"Successful Operation.",
                        "content":{
                            "application/json":{
                                "schema":{
                                    "$ref":"#/components/schemas/OrganizationDetails"
                                }
                            }
                        }
                    }
                },
                "x-internal-id":"user-organizations-get",
                "x-filename-id":"user-organizations-get"
            }
        },
        "/user/appinstance":{
            "get":{
                "tags":[
                    "User API - Public"
                ],
                "summary":"Get my application instances",
                "description":"Returns a of list of application instances the requested user have access to.",
                "operationId":"getUserAppInstances",
                "requestBody":{
                    "content":{
                        "application/json":{
                            "schema":{
                                "$ref":"#/components/schemas/LobbyRequestContext"
                            }
                        }
                    }
                },
                "responses":{
                    "500":{
                        "description":"An unexpected error occurred."
                    },
                    "200":{
                        "description":"Successful Operation.",
                        "content":{
                            "application/json":{
                                "schema":{
                                    "$ref":"#/components/schemas/UserAppInstanceResponse"
                                }
                            }
                        }
                    }
                },
                "x-internal-id":"user-appinstance-get",
                "x-filename-id":"user-appinstance-get"
            }
        }
    },
    "components":{
        "schemas":{
            "CreateAconexUserResponse":{
                "type":"object",
                "properties":{
                    "accountLinked":{
                        "type":"boolean",
                        "description":"Denotes if the Aconex account was linked to the Lobby account.",
                        "format":"boolean"
                    },
                    "appInstanceId":{
                        "type":"integer",
                        "description":"The application instance where the linked Aconex account resides.",
                        "format":"int64"
                    },
                    "aconexOrganizationId":{
                        "type":"integer",
                        "description":"The organization id of the Aconex organization.",
                        "format":"int64"
                    },
                    "userId":{
                        "type":"string",
                        "description":"The unique identifier for the Aconex user account.",
                        "format":"string"
                    },
                    "userName":{
                        "type":"string",
                        "description":"The username for the newly create Aconex user account.",
                        "format":"string"
                    },
                    "location":{
                        "type":"string",
                        "description":"The city, state, and country of the lobby organization.",
                        "format":"String"
                    },
                    "region":{
                        "type":"string",
                        "description":"The name of the region the application instance belongs.",
                        "format":"String"
                    },
                    "projectIds":{
                        "type":"array",
                        "description":"The list of Aconex projects each new aconex user account is invited to.",
                        "format":"Array",
                        "items":{
                            "type":"string",
                            "description":"The list of Aconex projects each new aconex user account is invited to.",
                            "format":"Array"
                        }
                    },
                    "errorDescription":{
                        "type":"string",
                        "description":"Will display any issues that occurred during the user creation process.",
                        "format":"string"
                    },
                    "hasLinkedAccounts":{
                        "type":"boolean",
                        "description":"Denotes if there are any linked accounts from the organization for the requested user.",
                        "format":"boolean"
                    },
                    "communicationEmail":{
                        "type":"string",
                        "description":"The email will be used to send emails from Lobby and Aconex.",
                        "format":"String"
                    }
                },
                "description":"The fields for the newly created Aconex profile."
            },
            "CreateLobbyUserResponse":{
                "type":"object",
                "properties":{
                    "firstName":{
                        "type":"string",
                        "description":"The first name for the newly created Lobby user account.",
                        "format":"String"
                    },
                    "middleName":{
                        "type":"string",
                        "description":"The middle name for the newly created Lobby user account.",
                        "format":"String"
                    },
                    "lastName":{
                        "type":"string",
                        "description":"The last name for the newly created Lobby user account.",
                        "format":"String"
                    },
                    "emailAddress":{
                        "type":"string",
                        "description":"The email address for the newly created Lobby user account. This is also the Lobby username.",
                        "format":"String"
                    },
                    "displayName":{
                        "type":"string",
                        "description":"The first, middle, and last name for the newly created Lobby user account.",
                        "format":"String"
                    },
                    "organizationId":{
                        "type":"integer",
                        "description":"The Lobby organization where the newly created Lobby user account exists.",
                        "format":"int64"
                    },
                    "emailForCommunication":{
                        "type":"string",
                        "description":"The email will be used to send emails from Lobby and Aconex.",
                        "format":"String"
                    }
                },
                "description":"The fields for the newly created Lobby user account."
            },
            "CreateUserResponse":{
                "type":"object",
                "properties":{
                    "lobbyUser":{
                        "$ref":"#/components/schemas/CreateLobbyUserResponse"
                    },
                    "aconexUser":{
                        "type":"array",
                        "description":"The fields for the newly created Aconex profile.",
                        "items":{
                            "$ref":"#/components/schemas/CreateAconexUserResponse"
                        }
                    }
                }
            },
            "Route":{
                "type":"object"
            },
            "CreateAconexUserRequest":{
                "required":[
                    "aconexOrganizationId",
                    "appInstanceId"
                ],
                "type":"object",
                "properties":{
                    "appInstanceId":{
                        "type":"integer",
                        "description":"The  Lobby application instance id where the Aconex user will be created.",
                        "format":"int64"
                    },
                    "aconexOrganizationId":{
                        "type":"integer",
                        "description":"The Aconex organization id where the new user needs to be created.",
                        "format":"int64"
                    },
                    "projectIds":{
                        "type":"array",
                        "description":"The list of Aconex project ids that the new Aconex user should be invited to. ",
                        "format":"Array",
                        "items":{
                            "type":"string",
                            "description":"The list of Aconex project ids that the new Aconex user should be invited to. ",
                            "format":"Array"
                        }
                    },
                    "userName":{
                        "type":"string",
                        "description":"The user name of the aconex profile we create ",
                        "format":"String"
                    }
                },
                "description":"The fields required to create an Aconex profile.",
                "format":"array"
            },
            "CreateLobbyUserRequest":{
                "required":[
                    "emailAddress",
                    "firstName",
                    "language",
                    "lastName",
                    "lobbyOrganizationId",
                    "setPassword"
                ],
                "type":"object",
                "properties":{
                    "emailAddress":{
                        "type":"string",
                        "description":"The email address for the Lobby and Aconex user.  This will also server as the Lobby username.",
                        "format":"String"
                    },
                    "firstName":{
                        "type":"string",
                        "description":"The first name for the new Lobby user.",
                        "format":"String"
                    },
                    "middleName":{
                        "type":"string",
                        "description":"The middle name for the new Lobby user. ",
                        "format":"String"
                    },
                    "lastName":{
                        "type":"string",
                        "description":"The last name for the new Lobby user. ",
                        "format":"String"
                    },
                    "language":{
                        "type":"string",
                        "description":"The language to use when sending emails from Lobby and Aconex.",
                        "format":"String"
                    },
                    "lobbyOrganizationId":{
                        "type":"integer",
                        "format":"int64"
                    },
                    "setPassword":{
                        "type":"boolean",
                        "description":"Determines if the new Lobby user should get an email to set a password. True to send an email. False to not send an email.",
                        "format":"boolean"
                    },
                    "emailForCommunication":{
                        "type":"string",
                        "description":"The email will be used to send emails from Lobby and Aconex.",
                        "format":"String"
                    }
                },
                "description":"The fields required to create a Lobby user account."
            },
            "CreateUserRequest":{
                "type":"object",
                "properties":{
                    "lobbyUser":{
                        "$ref":"#/components/schemas/CreateLobbyUserRequest"
                    },
                    "aconexUsers":{
                        "type":"array",
                        "description":"The fields required to create an Aconex profile.",
                        "format":"array",
                        "items":{
                            "$ref":"#/components/schemas/CreateAconexUserRequest"
                        }
                    }
                }
            },
            "OrganizationDetails":{
                "type":"object",
                "properties":{
                    "id":{
                        "type":"integer",
                        "description":"The unique identifier for the organization.",
                        "format":"int64"
                    },
                    "name":{
                        "type":"string",
                        "description":"The name of the organization."
                    },
                    "tradingName":{
                        "type":"string",
                        "description":"The trading name of the organization."
                    }
                }
            },
            "LobbyRequestContext":{
                "type":"object"
            },
            "UserAppInstanceResponse":{
                "type":"object",
                "properties":{
                    "id":{
                        "type":"integer",
                        "description":"The unique identifiier for the application instance.",
                        "format":"int64"
                    },
                    "name":{
                        "type":"string",
                        "description":"The name of the application."
                    },
                    "region":{
                        "type":"string",
                        "description":"The region or location where the application instance exists."
                    },
                    "baseUrl":{
                        "type":"string",
                        "description":"The application instance login URL."
                    }
                }
            },
            "AconexUserDetailsRequest":{
                "required":[
                    "aconexOrganizationId",
                    "appInstanceId",
                    "communicationEmail",
                    "language"
                ],
                "type":"object",
                "properties":{
                    "appInstanceId":{
                        "type":"string",
                        "description":"The  Lobby application instance id where the Aconex user will be created.",
                        "format":"Integer"
                    },
                    "aconexOrganizationId":{
                        "type":"string",
                        "description":"The Aconex organization id where the new user needs to be created.",
                        "format":"Integer"
                    },
                    "userName":{
                        "type":"string",
                        "description":"The user name of the aconex profile we create ",
                        "format":"String"
                    },
                    "communicationEmail":{
                        "type":"string",
                        "description":"The email address for the Aconex user.",
                        "format":"String"
                    },
                    "language":{
                        "type":"string",
                        "description":"The language to use when sending emails from Aconex.",
                        "format":"String"
                    },
                    "projectIds":{
                        "type":"array",
                        "description":"The list of Aconex project ids that the new Aconex user should be invited to. ",
                        "format":"Array",
                        "items":{
                            "type":"string",
                            "description":"The list of Aconex project ids that the new Aconex user should be invited to. ",
                            "format":"Array"
                        }
                    }
                },
                "description":"The fields required to create an Aconex profile.",
                "format":"array"
            },
            "LobbyUserDetailsRequest":{
                "required":[
                    "emailAddress"
                ],
                "type":"object",
                "properties":{
                    "emailAddress":{
                        "type":"string",
                        "description":"The Lobby username to link the newly created aconex profile",
                        "format":"String"
                    }
                },
                "description":"The fields for the Lobby user account to link the new aconex profile."
            },
            "PatchUserRequest":{
                "type":"object",
                "properties":{
                    "lobbyUser":{
                        "$ref":"#/components/schemas/LobbyUserDetailsRequest"
                    },
                    "aconexUsers":{
                        "$ref":"#/components/schemas/AconexUserDetailsRequest"
                    }
                }
            }
        }
    }
}