openapi: 3.0.0 info: version: 1.0.0 title: Brellium Audits Users API description: API for base Brellium functionality. termsOfService: https://brellium.com/terms contact: name: Brellium Team email: support@brellium.com url: http://brellium.com servers: - url: https://api.brellium.com/v1 tags: - name: Users paths: /users: post: summary: Create a new user requestBody: description: User information. required: true content: application/json: schema: type: object properties: email: type: string description: User's email address. name: type: string description: User's name. metadata: type: object description: Additional metadata for the user. attributes: type: object description: User attributes. required: - email responses: '200': description: User created successfully. content: application/json: schema: type: object properties: message: type: string '400': description: Invalid request. '401': description: Unauthorized. '500': description: Server error. security: - bearerAuth: [] tags: - Users get: summary: Get all users for organization responses: '200': description: List of users. content: application/json: schema: type: object properties: users: type: array items: type: object properties: user_id: type: string description: User id. org_id: type: string name: type: string email: type: string description: User's email address. created_at: type: string format: date-time updated_at: type: string format: date-time metadata: type: object attributes: type: object '401': description: Unauthorized. security: - bearerAuth: [] tags: - Users /users/{user_id}: get: summary: Get a specific user parameters: - name: user_id in: path required: true schema: type: string description: User id. responses: '200': description: User information. content: application/json: schema: type: object properties: user: type: object properties: user_id: type: string description: User id. org_id: type: string name: type: string email: type: string description: User's email address. created_at: type: string format: date-time updated_at: type: string format: date-time metadata: type: object attributes: type: object '401': description: Unauthorized. '404': description: User not found. security: - bearerAuth: [] tags: - Users post: summary: Update a user parameters: - name: user_id in: path required: true schema: type: string description: User id. requestBody: description: Updated user information. required: true content: application/json: schema: type: object properties: name: type: string email: type: string description: User's email address. metadata: type: object attributes: type: object responses: '200': description: Updated user information. content: application/json: schema: type: object properties: user: type: object properties: user_id: type: string description: User id. org_id: type: string name: type: string email: type: string description: User's email address. created_at: type: string format: date-time updated_at: type: string format: date-time metadata: type: object attributes: type: object '400': description: Invalid request. '401': description: Unauthorized. '404': description: User not found. security: - bearerAuth: [] tags: - Users delete: summary: Delete a user parameters: - name: user_id in: path required: true schema: type: string description: User id. responses: '200': description: User deleted successfully. content: application/json: schema: type: object properties: message: type: string '400': description: Delete failed. '401': description: Unauthorized. '404': description: User not found. '500': description: Server error. security: - bearerAuth: [] tags: - Users components: securitySchemes: bearerAuth: type: http scheme: bearer bearerFormat: JWT