# Send invitations to employees Sends invitation emails to one or more employees to join Aslan. This endpoint can be called multiple times - if an employee has already been invited, it will resend the invitation. Can be used for employees in CREATED or INVITED status. Supports batch invitations for multiple employees. Endpoint: POST /companies/{companyId}/users/invite Version: 0.0.1 Security: partnerAdminAuth ## Header parameters: - `X-Aslan-Timestamp` (integer, required) Unix epoch timestamp of the request in seconds. Example: 1730000000 ## Path parameters: - `companyId` (string, required) The unique identifier for the company ## Request fields (application/json): - `userIds` (array, required) List of employee UUIDs to send invitations to Example: ["f7e6d5c4-b3a2-4918-8e7d-6c5b4a3f2e1d","a1b2c3d4-e5f6-7890-abcd-ef1234567890"] ## Response 200 fields (application/json): - `message` (string, required) Confirmation message Example: "Invitation request accepted for processing" - `requestedCount` (integer, required) Number of users requested for invitation Example: 2 ## Response 400 fields (application/json): - `timestamp` (string, required) Timestamp when the error occurred Example: "2024-10-10T15:45:30Z" - `status` (integer, required) HTTP status code Example: 400 - `error` (string, required) HTTP status text Example: "Bad Request" - `message` (string, required) Human-readable error message describing what went wrong Example: "Invalid date range: fromDate must be before toDate" - `path` (string, required) API endpoint path where the error occurred Example: "/api/v1/companies/a3f2e1d0-5c4b-4a3e-9f8e-7d6c5b4a3e2f/users/f7e6d5c4-b3a2-4918-8e7d-6c5b4a3f2e1d/spend-report" - `errors` (array) Detailed validation errors (present for validation failures) - `errors.field` (string, required) Name of the field that failed validation Example: "email" - `errors.message` (string, required) Validation error message for this field Example: "Email address is already in use" - `errors.rejectedValue` (string) The value that was rejected (may be omitted for sensitive data) Example: "sarah.johnson@techflow.com" - `traceId` (string) Unique identifier for tracing this error in logs Example: "a1b2c3d4-e5f6-4a8b-9c0d-e1f2a3b4c5d6" ## Response 401 fields (application/json): - `timestamp` (string, required) Timestamp when the error occurred Example: "2024-10-10T15:45:30Z" - `status` (integer, required) HTTP status code Example: 400 - `error` (string, required) HTTP status text Example: "Bad Request" - `message` (string, required) Human-readable error message describing what went wrong Example: "Invalid date range: fromDate must be before toDate" - `path` (string, required) API endpoint path where the error occurred Example: "/api/v1/companies/a3f2e1d0-5c4b-4a3e-9f8e-7d6c5b4a3e2f/users/f7e6d5c4-b3a2-4918-8e7d-6c5b4a3f2e1d/spend-report" - `errors` (array) Detailed validation errors (present for validation failures) - `errors.field` (string, required) Name of the field that failed validation Example: "email" - `errors.message` (string, required) Validation error message for this field Example: "Email address is already in use" - `errors.rejectedValue` (string) The value that was rejected (may be omitted for sensitive data) Example: "sarah.johnson@techflow.com" - `traceId` (string) Unique identifier for tracing this error in logs Example: "a1b2c3d4-e5f6-4a8b-9c0d-e1f2a3b4c5d6" ## Response 403 fields (application/json): - `timestamp` (string, required) Timestamp when the error occurred Example: "2024-10-10T15:45:30Z" - `status` (integer, required) HTTP status code Example: 400 - `error` (string, required) HTTP status text Example: "Bad Request" - `message` (string, required) Human-readable error message describing what went wrong Example: "Invalid date range: fromDate must be before toDate" - `path` (string, required) API endpoint path where the error occurred Example: "/api/v1/companies/a3f2e1d0-5c4b-4a3e-9f8e-7d6c5b4a3e2f/users/f7e6d5c4-b3a2-4918-8e7d-6c5b4a3f2e1d/spend-report" - `errors` (array) Detailed validation errors (present for validation failures) - `errors.field` (string, required) Name of the field that failed validation Example: "email" - `errors.message` (string, required) Validation error message for this field Example: "Email address is already in use" - `errors.rejectedValue` (string) The value that was rejected (may be omitted for sensitive data) Example: "sarah.johnson@techflow.com" - `traceId` (string) Unique identifier for tracing this error in logs Example: "a1b2c3d4-e5f6-4a8b-9c0d-e1f2a3b4c5d6" ## Response 404 fields (application/json): - `timestamp` (string, required) Timestamp when the error occurred Example: "2024-10-10T15:45:30Z" - `status` (integer, required) HTTP status code Example: 400 - `error` (string, required) HTTP status text Example: "Bad Request" - `message` (string, required) Human-readable error message describing what went wrong Example: "Invalid date range: fromDate must be before toDate" - `path` (string, required) API endpoint path where the error occurred Example: "/api/v1/companies/a3f2e1d0-5c4b-4a3e-9f8e-7d6c5b4a3e2f/users/f7e6d5c4-b3a2-4918-8e7d-6c5b4a3f2e1d/spend-report" - `errors` (array) Detailed validation errors (present for validation failures) - `errors.field` (string, required) Name of the field that failed validation Example: "email" - `errors.message` (string, required) Validation error message for this field Example: "Email address is already in use" - `errors.rejectedValue` (string) The value that was rejected (may be omitted for sensitive data) Example: "sarah.johnson@techflow.com" - `traceId` (string) Unique identifier for tracing this error in logs Example: "a1b2c3d4-e5f6-4a8b-9c0d-e1f2a3b4c5d6" ## Response 500 fields (application/json): - `timestamp` (string, required) Timestamp when the error occurred Example: "2024-10-10T15:45:30Z" - `status` (integer, required) HTTP status code Example: 400 - `error` (string, required) HTTP status text Example: "Bad Request" - `message` (string, required) Human-readable error message describing what went wrong Example: "Invalid date range: fromDate must be before toDate" - `path` (string, required) API endpoint path where the error occurred Example: "/api/v1/companies/a3f2e1d0-5c4b-4a3e-9f8e-7d6c5b4a3e2f/users/f7e6d5c4-b3a2-4918-8e7d-6c5b4a3f2e1d/spend-report" - `errors` (array) Detailed validation errors (present for validation failures) - `errors.field` (string, required) Name of the field that failed validation Example: "email" - `errors.message` (string, required) Validation error message for this field Example: "Email address is already in use" - `errors.rejectedValue` (string) The value that was rejected (may be omitted for sensitive data) Example: "sarah.johnson@techflow.com" - `traceId` (string) Unique identifier for tracing this error in logs Example: "a1b2c3d4-e5f6-4a8b-9c0d-e1f2a3b4c5d6"