{"openapi":"3.1.0","info":{"title":"Bunblast API","version":"0.1.5","description":"Bunblast OpenAPI specification"},"servers":[{"url":"https://bbapi.yweibcibcdkscbndsnlcnn.com","description":"Production server"},{"url":"http://localhost:5880","description":"Development server"},{"url":"http://0.0.0.0:5880","description":"Development server"},{"url":"http://127.0.0.1:5880","description":"Development server"}],"paths":{"/":{"get":{"operationId":"home","summary":"Home page","description":"Welcome page for the API","tags":["General"],"responses":{"500":{"description":"Internal Server Error - Unexpected server error","content":{"application/json":{"example":{"message":"Internal server error","code":"INTERNAL_ERROR","details":"Stack trace or error details for debugging"},"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}}},"/api/health":{"get":{"operationId":"healthCheck","summary":"Health check","description":"Returns the health status of the API","tags":["System"],"responses":{"200":{"description":"200 response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthResponse"}}}},"500":{"description":"Internal Server Error - Unexpected server error","content":{"application/json":{"example":{"message":"Internal server error","code":"INTERNAL_ERROR","details":"Stack trace or error details for debugging"},"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}}},"/api/version":{"get":{"operationId":"getVersion","summary":"Get backend version","description":"Returns the current backend application version","tags":["System"],"responses":{"200":{"description":"200 response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VersionResponse"}}}},"500":{"description":"Internal Server Error - Unexpected server error","content":{"application/json":{"example":{"message":"Internal server error","code":"INTERNAL_ERROR","details":"Stack trace or error details for debugging"},"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}}},"/api/teams":{"get":{"operationId":"getUserTeams","summary":"Get user's teams","description":"Get all teams that the authenticated user is a member of","tags":["Teams"],"security":[{"bearerAuth":[]},{"cookieAuth":[]}],"responses":{"200":{"description":"200 response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/TeamWithRole"}}}}},"401":{"description":"Unauthorized - Authentication required or failed","content":{"application/json":{"example":{"message":"Authentication required","code":"UNAUTHORIZED"},"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"500":{"description":"Internal Server Error - Unexpected server error","content":{"application/json":{"example":{"message":"Internal server error","code":"INTERNAL_ERROR","details":"Stack trace or error details for debugging"},"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}},"post":{"operationId":"createTeam","summary":"Create a new team","description":"Create a new team with the authenticated user as owner","tags":["Teams"],"security":[{"bearerAuth":[]},{"cookieAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateTeamBody"}}}},"responses":{"200":{"description":"200 response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamWithMembers"}}}},"400":{"description":"Bad Request - Invalid input or validation failed","content":{"application/json":{"example":{"message":"Validation failed","code":"BAD_REQUEST","details":[{"path":["email"],"message":"Invalid email format"}]},"schema":{"$ref":"#/components/schemas/BadRequestErrorResponse"}}}},"401":{"description":"Unauthorized - Authentication required or failed","content":{"application/json":{"example":{"message":"Authentication required","code":"UNAUTHORIZED"},"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"500":{"description":"Internal Server Error - Unexpected server error","content":{"application/json":{"example":{"message":"Internal server error","code":"INTERNAL_ERROR","details":"Stack trace or error details for debugging"},"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}}},"/api/teams/{teamId}":{"get":{"operationId":"getTeam","summary":"Get team by ID","description":"Get detailed team information including all members","tags":["Teams"],"security":[{"bearerAuth":[]},{"cookieAuth":[]}],"parameters":[{"in":"path","name":"teamId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"200 response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamWithMembers"}}}},"401":{"description":"Unauthorized - Authentication required or failed","content":{"application/json":{"example":{"message":"Authentication required","code":"UNAUTHORIZED"},"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"example":{"message":"Insufficient permissions","code":"FORBIDDEN"},"schema":{"$ref":"#/components/schemas/ForbiddenErrorResponse"}}}},"404":{"description":"Not Found - Resource does not exist","content":{"application/json":{"example":{"message":"Resource not found","code":"NOT_FOUND"},"schema":{"$ref":"#/components/schemas/NotFoundErrorResponse"}}}},"500":{"description":"Internal Server Error - Unexpected server error","content":{"application/json":{"example":{"message":"Internal server error","code":"INTERNAL_ERROR","details":"Stack trace or error details for debugging"},"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}},"put":{"operationId":"updateTeam","summary":"Update team","description":"Update team information (requires admin or owner role)","tags":["Teams"],"security":[{"bearerAuth":[]},{"cookieAuth":[]}],"parameters":[{"in":"path","name":"teamId","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateTeamBody"}}}},"responses":{"200":{"description":"200 response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Team"}}}},"400":{"description":"Bad Request - Invalid input or validation failed","content":{"application/json":{"example":{"message":"Validation failed","code":"BAD_REQUEST","details":[{"path":["email"],"message":"Invalid email format"}]},"schema":{"$ref":"#/components/schemas/BadRequestErrorResponse"}}}},"401":{"description":"Unauthorized - Authentication required or failed","content":{"application/json":{"example":{"message":"Authentication required","code":"UNAUTHORIZED"},"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"example":{"message":"Insufficient permissions","code":"FORBIDDEN"},"schema":{"$ref":"#/components/schemas/ForbiddenErrorResponse"}}}},"404":{"description":"Not Found - Resource does not exist","content":{"application/json":{"example":{"message":"Resource not found","code":"NOT_FOUND"},"schema":{"$ref":"#/components/schemas/NotFoundErrorResponse"}}}},"500":{"description":"Internal Server Error - Unexpected server error","content":{"application/json":{"example":{"message":"Internal server error","code":"INTERNAL_ERROR","details":"Stack trace or error details for debugging"},"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}},"delete":{"operationId":"deleteTeam","summary":"Delete team","description":"Delete a team (requires owner role)","tags":["Teams"],"security":[{"bearerAuth":[]},{"cookieAuth":[]}],"parameters":[{"in":"path","name":"teamId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"200 response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"],"additionalProperties":false}}}},"401":{"description":"Unauthorized - Authentication required or failed","content":{"application/json":{"example":{"message":"Authentication required","code":"UNAUTHORIZED"},"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"example":{"message":"Insufficient permissions","code":"FORBIDDEN"},"schema":{"$ref":"#/components/schemas/ForbiddenErrorResponse"}}}},"404":{"description":"Not Found - Resource does not exist","content":{"application/json":{"example":{"message":"Resource not found","code":"NOT_FOUND"},"schema":{"$ref":"#/components/schemas/NotFoundErrorResponse"}}}},"500":{"description":"Internal Server Error - Unexpected server error","content":{"application/json":{"example":{"message":"Internal server error","code":"INTERNAL_ERROR","details":"Stack trace or error details for debugging"},"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}}},"/api/teams/{teamId}/members":{"get":{"operationId":"getTeamMembers","summary":"Get team members","description":"Get all members of a team","tags":["Teams"],"security":[{"bearerAuth":[]},{"cookieAuth":[]}],"parameters":[{"in":"path","name":"teamId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"200 response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/TeamMember"}}}}},"401":{"description":"Unauthorized - Authentication required or failed","content":{"application/json":{"example":{"message":"Authentication required","code":"UNAUTHORIZED"},"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"example":{"message":"Insufficient permissions","code":"FORBIDDEN"},"schema":{"$ref":"#/components/schemas/ForbiddenErrorResponse"}}}},"404":{"description":"Not Found - Resource does not exist","content":{"application/json":{"example":{"message":"Resource not found","code":"NOT_FOUND"},"schema":{"$ref":"#/components/schemas/NotFoundErrorResponse"}}}},"500":{"description":"Internal Server Error - Unexpected server error","content":{"application/json":{"example":{"message":"Internal server error","code":"INTERNAL_ERROR","details":"Stack trace or error details for debugging"},"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}},"post":{"operationId":"addTeamMember","summary":"Add team member","description":"Add a new member to the team (requires admin or owner role)","tags":["Teams"],"security":[{"bearerAuth":[]},{"cookieAuth":[]}],"parameters":[{"in":"path","name":"teamId","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddMemberBody"}}}},"responses":{"200":{"description":"200 response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamMember"}}}},"400":{"description":"Bad Request - Invalid input or validation failed","content":{"application/json":{"example":{"message":"Validation failed","code":"BAD_REQUEST","details":[{"path":["email"],"message":"Invalid email format"}]},"schema":{"$ref":"#/components/schemas/BadRequestErrorResponse"}}}},"401":{"description":"Unauthorized - Authentication required or failed","content":{"application/json":{"example":{"message":"Authentication required","code":"UNAUTHORIZED"},"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"example":{"message":"Insufficient permissions","code":"FORBIDDEN"},"schema":{"$ref":"#/components/schemas/ForbiddenErrorResponse"}}}},"404":{"description":"Not Found - Resource does not exist","content":{"application/json":{"example":{"message":"Resource not found","code":"NOT_FOUND"},"schema":{"$ref":"#/components/schemas/NotFoundErrorResponse"}}}},"409":{"description":"Conflict - Resource already exists or state conflict","content":{"application/json":{"example":{"message":"Resource already exists","code":"CONFLICT","details":"A user with this email already exists"},"schema":{"$ref":"#/components/schemas/ConflictErrorResponse"}}}},"500":{"description":"Internal Server Error - Unexpected server error","content":{"application/json":{"example":{"message":"Internal server error","code":"INTERNAL_ERROR","details":"Stack trace or error details for debugging"},"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}}},"/api/teams/{teamId}/members/{userId}":{"delete":{"operationId":"removeTeamMember","summary":"Remove team member","description":"Remove a member from the team (requires admin or owner role, or self-removal)","tags":["Teams"],"security":[{"bearerAuth":[]},{"cookieAuth":[]}],"parameters":[{"in":"path","name":"teamId","required":true,"schema":{"type":"string"}},{"in":"path","name":"userId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"200 response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"],"additionalProperties":false}}}},"401":{"description":"Unauthorized - Authentication required or failed","content":{"application/json":{"example":{"message":"Authentication required","code":"UNAUTHORIZED"},"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"example":{"message":"Insufficient permissions","code":"FORBIDDEN"},"schema":{"$ref":"#/components/schemas/ForbiddenErrorResponse"}}}},"404":{"description":"Not Found - Resource does not exist","content":{"application/json":{"example":{"message":"Resource not found","code":"NOT_FOUND"},"schema":{"$ref":"#/components/schemas/NotFoundErrorResponse"}}}},"500":{"description":"Internal Server Error - Unexpected server error","content":{"application/json":{"example":{"message":"Internal server error","code":"INTERNAL_ERROR","details":"Stack trace or error details for debugging"},"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}}},"/api/teams/{teamId}/members/{userId}/role":{"put":{"operationId":"updateMemberRole","summary":"Update member role","description":"Update a member's role in the team (owner can promote to admin, admins can demote members)","tags":["Teams"],"security":[{"bearerAuth":[]},{"cookieAuth":[]}],"parameters":[{"in":"path","name":"teamId","required":true,"schema":{"type":"string"}},{"in":"path","name":"userId","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateMemberRoleBody"}}}},"responses":{"200":{"description":"200 response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamMember"}}}},"400":{"description":"Bad Request - Invalid input or validation failed","content":{"application/json":{"example":{"message":"Validation failed","code":"BAD_REQUEST","details":[{"path":["email"],"message":"Invalid email format"}]},"schema":{"$ref":"#/components/schemas/BadRequestErrorResponse"}}}},"401":{"description":"Unauthorized - Authentication required or failed","content":{"application/json":{"example":{"message":"Authentication required","code":"UNAUTHORIZED"},"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"example":{"message":"Insufficient permissions","code":"FORBIDDEN"},"schema":{"$ref":"#/components/schemas/ForbiddenErrorResponse"}}}},"404":{"description":"Not Found - Resource does not exist","content":{"application/json":{"example":{"message":"Resource not found","code":"NOT_FOUND"},"schema":{"$ref":"#/components/schemas/NotFoundErrorResponse"}}}},"500":{"description":"Internal Server Error - Unexpected server error","content":{"application/json":{"example":{"message":"Internal server error","code":"INTERNAL_ERROR","details":"Stack trace or error details for debugging"},"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}}},"/api/teams/{teamId}/transfer-ownership":{"post":{"operationId":"transferOwnership","summary":"Transfer team ownership","description":"Transfer team ownership to another member (requires owner role)","tags":["Teams"],"security":[{"bearerAuth":[]},{"cookieAuth":[]}],"parameters":[{"in":"path","name":"teamId","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransferOwnershipBody"}}}},"responses":{"200":{"description":"200 response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"],"additionalProperties":false}}}},"400":{"description":"Bad Request - Invalid input or validation failed","content":{"application/json":{"example":{"message":"Validation failed","code":"BAD_REQUEST","details":[{"path":["email"],"message":"Invalid email format"}]},"schema":{"$ref":"#/components/schemas/BadRequestErrorResponse"}}}},"401":{"description":"Unauthorized - Authentication required or failed","content":{"application/json":{"example":{"message":"Authentication required","code":"UNAUTHORIZED"},"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"example":{"message":"Insufficient permissions","code":"FORBIDDEN"},"schema":{"$ref":"#/components/schemas/ForbiddenErrorResponse"}}}},"404":{"description":"Not Found - Resource does not exist","content":{"application/json":{"example":{"message":"Resource not found","code":"NOT_FOUND"},"schema":{"$ref":"#/components/schemas/NotFoundErrorResponse"}}}},"500":{"description":"Internal Server Error - Unexpected server error","content":{"application/json":{"example":{"message":"Internal server error","code":"INTERNAL_ERROR","details":"Stack trace or error details for debugging"},"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}}},"/api/teams/{teamId}/activity-logs":{"get":{"operationId":"getTeamActivityLogs","summary":"Get team activity logs","description":"Returns paginated activity log entries for a team. Accessible by all team members.","tags":["Teams"],"security":[{"bearerAuth":[]},{"cookieAuth":[]}],"parameters":[{"in":"query","name":"page","schema":{"default":1,"type":"integer","minimum":1,"maximum":9007199254740991}},{"in":"query","name":"pageSize","schema":{"default":20,"type":"integer","minimum":1,"maximum":100}},{"in":"query","name":"service","schema":{"type":"string","enum":["campaign","warmup","messaging","whatsapp","number-checking","one-time-messaging","account"]}},{"in":"query","name":"severity","schema":{"type":"string","enum":["info","warn","error"]}},{"in":"query","name":"resourceId","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"in":"query","name":"fromDate","schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},{"in":"query","name":"toDate","schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},{"in":"path","name":"teamId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"200 response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedActivityLogs"}}}},"400":{"description":"Bad Request - Invalid input or validation failed","content":{"application/json":{"example":{"message":"Validation failed","code":"BAD_REQUEST","details":[{"path":["email"],"message":"Invalid email format"}]},"schema":{"$ref":"#/components/schemas/BadRequestErrorResponse"}}}},"401":{"description":"Unauthorized - Authentication required or failed","content":{"application/json":{"example":{"message":"Authentication required","code":"UNAUTHORIZED"},"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"example":{"message":"Insufficient permissions","code":"FORBIDDEN"},"schema":{"$ref":"#/components/schemas/ForbiddenErrorResponse"}}}},"500":{"description":"Internal Server Error - Unexpected server error","content":{"application/json":{"example":{"message":"Internal server error","code":"INTERNAL_ERROR","details":"Stack trace or error details for debugging"},"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}}},"/api/accounts":{"get":{"operationId":"getTeamAccounts","summary":"Get team accounts","description":"Get all WhatsApp accounts for a team","tags":["Accounts (WhatsApp)"],"security":[{"bearerAuth":[]},{"cookieAuth":[]}],"parameters":[{"in":"query","name":"teamId","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"required":true}],"responses":{"200":{"description":"200 response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AccountWithSettings"}}}}},"400":{"description":"Bad Request - Invalid input or validation failed","content":{"application/json":{"example":{"message":"Validation failed","code":"BAD_REQUEST","details":[{"path":["email"],"message":"Invalid email format"}]},"schema":{"$ref":"#/components/schemas/BadRequestErrorResponse"}}}},"401":{"description":"Unauthorized - Authentication required or failed","content":{"application/json":{"example":{"message":"Authentication required","code":"UNAUTHORIZED"},"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"example":{"message":"Insufficient permissions","code":"FORBIDDEN"},"schema":{"$ref":"#/components/schemas/ForbiddenErrorResponse"}}}},"500":{"description":"Internal Server Error - Unexpected server error","content":{"application/json":{"example":{"message":"Internal server error","code":"INTERNAL_ERROR","details":"Stack trace or error details for debugging"},"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}},"post":{"operationId":"createAccount","summary":"Create a new account","description":"Create a new WhatsApp account for a team","tags":["Accounts (WhatsApp)"],"security":[{"bearerAuth":[]},{"cookieAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateAccountBody"}}}},"responses":{"200":{"description":"200 response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Account"}}}},"400":{"description":"Bad Request - Invalid input or validation failed","content":{"application/json":{"example":{"message":"Validation failed","code":"BAD_REQUEST","details":[{"path":["email"],"message":"Invalid email format"}]},"schema":{"$ref":"#/components/schemas/BadRequestErrorResponse"}}}},"401":{"description":"Unauthorized - Authentication required or failed","content":{"application/json":{"example":{"message":"Authentication required","code":"UNAUTHORIZED"},"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"example":{"message":"Insufficient permissions","code":"FORBIDDEN"},"schema":{"$ref":"#/components/schemas/ForbiddenErrorResponse"}}}},"409":{"description":"Conflict - Resource already exists or state conflict","content":{"application/json":{"example":{"message":"Resource already exists","code":"CONFLICT","details":"A user with this email already exists"},"schema":{"$ref":"#/components/schemas/ConflictErrorResponse"}}}},"500":{"description":"Internal Server Error - Unexpected server error","content":{"application/json":{"example":{"message":"Internal server error","code":"INTERNAL_ERROR","details":"Stack trace or error details for debugging"},"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}}},"/api/accounts/connected":{"get":{"operationId":"getConnectedAccounts","summary":"Get connected accounts","description":"Get all connected WhatsApp accounts for a team","tags":["Accounts (WhatsApp)"],"security":[{"bearerAuth":[]},{"cookieAuth":[]}],"parameters":[{"in":"query","name":"teamId","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"required":true}],"responses":{"200":{"description":"200 response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Account"}}}}},"400":{"description":"Bad Request - Invalid input or validation failed","content":{"application/json":{"example":{"message":"Validation failed","code":"BAD_REQUEST","details":[{"path":["email"],"message":"Invalid email format"}]},"schema":{"$ref":"#/components/schemas/BadRequestErrorResponse"}}}},"401":{"description":"Unauthorized - Authentication required or failed","content":{"application/json":{"example":{"message":"Authentication required","code":"UNAUTHORIZED"},"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"example":{"message":"Insufficient permissions","code":"FORBIDDEN"},"schema":{"$ref":"#/components/schemas/ForbiddenErrorResponse"}}}},"500":{"description":"Internal Server Error - Unexpected server error","content":{"application/json":{"example":{"message":"Internal server error","code":"INTERNAL_ERROR","details":"Stack trace or error details for debugging"},"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}}},"/api/accounts/import":{"post":{"operationId":"importAccounts","summary":"Import accounts from CSV","description":"Bulk import WhatsApp accounts from CSV. CSV must have headers: name, phoneNumber. Optional: state, expiredAt","tags":["Accounts (WhatsApp)"],"security":[{"bearerAuth":[]},{"cookieAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImportAccountsBody"}}}},"responses":{"200":{"description":"200 response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImportAccountsResult"}}}},"400":{"description":"Bad Request - Invalid input or validation failed","content":{"application/json":{"example":{"message":"Validation failed","code":"BAD_REQUEST","details":[{"path":["email"],"message":"Invalid email format"}]},"schema":{"$ref":"#/components/schemas/BadRequestErrorResponse"}}}},"401":{"description":"Unauthorized - Authentication required or failed","content":{"application/json":{"example":{"message":"Authentication required","code":"UNAUTHORIZED"},"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"example":{"message":"Insufficient permissions","code":"FORBIDDEN"},"schema":{"$ref":"#/components/schemas/ForbiddenErrorResponse"}}}},"500":{"description":"Internal Server Error - Unexpected server error","content":{"application/json":{"example":{"message":"Internal server error","code":"INTERNAL_ERROR","details":"Stack trace or error details for debugging"},"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}}},"/api/accounts/{accountId}":{"get":{"operationId":"getAccount","summary":"Get account by ID","description":"Get detailed account information","tags":["Accounts (WhatsApp)"],"security":[{"bearerAuth":[]},{"cookieAuth":[]}],"parameters":[{"in":"path","name":"accountId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"200 response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Account"}}}},"401":{"description":"Unauthorized - Authentication required or failed","content":{"application/json":{"example":{"message":"Authentication required","code":"UNAUTHORIZED"},"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"example":{"message":"Insufficient permissions","code":"FORBIDDEN"},"schema":{"$ref":"#/components/schemas/ForbiddenErrorResponse"}}}},"404":{"description":"Not Found - Resource does not exist","content":{"application/json":{"example":{"message":"Resource not found","code":"NOT_FOUND"},"schema":{"$ref":"#/components/schemas/NotFoundErrorResponse"}}}},"500":{"description":"Internal Server Error - Unexpected server error","content":{"application/json":{"example":{"message":"Internal server error","code":"INTERNAL_ERROR","details":"Stack trace or error details for debugging"},"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}},"put":{"operationId":"updateAccount","summary":"Update account","description":"Update account information (requires ownership or admin role)","tags":["Accounts (WhatsApp)"],"security":[{"bearerAuth":[]},{"cookieAuth":[]}],"parameters":[{"in":"path","name":"accountId","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateAccountBody"}}}},"responses":{"200":{"description":"200 response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Account"}}}},"400":{"description":"Bad Request - Invalid input or validation failed","content":{"application/json":{"example":{"message":"Validation failed","code":"BAD_REQUEST","details":[{"path":["email"],"message":"Invalid email format"}]},"schema":{"$ref":"#/components/schemas/BadRequestErrorResponse"}}}},"401":{"description":"Unauthorized - Authentication required or failed","content":{"application/json":{"example":{"message":"Authentication required","code":"UNAUTHORIZED"},"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"example":{"message":"Insufficient permissions","code":"FORBIDDEN"},"schema":{"$ref":"#/components/schemas/ForbiddenErrorResponse"}}}},"404":{"description":"Not Found - Resource does not exist","content":{"application/json":{"example":{"message":"Resource not found","code":"NOT_FOUND"},"schema":{"$ref":"#/components/schemas/NotFoundErrorResponse"}}}},"409":{"description":"Conflict - Resource already exists or state conflict","content":{"application/json":{"example":{"message":"Resource already exists","code":"CONFLICT","details":"A user with this email already exists"},"schema":{"$ref":"#/components/schemas/ConflictErrorResponse"}}}},"500":{"description":"Internal Server Error - Unexpected server error","content":{"application/json":{"example":{"message":"Internal server error","code":"INTERNAL_ERROR","details":"Stack trace or error details for debugging"},"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}},"delete":{"operationId":"deleteAccount","summary":"Delete account","description":"Delete a WhatsApp account (requires ownership or admin role)","tags":["Accounts (WhatsApp)"],"security":[{"bearerAuth":[]},{"cookieAuth":[]}],"parameters":[{"in":"path","name":"accountId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"200 response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"],"additionalProperties":false}}}},"401":{"description":"Unauthorized - Authentication required or failed","content":{"application/json":{"example":{"message":"Authentication required","code":"UNAUTHORIZED"},"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"example":{"message":"Insufficient permissions","code":"FORBIDDEN"},"schema":{"$ref":"#/components/schemas/ForbiddenErrorResponse"}}}},"404":{"description":"Not Found - Resource does not exist","content":{"application/json":{"example":{"message":"Resource not found","code":"NOT_FOUND"},"schema":{"$ref":"#/components/schemas/NotFoundErrorResponse"}}}},"500":{"description":"Internal Server Error - Unexpected server error","content":{"application/json":{"example":{"message":"Internal server error","code":"INTERNAL_ERROR","details":"Stack trace or error details for debugging"},"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}}},"/api/accounts/{accountId}/state":{"patch":{"operationId":"updateAccountState","summary":"Update account state","description":"Update the connection state of a WhatsApp account","tags":["Accounts (WhatsApp)"],"security":[{"bearerAuth":[]},{"cookieAuth":[]}],"parameters":[{"in":"path","name":"accountId","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateAccountStateBody"}}}},"responses":{"200":{"description":"200 response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Account"}}}},"400":{"description":"Bad Request - Invalid input or validation failed","content":{"application/json":{"example":{"message":"Validation failed","code":"BAD_REQUEST","details":[{"path":["email"],"message":"Invalid email format"}]},"schema":{"$ref":"#/components/schemas/BadRequestErrorResponse"}}}},"401":{"description":"Unauthorized - Authentication required or failed","content":{"application/json":{"example":{"message":"Authentication required","code":"UNAUTHORIZED"},"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"example":{"message":"Insufficient permissions","code":"FORBIDDEN"},"schema":{"$ref":"#/components/schemas/ForbiddenErrorResponse"}}}},"404":{"description":"Not Found - Resource does not exist","content":{"application/json":{"example":{"message":"Resource not found","code":"NOT_FOUND"},"schema":{"$ref":"#/components/schemas/NotFoundErrorResponse"}}}},"500":{"description":"Internal Server Error - Unexpected server error","content":{"application/json":{"example":{"message":"Internal server error","code":"INTERNAL_ERROR","details":"Stack trace or error details for debugging"},"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}}},"/api/groups":{"get":{"operationId":"getTeamGroups","summary":"Get team groups","description":"Get all groups for a team","tags":["Groups"],"security":[{"bearerAuth":[]},{"cookieAuth":[]}],"parameters":[{"in":"query","name":"teamId","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"required":true}],"responses":{"200":{"description":"200 response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/GroupWithAccountCount"}}}}},"400":{"description":"Bad Request - Invalid input or validation failed","content":{"application/json":{"example":{"message":"Validation failed","code":"BAD_REQUEST","details":[{"path":["email"],"message":"Invalid email format"}]},"schema":{"$ref":"#/components/schemas/BadRequestErrorResponse"}}}},"401":{"description":"Unauthorized - Authentication required or failed","content":{"application/json":{"example":{"message":"Authentication required","code":"UNAUTHORIZED"},"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"example":{"message":"Insufficient permissions","code":"FORBIDDEN"},"schema":{"$ref":"#/components/schemas/ForbiddenErrorResponse"}}}},"500":{"description":"Internal Server Error - Unexpected server error","content":{"application/json":{"example":{"message":"Internal server error","code":"INTERNAL_ERROR","details":"Stack trace or error details for debugging"},"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}},"post":{"operationId":"createGroup","summary":"Create a new group","description":"Create a new WhatsApp account group for a team","tags":["Groups"],"security":[{"bearerAuth":[]},{"cookieAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateGroupBody"}}}},"responses":{"200":{"description":"200 response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Group"}}}},"400":{"description":"Bad Request - Invalid input or validation failed","content":{"application/json":{"example":{"message":"Validation failed","code":"BAD_REQUEST","details":[{"path":["email"],"message":"Invalid email format"}]},"schema":{"$ref":"#/components/schemas/BadRequestErrorResponse"}}}},"401":{"description":"Unauthorized - Authentication required or failed","content":{"application/json":{"example":{"message":"Authentication required","code":"UNAUTHORIZED"},"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"example":{"message":"Insufficient permissions","code":"FORBIDDEN"},"schema":{"$ref":"#/components/schemas/ForbiddenErrorResponse"}}}},"500":{"description":"Internal Server Error - Unexpected server error","content":{"application/json":{"example":{"message":"Internal server error","code":"INTERNAL_ERROR","details":"Stack trace or error details for debugging"},"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}}},"/api/groups/{groupId}":{"get":{"operationId":"getGroup","summary":"Get group details","description":"Get detailed information about a group including its accounts","tags":["Groups"],"security":[{"bearerAuth":[]},{"cookieAuth":[]}],"parameters":[{"in":"path","name":"groupId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"200 response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GroupWithAccountsFull"}}}},"401":{"description":"Unauthorized - Authentication required or failed","content":{"application/json":{"example":{"message":"Authentication required","code":"UNAUTHORIZED"},"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"example":{"message":"Insufficient permissions","code":"FORBIDDEN"},"schema":{"$ref":"#/components/schemas/ForbiddenErrorResponse"}}}},"404":{"description":"Not Found - Resource does not exist","content":{"application/json":{"example":{"message":"Resource not found","code":"NOT_FOUND"},"schema":{"$ref":"#/components/schemas/NotFoundErrorResponse"}}}},"500":{"description":"Internal Server Error - Unexpected server error","content":{"application/json":{"example":{"message":"Internal server error","code":"INTERNAL_ERROR","details":"Stack trace or error details for debugging"},"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}},"put":{"operationId":"updateGroup","summary":"Update group","description":"Update group information","tags":["Groups"],"security":[{"bearerAuth":[]},{"cookieAuth":[]}],"parameters":[{"in":"path","name":"groupId","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateGroupBody"}}}},"responses":{"200":{"description":"200 response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Group"}}}},"400":{"description":"Bad Request - Invalid input or validation failed","content":{"application/json":{"example":{"message":"Validation failed","code":"BAD_REQUEST","details":[{"path":["email"],"message":"Invalid email format"}]},"schema":{"$ref":"#/components/schemas/BadRequestErrorResponse"}}}},"401":{"description":"Unauthorized - Authentication required or failed","content":{"application/json":{"example":{"message":"Authentication required","code":"UNAUTHORIZED"},"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"example":{"message":"Insufficient permissions","code":"FORBIDDEN"},"schema":{"$ref":"#/components/schemas/ForbiddenErrorResponse"}}}},"404":{"description":"Not Found - Resource does not exist","content":{"application/json":{"example":{"message":"Resource not found","code":"NOT_FOUND"},"schema":{"$ref":"#/components/schemas/NotFoundErrorResponse"}}}},"500":{"description":"Internal Server Error - Unexpected server error","content":{"application/json":{"example":{"message":"Internal server error","code":"INTERNAL_ERROR","details":"Stack trace or error details for debugging"},"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}},"delete":{"operationId":"deleteGroup","summary":"Delete group","description":"Delete a group (this will not delete the accounts)","tags":["Groups"],"security":[{"bearerAuth":[]},{"cookieAuth":[]}],"parameters":[{"in":"path","name":"groupId","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"204 response","content":{"application/json":{"schema":{"type":"string","description":"No content"}}}},"401":{"description":"Unauthorized - Authentication required or failed","content":{"application/json":{"example":{"message":"Authentication required","code":"UNAUTHORIZED"},"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"example":{"message":"Insufficient permissions","code":"FORBIDDEN"},"schema":{"$ref":"#/components/schemas/ForbiddenErrorResponse"}}}},"404":{"description":"Not Found - Resource does not exist","content":{"application/json":{"example":{"message":"Resource not found","code":"NOT_FOUND"},"schema":{"$ref":"#/components/schemas/NotFoundErrorResponse"}}}},"500":{"description":"Internal Server Error - Unexpected server error","content":{"application/json":{"example":{"message":"Internal server error","code":"INTERNAL_ERROR","details":"Stack trace or error details for debugging"},"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}}},"/api/groups/{groupId}/accounts":{"post":{"operationId":"addAccountsToGroup","summary":"Add accounts to group","description":"Add one or more accounts to a group","tags":["Groups"],"security":[{"bearerAuth":[]},{"cookieAuth":[]}],"parameters":[{"in":"path","name":"groupId","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddAccountsToGroupBody"}}}},"responses":{"200":{"description":"200 response","content":{"application/json":{"schema":{"type":"object","properties":{"added":{"type":"number"},"skipped":{"type":"number"}},"required":["added","skipped"],"additionalProperties":false}}}},"400":{"description":"Bad Request - Invalid input or validation failed","content":{"application/json":{"example":{"message":"Validation failed","code":"BAD_REQUEST","details":[{"path":["email"],"message":"Invalid email format"}]},"schema":{"$ref":"#/components/schemas/BadRequestErrorResponse"}}}},"401":{"description":"Unauthorized - Authentication required or failed","content":{"application/json":{"example":{"message":"Authentication required","code":"UNAUTHORIZED"},"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"example":{"message":"Insufficient permissions","code":"FORBIDDEN"},"schema":{"$ref":"#/components/schemas/ForbiddenErrorResponse"}}}},"404":{"description":"Not Found - Resource does not exist","content":{"application/json":{"example":{"message":"Resource not found","code":"NOT_FOUND"},"schema":{"$ref":"#/components/schemas/NotFoundErrorResponse"}}}},"500":{"description":"Internal Server Error - Unexpected server error","content":{"application/json":{"example":{"message":"Internal server error","code":"INTERNAL_ERROR","details":"Stack trace or error details for debugging"},"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}}},"/api/groups/{groupId}/accounts/{accountId}":{"delete":{"operationId":"removeAccountFromGroup","summary":"Remove account from group","description":"Remove an account from a group","tags":["Groups"],"security":[{"bearerAuth":[]},{"cookieAuth":[]}],"parameters":[{"in":"path","name":"groupId","required":true,"schema":{"type":"string"}},{"in":"path","name":"accountId","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"204 response","content":{"application/json":{"schema":{"type":"string","description":"No content"}}}},"401":{"description":"Unauthorized - Authentication required or failed","content":{"application/json":{"example":{"message":"Authentication required","code":"UNAUTHORIZED"},"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"example":{"message":"Insufficient permissions","code":"FORBIDDEN"},"schema":{"$ref":"#/components/schemas/ForbiddenErrorResponse"}}}},"404":{"description":"Not Found - Resource does not exist","content":{"application/json":{"example":{"message":"Resource not found","code":"NOT_FOUND"},"schema":{"$ref":"#/components/schemas/NotFoundErrorResponse"}}}},"500":{"description":"Internal Server Error - Unexpected server error","content":{"application/json":{"example":{"message":"Internal server error","code":"INTERNAL_ERROR","details":"Stack trace or error details for debugging"},"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}}},"/api/groups/{groupId}/available-accounts":{"get":{"operationId":"getAvailableAccountsForGroup","summary":"Get available accounts for group","description":"Get all accounts in the team that are not in this group","tags":["Groups"],"security":[{"bearerAuth":[]},{"cookieAuth":[]}],"parameters":[{"in":"query","name":"teamId","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"required":true},{"in":"path","name":"groupId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"200 response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Account"}}}}},"400":{"description":"Bad Request - Invalid input or validation failed","content":{"application/json":{"example":{"message":"Validation failed","code":"BAD_REQUEST","details":[{"path":["email"],"message":"Invalid email format"}]},"schema":{"$ref":"#/components/schemas/BadRequestErrorResponse"}}}},"401":{"description":"Unauthorized - Authentication required or failed","content":{"application/json":{"example":{"message":"Authentication required","code":"UNAUTHORIZED"},"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"example":{"message":"Insufficient permissions","code":"FORBIDDEN"},"schema":{"$ref":"#/components/schemas/ForbiddenErrorResponse"}}}},"404":{"description":"Not Found - Resource does not exist","content":{"application/json":{"example":{"message":"Resource not found","code":"NOT_FOUND"},"schema":{"$ref":"#/components/schemas/NotFoundErrorResponse"}}}},"500":{"description":"Internal Server Error - Unexpected server error","content":{"application/json":{"example":{"message":"Internal server error","code":"INTERNAL_ERROR","details":"Stack trace or error details for debugging"},"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}}},"/api/campaigns":{"get":{"operationId":"listCampaigns","summary":"List campaigns","description":"Get all campaigns for a team","tags":["Campaigns"],"security":[{"bearerAuth":[]},{"cookieAuth":[]}],"parameters":[{"in":"query","name":"teamId","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"required":true}],"responses":{"200":{"description":"200 response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CampaignResponse"}}}}},"400":{"description":"Bad Request - Invalid input or validation failed","content":{"application/json":{"example":{"message":"Validation failed","code":"BAD_REQUEST","details":[{"path":["email"],"message":"Invalid email format"}]},"schema":{"$ref":"#/components/schemas/BadRequestErrorResponse"}}}},"401":{"description":"Unauthorized - Authentication required or failed","content":{"application/json":{"example":{"message":"Authentication required","code":"UNAUTHORIZED"},"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"example":{"message":"Insufficient permissions","code":"FORBIDDEN"},"schema":{"$ref":"#/components/schemas/ForbiddenErrorResponse"}}}},"500":{"description":"Internal Server Error - Unexpected server error","content":{"application/json":{"example":{"message":"Internal server error","code":"INTERNAL_ERROR","details":"Stack trace or error details for debugging"},"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}},"post":{"operationId":"createCampaign","summary":"Create new campaign","description":"Create a new campaign for message distribution","tags":["Campaigns"],"security":[{"bearerAuth":[]},{"cookieAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCampaignBody"}}}},"responses":{"200":{"description":"200 response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignResponse"}}}},"400":{"description":"Bad Request - Invalid input or validation failed","content":{"application/json":{"example":{"message":"Validation failed","code":"BAD_REQUEST","details":[{"path":["email"],"message":"Invalid email format"}]},"schema":{"$ref":"#/components/schemas/BadRequestErrorResponse"}}}},"401":{"description":"Unauthorized - Authentication required or failed","content":{"application/json":{"example":{"message":"Authentication required","code":"UNAUTHORIZED"},"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"example":{"message":"Insufficient permissions","code":"FORBIDDEN"},"schema":{"$ref":"#/components/schemas/ForbiddenErrorResponse"}}}},"404":{"description":"Not Found - Resource does not exist","content":{"application/json":{"example":{"message":"Resource not found","code":"NOT_FOUND"},"schema":{"$ref":"#/components/schemas/NotFoundErrorResponse"}}}},"500":{"description":"Internal Server Error - Unexpected server error","content":{"application/json":{"example":{"message":"Internal server error","code":"INTERNAL_ERROR","details":"Stack trace or error details for debugging"},"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}}},"/api/campaigns/{id}":{"get":{"operationId":"getCampaign","summary":"Get campaign details","description":"Get detailed information about a specific campaign","tags":["Campaigns"],"security":[{"bearerAuth":[]},{"cookieAuth":[]}],"parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"200 response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignResponse"}}}},"401":{"description":"Unauthorized - Authentication required or failed","content":{"application/json":{"example":{"message":"Authentication required","code":"UNAUTHORIZED"},"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"example":{"message":"Insufficient permissions","code":"FORBIDDEN"},"schema":{"$ref":"#/components/schemas/ForbiddenErrorResponse"}}}},"404":{"description":"Not Found - Resource does not exist","content":{"application/json":{"example":{"message":"Resource not found","code":"NOT_FOUND"},"schema":{"$ref":"#/components/schemas/NotFoundErrorResponse"}}}},"500":{"description":"Internal Server Error - Unexpected server error","content":{"application/json":{"example":{"message":"Internal server error","code":"INTERNAL_ERROR","details":"Stack trace or error details for debugging"},"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}},"put":{"operationId":"updateCampaign","summary":"Update campaign","description":"Update campaign information (only for draft/pending campaigns)","tags":["Campaigns"],"security":[{"bearerAuth":[]},{"cookieAuth":[]}],"parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateCampaignBody"}}}},"responses":{"200":{"description":"200 response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignResponse"}}}},"400":{"description":"Bad Request - Invalid input or validation failed","content":{"application/json":{"example":{"message":"Validation failed","code":"BAD_REQUEST","details":[{"path":["email"],"message":"Invalid email format"}]},"schema":{"$ref":"#/components/schemas/BadRequestErrorResponse"}}}},"401":{"description":"Unauthorized - Authentication required or failed","content":{"application/json":{"example":{"message":"Authentication required","code":"UNAUTHORIZED"},"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"example":{"message":"Insufficient permissions","code":"FORBIDDEN"},"schema":{"$ref":"#/components/schemas/ForbiddenErrorResponse"}}}},"404":{"description":"Not Found - Resource does not exist","content":{"application/json":{"example":{"message":"Resource not found","code":"NOT_FOUND"},"schema":{"$ref":"#/components/schemas/NotFoundErrorResponse"}}}},"500":{"description":"Internal Server Error - Unexpected server error","content":{"application/json":{"example":{"message":"Internal server error","code":"INTERNAL_ERROR","details":"Stack trace or error details for debugging"},"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}},"delete":{"operationId":"deleteCampaign","summary":"Delete campaign","description":"Delete a campaign and all its receivers","tags":["Campaigns"],"security":[{"bearerAuth":[]},{"cookieAuth":[]}],"parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"200 response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"],"additionalProperties":false}}}},"401":{"description":"Unauthorized - Authentication required or failed","content":{"application/json":{"example":{"message":"Authentication required","code":"UNAUTHORIZED"},"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"example":{"message":"Insufficient permissions","code":"FORBIDDEN"},"schema":{"$ref":"#/components/schemas/ForbiddenErrorResponse"}}}},"404":{"description":"Not Found - Resource does not exist","content":{"application/json":{"example":{"message":"Resource not found","code":"NOT_FOUND"},"schema":{"$ref":"#/components/schemas/NotFoundErrorResponse"}}}},"500":{"description":"Internal Server Error - Unexpected server error","content":{"application/json":{"example":{"message":"Internal server error","code":"INTERNAL_ERROR","details":"Stack trace or error details for debugging"},"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}}},"/api/campaigns/{id}/start":{"post":{"operationId":"startCampaign","summary":"Start campaign","description":"Start executing a campaign","tags":["Campaigns"],"security":[{"bearerAuth":[]},{"cookieAuth":[]}],"parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"200 response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignStartResponse"}}}},"400":{"description":"Bad Request - Invalid input or validation failed","content":{"application/json":{"example":{"message":"Validation failed","code":"BAD_REQUEST","details":[{"path":["email"],"message":"Invalid email format"}]},"schema":{"$ref":"#/components/schemas/BadRequestErrorResponse"}}}},"401":{"description":"Unauthorized - Authentication required or failed","content":{"application/json":{"example":{"message":"Authentication required","code":"UNAUTHORIZED"},"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"example":{"message":"Insufficient permissions","code":"FORBIDDEN"},"schema":{"$ref":"#/components/schemas/ForbiddenErrorResponse"}}}},"404":{"description":"Not Found - Resource does not exist","content":{"application/json":{"example":{"message":"Resource not found","code":"NOT_FOUND"},"schema":{"$ref":"#/components/schemas/NotFoundErrorResponse"}}}},"500":{"description":"Internal Server Error - Unexpected server error","content":{"application/json":{"example":{"message":"Internal server error","code":"INTERNAL_ERROR","details":"Stack trace or error details for debugging"},"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}}},"/api/campaigns/{id}/pause":{"post":{"operationId":"pauseCampaign","summary":"Pause campaign","description":"Pause a running campaign","tags":["Campaigns"],"security":[{"bearerAuth":[]},{"cookieAuth":[]}],"parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"200 response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string"},"pausedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"completedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","status","pausedAt","completedAt"],"additionalProperties":false}}}},"400":{"description":"Bad Request - Invalid input or validation failed","content":{"application/json":{"example":{"message":"Validation failed","code":"BAD_REQUEST","details":[{"path":["email"],"message":"Invalid email format"}]},"schema":{"$ref":"#/components/schemas/BadRequestErrorResponse"}}}},"401":{"description":"Unauthorized - Authentication required or failed","content":{"application/json":{"example":{"message":"Authentication required","code":"UNAUTHORIZED"},"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"example":{"message":"Insufficient permissions","code":"FORBIDDEN"},"schema":{"$ref":"#/components/schemas/ForbiddenErrorResponse"}}}},"404":{"description":"Not Found - Resource does not exist","content":{"application/json":{"example":{"message":"Resource not found","code":"NOT_FOUND"},"schema":{"$ref":"#/components/schemas/NotFoundErrorResponse"}}}},"500":{"description":"Internal Server Error - Unexpected server error","content":{"application/json":{"example":{"message":"Internal server error","code":"INTERNAL_ERROR","details":"Stack trace or error details for debugging"},"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}}},"/api/campaigns/{id}/resume":{"post":{"operationId":"resumeCampaign","summary":"Resume campaign","description":"Resume a paused campaign","tags":["Campaigns"],"security":[{"bearerAuth":[]},{"cookieAuth":[]}],"parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"200 response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string"},"pausedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"completedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","status","pausedAt","completedAt"],"additionalProperties":false}}}},"400":{"description":"Bad Request - Invalid input or validation failed","content":{"application/json":{"example":{"message":"Validation failed","code":"BAD_REQUEST","details":[{"path":["email"],"message":"Invalid email format"}]},"schema":{"$ref":"#/components/schemas/BadRequestErrorResponse"}}}},"401":{"description":"Unauthorized - Authentication required or failed","content":{"application/json":{"example":{"message":"Authentication required","code":"UNAUTHORIZED"},"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"example":{"message":"Insufficient permissions","code":"FORBIDDEN"},"schema":{"$ref":"#/components/schemas/ForbiddenErrorResponse"}}}},"404":{"description":"Not Found - Resource does not exist","content":{"application/json":{"example":{"message":"Resource not found","code":"NOT_FOUND"},"schema":{"$ref":"#/components/schemas/NotFoundErrorResponse"}}}},"500":{"description":"Internal Server Error - Unexpected server error","content":{"application/json":{"example":{"message":"Internal server error","code":"INTERNAL_ERROR","details":"Stack trace or error details for debugging"},"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}}},"/api/campaigns/{id}/cancel":{"post":{"operationId":"cancelCampaign","summary":"Cancel campaign","description":"Cancel a campaign permanently","tags":["Campaigns"],"security":[{"bearerAuth":[]},{"cookieAuth":[]}],"parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"200 response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string"},"pausedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"completedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","status","pausedAt","completedAt"],"additionalProperties":false}}}},"400":{"description":"Bad Request - Invalid input or validation failed","content":{"application/json":{"example":{"message":"Validation failed","code":"BAD_REQUEST","details":[{"path":["email"],"message":"Invalid email format"}]},"schema":{"$ref":"#/components/schemas/BadRequestErrorResponse"}}}},"401":{"description":"Unauthorized - Authentication required or failed","content":{"application/json":{"example":{"message":"Authentication required","code":"UNAUTHORIZED"},"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"example":{"message":"Insufficient permissions","code":"FORBIDDEN"},"schema":{"$ref":"#/components/schemas/ForbiddenErrorResponse"}}}},"404":{"description":"Not Found - Resource does not exist","content":{"application/json":{"example":{"message":"Resource not found","code":"NOT_FOUND"},"schema":{"$ref":"#/components/schemas/NotFoundErrorResponse"}}}},"500":{"description":"Internal Server Error - Unexpected server error","content":{"application/json":{"example":{"message":"Internal server error","code":"INTERNAL_ERROR","details":"Stack trace or error details for debugging"},"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}}},"/api/campaigns/{id}/receivers":{"get":{"operationId":"getCampaignReceivers","summary":"Get receivers","description":"Get list of receivers for a campaign","tags":["Campaigns"],"security":[{"bearerAuth":[]},{"cookieAuth":[]}],"parameters":[{"in":"query","name":"status","schema":{"type":"string","enum":["pending","queued","sending","sent","delivered","read","failed","skipped"]}},{"in":"query","name":"limit","schema":{"default":100,"type":"integer","minimum":1,"maximum":1000}},{"in":"query","name":"offset","schema":{"default":0,"type":"integer","minimum":0,"maximum":9007199254740991}},{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"200 response","content":{"application/json":{"schema":{"type":"object","properties":{"receivers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"phoneNumber":{"type":"string"},"status":{"type":"string"},"messageVariables":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},{"type":"null"}]},"sentAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"deliveredAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"readAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"errorMessage":{"anyOf":[{"type":"string"},{"type":"null"}]},"actualMessage":{"type":"string"},"sentBy":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"phoneNumber":{"type":"string"}},"required":["id","name","phoneNumber"],"additionalProperties":false},{"type":"null"}]},"createdAt":{"type":"string"}},"required":["id","phoneNumber","status","messageVariables","sentAt","deliveredAt","readAt","errorMessage","actualMessage","sentBy","createdAt"],"additionalProperties":false}},"total":{"type":"number"}},"required":["receivers","total"],"additionalProperties":false}}}},"400":{"description":"Bad Request - Invalid input or validation failed","content":{"application/json":{"example":{"message":"Validation failed","code":"BAD_REQUEST","details":[{"path":["email"],"message":"Invalid email format"}]},"schema":{"$ref":"#/components/schemas/BadRequestErrorResponse"}}}},"401":{"description":"Unauthorized - Authentication required or failed","content":{"application/json":{"example":{"message":"Authentication required","code":"UNAUTHORIZED"},"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"example":{"message":"Insufficient permissions","code":"FORBIDDEN"},"schema":{"$ref":"#/components/schemas/ForbiddenErrorResponse"}}}},"404":{"description":"Not Found - Resource does not exist","content":{"application/json":{"example":{"message":"Resource not found","code":"NOT_FOUND"},"schema":{"$ref":"#/components/schemas/NotFoundErrorResponse"}}}},"500":{"description":"Internal Server Error - Unexpected server error","content":{"application/json":{"example":{"message":"Internal server error","code":"INTERNAL_ERROR","details":"Stack trace or error details for debugging"},"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}},"post":{"operationId":"addCampaignReceivers","summary":"Add receivers","description":"Add receivers to a campaign","tags":["Campaigns"],"security":[{"bearerAuth":[]},{"cookieAuth":[]}],"parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"receivers":{"type":"array","items":{"type":"object","properties":{"phoneNumber":{"type":"string","minLength":1,"maxLength":10000,"description":"Array of phone numbers to check (without + prefix)","example":["621234567890","621234567891","621234567892"]},"messageVariables":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["phoneNumber"]}}},"required":["receivers"]}}}},"responses":{"200":{"description":"200 response","content":{"application/json":{"schema":{"type":"object","properties":{"added":{"type":"number"},"total":{"type":"number"}},"required":["added","total"],"additionalProperties":false}}}},"400":{"description":"Bad Request - Invalid input or validation failed","content":{"application/json":{"example":{"message":"Validation failed","code":"BAD_REQUEST","details":[{"path":["email"],"message":"Invalid email format"}]},"schema":{"$ref":"#/components/schemas/BadRequestErrorResponse"}}}},"401":{"description":"Unauthorized - Authentication required or failed","content":{"application/json":{"example":{"message":"Authentication required","code":"UNAUTHORIZED"},"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"example":{"message":"Insufficient permissions","code":"FORBIDDEN"},"schema":{"$ref":"#/components/schemas/ForbiddenErrorResponse"}}}},"404":{"description":"Not Found - Resource does not exist","content":{"application/json":{"example":{"message":"Resource not found","code":"NOT_FOUND"},"schema":{"$ref":"#/components/schemas/NotFoundErrorResponse"}}}},"500":{"description":"Internal Server Error - Unexpected server error","content":{"application/json":{"example":{"message":"Internal server error","code":"INTERNAL_ERROR","details":"Stack trace or error details for debugging"},"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}}},"/api/whatsapp/{accountId}/connect":{"post":{"operationId":"connectWhatsAppAccount","summary":"Connect WhatsApp account","description":"Initiate WhatsApp authentication flow for an account","tags":["WhatsApp"],"security":[{"bearerAuth":[]},{"cookieAuth":[]}],"parameters":[{"in":"path","name":"accountId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"200 response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"400":{"description":"Bad Request - Invalid input or validation failed","content":{"application/json":{"example":{"message":"Validation failed","code":"BAD_REQUEST","details":[{"path":["email"],"message":"Invalid email format"}]},"schema":{"$ref":"#/components/schemas/BadRequestErrorResponse"}}}},"401":{"description":"Unauthorized - Authentication required or failed","content":{"application/json":{"example":{"message":"Authentication required","code":"UNAUTHORIZED"},"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"example":{"message":"Insufficient permissions","code":"FORBIDDEN"},"schema":{"$ref":"#/components/schemas/ForbiddenErrorResponse"}}}},"404":{"description":"Not Found - Resource does not exist","content":{"application/json":{"example":{"message":"Resource not found","code":"NOT_FOUND"},"schema":{"$ref":"#/components/schemas/NotFoundErrorResponse"}}}},"500":{"description":"Internal Server Error - Unexpected server error","content":{"application/json":{"example":{"message":"Internal server error","code":"INTERNAL_ERROR","details":"Stack trace or error details for debugging"},"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}}},"/api/whatsapp/{accountId}/disconnect":{"post":{"operationId":"disconnectWhatsAppAccount","summary":"Disconnect WhatsApp account","description":"Disconnect a WhatsApp account session","tags":["WhatsApp"],"security":[{"bearerAuth":[]},{"cookieAuth":[]}],"parameters":[{"in":"path","name":"accountId","required":true,"schema":{"type":"string"}}],"responses":{"401":{"description":"Unauthorized - Authentication required or failed","content":{"application/json":{"example":{"message":"Authentication required","code":"UNAUTHORIZED"},"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"example":{"message":"Insufficient permissions","code":"FORBIDDEN"},"schema":{"$ref":"#/components/schemas/ForbiddenErrorResponse"}}}},"404":{"description":"Not Found - Resource does not exist","content":{"application/json":{"example":{"message":"Resource not found","code":"NOT_FOUND"},"schema":{"$ref":"#/components/schemas/NotFoundErrorResponse"}}}},"500":{"description":"Internal Server Error - Unexpected server error","content":{"application/json":{"example":{"message":"Internal server error","code":"INTERNAL_ERROR","details":"Stack trace or error details for debugging"},"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}}},"/api/whatsapp/{accountId}/qr":{"get":{"operationId":"getWhatsAppQRCode","summary":"Get QR code","description":"Get QR code for WhatsApp account authentication","tags":["WhatsApp"],"security":[{"bearerAuth":[]},{"cookieAuth":[]}],"parameters":[{"in":"path","name":"accountId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"200 response","content":{"application/json":{"schema":{"type":"object","properties":{"qr":{"type":"string"},"timestamp":{"type":"string"},"expiresAt":{"type":"string"}},"required":["qr","timestamp"],"additionalProperties":false}}}},"400":{"description":"Bad Request - Invalid input or validation failed","content":{"application/json":{"example":{"message":"Validation failed","code":"BAD_REQUEST","details":[{"path":["email"],"message":"Invalid email format"}]},"schema":{"$ref":"#/components/schemas/BadRequestErrorResponse"}}}},"401":{"description":"Unauthorized - Authentication required or failed","content":{"application/json":{"example":{"message":"Authentication required","code":"UNAUTHORIZED"},"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"example":{"message":"Insufficient permissions","code":"FORBIDDEN"},"schema":{"$ref":"#/components/schemas/ForbiddenErrorResponse"}}}},"404":{"description":"Not Found - Resource does not exist","content":{"application/json":{"example":{"message":"Resource not found","code":"NOT_FOUND"},"schema":{"$ref":"#/components/schemas/NotFoundErrorResponse"}}}},"500":{"description":"Internal Server Error - Unexpected server error","content":{"application/json":{"example":{"message":"Internal server error","code":"INTERNAL_ERROR","details":"Stack trace or error details for debugging"},"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}}},"/api/whatsapp/{accountId}/status":{"get":{"operationId":"getWhatsAppStatus","summary":"Get connection status","description":"Get connection status and info for a WhatsApp account","tags":["WhatsApp"],"security":[{"bearerAuth":[]},{"cookieAuth":[]}],"parameters":[{"in":"path","name":"accountId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"200 response","content":{"application/json":{"schema":{"type":"object","properties":{"accountId":{"type":"string"},"state":{"type":"string","enum":["disconnected","disconnecting","launching","connecting","qr_pending","connected","error"]},"connectedAt":{"type":"string"},"info":{"type":"object","properties":{"phoneNumber":{"type":"string"},"platform":{"type":"string"},"pushName":{"type":"string"},"waVersion":{"type":"string"},"device":{"type":"string"}},"required":["phoneNumber","platform","pushName"],"additionalProperties":false}},"required":["accountId","state"],"additionalProperties":false}}}},"401":{"description":"Unauthorized - Authentication required or failed","content":{"application/json":{"example":{"message":"Authentication required","code":"UNAUTHORIZED"},"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"example":{"message":"Insufficient permissions","code":"FORBIDDEN"},"schema":{"$ref":"#/components/schemas/ForbiddenErrorResponse"}}}},"404":{"description":"Not Found - Resource does not exist","content":{"application/json":{"example":{"message":"Resource not found","code":"NOT_FOUND"},"schema":{"$ref":"#/components/schemas/NotFoundErrorResponse"}}}},"500":{"description":"Internal Server Error - Unexpected server error","content":{"application/json":{"example":{"message":"Internal server error","code":"INTERNAL_ERROR","details":"Stack trace or error details for debugging"},"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}}},"/api/whatsapp/{accountId}/check-number":{"post":{"operationId":"checkWhatsAppNumber","summary":"Check phone number","description":"Check if a phone number exists on WhatsApp","tags":["WhatsApp"],"security":[{"bearerAuth":[]},{"cookieAuth":[]}],"parameters":[{"in":"path","name":"accountId","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"number":{"type":"string","minLength":1}},"required":["number"]}}}},"responses":{"200":{"description":"200 response","content":{"application/json":{"schema":{"type":"object","properties":{"exists":{"type":"boolean"},"numberId":{"type":"string"},"isBusiness":{"type":"boolean"}},"required":["exists"],"additionalProperties":false}}}},"400":{"description":"Bad Request - Invalid input or validation failed","content":{"application/json":{"example":{"message":"Validation failed","code":"BAD_REQUEST","details":[{"path":["email"],"message":"Invalid email format"}]},"schema":{"$ref":"#/components/schemas/BadRequestErrorResponse"}}}},"401":{"description":"Unauthorized - Authentication required or failed","content":{"application/json":{"example":{"message":"Authentication required","code":"UNAUTHORIZED"},"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"example":{"message":"Insufficient permissions","code":"FORBIDDEN"},"schema":{"$ref":"#/components/schemas/ForbiddenErrorResponse"}}}},"404":{"description":"Not Found - Resource does not exist","content":{"application/json":{"example":{"message":"Resource not found","code":"NOT_FOUND"},"schema":{"$ref":"#/components/schemas/NotFoundErrorResponse"}}}},"500":{"description":"Internal Server Error - Unexpected server error","content":{"application/json":{"example":{"message":"Internal server error","code":"INTERNAL_ERROR","details":"Stack trace or error details for debugging"},"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}}},"/api/whatsapp/{accountId}/logout":{"post":{"operationId":"logoutWhatsAppAccount","summary":"Logout WhatsApp account","description":"Logout and clear session data for WhatsApp account","tags":["WhatsApp"],"security":[{"bearerAuth":[]},{"cookieAuth":[]}],"parameters":[{"in":"path","name":"accountId","required":true,"schema":{"type":"string"}}],"responses":{"401":{"description":"Unauthorized - Authentication required or failed","content":{"application/json":{"example":{"message":"Authentication required","code":"UNAUTHORIZED"},"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"example":{"message":"Insufficient permissions","code":"FORBIDDEN"},"schema":{"$ref":"#/components/schemas/ForbiddenErrorResponse"}}}},"404":{"description":"Not Found - Resource does not exist","content":{"application/json":{"example":{"message":"Resource not found","code":"NOT_FOUND"},"schema":{"$ref":"#/components/schemas/NotFoundErrorResponse"}}}},"500":{"description":"Internal Server Error - Unexpected server error","content":{"application/json":{"example":{"message":"Internal server error","code":"INTERNAL_ERROR","details":"Stack trace or error details for debugging"},"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}}},"/api/whatsapp/{accountId}/repair":{"post":{"operationId":"repairWhatsAppAccount","summary":"Repair WhatsApp account","description":"Remove session data folder (.wwebjs_auth) and reset account state. Use this when an account is stuck or needs a fresh start.","tags":["WhatsApp"],"security":[{"bearerAuth":[]},{"cookieAuth":[]}],"parameters":[{"in":"path","name":"accountId","required":true,"schema":{"type":"string"}}],"responses":{"401":{"description":"Unauthorized - Authentication required or failed","content":{"application/json":{"example":{"message":"Authentication required","code":"UNAUTHORIZED"},"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"example":{"message":"Insufficient permissions","code":"FORBIDDEN"},"schema":{"$ref":"#/components/schemas/ForbiddenErrorResponse"}}}},"404":{"description":"Not Found - Resource does not exist","content":{"application/json":{"example":{"message":"Resource not found","code":"NOT_FOUND"},"schema":{"$ref":"#/components/schemas/NotFoundErrorResponse"}}}},"500":{"description":"Internal Server Error - Unexpected server error","content":{"application/json":{"example":{"message":"Internal server error","code":"INTERNAL_ERROR","details":"Stack trace or error details for debugging"},"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}}},"/api/messages":{"get":{"operationId":"listMessages","summary":"List messages","description":"Get all messages for a team with filtering options","tags":["Messages"],"security":[{"bearerAuth":[]},{"cookieAuth":[]}],"parameters":[{"in":"query","name":"teamId","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"required":true},{"in":"query","name":"status","schema":{"type":"string","enum":["pending","scheduled","sending","sent","delivered","read","failed","canceled"]}},{"in":"query","name":"limit","schema":{"default":20,"type":"integer","exclusiveMinimum":0,"maximum":100}},{"in":"query","name":"offset","schema":{"default":0,"type":"integer","minimum":0,"maximum":9007199254740991}}],"responses":{"200":{"description":"200 response","content":{"application/json":{"schema":{"type":"object","properties":{"messages":{"type":"array","items":{"$ref":"#/components/schemas/MessageWithMetadata"}},"total":{"type":"number"}},"required":["messages","total"],"additionalProperties":false}}}},"400":{"description":"Bad Request - Invalid input or validation failed","content":{"application/json":{"example":{"message":"Validation failed","code":"BAD_REQUEST","details":[{"path":["email"],"message":"Invalid email format"}]},"schema":{"$ref":"#/components/schemas/BadRequestErrorResponse"}}}},"401":{"description":"Unauthorized - Authentication required or failed","content":{"application/json":{"example":{"message":"Authentication required","code":"UNAUTHORIZED"},"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"example":{"message":"Insufficient permissions","code":"FORBIDDEN"},"schema":{"$ref":"#/components/schemas/ForbiddenErrorResponse"}}}},"500":{"description":"Internal Server Error - Unexpected server error","content":{"application/json":{"example":{"message":"Internal server error","code":"INTERNAL_ERROR","details":"Stack trace or error details for debugging"},"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}}},"/api/messages/templates":{"get":{"operationId":"listMessageTemplates","summary":"List message templates","description":"Get all message templates accessible by the user","tags":["Messages"],"security":[{"bearerAuth":[]},{"cookieAuth":[]}],"parameters":[{"in":"query","name":"teamId","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"in":"query","name":"category","schema":{"type":"string","enum":["marketing","transactional","notification","support","general"]}},{"in":"query","name":"isActive","schema":{"type":"string"}}],"responses":{"200":{"description":"200 response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/MessageTemplate"}}}}},"400":{"description":"Bad Request - Invalid input or validation failed","content":{"application/json":{"example":{"message":"Validation failed","code":"BAD_REQUEST","details":[{"path":["email"],"message":"Invalid email format"}]},"schema":{"$ref":"#/components/schemas/BadRequestErrorResponse"}}}},"401":{"description":"Unauthorized - Authentication required or failed","content":{"application/json":{"example":{"message":"Authentication required","code":"UNAUTHORIZED"},"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"example":{"message":"Insufficient permissions","code":"FORBIDDEN"},"schema":{"$ref":"#/components/schemas/ForbiddenErrorResponse"}}}},"500":{"description":"Internal Server Error - Unexpected server error","content":{"application/json":{"example":{"message":"Internal server error","code":"INTERNAL_ERROR","details":"Stack trace or error details for debugging"},"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}},"post":{"operationId":"createMessageTemplate","summary":"Create a new message template","description":"Create a reusable message template with variable substitution support","tags":["Messages"],"security":[{"bearerAuth":[]},{"cookieAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateMessageTemplateBody"}}}},"responses":{"200":{"description":"200 response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageTemplate"}}}},"400":{"description":"Bad Request - Invalid input or validation failed","content":{"application/json":{"example":{"message":"Validation failed","code":"BAD_REQUEST","details":[{"path":["email"],"message":"Invalid email format"}]},"schema":{"$ref":"#/components/schemas/BadRequestErrorResponse"}}}},"401":{"description":"Unauthorized - Authentication required or failed","content":{"application/json":{"example":{"message":"Authentication required","code":"UNAUTHORIZED"},"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"example":{"message":"Insufficient permissions","code":"FORBIDDEN"},"schema":{"$ref":"#/components/schemas/ForbiddenErrorResponse"}}}},"404":{"description":"Not Found - Resource does not exist","content":{"application/json":{"example":{"message":"Resource not found","code":"NOT_FOUND"},"schema":{"$ref":"#/components/schemas/NotFoundErrorResponse"}}}},"500":{"description":"Internal Server Error - Unexpected server error","content":{"application/json":{"example":{"message":"Internal server error","code":"INTERNAL_ERROR","details":"Stack trace or error details for debugging"},"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}}},"/api/messages/templates/{id}":{"get":{"operationId":"getMessageTemplate","summary":"Get a message template","description":"Get a message template by ID","tags":["Messages"],"security":[{"bearerAuth":[]},{"cookieAuth":[]}],"parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"200 response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageTemplate"}}}},"401":{"description":"Unauthorized - Authentication required or failed","content":{"application/json":{"example":{"message":"Authentication required","code":"UNAUTHORIZED"},"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"example":{"message":"Insufficient permissions","code":"FORBIDDEN"},"schema":{"$ref":"#/components/schemas/ForbiddenErrorResponse"}}}},"404":{"description":"Not Found - Resource does not exist","content":{"application/json":{"example":{"message":"Resource not found","code":"NOT_FOUND"},"schema":{"$ref":"#/components/schemas/NotFoundErrorResponse"}}}},"500":{"description":"Internal Server Error - Unexpected server error","content":{"application/json":{"example":{"message":"Internal server error","code":"INTERNAL_ERROR","details":"Stack trace or error details for debugging"},"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}},"put":{"operationId":"updateMessageTemplate","summary":"Update a message template","description":"Update an existing message template","tags":["Messages"],"security":[{"bearerAuth":[]},{"cookieAuth":[]}],"parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateMessageTemplateBody"}}}},"responses":{"200":{"description":"200 response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageTemplate"}}}},"400":{"description":"Bad Request - Invalid input or validation failed","content":{"application/json":{"example":{"message":"Validation failed","code":"BAD_REQUEST","details":[{"path":["email"],"message":"Invalid email format"}]},"schema":{"$ref":"#/components/schemas/BadRequestErrorResponse"}}}},"401":{"description":"Unauthorized - Authentication required or failed","content":{"application/json":{"example":{"message":"Authentication required","code":"UNAUTHORIZED"},"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"example":{"message":"Insufficient permissions","code":"FORBIDDEN"},"schema":{"$ref":"#/components/schemas/ForbiddenErrorResponse"}}}},"404":{"description":"Not Found - Resource does not exist","content":{"application/json":{"example":{"message":"Resource not found","code":"NOT_FOUND"},"schema":{"$ref":"#/components/schemas/NotFoundErrorResponse"}}}},"500":{"description":"Internal Server Error - Unexpected server error","content":{"application/json":{"example":{"message":"Internal server error","code":"INTERNAL_ERROR","details":"Stack trace or error details for debugging"},"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}},"delete":{"operationId":"deleteMessageTemplate","summary":"Delete a message template","description":"Delete a message template by ID","tags":["Messages"],"security":[{"bearerAuth":[]},{"cookieAuth":[]}],"parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"200 response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string"}},"required":["success","message"],"additionalProperties":false}}}},"401":{"description":"Unauthorized - Authentication required or failed","content":{"application/json":{"example":{"message":"Authentication required","code":"UNAUTHORIZED"},"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"example":{"message":"Insufficient permissions","code":"FORBIDDEN"},"schema":{"$ref":"#/components/schemas/ForbiddenErrorResponse"}}}},"404":{"description":"Not Found - Resource does not exist","content":{"application/json":{"example":{"message":"Resource not found","code":"NOT_FOUND"},"schema":{"$ref":"#/components/schemas/NotFoundErrorResponse"}}}},"500":{"description":"Internal Server Error - Unexpected server error","content":{"application/json":{"example":{"message":"Internal server error","code":"INTERNAL_ERROR","details":"Stack trace or error details for debugging"},"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}}},"/api/messages/templates/{id}/duplicate":{"post":{"operationId":"duplicateMessageTemplate","summary":"Duplicate a message template","description":"Create a copy of an existing message template","tags":["Messages"],"security":[{"bearerAuth":[]},{"cookieAuth":[]}],"parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"200 response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageTemplate"}}}},"401":{"description":"Unauthorized - Authentication required or failed","content":{"application/json":{"example":{"message":"Authentication required","code":"UNAUTHORIZED"},"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"example":{"message":"Insufficient permissions","code":"FORBIDDEN"},"schema":{"$ref":"#/components/schemas/ForbiddenErrorResponse"}}}},"404":{"description":"Not Found - Resource does not exist","content":{"application/json":{"example":{"message":"Resource not found","code":"NOT_FOUND"},"schema":{"$ref":"#/components/schemas/NotFoundErrorResponse"}}}},"500":{"description":"Internal Server Error - Unexpected server error","content":{"application/json":{"example":{"message":"Internal server error","code":"INTERNAL_ERROR","details":"Stack trace or error details for debugging"},"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}}},"/api/messaging/one-time/send":{"post":{"operationId":"sendOneTimeMessage","summary":"Send one-time message","description":"Queue a one-time message for sending","tags":["One-Time Messaging"],"security":[{"bearerAuth":[]},{"cookieAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendMessageBody"}}}},"responses":{"200":{"description":"200 response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendMessageResponse"}}}},"400":{"description":"Bad Request - Invalid input or validation failed","content":{"application/json":{"example":{"message":"Validation failed","code":"BAD_REQUEST","details":[{"path":["email"],"message":"Invalid email format"}]},"schema":{"$ref":"#/components/schemas/BadRequestErrorResponse"}}}},"401":{"description":"Unauthorized - Authentication required or failed","content":{"application/json":{"example":{"message":"Authentication required","code":"UNAUTHORIZED"},"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"example":{"message":"Insufficient permissions","code":"FORBIDDEN"},"schema":{"$ref":"#/components/schemas/ForbiddenErrorResponse"}}}},"404":{"description":"Not Found - Resource does not exist","content":{"application/json":{"example":{"message":"Resource not found","code":"NOT_FOUND"},"schema":{"$ref":"#/components/schemas/NotFoundErrorResponse"}}}},"500":{"description":"Internal Server Error - Unexpected server error","content":{"application/json":{"example":{"message":"Internal server error","code":"INTERNAL_ERROR","details":"Stack trace or error details for debugging"},"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}}},"/api/messaging/one-time/queue":{"get":{"operationId":"listOneTimeMessageQueue","summary":"List queued messages","description":"List one-time messages in the queue for the user's team","tags":["One-Time Messaging"],"security":[{"bearerAuth":[]},{"cookieAuth":[]}],"parameters":[{"in":"query","name":"teamId","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"required":true},{"in":"query","name":"status","schema":{"type":"string","enum":["pending","processing","sent","failed","canceled"]}},{"in":"query","name":"limit","schema":{"default":50,"type":"integer","minimum":1,"maximum":1000}},{"in":"query","name":"offset","schema":{"default":0,"type":"integer","minimum":0,"maximum":9007199254740991}}],"responses":{"200":{"description":"200 response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueueListResponse"}}}},"400":{"description":"Bad Request - Invalid input or validation failed","content":{"application/json":{"example":{"message":"Validation failed","code":"BAD_REQUEST","details":[{"path":["email"],"message":"Invalid email format"}]},"schema":{"$ref":"#/components/schemas/BadRequestErrorResponse"}}}},"401":{"description":"Unauthorized - Authentication required or failed","content":{"application/json":{"example":{"message":"Authentication required","code":"UNAUTHORIZED"},"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"example":{"message":"Insufficient permissions","code":"FORBIDDEN"},"schema":{"$ref":"#/components/schemas/ForbiddenErrorResponse"}}}},"500":{"description":"Internal Server Error - Unexpected server error","content":{"application/json":{"example":{"message":"Internal server error","code":"INTERNAL_ERROR","details":"Stack trace or error details for debugging"},"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}}},"/api/messaging/one-time/{messageId}":{"get":{"operationId":"getOneTimeMessage","summary":"Get message details","description":"Get details of a specific one-time message","tags":["One-Time Messaging"],"security":[{"bearerAuth":[]},{"cookieAuth":[]}],"parameters":[{"in":"query","name":"teamId","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"in":"path","name":"messageId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"200 response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OneTimeMessageResponse"}}}},"400":{"description":"Bad Request - Invalid input or validation failed","content":{"application/json":{"example":{"message":"Validation failed","code":"BAD_REQUEST","details":[{"path":["email"],"message":"Invalid email format"}]},"schema":{"$ref":"#/components/schemas/BadRequestErrorResponse"}}}},"401":{"description":"Unauthorized - Authentication required or failed","content":{"application/json":{"example":{"message":"Authentication required","code":"UNAUTHORIZED"},"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"example":{"message":"Insufficient permissions","code":"FORBIDDEN"},"schema":{"$ref":"#/components/schemas/ForbiddenErrorResponse"}}}},"404":{"description":"Not Found - Resource does not exist","content":{"application/json":{"example":{"message":"Resource not found","code":"NOT_FOUND"},"schema":{"$ref":"#/components/schemas/NotFoundErrorResponse"}}}},"500":{"description":"Internal Server Error - Unexpected server error","content":{"application/json":{"example":{"message":"Internal server error","code":"INTERNAL_ERROR","details":"Stack trace or error details for debugging"},"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}}},"/api/messaging/one-time/{messageId}/cancel":{"post":{"operationId":"cancelOneTimeMessage","summary":"Cancel message","description":"Cancel a pending or processing one-time message","tags":["One-Time Messaging"],"security":[{"bearerAuth":[]},{"cookieAuth":[]}],"parameters":[{"in":"query","name":"teamId","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"in":"path","name":"messageId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"200 response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","const":true},"message":{"type":"string"}},"required":["success","message"],"additionalProperties":false}}}},"400":{"description":"Bad Request - Invalid input or validation failed","content":{"application/json":{"example":{"message":"Validation failed","code":"BAD_REQUEST","details":[{"path":["email"],"message":"Invalid email format"}]},"schema":{"$ref":"#/components/schemas/BadRequestErrorResponse"}}}},"401":{"description":"Unauthorized - Authentication required or failed","content":{"application/json":{"example":{"message":"Authentication required","code":"UNAUTHORIZED"},"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"example":{"message":"Insufficient permissions","code":"FORBIDDEN"},"schema":{"$ref":"#/components/schemas/ForbiddenErrorResponse"}}}},"404":{"description":"Not Found - Resource does not exist","content":{"application/json":{"example":{"message":"Resource not found","code":"NOT_FOUND"},"schema":{"$ref":"#/components/schemas/NotFoundErrorResponse"}}}},"500":{"description":"Internal Server Error - Unexpected server error","content":{"application/json":{"example":{"message":"Internal server error","code":"INTERNAL_ERROR","details":"Stack trace or error details for debugging"},"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}}},"/api/messaging/one-time/{messageId}/retry":{"post":{"operationId":"retryOneTimeMessage","summary":"Retry message","description":"Retry a failed one-time message","tags":["One-Time Messaging"],"security":[{"bearerAuth":[]},{"cookieAuth":[]}],"parameters":[{"in":"query","name":"teamId","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"in":"path","name":"messageId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"200 response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","const":true},"message":{"type":"string"}},"required":["success","message"],"additionalProperties":false}}}},"400":{"description":"Bad Request - Invalid input or validation failed","content":{"application/json":{"example":{"message":"Validation failed","code":"BAD_REQUEST","details":[{"path":["email"],"message":"Invalid email format"}]},"schema":{"$ref":"#/components/schemas/BadRequestErrorResponse"}}}},"401":{"description":"Unauthorized - Authentication required or failed","content":{"application/json":{"example":{"message":"Authentication required","code":"UNAUTHORIZED"},"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"example":{"message":"Insufficient permissions","code":"FORBIDDEN"},"schema":{"$ref":"#/components/schemas/ForbiddenErrorResponse"}}}},"404":{"description":"Not Found - Resource does not exist","content":{"application/json":{"example":{"message":"Resource not found","code":"NOT_FOUND"},"schema":{"$ref":"#/components/schemas/NotFoundErrorResponse"}}}},"500":{"description":"Internal Server Error - Unexpected server error","content":{"application/json":{"example":{"message":"Internal server error","code":"INTERNAL_ERROR","details":"Stack trace or error details for debugging"},"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}}},"/api/messaging/one-time/stats":{"get":{"operationId":"getOneTimeMessageStats","summary":"Get queue statistics","description":"Get queue statistics for the user's team","tags":["One-Time Messaging"],"security":[{"bearerAuth":[]},{"cookieAuth":[]}],"parameters":[{"in":"query","name":"teamId","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"required":true}],"responses":{"200":{"description":"200 response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueueStatsResponse"}}}},"400":{"description":"Bad Request - Invalid input or validation failed","content":{"application/json":{"example":{"message":"Validation failed","code":"BAD_REQUEST","details":[{"path":["email"],"message":"Invalid email format"}]},"schema":{"$ref":"#/components/schemas/BadRequestErrorResponse"}}}},"401":{"description":"Unauthorized - Authentication required or failed","content":{"application/json":{"example":{"message":"Authentication required","code":"UNAUTHORIZED"},"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"example":{"message":"Insufficient permissions","code":"FORBIDDEN"},"schema":{"$ref":"#/components/schemas/ForbiddenErrorResponse"}}}},"500":{"description":"Internal Server Error - Unexpected server error","content":{"application/json":{"example":{"message":"Internal server error","code":"INTERNAL_ERROR","details":"Stack trace or error details for debugging"},"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}}},"/api/warmup-templates":{"get":{"operationId":"listWarmupTemplates","summary":"List warmup templates","description":"Get list of warmup templates for a team","tags":["Warmup Templates"],"security":[{"bearerAuth":[]},{"cookieAuth":[]}],"parameters":[{"in":"query","name":"teamId","schema":{"type":"string"},"required":true},{"in":"query","name":"isSystem","schema":{"type":"string","enum":["true","false"]}},{"in":"query","name":"tags","schema":{"type":"string"}}],"responses":{"200":{"description":"200 response","content":{"application/json":{"schema":{"type":"object","properties":{"templates":{"type":"array","items":{"$ref":"#/components/schemas/WarmupTemplateResponse"}},"total":{"type":"number"}},"required":["templates","total"],"additionalProperties":false}}}},"400":{"description":"Bad Request - Invalid input or validation failed","content":{"application/json":{"example":{"message":"Validation failed","code":"BAD_REQUEST","details":[{"path":["email"],"message":"Invalid email format"}]},"schema":{"$ref":"#/components/schemas/BadRequestErrorResponse"}}}},"401":{"description":"Unauthorized - Authentication required or failed","content":{"application/json":{"example":{"message":"Authentication required","code":"UNAUTHORIZED"},"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"example":{"message":"Insufficient permissions","code":"FORBIDDEN"},"schema":{"$ref":"#/components/schemas/ForbiddenErrorResponse"}}}},"500":{"description":"Internal Server Error - Unexpected server error","content":{"application/json":{"example":{"message":"Internal server error","code":"INTERNAL_ERROR","details":"Stack trace or error details for debugging"},"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}},"post":{"operationId":"createWarmupTemplate","summary":"Create warmup template","description":"Create a new warmup template","tags":["Warmup Templates"],"security":[{"bearerAuth":[]},{"cookieAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"teamId":{"type":"string"},"name":{"type":"string","minLength":3,"maxLength":255},"description":{"type":"string","maxLength":1000},"actions":{"minItems":1,"type":"array","items":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"send_message"},"delayMinutes":{"type":"number"},"delayVarianceMinutes":{"type":"number"},"actor":{"anyOf":[{"type":"string","const":"account_1"},{"type":"string","const":"account_2"}]},"message":{"type":"object","properties":{"text":{"type":"string"},"mediaUrl":{"type":"string"}}}},"required":["id","type","delayMinutes","delayVarianceMinutes","actor","message"]},{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"send_reaction"},"delayMinutes":{"type":"number"},"delayVarianceMinutes":{"type":"number"},"actor":{"anyOf":[{"type":"string","const":"account_1"},{"type":"string","const":"account_2"}]},"reaction":{"type":"object","properties":{"replyToActionId":{"type":"string"},"emoji":{"type":"string"}},"required":["replyToActionId","emoji"]}},"required":["id","type","delayMinutes","delayVarianceMinutes","actor","reaction"]},{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"send_reply"},"delayMinutes":{"type":"number"},"delayVarianceMinutes":{"type":"number"},"actor":{"anyOf":[{"type":"string","const":"account_1"},{"type":"string","const":"account_2"}]},"reply":{"type":"object","properties":{"replyToActionId":{"type":"string"},"text":{"type":"string"}},"required":["replyToActionId","text"]}},"required":["id","type","delayMinutes","delayVarianceMinutes","actor","reply"]},{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"pause"},"delayMinutes":{"type":"number"},"delayVarianceMinutes":{"type":"number"}},"required":["id","type","delayMinutes","delayVarianceMinutes"]}]}},"tags":{"type":"array","items":{"type":"string"}},"variableModes":{"type":"array","items":{"type":"object","properties":{"mode":{"type":"string","pattern":"^[a-zA-Z0-9_-]+$"},"variables":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["mode","variables"]}}},"required":["teamId","name","actions"]}}}},"responses":{"200":{"description":"200 response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WarmupTemplateResponse"}}}},"400":{"description":"Bad Request - Invalid input or validation failed","content":{"application/json":{"example":{"message":"Validation failed","code":"BAD_REQUEST","details":[{"path":["email"],"message":"Invalid email format"}]},"schema":{"$ref":"#/components/schemas/BadRequestErrorResponse"}}}},"401":{"description":"Unauthorized - Authentication required or failed","content":{"application/json":{"example":{"message":"Authentication required","code":"UNAUTHORIZED"},"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"example":{"message":"Insufficient permissions","code":"FORBIDDEN"},"schema":{"$ref":"#/components/schemas/ForbiddenErrorResponse"}}}},"500":{"description":"Internal Server Error - Unexpected server error","content":{"application/json":{"example":{"message":"Internal server error","code":"INTERNAL_ERROR","details":"Stack trace or error details for debugging"},"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}}},"/api/warmup-templates/{id}":{"get":{"operationId":"getWarmupTemplate","summary":"Get warmup template","description":"Get a warmup template by ID","tags":["Warmup Templates"],"security":[{"bearerAuth":[]},{"cookieAuth":[]}],"parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"200 response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WarmupTemplateResponse"}}}},"401":{"description":"Unauthorized - Authentication required or failed","content":{"application/json":{"example":{"message":"Authentication required","code":"UNAUTHORIZED"},"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"example":{"message":"Insufficient permissions","code":"FORBIDDEN"},"schema":{"$ref":"#/components/schemas/ForbiddenErrorResponse"}}}},"404":{"description":"Not Found - Resource does not exist","content":{"application/json":{"example":{"message":"Resource not found","code":"NOT_FOUND"},"schema":{"$ref":"#/components/schemas/NotFoundErrorResponse"}}}},"500":{"description":"Internal Server Error - Unexpected server error","content":{"application/json":{"example":{"message":"Internal server error","code":"INTERNAL_ERROR","details":"Stack trace or error details for debugging"},"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}},"patch":{"operationId":"updateWarmupTemplate","summary":"Update warmup template","description":"Update a warmup template","tags":["Warmup Templates"],"security":[{"bearerAuth":[]},{"cookieAuth":[]}],"parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":3,"maxLength":255},"description":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}]},"actions":{"minItems":1,"type":"array","items":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"send_message"},"delayMinutes":{"type":"number"},"delayVarianceMinutes":{"type":"number"},"actor":{"anyOf":[{"type":"string","const":"account_1"},{"type":"string","const":"account_2"}]},"message":{"type":"object","properties":{"text":{"type":"string"},"mediaUrl":{"type":"string"}}}},"required":["id","type","delayMinutes","delayVarianceMinutes","actor","message"]},{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"send_reaction"},"delayMinutes":{"type":"number"},"delayVarianceMinutes":{"type":"number"},"actor":{"anyOf":[{"type":"string","const":"account_1"},{"type":"string","const":"account_2"}]},"reaction":{"type":"object","properties":{"replyToActionId":{"type":"string"},"emoji":{"type":"string"}},"required":["replyToActionId","emoji"]}},"required":["id","type","delayMinutes","delayVarianceMinutes","actor","reaction"]},{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"send_reply"},"delayMinutes":{"type":"number"},"delayVarianceMinutes":{"type":"number"},"actor":{"anyOf":[{"type":"string","const":"account_1"},{"type":"string","const":"account_2"}]},"reply":{"type":"object","properties":{"replyToActionId":{"type":"string"},"text":{"type":"string"}},"required":["replyToActionId","text"]}},"required":["id","type","delayMinutes","delayVarianceMinutes","actor","reply"]},{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"pause"},"delayMinutes":{"type":"number"},"delayVarianceMinutes":{"type":"number"}},"required":["id","type","delayMinutes","delayVarianceMinutes"]}]}},"tags":{"type":"array","items":{"type":"string"}},"variableModes":{"type":"array","items":{"type":"object","properties":{"mode":{"type":"string","pattern":"^[a-zA-Z0-9_-]+$"},"variables":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["mode","variables"]}}}}}}},"responses":{"200":{"description":"200 response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WarmupTemplateResponse"}}}},"400":{"description":"Bad Request - Invalid input or validation failed","content":{"application/json":{"example":{"message":"Validation failed","code":"BAD_REQUEST","details":[{"path":["email"],"message":"Invalid email format"}]},"schema":{"$ref":"#/components/schemas/BadRequestErrorResponse"}}}},"401":{"description":"Unauthorized - Authentication required or failed","content":{"application/json":{"example":{"message":"Authentication required","code":"UNAUTHORIZED"},"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"example":{"message":"Insufficient permissions","code":"FORBIDDEN"},"schema":{"$ref":"#/components/schemas/ForbiddenErrorResponse"}}}},"404":{"description":"Not Found - Resource does not exist","content":{"application/json":{"example":{"message":"Resource not found","code":"NOT_FOUND"},"schema":{"$ref":"#/components/schemas/NotFoundErrorResponse"}}}},"500":{"description":"Internal Server Error - Unexpected server error","content":{"application/json":{"example":{"message":"Internal server error","code":"INTERNAL_ERROR","details":"Stack trace or error details for debugging"},"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}},"delete":{"operationId":"deleteWarmupTemplate","summary":"Delete warmup template","description":"Delete a warmup template","tags":["Warmup Templates"],"security":[{"bearerAuth":[]},{"cookieAuth":[]}],"parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"200 response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"],"additionalProperties":false}}}},"401":{"description":"Unauthorized - Authentication required or failed","content":{"application/json":{"example":{"message":"Authentication required","code":"UNAUTHORIZED"},"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"example":{"message":"Insufficient permissions","code":"FORBIDDEN"},"schema":{"$ref":"#/components/schemas/ForbiddenErrorResponse"}}}},"404":{"description":"Not Found - Resource does not exist","content":{"application/json":{"example":{"message":"Resource not found","code":"NOT_FOUND"},"schema":{"$ref":"#/components/schemas/NotFoundErrorResponse"}}}},"500":{"description":"Internal Server Error - Unexpected server error","content":{"application/json":{"example":{"message":"Internal server error","code":"INTERNAL_ERROR","details":"Stack trace or error details for debugging"},"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}}},"/api/warmup-templates/{id}/duplicate":{"post":{"operationId":"duplicateWarmupTemplate","summary":"Duplicate warmup template","description":"Create a copy of a warmup template","tags":["Warmup Templates"],"security":[{"bearerAuth":[]},{"cookieAuth":[]}],"parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"200 response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WarmupTemplateResponse"}}}},"401":{"description":"Unauthorized - Authentication required or failed","content":{"application/json":{"example":{"message":"Authentication required","code":"UNAUTHORIZED"},"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"example":{"message":"Insufficient permissions","code":"FORBIDDEN"},"schema":{"$ref":"#/components/schemas/ForbiddenErrorResponse"}}}},"404":{"description":"Not Found - Resource does not exist","content":{"application/json":{"example":{"message":"Resource not found","code":"NOT_FOUND"},"schema":{"$ref":"#/components/schemas/NotFoundErrorResponse"}}}},"500":{"description":"Internal Server Error - Unexpected server error","content":{"application/json":{"example":{"message":"Internal server error","code":"INTERNAL_ERROR","details":"Stack trace or error details for debugging"},"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}}},"/api/warmup-templates/import":{"post":{"operationId":"importWarmupTemplates","summary":"Bulk import warmup templates","description":"Import one or more warmup templates from a .chat script file","tags":["Warmup Templates"],"security":[{"bearerAuth":[]},{"cookieAuth":[]}],"responses":{"200":{"description":"200 response","content":{"application/json":{"schema":{"type":"object","properties":{"created":{"type":"array","items":{"$ref":"#/components/schemas/WarmupTemplateResponse"}},"issues":{"type":"array","items":{"type":"object","properties":{"block":{"type":"number"},"line":{"type":"number"},"message":{"type":"string"}},"required":["block","line","message"],"additionalProperties":false}}},"required":["created","issues"],"additionalProperties":false}}}},"400":{"description":"Bad Request - Invalid input or validation failed","content":{"application/json":{"example":{"message":"Validation failed","code":"BAD_REQUEST","details":[{"path":["email"],"message":"Invalid email format"}]},"schema":{"$ref":"#/components/schemas/BadRequestErrorResponse"}}}},"401":{"description":"Unauthorized - Authentication required or failed","content":{"application/json":{"example":{"message":"Authentication required","code":"UNAUTHORIZED"},"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"example":{"message":"Insufficient permissions","code":"FORBIDDEN"},"schema":{"$ref":"#/components/schemas/ForbiddenErrorResponse"}}}},"500":{"description":"Internal Server Error - Unexpected server error","content":{"application/json":{"example":{"message":"Internal server error","code":"INTERNAL_ERROR","details":"Stack trace or error details for debugging"},"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}}},"/api/warmup-executions":{"get":{"operationId":"listWarmupExecutions","summary":"List warmup executions","description":"List warmup executions for a team","tags":["Warmup Executions"],"security":[{"bearerAuth":[]},{"cookieAuth":[]}],"parameters":[{"in":"query","name":"teamId","schema":{"type":"string"},"required":true},{"in":"query","name":"status","schema":{"type":"string"}},{"in":"query","name":"limit","schema":{"type":"string"}}],"responses":{"200":{"description":"200 response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListExecutionsResponse"}}}},"400":{"description":"Bad Request - Invalid input or validation failed","content":{"application/json":{"example":{"message":"Validation failed","code":"BAD_REQUEST","details":[{"path":["email"],"message":"Invalid email format"}]},"schema":{"$ref":"#/components/schemas/BadRequestErrorResponse"}}}},"401":{"description":"Unauthorized - Authentication required or failed","content":{"application/json":{"example":{"message":"Authentication required","code":"UNAUTHORIZED"},"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"example":{"message":"Insufficient permissions","code":"FORBIDDEN"},"schema":{"$ref":"#/components/schemas/ForbiddenErrorResponse"}}}},"500":{"description":"Internal Server Error - Unexpected server error","content":{"application/json":{"example":{"message":"Internal server error","code":"INTERNAL_ERROR","details":"Stack trace or error details for debugging"},"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}},"post":{"operationId":"createWarmupExecution","summary":"Create warmup execution","description":"Create a new warmup execution","tags":["Warmup Executions"],"security":[{"bearerAuth":[]},{"cookieAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"teamId":{"type":"string"},"templateId":{"type":"string"},"accountPairIds":{"type":"array","prefixItems":[{"type":"string"},{"type":"string"}]},"executionType":{"type":"string","enum":["immediate","scheduled","recurring"]},"scheduledAt":{"type":"string"},"recurrenceConfig":{"type":"object","properties":{"pattern":{"anyOf":[{"type":"string","const":"interval"},{"type":"string","const":"daily"},{"type":"string","const":"weekly"}]},"intervalHours":{"type":"number"},"dailyAtHour":{"type":"number","minimum":0,"maximum":23},"dailyAtMinute":{"type":"number","minimum":0,"maximum":59},"weeklyDay":{"anyOf":[{"type":"number","const":0},{"type":"number","const":1},{"type":"number","const":2},{"type":"number","const":3},{"type":"number","const":4},{"type":"number","const":5},{"type":"number","const":6}]},"weeklyAtHour":{"type":"number","minimum":0,"maximum":23},"weeklyAtMinute":{"type":"number","minimum":0,"maximum":59},"recurrenceStartDate":{"type":"string"},"recurrenceEndDate":{"type":"string"},"maxOccurrences":{"type":"number"},"currentOccurrence":{"type":"number"},"canceledAt":{"type":"string"},"timezone":{"default":"UTC","type":"string"}},"required":["pattern","recurrenceStartDate"]},"selectedVariableMode":{"type":"string"}},"required":["teamId","templateId","accountPairIds","executionType"]}}}},"responses":{"200":{"description":"200 response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WarmupExecutionResponse"}}}},"400":{"description":"Bad Request - Invalid input or validation failed","content":{"application/json":{"example":{"message":"Validation failed","code":"BAD_REQUEST","details":[{"path":["email"],"message":"Invalid email format"}]},"schema":{"$ref":"#/components/schemas/BadRequestErrorResponse"}}}},"401":{"description":"Unauthorized - Authentication required or failed","content":{"application/json":{"example":{"message":"Authentication required","code":"UNAUTHORIZED"},"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"example":{"message":"Insufficient permissions","code":"FORBIDDEN"},"schema":{"$ref":"#/components/schemas/ForbiddenErrorResponse"}}}},"500":{"description":"Internal Server Error - Unexpected server error","content":{"application/json":{"example":{"message":"Internal server error","code":"INTERNAL_ERROR","details":"Stack trace or error details for debugging"},"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}}},"/api/warmup-executions/{id}":{"get":{"operationId":"getWarmupExecution","summary":"Get warmup execution","description":"Get a warmup execution by ID","tags":["Warmup Executions"],"security":[{"bearerAuth":[]},{"cookieAuth":[]}],"parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"200 response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WarmupExecutionResponse"}}}},"401":{"description":"Unauthorized - Authentication required or failed","content":{"application/json":{"example":{"message":"Authentication required","code":"UNAUTHORIZED"},"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"example":{"message":"Insufficient permissions","code":"FORBIDDEN"},"schema":{"$ref":"#/components/schemas/ForbiddenErrorResponse"}}}},"404":{"description":"Not Found - Resource does not exist","content":{"application/json":{"example":{"message":"Resource not found","code":"NOT_FOUND"},"schema":{"$ref":"#/components/schemas/NotFoundErrorResponse"}}}},"500":{"description":"Internal Server Error - Unexpected server error","content":{"application/json":{"example":{"message":"Internal server error","code":"INTERNAL_ERROR","details":"Stack trace or error details for debugging"},"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}}},"/api/warmup-executions/{id}/children":{"get":{"operationId":"getChildExecutions","summary":"Get child executions","description":"Get child executions for a recurring parent execution","tags":["Warmup Executions"],"security":[{"bearerAuth":[]},{"cookieAuth":[]}],"parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"200 response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChildExecutionsResponse"}}}},"401":{"description":"Unauthorized - Authentication required or failed","content":{"application/json":{"example":{"message":"Authentication required","code":"UNAUTHORIZED"},"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"example":{"message":"Insufficient permissions","code":"FORBIDDEN"},"schema":{"$ref":"#/components/schemas/ForbiddenErrorResponse"}}}},"404":{"description":"Not Found - Resource does not exist","content":{"application/json":{"example":{"message":"Resource not found","code":"NOT_FOUND"},"schema":{"$ref":"#/components/schemas/NotFoundErrorResponse"}}}},"500":{"description":"Internal Server Error - Unexpected server error","content":{"application/json":{"example":{"message":"Internal server error","code":"INTERNAL_ERROR","details":"Stack trace or error details for debugging"},"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}}},"/api/warmup-executions/{id}/progress":{"get":{"operationId":"getWarmupExecutionProgress","summary":"Get execution progress","description":"Get progress details for a warmup execution","tags":["Warmup Executions"],"security":[{"bearerAuth":[]},{"cookieAuth":[]}],"parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"200 response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExecutionProgressResponse"}}}},"401":{"description":"Unauthorized - Authentication required or failed","content":{"application/json":{"example":{"message":"Authentication required","code":"UNAUTHORIZED"},"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"example":{"message":"Insufficient permissions","code":"FORBIDDEN"},"schema":{"$ref":"#/components/schemas/ForbiddenErrorResponse"}}}},"404":{"description":"Not Found - Resource does not exist","content":{"application/json":{"example":{"message":"Resource not found","code":"NOT_FOUND"},"schema":{"$ref":"#/components/schemas/NotFoundErrorResponse"}}}},"500":{"description":"Internal Server Error - Unexpected server error","content":{"application/json":{"example":{"message":"Internal server error","code":"INTERNAL_ERROR","details":"Stack trace or error details for debugging"},"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}}},"/api/warmup-executions/{id}/cancel":{"post":{"operationId":"cancelWarmupExecution","summary":"Cancel execution","description":"Cancel a running or pending warmup execution","tags":["Warmup Executions"],"security":[{"bearerAuth":[]},{"cookieAuth":[]}],"parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"200 response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CancelExecutionResponse"}}}},"400":{"description":"Bad Request - Invalid input or validation failed","content":{"application/json":{"example":{"message":"Validation failed","code":"BAD_REQUEST","details":[{"path":["email"],"message":"Invalid email format"}]},"schema":{"$ref":"#/components/schemas/BadRequestErrorResponse"}}}},"401":{"description":"Unauthorized - Authentication required or failed","content":{"application/json":{"example":{"message":"Authentication required","code":"UNAUTHORIZED"},"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"example":{"message":"Insufficient permissions","code":"FORBIDDEN"},"schema":{"$ref":"#/components/schemas/ForbiddenErrorResponse"}}}},"404":{"description":"Not Found - Resource does not exist","content":{"application/json":{"example":{"message":"Resource not found","code":"NOT_FOUND"},"schema":{"$ref":"#/components/schemas/NotFoundErrorResponse"}}}},"500":{"description":"Internal Server Error - Unexpected server error","content":{"application/json":{"example":{"message":"Internal server error","code":"INTERNAL_ERROR","details":"Stack trace or error details for debugging"},"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}}},"/api/number-checks/batches":{"get":{"operationId":"listTeamBatches","summary":"List team batches","description":"Lists all number checking batches for the specified team","tags":["Number Checking"],"security":[{"bearerAuth":[]},{"cookieAuth":[]}],"parameters":[{"in":"query","name":"teamId","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"required":true},{"in":"query","name":"status","schema":{"type":"string","enum":["pending","processing","completed","failed","canceled"]}},{"in":"query","name":"limit","schema":{"default":20,"type":"number","minimum":1,"maximum":100}},{"in":"query","name":"offset","schema":{"default":0,"type":"number","minimum":0}}],"responses":{"200":{"description":"200 response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchListResponse"}}}},"400":{"description":"Bad Request - Invalid input or validation failed","content":{"application/json":{"example":{"message":"Validation failed","code":"BAD_REQUEST","details":[{"path":["email"],"message":"Invalid email format"}]},"schema":{"$ref":"#/components/schemas/BadRequestErrorResponse"}}}},"401":{"description":"Unauthorized - Authentication required or failed","content":{"application/json":{"example":{"message":"Authentication required","code":"UNAUTHORIZED"},"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"example":{"message":"Insufficient permissions","code":"FORBIDDEN"},"schema":{"$ref":"#/components/schemas/ForbiddenErrorResponse"}}}},"500":{"description":"Internal Server Error - Unexpected server error","content":{"application/json":{"example":{"message":"Internal server error","code":"INTERNAL_ERROR","details":"Stack trace or error details for debugging"},"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}},"post":{"operationId":"createBatch","summary":"Create number checking batch","description":"Creates a new batch for checking if phone numbers are on WhatsApp. Automatically detects and removes duplicates.","tags":["Number Checking"],"security":[{"bearerAuth":[]},{"cookieAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateBatchBody"}}}},"responses":{"200":{"description":"200 response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchCreationResponse"}}}},"400":{"description":"Bad Request - Invalid input or validation failed","content":{"application/json":{"example":{"message":"Validation failed","code":"BAD_REQUEST","details":[{"path":["email"],"message":"Invalid email format"}]},"schema":{"$ref":"#/components/schemas/BadRequestErrorResponse"}}}},"401":{"description":"Unauthorized - Authentication required or failed","content":{"application/json":{"example":{"message":"Authentication required","code":"UNAUTHORIZED"},"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"500":{"description":"Internal Server Error - Unexpected server error","content":{"application/json":{"example":{"message":"Internal server error","code":"INTERNAL_ERROR","details":"Stack trace or error details for debugging"},"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}}},"/api/number-checks/batches/summary":{"get":{"operationId":"getBatchSummary","summary":"Get batch summary","description":"Get aggregate statistics for all batches belonging to a team","tags":["Number Checking"],"security":[{"bearerAuth":[]},{"cookieAuth":[]}],"parameters":[{"in":"query","name":"teamId","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"required":true}],"responses":{"200":{"description":"200 response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchSummaryResponse"}}}},"400":{"description":"Bad Request - Invalid input or validation failed","content":{"application/json":{"example":{"message":"Validation failed","code":"BAD_REQUEST","details":[{"path":["email"],"message":"Invalid email format"}]},"schema":{"$ref":"#/components/schemas/BadRequestErrorResponse"}}}},"401":{"description":"Unauthorized - Authentication required or failed","content":{"application/json":{"example":{"message":"Authentication required","code":"UNAUTHORIZED"},"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"example":{"message":"Insufficient permissions","code":"FORBIDDEN"},"schema":{"$ref":"#/components/schemas/ForbiddenErrorResponse"}}}},"500":{"description":"Internal Server Error - Unexpected server error","content":{"application/json":{"example":{"message":"Internal server error","code":"INTERNAL_ERROR","details":"Stack trace or error details for debugging"},"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}}},"/api/number-checks/batches/{id}":{"get":{"operationId":"getBatch","summary":"Get batch details","description":"Retrieves detailed information about a specific batch","tags":["Number Checking"],"security":[{"bearerAuth":[]},{"cookieAuth":[]}],"parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"200 response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchResponse"}}}},"401":{"description":"Unauthorized - Authentication required or failed","content":{"application/json":{"example":{"message":"Authentication required","code":"UNAUTHORIZED"},"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"example":{"message":"Insufficient permissions","code":"FORBIDDEN"},"schema":{"$ref":"#/components/schemas/ForbiddenErrorResponse"}}}},"404":{"description":"Not Found - Resource does not exist","content":{"application/json":{"example":{"message":"Resource not found","code":"NOT_FOUND"},"schema":{"$ref":"#/components/schemas/NotFoundErrorResponse"}}}},"500":{"description":"Internal Server Error - Unexpected server error","content":{"application/json":{"example":{"message":"Internal server error","code":"INTERNAL_ERROR","details":"Stack trace or error details for debugging"},"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}},"delete":{"operationId":"deleteBatch","summary":"Delete batch","description":"Permanently deletes a batch and all associated checks","tags":["Number Checking"],"security":[{"bearerAuth":[]},{"cookieAuth":[]}],"parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"200 response","content":{"application/json":{"schema":{"type":"string","description":"No content"}}}},"401":{"description":"Unauthorized - Authentication required or failed","content":{"application/json":{"example":{"message":"Authentication required","code":"UNAUTHORIZED"},"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"404":{"description":"Not Found - Resource does not exist","content":{"application/json":{"example":{"message":"Resource not found","code":"NOT_FOUND"},"schema":{"$ref":"#/components/schemas/NotFoundErrorResponse"}}}},"500":{"description":"Internal Server Error - Unexpected server error","content":{"application/json":{"example":{"message":"Internal server error","code":"INTERNAL_ERROR","details":"Stack trace or error details for debugging"},"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}}},"/api/number-checks/batches/{id}/progress":{"get":{"operationId":"getBatchProgress","summary":"Get batch progress","description":"Retrieves the current progress of a batch with statistics","tags":["Number Checking"],"security":[{"bearerAuth":[]},{"cookieAuth":[]}],"parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"200 response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchProgressResponse"}}}},"401":{"description":"Unauthorized - Authentication required or failed","content":{"application/json":{"example":{"message":"Authentication required","code":"UNAUTHORIZED"},"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"404":{"description":"Not Found - Resource does not exist","content":{"application/json":{"example":{"message":"Resource not found","code":"NOT_FOUND"},"schema":{"$ref":"#/components/schemas/NotFoundErrorResponse"}}}},"500":{"description":"Internal Server Error - Unexpected server error","content":{"application/json":{"example":{"message":"Internal server error","code":"INTERNAL_ERROR","details":"Stack trace or error details for debugging"},"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}}},"/api/number-checks/batches/{id}/checks":{"get":{"operationId":"getBatchChecks","summary":"Get batch checks","description":"Retrieves all individual checks within a batch","tags":["Number Checking"],"security":[{"bearerAuth":[]},{"cookieAuth":[]}],"parameters":[{"in":"query","name":"status","schema":{"type":"string","enum":["pending","queued","checking","completed","failed"]}},{"in":"query","name":"limit","schema":{"default":100,"type":"number","minimum":1,"maximum":1000}},{"in":"query","name":"offset","schema":{"default":0,"type":"number","minimum":0}},{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"200 response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchChecksResponse"}}}},"400":{"description":"Bad Request - Invalid input or validation failed","content":{"application/json":{"example":{"message":"Validation failed","code":"BAD_REQUEST","details":[{"path":["email"],"message":"Invalid email format"}]},"schema":{"$ref":"#/components/schemas/BadRequestErrorResponse"}}}},"401":{"description":"Unauthorized - Authentication required or failed","content":{"application/json":{"example":{"message":"Authentication required","code":"UNAUTHORIZED"},"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"404":{"description":"Not Found - Resource does not exist","content":{"application/json":{"example":{"message":"Resource not found","code":"NOT_FOUND"},"schema":{"$ref":"#/components/schemas/NotFoundErrorResponse"}}}},"500":{"description":"Internal Server Error - Unexpected server error","content":{"application/json":{"example":{"message":"Internal server error","code":"INTERNAL_ERROR","details":"Stack trace or error details for debugging"},"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}}},"/api/number-checks/batches/{id}/export":{"get":{"operationId":"exportBatchResults","summary":"Export batch results","description":"Exports batch results in CSV or JSON format with optional filtering","tags":["Number Checking"],"security":[{"bearerAuth":[]},{"cookieAuth":[]}],"parameters":[{"in":"query","name":"format","schema":{"default":"csv","type":"string","enum":["csv","json"]}},{"in":"query","name":"filter","schema":{"default":"all","type":"string","enum":["all","valid","invalid"]}},{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"200 response","content":{"application/json":{"schema":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"object","properties":{"phoneNumber":{"type":"string"},"isOnWhatsApp":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"status":{"type":"string"},"checkedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"isCachedResult":{"type":"boolean"},"createdAt":{"type":"string"},"errorMessage":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["phoneNumber","isOnWhatsApp","status","checkedAt","isCachedResult","createdAt","errorMessage"],"additionalProperties":false}}]}}}},"400":{"description":"Bad Request - Invalid input or validation failed","content":{"application/json":{"example":{"message":"Validation failed","code":"BAD_REQUEST","details":[{"path":["email"],"message":"Invalid email format"}]},"schema":{"$ref":"#/components/schemas/BadRequestErrorResponse"}}}},"401":{"description":"Unauthorized - Authentication required or failed","content":{"application/json":{"example":{"message":"Authentication required","code":"UNAUTHORIZED"},"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"404":{"description":"Not Found - Resource does not exist","content":{"application/json":{"example":{"message":"Resource not found","code":"NOT_FOUND"},"schema":{"$ref":"#/components/schemas/NotFoundErrorResponse"}}}},"500":{"description":"Internal Server Error - Unexpected server error","content":{"application/json":{"example":{"message":"Internal server error","code":"INTERNAL_ERROR","details":"Stack trace or error details for debugging"},"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}}},"/api/number-checks/batches/{id}/cancel":{"post":{"operationId":"cancelBatch","summary":"Cancel batch","description":"Cancels a pending or processing batch. Completed batches cannot be canceled.","tags":["Number Checking"],"security":[{"bearerAuth":[]},{"cookieAuth":[]}],"parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"200 response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchResponse"}}}},"400":{"description":"Bad Request - Invalid input or validation failed","content":{"application/json":{"example":{"message":"Validation failed","code":"BAD_REQUEST","details":[{"path":["email"],"message":"Invalid email format"}]},"schema":{"$ref":"#/components/schemas/BadRequestErrorResponse"}}}},"401":{"description":"Unauthorized - Authentication required or failed","content":{"application/json":{"example":{"message":"Authentication required","code":"UNAUTHORIZED"},"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"404":{"description":"Not Found - Resource does not exist","content":{"application/json":{"example":{"message":"Resource not found","code":"NOT_FOUND"},"schema":{"$ref":"#/components/schemas/NotFoundErrorResponse"}}}},"500":{"description":"Internal Server Error - Unexpected server error","content":{"application/json":{"example":{"message":"Internal server error","code":"INTERNAL_ERROR","details":"Stack trace or error details for debugging"},"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}}},"/api/number-checks/batches/{id}/retry":{"post":{"operationId":"retryBatch","summary":"Retry an entire batch","description":"Resets all checks to pending (retryCount=0) and resets batch stats to zero, putting the batch back to pending for reprocessing.","tags":["Number Checking"],"security":[{"bearerAuth":[]},{"cookieAuth":[]}],"parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"200 response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchResponse"}}}},"400":{"description":"Bad Request - Invalid input or validation failed","content":{"application/json":{"example":{"message":"Validation failed","code":"BAD_REQUEST","details":[{"path":["email"],"message":"Invalid email format"}]},"schema":{"$ref":"#/components/schemas/BadRequestErrorResponse"}}}},"401":{"description":"Unauthorized - Authentication required or failed","content":{"application/json":{"example":{"message":"Authentication required","code":"UNAUTHORIZED"},"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"404":{"description":"Not Found - Resource does not exist","content":{"application/json":{"example":{"message":"Resource not found","code":"NOT_FOUND"},"schema":{"$ref":"#/components/schemas/NotFoundErrorResponse"}}}},"500":{"description":"Internal Server Error - Unexpected server error","content":{"application/json":{"example":{"message":"Internal server error","code":"INTERNAL_ERROR","details":"Stack trace or error details for debugging"},"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}}},"/api/number-checks/batches/{id}/checks/{checkId}/retry":{"post":{"operationId":"retryCheck","summary":"Retry a single check","description":"Resets a single check to pending (retryCount=0) and puts the batch back to pending for reprocessing.","tags":["Number Checking"],"security":[{"bearerAuth":[]},{"cookieAuth":[]}],"parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}},{"in":"path","name":"checkId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"200 response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchResponse"}}}},"400":{"description":"Bad Request - Invalid input or validation failed","content":{"application/json":{"example":{"message":"Validation failed","code":"BAD_REQUEST","details":[{"path":["email"],"message":"Invalid email format"}]},"schema":{"$ref":"#/components/schemas/BadRequestErrorResponse"}}}},"401":{"description":"Unauthorized - Authentication required or failed","content":{"application/json":{"example":{"message":"Authentication required","code":"UNAUTHORIZED"},"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"404":{"description":"Not Found - Resource does not exist","content":{"application/json":{"example":{"message":"Resource not found","code":"NOT_FOUND"},"schema":{"$ref":"#/components/schemas/NotFoundErrorResponse"}}}},"500":{"description":"Internal Server Error - Unexpected server error","content":{"application/json":{"example":{"message":"Internal server error","code":"INTERNAL_ERROR","details":"Stack trace or error details for debugging"},"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}}},"/api/number-checks/single":{"post":{"operationId":"checkSingleNumber","summary":"Check single number","description":"Checks if a single phone number is on WhatsApp. Returns cached result if available.","tags":["Number Checking"],"security":[{"bearerAuth":[]},{"cookieAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SingleCheckBody"}}}},"responses":{"200":{"description":"200 response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SingleCheckResponse"}}}},"400":{"description":"Bad Request - Invalid input or validation failed","content":{"application/json":{"example":{"message":"Validation failed","code":"BAD_REQUEST","details":[{"path":["email"],"message":"Invalid email format"}]},"schema":{"$ref":"#/components/schemas/BadRequestErrorResponse"}}}},"401":{"description":"Unauthorized - Authentication required or failed","content":{"application/json":{"example":{"message":"Authentication required","code":"UNAUTHORIZED"},"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"500":{"description":"Internal Server Error - Unexpected server error","content":{"application/json":{"example":{"message":"Internal server error","code":"INTERNAL_ERROR","details":"Stack trace or error details for debugging"},"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}}},"/api/account/profile":{"get":{"operationId":"getUserProfile","summary":"Get user profile","description":"Get the current authenticated user's profile information","tags":["Account Settings"],"security":[{"bearerAuth":[]},{"cookieAuth":[]}],"responses":{"200":{"description":"200 response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserProfileResponse"}}}},"401":{"description":"Unauthorized - Authentication required or failed","content":{"application/json":{"example":{"message":"Authentication required","code":"UNAUTHORIZED"},"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"404":{"description":"Not Found - Resource does not exist","content":{"application/json":{"example":{"message":"Resource not found","code":"NOT_FOUND"},"schema":{"$ref":"#/components/schemas/NotFoundErrorResponse"}}}},"500":{"description":"Internal Server Error - Unexpected server error","content":{"application/json":{"example":{"message":"Internal server error","code":"INTERNAL_ERROR","details":"Stack trace or error details for debugging"},"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}}},"/api/account/change-password":{"post":{"operationId":"changePassword","summary":"Change password","description":"Change the current authenticated user's password","tags":["Account Settings"],"security":[{"cookieAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChangePasswordRequest"}}}},"responses":{"200":{"description":"200 response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChangePasswordResponse"}}}},"400":{"description":"Bad Request - Invalid input or validation failed","content":{"application/json":{"example":{"message":"Validation failed","code":"BAD_REQUEST","details":[{"path":["email"],"message":"Invalid email format"}]},"schema":{"$ref":"#/components/schemas/BadRequestErrorResponse"}}}},"401":{"description":"Unauthorized - Authentication required or failed","content":{"application/json":{"example":{"message":"Authentication required","code":"UNAUTHORIZED"},"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"500":{"description":"Internal Server Error - Unexpected server error","content":{"application/json":{"example":{"message":"Internal server error","code":"INTERNAL_ERROR","details":"Stack trace or error details for debugging"},"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}}},"/api/webhooks":{"get":{"operationId":"listWebhooks","summary":"List webhooks","description":"Get all webhooks for a team","tags":["Webhooks"],"security":[{"bearerAuth":[]},{"cookieAuth":[]}],"parameters":[{"in":"query","name":"teamId","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"required":true}],"responses":{"200":{"description":"200 response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/WebhookResponse"}}}}},"400":{"description":"Bad Request - Invalid input or validation failed","content":{"application/json":{"example":{"message":"Validation failed","code":"BAD_REQUEST","details":[{"path":["email"],"message":"Invalid email format"}]},"schema":{"$ref":"#/components/schemas/BadRequestErrorResponse"}}}},"401":{"description":"Unauthorized - Authentication required or failed","content":{"application/json":{"example":{"message":"Authentication required","code":"UNAUTHORIZED"},"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"example":{"message":"Insufficient permissions","code":"FORBIDDEN"},"schema":{"$ref":"#/components/schemas/ForbiddenErrorResponse"}}}},"500":{"description":"Internal Server Error - Unexpected server error","content":{"application/json":{"example":{"message":"Internal server error","code":"INTERNAL_ERROR","details":"Stack trace or error details for debugging"},"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}},"post":{"operationId":"createWebhook","summary":"Create webhook","description":"Create a new webhook for receiving event notifications. The secret is only shown once after creation.","tags":["Webhooks"],"security":[{"bearerAuth":[]},{"cookieAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateWebhookBody"}}}},"responses":{"200":{"description":"200 response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookWithSecretResponse"}}}},"400":{"description":"Bad Request - Invalid input or validation failed","content":{"application/json":{"example":{"message":"Validation failed","code":"BAD_REQUEST","details":[{"path":["email"],"message":"Invalid email format"}]},"schema":{"$ref":"#/components/schemas/BadRequestErrorResponse"}}}},"401":{"description":"Unauthorized - Authentication required or failed","content":{"application/json":{"example":{"message":"Authentication required","code":"UNAUTHORIZED"},"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"example":{"message":"Insufficient permissions","code":"FORBIDDEN"},"schema":{"$ref":"#/components/schemas/ForbiddenErrorResponse"}}}},"500":{"description":"Internal Server Error - Unexpected server error","content":{"application/json":{"example":{"message":"Internal server error","code":"INTERNAL_ERROR","details":"Stack trace or error details for debugging"},"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}}},"/api/webhooks/{id}":{"get":{"operationId":"getWebhook","summary":"Get webhook","description":"Get details of a specific webhook","tags":["Webhooks"],"security":[{"bearerAuth":[]},{"cookieAuth":[]}],"parameters":[{"in":"query","name":"teamId","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"required":true},{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"200 response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookResponse"}}}},"400":{"description":"Bad Request - Invalid input or validation failed","content":{"application/json":{"example":{"message":"Validation failed","code":"BAD_REQUEST","details":[{"path":["email"],"message":"Invalid email format"}]},"schema":{"$ref":"#/components/schemas/BadRequestErrorResponse"}}}},"401":{"description":"Unauthorized - Authentication required or failed","content":{"application/json":{"example":{"message":"Authentication required","code":"UNAUTHORIZED"},"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"example":{"message":"Insufficient permissions","code":"FORBIDDEN"},"schema":{"$ref":"#/components/schemas/ForbiddenErrorResponse"}}}},"404":{"description":"Not Found - Resource does not exist","content":{"application/json":{"example":{"message":"Resource not found","code":"NOT_FOUND"},"schema":{"$ref":"#/components/schemas/NotFoundErrorResponse"}}}},"500":{"description":"Internal Server Error - Unexpected server error","content":{"application/json":{"example":{"message":"Internal server error","code":"INTERNAL_ERROR","details":"Stack trace or error details for debugging"},"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}},"patch":{"operationId":"updateWebhook","summary":"Update webhook","description":"Update webhook configuration","tags":["Webhooks"],"security":[{"bearerAuth":[]},{"cookieAuth":[]}],"parameters":[{"in":"query","name":"teamId","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"required":true},{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateWebhookBody"}}}},"responses":{"200":{"description":"200 response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookResponse"}}}},"400":{"description":"Bad Request - Invalid input or validation failed","content":{"application/json":{"example":{"message":"Validation failed","code":"BAD_REQUEST","details":[{"path":["email"],"message":"Invalid email format"}]},"schema":{"$ref":"#/components/schemas/BadRequestErrorResponse"}}}},"401":{"description":"Unauthorized - Authentication required or failed","content":{"application/json":{"example":{"message":"Authentication required","code":"UNAUTHORIZED"},"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"example":{"message":"Insufficient permissions","code":"FORBIDDEN"},"schema":{"$ref":"#/components/schemas/ForbiddenErrorResponse"}}}},"404":{"description":"Not Found - Resource does not exist","content":{"application/json":{"example":{"message":"Resource not found","code":"NOT_FOUND"},"schema":{"$ref":"#/components/schemas/NotFoundErrorResponse"}}}},"500":{"description":"Internal Server Error - Unexpected server error","content":{"application/json":{"example":{"message":"Internal server error","code":"INTERNAL_ERROR","details":"Stack trace or error details for debugging"},"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}},"delete":{"operationId":"deleteWebhook","summary":"Delete webhook","description":"Delete a webhook and all its delivery logs","tags":["Webhooks"],"security":[{"bearerAuth":[]},{"cookieAuth":[]}],"parameters":[{"in":"query","name":"teamId","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"required":true},{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"200 response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"],"additionalProperties":false}}}},"400":{"description":"Bad Request - Invalid input or validation failed","content":{"application/json":{"example":{"message":"Validation failed","code":"BAD_REQUEST","details":[{"path":["email"],"message":"Invalid email format"}]},"schema":{"$ref":"#/components/schemas/BadRequestErrorResponse"}}}},"401":{"description":"Unauthorized - Authentication required or failed","content":{"application/json":{"example":{"message":"Authentication required","code":"UNAUTHORIZED"},"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"example":{"message":"Insufficient permissions","code":"FORBIDDEN"},"schema":{"$ref":"#/components/schemas/ForbiddenErrorResponse"}}}},"404":{"description":"Not Found - Resource does not exist","content":{"application/json":{"example":{"message":"Resource not found","code":"NOT_FOUND"},"schema":{"$ref":"#/components/schemas/NotFoundErrorResponse"}}}},"500":{"description":"Internal Server Error - Unexpected server error","content":{"application/json":{"example":{"message":"Internal server error","code":"INTERNAL_ERROR","details":"Stack trace or error details for debugging"},"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}}},"/api/webhooks/{id}/status":{"patch":{"operationId":"updateWebhookStatus","summary":"Update webhook status","description":"Enable or disable a webhook","tags":["Webhooks"],"security":[{"bearerAuth":[]},{"cookieAuth":[]}],"parameters":[{"in":"query","name":"teamId","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"required":true},{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateWebhookStatusBody"}}}},"responses":{"200":{"description":"200 response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookResponse"}}}},"400":{"description":"Bad Request - Invalid input or validation failed","content":{"application/json":{"example":{"message":"Validation failed","code":"BAD_REQUEST","details":[{"path":["email"],"message":"Invalid email format"}]},"schema":{"$ref":"#/components/schemas/BadRequestErrorResponse"}}}},"401":{"description":"Unauthorized - Authentication required or failed","content":{"application/json":{"example":{"message":"Authentication required","code":"UNAUTHORIZED"},"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"example":{"message":"Insufficient permissions","code":"FORBIDDEN"},"schema":{"$ref":"#/components/schemas/ForbiddenErrorResponse"}}}},"404":{"description":"Not Found - Resource does not exist","content":{"application/json":{"example":{"message":"Resource not found","code":"NOT_FOUND"},"schema":{"$ref":"#/components/schemas/NotFoundErrorResponse"}}}},"500":{"description":"Internal Server Error - Unexpected server error","content":{"application/json":{"example":{"message":"Internal server error","code":"INTERNAL_ERROR","details":"Stack trace or error details for debugging"},"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}}},"/api/webhooks/{id}/regenerate-secret":{"post":{"operationId":"regenerateWebhookSecret","summary":"Regenerate webhook secret","description":"Generate a new secret for the webhook. The old secret will be invalidated. The new secret is only shown once.","tags":["Webhooks"],"security":[{"bearerAuth":[]},{"cookieAuth":[]}],"parameters":[{"in":"query","name":"teamId","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"required":true},{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"200 response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookWithSecretResponse"}}}},"400":{"description":"Bad Request - Invalid input or validation failed","content":{"application/json":{"example":{"message":"Validation failed","code":"BAD_REQUEST","details":[{"path":["email"],"message":"Invalid email format"}]},"schema":{"$ref":"#/components/schemas/BadRequestErrorResponse"}}}},"401":{"description":"Unauthorized - Authentication required or failed","content":{"application/json":{"example":{"message":"Authentication required","code":"UNAUTHORIZED"},"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"example":{"message":"Insufficient permissions","code":"FORBIDDEN"},"schema":{"$ref":"#/components/schemas/ForbiddenErrorResponse"}}}},"404":{"description":"Not Found - Resource does not exist","content":{"application/json":{"example":{"message":"Resource not found","code":"NOT_FOUND"},"schema":{"$ref":"#/components/schemas/NotFoundErrorResponse"}}}},"500":{"description":"Internal Server Error - Unexpected server error","content":{"application/json":{"example":{"message":"Internal server error","code":"INTERNAL_ERROR","details":"Stack trace or error details for debugging"},"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}}},"/api/webhooks/{id}/test":{"post":{"operationId":"testWebhook","summary":"Test webhook","description":"Send a test webhook with fake data to verify the webhook endpoint is working","tags":["Webhooks"],"security":[{"bearerAuth":[]},{"cookieAuth":[]}],"parameters":[{"in":"query","name":"teamId","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"required":true},{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"200 response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestWebhookResponse"}}}},"400":{"description":"Bad Request - Invalid input or validation failed","content":{"application/json":{"example":{"message":"Validation failed","code":"BAD_REQUEST","details":[{"path":["email"],"message":"Invalid email format"}]},"schema":{"$ref":"#/components/schemas/BadRequestErrorResponse"}}}},"401":{"description":"Unauthorized - Authentication required or failed","content":{"application/json":{"example":{"message":"Authentication required","code":"UNAUTHORIZED"},"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"example":{"message":"Insufficient permissions","code":"FORBIDDEN"},"schema":{"$ref":"#/components/schemas/ForbiddenErrorResponse"}}}},"404":{"description":"Not Found - Resource does not exist","content":{"application/json":{"example":{"message":"Resource not found","code":"NOT_FOUND"},"schema":{"$ref":"#/components/schemas/NotFoundErrorResponse"}}}},"500":{"description":"Internal Server Error - Unexpected server error","content":{"application/json":{"example":{"message":"Internal server error","code":"INTERNAL_ERROR","details":"Stack trace or error details for debugging"},"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}}},"/api/webhooks/event-types":{"get":{"operationId":"getWebhookEventTypes","summary":"Get webhook event types","description":"Get list of available webhook event types with metadata","tags":["Webhooks"],"responses":{"200":{"description":"200 response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/WebhookEventTypeMetadata"}}}}},"500":{"description":"Internal Server Error - Unexpected server error","content":{"application/json":{"example":{"message":"Internal server error","code":"INTERNAL_ERROR","details":"Stack trace or error details for debugging"},"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}}},"/api/webhooks/event-docs":{"get":{"operationId":"getWebhookEventDocs","summary":"Get webhook event documentation","description":"Get detailed documentation for all webhook events including schemas and examples","tags":["Webhooks"],"responses":{"200":{"description":"200 response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"label":{"type":"string"},"description":{"type":"string"},"category":{"type":"string"},"schema":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"example":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["type","label","description","category","schema","example"],"additionalProperties":false}}}}},"500":{"description":"Internal Server Error - Unexpected server error","content":{"application/json":{"example":{"message":"Internal server error","code":"INTERNAL_ERROR","details":"Stack trace or error details for debugging"},"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}}},"/api/webhooks/{id}/deliveries":{"get":{"operationId":"listWebhookDeliveries","summary":"List webhook deliveries","description":"Get delivery logs for a webhook","tags":["Webhooks"],"security":[{"bearerAuth":[]},{"cookieAuth":[]}],"parameters":[{"in":"query","name":"limit","schema":{"default":20,"type":"integer","minimum":1,"maximum":100}},{"in":"query","name":"offset","schema":{"default":0,"type":"integer","minimum":0,"maximum":9007199254740991}},{"in":"query","name":"teamId","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"required":true},{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"200 response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/WebhookDeliveryResponse"}}}}},"400":{"description":"Bad Request - Invalid input or validation failed","content":{"application/json":{"example":{"message":"Validation failed","code":"BAD_REQUEST","details":[{"path":["email"],"message":"Invalid email format"}]},"schema":{"$ref":"#/components/schemas/BadRequestErrorResponse"}}}},"401":{"description":"Unauthorized - Authentication required or failed","content":{"application/json":{"example":{"message":"Authentication required","code":"UNAUTHORIZED"},"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"example":{"message":"Insufficient permissions","code":"FORBIDDEN"},"schema":{"$ref":"#/components/schemas/ForbiddenErrorResponse"}}}},"404":{"description":"Not Found - Resource does not exist","content":{"application/json":{"example":{"message":"Resource not found","code":"NOT_FOUND"},"schema":{"$ref":"#/components/schemas/NotFoundErrorResponse"}}}},"500":{"description":"Internal Server Error - Unexpected server error","content":{"application/json":{"example":{"message":"Internal server error","code":"INTERNAL_ERROR","details":"Stack trace or error details for debugging"},"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}}},"/api/webhooks/{id}/deliveries/{deliveryId}":{"get":{"operationId":"getWebhookDelivery","summary":"Get delivery details","description":"Get details of a specific webhook delivery","tags":["Webhooks"],"security":[{"bearerAuth":[]},{"cookieAuth":[]}],"parameters":[{"in":"query","name":"teamId","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"required":true},{"in":"path","name":"id","required":true,"schema":{"type":"string"}},{"in":"path","name":"deliveryId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"200 response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookDeliveryResponse"}}}},"400":{"description":"Bad Request - Invalid input or validation failed","content":{"application/json":{"example":{"message":"Validation failed","code":"BAD_REQUEST","details":[{"path":["email"],"message":"Invalid email format"}]},"schema":{"$ref":"#/components/schemas/BadRequestErrorResponse"}}}},"401":{"description":"Unauthorized - Authentication required or failed","content":{"application/json":{"example":{"message":"Authentication required","code":"UNAUTHORIZED"},"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"example":{"message":"Insufficient permissions","code":"FORBIDDEN"},"schema":{"$ref":"#/components/schemas/ForbiddenErrorResponse"}}}},"404":{"description":"Not Found - Resource does not exist","content":{"application/json":{"example":{"message":"Resource not found","code":"NOT_FOUND"},"schema":{"$ref":"#/components/schemas/NotFoundErrorResponse"}}}},"500":{"description":"Internal Server Error - Unexpected server error","content":{"application/json":{"example":{"message":"Internal server error","code":"INTERNAL_ERROR","details":"Stack trace or error details for debugging"},"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}}},"/api/webhooks/{id}/deliveries/{deliveryId}/retry":{"post":{"operationId":"retryWebhookDelivery","summary":"Retry delivery","description":"Manually retry a failed webhook delivery","tags":["Webhooks"],"security":[{"bearerAuth":[]},{"cookieAuth":[]}],"parameters":[{"in":"query","name":"teamId","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"required":true},{"in":"path","name":"id","required":true,"schema":{"type":"string"}},{"in":"path","name":"deliveryId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"200 response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"],"additionalProperties":false}}}},"400":{"description":"Bad Request - Invalid input or validation failed","content":{"application/json":{"example":{"message":"Validation failed","code":"BAD_REQUEST","details":[{"path":["email"],"message":"Invalid email format"}]},"schema":{"$ref":"#/components/schemas/BadRequestErrorResponse"}}}},"401":{"description":"Unauthorized - Authentication required or failed","content":{"application/json":{"example":{"message":"Authentication required","code":"UNAUTHORIZED"},"schema":{"$ref":"#/components/schemas/UnauthorizedErrorResponse"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"example":{"message":"Insufficient permissions","code":"FORBIDDEN"},"schema":{"$ref":"#/components/schemas/ForbiddenErrorResponse"}}}},"404":{"description":"Not Found - Resource does not exist","content":{"application/json":{"example":{"message":"Resource not found","code":"NOT_FOUND"},"schema":{"$ref":"#/components/schemas/NotFoundErrorResponse"}}}},"500":{"description":"Internal Server Error - Unexpected server error","content":{"application/json":{"example":{"message":"Internal server error","code":"INTERNAL_ERROR","details":"Stack trace or error details for debugging"},"schema":{"$ref":"#/components/schemas/InternalServerErrorResponse"}}}}}}}},"components":{"schemas":{"RegisterBody":{"type":"object","properties":{"username":{"type":"string","minLength":3,"maxLength":10,"example":"johndoe"},"password":{"type":"string","minLength":6,"maxLength":128,"allOf":[{"pattern":"[a-z]"},{"pattern":"[0-9]"}],"description":"User password (min 8 characters, must include lowercase and number)","example":"qwer1234"}},"required":["username","password"],"title":"Register Request","description":"User registration data"},"LoginBody":{"type":"object","properties":{"username":{"type":"string","example":"johndoe"},"password":{"type":"string","example":"qwer1234"}},"required":["username","password"],"title":"Login Request","description":"User login credentials"},"CreateTeamBody":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255,"example":"My Team"},"description":{"example":"A great team for collaboration","type":"string","maxLength":500}},"required":["name"],"title":"Create Team Request","description":"Data for creating a new team"},"UpdateTeamBody":{"type":"object","properties":{"name":{"example":"Updated Team Name","type":"string","minLength":1,"maxLength":255},"description":{"example":"Updated description","anyOf":[{"type":"string","maxLength":500},{"type":"null"}]}},"title":"Update Team Request","description":"Data for updating a team"},"AddMemberBody":{"type":"object","properties":{"username":{"type":"string","minLength":1,"example":"john_doe"},"role":{"default":"member","example":"member","type":"string","enum":["owner","admin","member"]}},"required":["username"],"title":"Add Member Request","description":"Data for adding a member to a team"},"UpdateMemberRoleBody":{"type":"object","properties":{"role":{"type":"string","enum":["admin","member"],"example":"admin"}},"required":["role"],"title":"Update Member Role Request","description":"Data for updating a member's role"},"TransferOwnershipBody":{"type":"object","properties":{"newOwnerId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","example":"123e4567-e89b-12d3-a456-426614174000"}},"required":["newOwnerId"],"title":"Transfer Ownership Request","description":"Data for transferring team ownership"},"CreateAccountBody":{"type":"object","properties":{"teamId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","example":"123e4567-e89b-12d3-a456-426614174000"},"name":{"type":"string","minLength":1,"maxLength":255,"example":"My WhatsApp Account"},"phoneNumber":{"type":"string","minLength":1,"maxLength":20,"example":"682123456789"},"expiredAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","example":"2025-12-31T23:59:59Z"},"state":{"default":"disconnected","example":"disconnected","type":"string","enum":["disconnected","disconnecting","launching","connecting","qr_pending","connected","error"]},"settings":{"type":"object","properties":{"cooldownEnabled":{"type":"boolean"},"cooldownDurationSeconds":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"cooldownVarianceSeconds":{"type":"integer","minimum":0,"maximum":9007199254740991},"messagesPerHour":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"messagesPerDay":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}}},"persistent":{"default":false,"type":"boolean"}},"required":["teamId","name","phoneNumber","expiredAt"],"title":"Create Account Request","description":"Data for creating a new WhatsApp account"},"ImportAccountsBody":{"type":"object","properties":{"teamId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","example":"123e4567-e89b-12d3-a456-426614174000"},"csvContent":{"type":"string","minLength":1,"example":"name,phoneNumber,state,expiredAt\nAccount 1,682123456789,disconnected,2025-12-31T23:59:59Z\nAccount 2,62813654321,disconnected,2025-12-31T23:59:59Z"}},"required":["teamId","csvContent"],"title":"Import Accounts Request","description":"CSV content for bulk importing accounts"},"UpdateAccountBody":{"type":"object","properties":{"name":{"example":"Updated Account Name","type":"string","minLength":1,"maxLength":255},"phoneNumber":{"example":"682123456789","type":"string","minLength":1,"maxLength":20},"expiredAt":{"example":"2025-12-31T23:59:59Z","type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"state":{"example":"connected","type":"string","enum":["disconnected","disconnecting","launching","connecting","qr_pending","connected","error"]},"settings":{"type":"object","properties":{"cooldownEnabled":{"type":"boolean"},"cooldownDurationSeconds":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"cooldownVarianceSeconds":{"type":"integer","minimum":0,"maximum":9007199254740991},"messagesPerHour":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"messagesPerDay":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}}},"persistent":{"type":"boolean"}},"title":"Update Account Request","description":"Data for updating an account"},"UpdateAccountStateBody":{"type":"object","properties":{"state":{"type":"string","enum":["disconnected","disconnecting","launching","connecting","qr_pending","connected","error"],"example":"connected"}},"required":["state"],"title":"Update Account State Request","description":"Data for updating account state"},"CreateGroupBody":{"type":"object","properties":{"teamId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","example":"123e4567-e89b-12d3-a456-426614174000"},"name":{"type":"string","minLength":1,"maxLength":255,"example":"Marketing Team Accounts"},"description":{"example":"Accounts for marketing campaigns","type":"string","maxLength":500}},"required":["teamId","name"],"title":"Create Group Request","description":"Data for creating a new group"},"UpdateGroupBody":{"type":"object","properties":{"name":{"example":"Updated Group Name","type":"string","minLength":1,"maxLength":255},"description":{"example":"Updated description","anyOf":[{"type":"string","maxLength":500},{"type":"null"}]}},"title":"Update Group Request","description":"Data for updating a group"},"AddAccountsToGroupBody":{"type":"object","properties":{"accountIds":{"minItems":1,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"example":["123e4567-e89b-12d3-a456-426614174000"]}},"required":["accountIds"],"title":"Add Accounts to Group Request","description":"Account IDs to add to the group"},"CreateCampaignBody":{"type":"object","properties":{"teamId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string","minLength":3,"maxLength":255},"description":{"type":"string","maxLength":1000},"message":{"type":"string","minLength":1,"maxLength":4096},"messageVariables":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"mediaUrl":{"type":"string"},"groupId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"scheduledAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"concurrencyLimit":{"type":"integer","minimum":1,"maximum":20},"delayBetweenMessages":{"type":"integer","minimum":0,"maximum":60000}},"required":["teamId","name","message","groupId"],"title":"Create Campaign Request","description":"Campaign creation data"},"UpdateCampaignBody":{"type":"object","properties":{"name":{"type":"string","minLength":3,"maxLength":255},"description":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}]},"message":{"type":"string","minLength":1,"maxLength":4096},"messageVariables":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},{"type":"null"}]},"mediaUrl":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]},"groupId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"scheduledAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]},"concurrencyLimit":{"type":"integer","minimum":1,"maximum":20},"delayBetweenMessages":{"type":"integer","minimum":0,"maximum":60000}},"title":"Update Campaign Request","description":"Campaign update data"},"CreateMessageTemplateBody":{"type":"object","properties":{"teamId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","example":"123e4567-e89b-12d3-a456-426614174000"},"name":{"type":"string","minLength":1,"maxLength":100,"example":"Welcome Message"},"body":{"type":"string","minLength":1,"maxLength":4096,"example":"Hello {{name}}, welcome to our service! Visit {{url}} to get started."},"category":{"type":"string","enum":["marketing","transactional","notification","support","general"],"example":"marketing"},"mediaUrl":{"example":"https://example.com/image.jpg","type":"string","format":"uri"}},"required":["teamId","name","body","category"],"title":"Create Message Template Request","description":"Data for creating a new message template"},"UpdateMessageTemplateBody":{"type":"object","properties":{"name":{"example":"Updated Template Name","type":"string","minLength":1,"maxLength":100},"body":{"example":"Updated message with {{variable}}","type":"string","minLength":1,"maxLength":4096},"category":{"example":"support","type":"string","enum":["marketing","transactional","notification","support","general"]},"mediaUrl":{"example":"https://example.com/updated.jpg","type":"string","format":"uri"},"isActive":{"example":true,"type":"boolean"}},"title":"Update Message Template Request","description":"Data for updating a message template"},"SendMessageBody":{"type":"object","properties":{"teamId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"toNumber":{"type":"string","minLength":10,"maxLength":20,"example":"628123456789"},"body":{"type":"string","minLength":1,"maxLength":4096},"accountId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"groupId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["teamId","toNumber","body"],"title":"Send Message Request","description":"Data for sending a one-time message. Either accountId or groupId must be provided."},"CreateBatchBody":{"type":"object","properties":{"teamId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Team ID that owns the batch","example":"550e8400-e29b-41d4-a716-446655440000"},"groupId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"WhatsApp group ID containing accounts for checking","example":"550e8400-e29b-41d4-a716-446655440000"},"phoneNumbers":{"minItems":1,"maxItems":10000,"type":"array","items":{"type":"string"},"description":"Array of phone numbers to check (without + prefix)","example":["621234567890","621234567891","621234567892"]}},"required":["teamId","groupId","phoneNumbers"],"title":"Create Batch Request","description":"Request body for creating a number checking batch"},"SingleCheckBody":{"type":"object","properties":{"teamId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Team ID for the check","example":"550e8400-e29b-41d4-a716-446655440000"},"phoneNumber":{"type":"string","description":"Phone number to check (without + prefix)","example":"682123456789"},"groupId":{"description":"Optional group ID for organizing single checks (defaults to 'single-check')","example":"550e8400-e29b-41d4-a716-446655440001","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["teamId","phoneNumber"],"title":"Single Check Request","description":"Request body for checking a single number"},"ChangePasswordRequest":{"type":"object","properties":{"currentPassword":{"type":"string","minLength":1},"newPassword":{"type":"string","minLength":8,"maxLength":128}},"required":["currentPassword","newPassword"],"title":"Change Password Request"},"CreateApiKeyRequest":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255},"expiresInDays":{"type":"number","minimum":1,"maximum":365},"permissions":{"type":"array","items":{"type":"object","properties":{"resource":{"type":"string","enum":["campaigns","accounts","contacts","messages","warmup","number-checking","teams","*"]},"actions":{"type":"array","items":{"type":"string","enum":["read","write","delete","*"]}}},"required":["resource","actions"]}}},"required":["name"],"title":"Create API Key Request"},"UpdatePermissionsRequest":{"type":"object","properties":{"permissions":{"type":"array","items":{"type":"object","properties":{"resource":{"type":"string","enum":["campaigns","accounts","contacts","messages","warmup","number-checking","teams","*"]},"actions":{"type":"array","items":{"type":"string","enum":["read","write","delete","*"]}}},"required":["resource","actions"]}}},"required":["permissions"],"title":"Update Permissions Request"},"CreateWebhookBody":{"type":"object","properties":{"teamId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string","minLength":1,"maxLength":255},"description":{"type":"string","maxLength":1000},"url":{"type":"string","maxLength":2048,"format":"uri"},"events":{"type":"array","items":{"type":"string","enum":["wh:one_time_message.created","wh:one_time_message.sent","wh:one_time_message.failed","wh:campaign.started","wh:campaign.completed","wh:campaign.failed","wh:campaign.paused","wh:campaign.canceled","wh:number_check.started","wh:number_check.completed","wh:number_check.failed","wh:number_check.canceled","wh:account.connected","wh:account.disconnected","wh:account.error","wh:account.state_changed","wh:account.message_received","wh:warmup.started","wh:warmup.completed","wh:warmup.failed","wh:warmup.canceled"]}},"timeout":{"default":30000,"type":"integer","minimum":1000,"maximum":60000},"retryEnabled":{"default":true,"type":"boolean"},"maxRetries":{"default":3,"type":"integer","minimum":0,"maximum":10}},"required":["teamId","name","url"],"title":"Create Webhook Request","description":"Data for creating a new webhook"},"UpdateWebhookBody":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255},"description":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}]},"url":{"type":"string","maxLength":2048,"format":"uri"},"events":{"anyOf":[{"type":"array","items":{"type":"string","enum":["wh:one_time_message.created","wh:one_time_message.sent","wh:one_time_message.failed","wh:campaign.started","wh:campaign.completed","wh:campaign.failed","wh:campaign.paused","wh:campaign.canceled","wh:number_check.started","wh:number_check.completed","wh:number_check.failed","wh:number_check.canceled","wh:account.connected","wh:account.disconnected","wh:account.error","wh:account.state_changed","wh:account.message_received","wh:warmup.started","wh:warmup.completed","wh:warmup.failed","wh:warmup.canceled"]}},{"type":"null"}]},"timeout":{"type":"integer","minimum":1000,"maximum":60000},"retryEnabled":{"type":"boolean"},"maxRetries":{"type":"integer","minimum":0,"maximum":10}},"title":"Update Webhook Request","description":"Data for updating a webhook"},"UpdateWebhookStatusBody":{"type":"object","properties":{"status":{"type":"string","enum":["active","inactive"]}},"required":["status"],"title":"Update Webhook Status Request","description":"Toggle webhook active/inactive status"},"ImpersonateRequest":{"type":"object","properties":{"targetUsername":{"type":"string","minLength":1,"maxLength":24}},"required":["targetUsername"],"title":"Impersonate Request","description":"Request to start impersonating a user"},"CreateUserRequest":{"type":"object","properties":{"username":{"type":"string","minLength":1,"maxLength":24,"pattern":"^[a-zA-Z0-9_-]+$"},"password":{"type":"string","minLength":8,"maxLength":128},"isSuperUser":{"default":false,"type":"boolean"}},"required":["username","password"],"title":"Create User Request","description":"Request to create a new user (super users only)"},"AddIpWhitelistBody":{"type":"object","properties":{"ipAddress":{"type":"string","minLength":1,"maxLength":45,"example":"192.168.1.1"},"description":{"example":"Office IP address","type":"string","maxLength":500}},"required":["ipAddress"],"title":"Add IP Whitelist Request","description":"Data for adding IP to whitelist"},"UpdateIpWhitelistBody":{"type":"object","properties":{"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"example":"Updated description"},"isActive":{"example":true,"type":"boolean"}},"title":"Update IP Whitelist Request","description":"Data for updating IP whitelist entry"},"UpdatePluginSettings":{"type":"object","properties":{"teamId":{"type":"string"},"settings":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["teamId","settings"],"title":"Update Plugin Settings"},"PluginRpcBody":{"title":"Plugin RPC Body"},"HealthResponse":{"type":"object","properties":{"status":{"type":"string","const":"ok","example":"ok"},"timestamp":{"type":"string","example":"2026-06-04T07:16:09.681Z"},"uptime":{"type":"number","example":123.456},"system":{"type":"object","properties":{"cpuUsage":{"anyOf":[{"type":"number"},{"type":"null"}],"example":42.5},"memoryUsage":{"anyOf":[{"type":"number"},{"type":"null"}],"example":68.3},"diskUsage":{"anyOf":[{"type":"number"},{"type":"null"}],"example":55.1}},"required":["cpuUsage","memoryUsage","diskUsage"],"additionalProperties":false}},"required":["status","timestamp","uptime","system"],"additionalProperties":false,"title":"Health Check Response","description":"Health check response indicating service status"},"VersionResponse":{"type":"object","properties":{"version":{"type":"string","example":"1.0.0"}},"required":["version"],"additionalProperties":false,"title":"Version Response","description":"Backend application version"},"AuthResponse":{"type":"object","properties":{"user":{"type":"object","properties":{"id":{"type":"string"},"username":{"type":"string"},"isSuperUser":{"type":"boolean"},"createdAt":{"type":"string"},"impersonating":{"type":"object","properties":{"userId":{"type":"string"},"username":{"type":"string"}},"required":["userId","username"],"additionalProperties":false}},"required":["id","username","createdAt"],"additionalProperties":false}},"required":["user"],"additionalProperties":false,"title":"Auth Response","description":"Authentication response with user data (token set in HTTP-only cookie)"},"UserResponse":{"type":"object","properties":{"id":{"type":"string"},"username":{"type":"string"},"isSuperUser":{"type":"boolean"},"createdAt":{"type":"string"},"impersonating":{"type":"object","properties":{"userId":{"type":"string"},"username":{"type":"string"}},"required":["userId","username"],"additionalProperties":false}},"required":["id","username","createdAt"],"additionalProperties":false,"title":"User Response","description":"User profile data"},"TeamWithRole":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"role":{"type":"string","enum":["owner","admin","member"]}},"required":["id","name","description","createdAt","updatedAt","role"],"additionalProperties":false,"title":"Team with Role","description":"Team information including user's role"},"TeamWithMembers":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"members":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"userId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"teamId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"role":{"type":"string","enum":["owner","admin","member"]},"username":{"type":"string"},"createdAt":{"type":"string"}},"required":["id","userId","teamId","role","username","createdAt"],"additionalProperties":false}}},"required":["id","name","description","createdAt","updatedAt","members"],"additionalProperties":false,"title":"Team with Members","description":"Team information including all members"},"Team":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","name","description","createdAt","updatedAt"],"additionalProperties":false,"title":"Team","description":"Team information"},"TeamMember":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"userId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"teamId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"role":{"type":"string","enum":["owner","admin","member"]},"username":{"type":"string"},"createdAt":{"type":"string"}},"required":["id","userId","teamId","role","username","createdAt"],"additionalProperties":false,"title":"Team Member","description":"Team member with user info and role"},"PaginatedActivityLogs":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/ActivityLogItem"}},"total":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"page":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"pageSize":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"totalPages":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["items","total","page","pageSize","totalPages"],"additionalProperties":false,"title":"Paginated Activity Logs","description":"Paginated list of team activity log entries"},"ActivityLogItem":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"teamId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"actorId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"service":{"type":"string","enum":["campaign","warmup","messaging","whatsapp","number-checking","one-time-messaging","account"]},"event":{"type":"string"},"severity":{"type":"string","enum":["info","warn","error"]},"summary":{"type":"string"},"metadata":{"anyOf":[{},{"type":"null"}]},"resourceId":{"anyOf":[{"type":"string"},{"type":"null"}]},"resourceType":{"anyOf":[{"type":"string"},{"type":"null"}]},"expiresAt":{"type":"string"},"createdAt":{"type":"string"}},"required":["id","teamId","actorId","service","event","severity","summary","metadata","resourceId","resourceType","expiresAt","createdAt"],"additionalProperties":false,"title":"Activity Log Item","description":"A single team activity log entry"},"AccountWithSettings":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"userId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"teamId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"phoneNumber":{"type":"string"},"state":{"type":"string","enum":["disconnected","disconnecting","launching","connecting","qr_pending","connected","error"]},"expiredAt":{"type":"string"},"persistent":{"type":"boolean"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"settings":{"anyOf":[{"$ref":"#/components/schemas/AccountSettings"},{"type":"null"}]},"groups":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","description"],"additionalProperties":false}},"sessionInfo":{"anyOf":[{"type":"object","properties":{"phoneNumber":{"type":"string"},"platform":{"type":"string"},"pushName":{"type":"string"},"profilePictureUrl":{"type":"string"},"waVersion":{"type":"string"}},"required":["phoneNumber","platform","pushName"],"additionalProperties":false},{"type":"null"}]},"currentActivity":{"$ref":"#/components/schemas/AccountActivity"}},"required":["id","userId","teamId","name","phoneNumber","state","expiredAt","persistent","createdAt","updatedAt","settings","groups","sessionInfo","currentActivity"],"additionalProperties":false,"title":"Account With Settings","description":"WhatsApp account with cooldown settings, groups, and session info"},"AccountSettings":{"type":"object","properties":{"cooldownEnabled":{"type":"boolean"},"cooldownDurationSeconds":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"cooldownVarianceSeconds":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"messagesPerHour":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"messagesPerDay":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"messagesSentToday":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"messagesSentThisHour":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"hourResetAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"dayResetAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"cooldownUntil":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["cooldownEnabled","cooldownDurationSeconds","cooldownVarianceSeconds","messagesPerHour","messagesPerDay","messagesSentToday","messagesSentThisHour","hourResetAt","dayResetAt","cooldownUntil"],"additionalProperties":false,"title":"Account Settings","description":"Account cooldown and rate limiting settings"},"AccountActivity":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"idle"}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"cooldown"},"untilMs":{"type":"number"}},"required":["type","untilMs"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"warmup"},"action":{"type":"string","enum":["send_message","send_reaction","send_reply"]},"executionId":{"type":"string"}},"required":["type","action","executionId"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"campaign"},"campaignId":{"type":"string"}},"required":["type","campaignId"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"one_time_message"},"messageId":{"type":"string"}},"required":["type","messageId"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"number_checking"},"batchId":{"type":"string"}},"required":["type","batchId"],"additionalProperties":false}],"title":"Account Activity","description":"Represents the current activity state of an account, including cooldowns and ongoing actions","type":"object"},"Account":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"userId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"teamId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"phoneNumber":{"type":"string"},"state":{"type":"string","enum":["disconnected","disconnecting","launching","connecting","qr_pending","connected","error"]},"expiredAt":{"type":"string"},"persistent":{"type":"boolean"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","userId","teamId","name","phoneNumber","state","expiredAt","persistent","createdAt","updatedAt"],"additionalProperties":false,"title":"Account","description":"WhatsApp account information"},"ImportAccountsResult":{"type":"object","properties":{"total":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"example":10},"successful":{"type":"array","items":{"type":"object","properties":{"row":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"example":2},"account":{"$ref":"#/components/schemas/Account"}},"required":["row","account"],"additionalProperties":false},"example":[{"row":2,"account":{"id":"123e4567-e89b-12d3-a456-426614174000","name":"Account 1","phoneNumber":"682123456789","state":"disconnected"}}]},"failed":{"type":"array","items":{"type":"object","properties":{"row":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"example":3},"data":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"},"example":{"name":"Invalid"}},"reason":{"type":"string","example":"Phone number is invalid"}},"required":["row","data","reason"],"additionalProperties":false},"example":[{"row":3,"data":{"name":"Invalid","phoneNumber":"invalid"},"reason":"Invalid phone number format"}]}},"required":["total","successful","failed"],"additionalProperties":false,"title":"Import Accounts Result","description":"Result of bulk account import operation"},"GroupWithAccountCount":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"userId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"teamId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"accountCount":{"type":"number"}},"required":["id","userId","teamId","name","description","createdAt","updatedAt","accountCount"],"additionalProperties":false,"title":"Group with Account Count","description":"Group with the number of associated accounts"},"Group":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"userId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"teamId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","userId","teamId","name","description","createdAt","updatedAt"],"additionalProperties":false,"title":"Group","description":"WhatsApp account group"},"GroupWithAccountsFull":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"userId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"teamId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"accounts":{"type":"array","items":{"$ref":"#/components/schemas/Account"}}},"required":["id","userId","teamId","name","description","createdAt","updatedAt","accounts"],"additionalProperties":false,"title":"Group with Full Account Details","description":"Group details with full account information"},"CampaignResponse":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"message":{"type":"string"},"messageVariables":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},{"type":"null"}]},"mediaUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"groupId":{"type":"string"},"status":{"type":"string"},"scheduledAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"startedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"completedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"totalReceivers":{"type":"number"},"processedCount":{"type":"number"},"successCount":{"type":"number"},"failedCount":{"type":"number"},"skippedCount":{"type":"number"},"concurrencyLimit":{"type":"number"},"delayBetweenMessages":{"type":"number"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","name","description","message","messageVariables","mediaUrl","groupId","status","scheduledAt","startedAt","completedAt","totalReceivers","processedCount","successCount","failedCount","skippedCount","concurrencyLimit","delayBetweenMessages","createdAt","updatedAt"],"additionalProperties":false,"title":"Campaign Response","description":"Campaign data"},"CampaignStartResponse":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string"},"startedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","status","startedAt"],"additionalProperties":false,"title":"Campaign Start Response","description":"Campaign start status"},"MessageWithMetadata":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"teamId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"userId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"accountId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"direction":{"type":"string","enum":["inbound","outbound"]},"fromNumber":{"type":"string"},"toNumber":{"type":"string"},"recipientNumber":{"type":"string"},"body":{"type":"string"},"status":{"type":"string","enum":["pending","scheduled","sending","sent","delivered","read","failed","canceled"]},"whatsappMessageId":{"anyOf":[{"type":"string"},{"type":"null"}]},"scheduledFor":{"anyOf":[{"type":"string"},{"type":"null"}]},"sentAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"deliveredAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"readAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"retryCount":{"type":"number"},"maxRetries":{"type":"number"},"errorMessage":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"metadata":{"$ref":"#/components/schemas/MessageMetadata"}},"required":["id","teamId","userId","accountId","direction","fromNumber","toNumber","recipientNumber","body","status","whatsappMessageId","scheduledFor","sentAt","deliveredAt","readAt","retryCount","maxRetries","errorMessage","createdAt","updatedAt","metadata"],"additionalProperties":false,"title":"Message with Metadata","description":"Complete message information with metadata"},"MessageMetadata":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"messageId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"sourceType":{"type":"string","enum":["campaign","warmup","one_time","api","direct"]},"sourceId":{"anyOf":[{"type":"string"},{"type":"null"}]},"sourceMetadata":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"templateId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"templateSnapshot":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"mediaUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"mediaType":{"anyOf":[{"type":"string"},{"type":"null"}]},"mediaCaption":{"anyOf":[{"type":"string"},{"type":"null"}]},"replyToMessageId":{"anyOf":[{"type":"string"},{"type":"null"}]},"additionalData":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"createdAt":{"type":"string"}},"required":["id","messageId","sourceType","sourceId","sourceMetadata","templateId","templateSnapshot","mediaUrl","mediaType","mediaCaption","replyToMessageId","additionalData","createdAt"],"additionalProperties":false,"title":"Message Metadata","description":"Extended metadata for messages"},"MessageTemplate":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"teamId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"body":{"type":"string"},"variables":{"type":"array","items":{"type":"string"}},"category":{"type":"string","enum":["marketing","transactional","notification","support","general"]},"mediaUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"usageCount":{"type":"number"},"lastUsedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"isActive":{"type":"boolean"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","teamId","name","body","variables","category","mediaUrl","usageCount","lastUsedAt","isActive","createdAt","updatedAt"],"additionalProperties":false,"title":"Message Template","description":"Reusable message template with variable substitution"},"SendMessageResponse":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string","const":"pending"},"queuePosition":{"type":"number"}},"required":["id","status"],"additionalProperties":false,"title":"Send Message Response","description":"Response after enqueueing a message"},"QueueListResponse":{"type":"object","properties":{"messages":{"type":"array","items":{"$ref":"#/components/schemas/OneTimeMessageResponse"}},"total":{"type":"number"},"queueStats":{"type":"object","properties":{"pending":{"type":"number"},"processing":{"type":"number"},"sent":{"type":"number"},"failed":{"type":"number"},"canceled":{"type":"number"}},"required":["pending","processing","sent","failed","canceled"],"additionalProperties":false}},"required":["messages","total","queueStats"],"additionalProperties":false,"title":"Queue List Response","description":"List of queued messages with statistics"},"OneTimeMessageResponse":{"type":"object","properties":{"id":{"type":"string"},"userId":{"type":"string"},"teamId":{"type":"string"},"accountId":{"anyOf":[{"type":"string"},{"type":"null"}]},"groupId":{"anyOf":[{"type":"string"},{"type":"null"}]},"toNumber":{"type":"string"},"body":{"type":"string"},"status":{"type":"string","enum":["pending","processing","sent","failed","canceled"]},"queuedAt":{"type":"string"},"processingAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"sentAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"completedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"messageId":{"anyOf":[{"type":"string"},{"type":"null"}]},"whatsappMessageId":{"anyOf":[{"type":"string"},{"type":"null"}]},"errorMessage":{"anyOf":[{"type":"string"},{"type":"null"}]},"failureReasons":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"accountId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"type":{"type":"string"},"code":{"type":"string"},"message":{"type":"string"}},"required":["accountId","type","message"],"additionalProperties":false}},{"type":"null"}]},"retryCount":{"type":"number"},"maxRetries":{"type":"number"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"sentByAccount":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"phoneNumber":{"type":"string"}},"required":["id","name","phoneNumber"],"additionalProperties":false},{"type":"null"}]}},"required":["id","userId","teamId","accountId","groupId","toNumber","body","status","queuedAt","processingAt","sentAt","completedAt","messageId","whatsappMessageId","errorMessage","failureReasons","retryCount","maxRetries","createdAt","updatedAt","sentByAccount"],"additionalProperties":false,"title":"One-Time Message Response","description":"One-time message data"},"QueueStatsResponse":{"type":"object","properties":{"pending":{"type":"number"},"processing":{"type":"number"},"sent":{"type":"number"},"failed":{"type":"number"},"canceled":{"type":"number"},"isProcessing":{"type":"boolean"}},"required":["pending","processing","sent","failed","canceled","isProcessing"],"additionalProperties":false,"title":"Queue Statistics Response","description":"Queue statistics for a team"},"WarmupTemplateResponse":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"isSystem":{"type":"number"},"actions":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"send_message"},"delayMinutes":{"type":"number"},"delayVarianceMinutes":{"type":"number"},"actor":{"anyOf":[{"type":"string","const":"account_1"},{"type":"string","const":"account_2"}]},"message":{"type":"object","properties":{"text":{"type":"string"},"mediaUrl":{"type":"string"}},"additionalProperties":false}},"required":["id","type","delayMinutes","delayVarianceMinutes","actor","message"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"send_reaction"},"delayMinutes":{"type":"number"},"delayVarianceMinutes":{"type":"number"},"actor":{"anyOf":[{"type":"string","const":"account_1"},{"type":"string","const":"account_2"}]},"reaction":{"type":"object","properties":{"replyToActionId":{"type":"string"},"emoji":{"type":"string"}},"required":["replyToActionId","emoji"],"additionalProperties":false}},"required":["id","type","delayMinutes","delayVarianceMinutes","actor","reaction"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"send_reply"},"delayMinutes":{"type":"number"},"delayVarianceMinutes":{"type":"number"},"actor":{"anyOf":[{"type":"string","const":"account_1"},{"type":"string","const":"account_2"}]},"reply":{"type":"object","properties":{"replyToActionId":{"type":"string"},"text":{"type":"string"}},"required":["replyToActionId","text"],"additionalProperties":false}},"required":["id","type","delayMinutes","delayVarianceMinutes","actor","reply"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"pause"},"delayMinutes":{"type":"number"},"delayVarianceMinutes":{"type":"number"}},"required":["id","type","delayMinutes","delayVarianceMinutes"],"additionalProperties":false}]}},"tags":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"estimatedDurationMinutes":{"anyOf":[{"type":"number"},{"type":"null"}]},"variableModes":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"mode":{"type":"string","pattern":"^[a-zA-Z0-9_-]+$"},"variables":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["mode","variables"],"additionalProperties":false}},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","name","description","isSystem","actions","tags","estimatedDurationMinutes","variableModes","createdAt","updatedAt"],"additionalProperties":false,"title":"Warmup Template Response","description":"Warmup template data"},"ListExecutionsResponse":{"type":"object","properties":{"executions":{"type":"array","items":{"$ref":"#/components/schemas/WarmupExecutionResponseWithChildCount"}}},"required":["executions"],"additionalProperties":false,"title":"List Executions Response"},"WarmupExecutionResponseWithChildCount":{"type":"object","properties":{"id":{"type":"string"},"teamId":{"type":"string"},"userId":{"type":"string"},"templateId":{"type":"string"},"templateSnapshot":{},"accountPairIds":{"type":"array","prefixItems":[{"type":"string"},{"type":"string"}]},"executionType":{"type":"string","enum":["immediate","scheduled","recurring"]},"status":{"type":"string","enum":["pending","running","completed","failed","canceled"]},"progressPercent":{"type":"number"},"messagesSentCount":{"type":"number"},"actionHistory":{"type":"array","items":{"type":"object","properties":{"actionId":{"type":"string"},"status":{"anyOf":[{"type":"string","const":"success"},{"type":"string","const":"failed"}]},"executedAt":{"type":"string"},"actualDelayMs":{"type":"number"},"errorMessage":{"type":"string"}},"required":["actionId","status","executedAt","actualDelayMs"],"additionalProperties":false}},"scheduledAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"startedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"completedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"recurrenceConfig":{"anyOf":[{"type":"object","properties":{"pattern":{"anyOf":[{"type":"string","const":"interval"},{"type":"string","const":"daily"},{"type":"string","const":"weekly"}]},"intervalHours":{"type":"number"},"dailyAtHour":{"type":"number","minimum":0,"maximum":23},"dailyAtMinute":{"type":"number","minimum":0,"maximum":59},"weeklyDay":{"anyOf":[{"type":"number","const":0},{"type":"number","const":1},{"type":"number","const":2},{"type":"number","const":3},{"type":"number","const":4},{"type":"number","const":5},{"type":"number","const":6}]},"weeklyAtHour":{"type":"number","minimum":0,"maximum":23},"weeklyAtMinute":{"type":"number","minimum":0,"maximum":59},"recurrenceStartDate":{"type":"string"},"recurrenceEndDate":{"type":"string"},"maxOccurrences":{"type":"number"},"currentOccurrence":{"type":"number"},"canceledAt":{"type":"string"},"timezone":{"default":"UTC","type":"string"}},"required":["pattern","recurrenceStartDate","timezone"],"additionalProperties":false},{"type":"null"}]},"parentExecutionId":{"anyOf":[{"type":"string"},{"type":"null"}]},"errorMessage":{"anyOf":[{"type":"string"},{"type":"null"}]},"selectedVariableMode":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"childCount":{"type":"number"}},"required":["id","teamId","userId","templateId","templateSnapshot","accountPairIds","executionType","status","progressPercent","messagesSentCount","actionHistory","scheduledAt","startedAt","completedAt","recurrenceConfig","parentExecutionId","errorMessage","selectedVariableMode","createdAt","updatedAt","childCount"],"additionalProperties":false,"title":"Warmup Execution Response With Child Count","description":"Warmup execution data with child execution count"},"WarmupExecutionResponse":{"type":"object","properties":{"id":{"type":"string"},"teamId":{"type":"string"},"userId":{"type":"string"},"templateId":{"type":"string"},"templateSnapshot":{},"accountPairIds":{"type":"array","prefixItems":[{"type":"string"},{"type":"string"}]},"executionType":{"type":"string","enum":["immediate","scheduled","recurring"]},"status":{"type":"string","enum":["pending","running","completed","failed","canceled"]},"progressPercent":{"type":"number"},"messagesSentCount":{"type":"number"},"actionHistory":{"type":"array","items":{"type":"object","properties":{"actionId":{"type":"string"},"status":{"anyOf":[{"type":"string","const":"success"},{"type":"string","const":"failed"}]},"executedAt":{"type":"string"},"actualDelayMs":{"type":"number"},"errorMessage":{"type":"string"}},"required":["actionId","status","executedAt","actualDelayMs"],"additionalProperties":false}},"scheduledAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"startedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"completedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"recurrenceConfig":{"anyOf":[{"type":"object","properties":{"pattern":{"anyOf":[{"type":"string","const":"interval"},{"type":"string","const":"daily"},{"type":"string","const":"weekly"}]},"intervalHours":{"type":"number"},"dailyAtHour":{"type":"number","minimum":0,"maximum":23},"dailyAtMinute":{"type":"number","minimum":0,"maximum":59},"weeklyDay":{"anyOf":[{"type":"number","const":0},{"type":"number","const":1},{"type":"number","const":2},{"type":"number","const":3},{"type":"number","const":4},{"type":"number","const":5},{"type":"number","const":6}]},"weeklyAtHour":{"type":"number","minimum":0,"maximum":23},"weeklyAtMinute":{"type":"number","minimum":0,"maximum":59},"recurrenceStartDate":{"type":"string"},"recurrenceEndDate":{"type":"string"},"maxOccurrences":{"type":"number"},"currentOccurrence":{"type":"number"},"canceledAt":{"type":"string"},"timezone":{"default":"UTC","type":"string"}},"required":["pattern","recurrenceStartDate","timezone"],"additionalProperties":false},{"type":"null"}]},"parentExecutionId":{"anyOf":[{"type":"string"},{"type":"null"}]},"errorMessage":{"anyOf":[{"type":"string"},{"type":"null"}]},"selectedVariableMode":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","teamId","userId","templateId","templateSnapshot","accountPairIds","executionType","status","progressPercent","messagesSentCount","actionHistory","scheduledAt","startedAt","completedAt","recurrenceConfig","parentExecutionId","errorMessage","selectedVariableMode","createdAt","updatedAt"],"additionalProperties":false,"title":"Warmup Execution Response","description":"Warmup execution data"},"ChildExecutionsResponse":{"type":"object","properties":{"childExecutions":{"type":"array","items":{"$ref":"#/components/schemas/WarmupExecutionResponse"}}},"required":["childExecutions"],"additionalProperties":false,"title":"Child Executions Response"},"ExecutionProgressResponse":{"type":"object","properties":{"executionId":{"type":"string"},"status":{"type":"string"},"total":{"type":"number"},"sent":{"type":"number"},"pending":{"type":"number"},"progressPercent":{"type":"number"}},"required":["executionId","status","total","sent","pending","progressPercent"],"additionalProperties":false,"title":"Execution Progress Response","description":"Current progress of an execution"},"CancelExecutionResponse":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false,"title":"Cancel Execution Response"},"BatchCreationResponse":{"type":"object","properties":{"batch":{"$ref":"#/components/schemas/BatchResponse"},"statistics":{"type":"object","properties":{"totalNumbers":{"type":"number"},"originalCount":{"type":"number"},"duplicateCount":{"type":"number"}},"required":["totalNumbers","originalCount","duplicateCount"],"additionalProperties":false}},"required":["batch","statistics"],"additionalProperties":false,"title":"Batch Creation Response","description":"Response after creating a new batch"},"BatchResponse":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"userId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"teamId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"groupId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"groupName":{"type":"string"},"totalNumbers":{"type":"number"},"originalCount":{"type":"number"},"duplicateCount":{"type":"number"},"completedNumbers":{"type":"number"},"failedNumbers":{"type":"number"},"validCount":{"type":"number"},"invalidCount":{"type":"number"},"cachedCount":{"type":"number"},"status":{"type":"string","enum":["pending","processing","completed","failed","canceled"]},"startedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"completedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"}},"required":["id","userId","teamId","groupId","groupName","totalNumbers","originalCount","duplicateCount","completedNumbers","failedNumbers","validCount","invalidCount","cachedCount","status","startedAt","completedAt","createdAt"],"additionalProperties":false,"title":"Batch Response","description":"Number checking batch details"},"BatchListResponse":{"type":"object","properties":{"batches":{"type":"array","items":{"$ref":"#/components/schemas/BatchResponse"}},"total":{"type":"number"}},"required":["batches","total"],"additionalProperties":false,"title":"Batch List Response","description":"List of number checking batches"},"BatchSummaryResponse":{"type":"object","properties":{"totalBatches":{"type":"number"},"totalNumbersChecked":{"type":"number"},"totalValid":{"type":"number"},"totalInvalid":{"type":"number"},"totalCached":{"type":"number"},"totalErrors":{"type":"number"}},"required":["totalBatches","totalNumbersChecked","totalValid","totalInvalid","totalCached","totalErrors"],"additionalProperties":false,"title":"Batch Summary Response","description":"Aggregate statistics for all batches"},"BatchProgressResponse":{"type":"object","properties":{"batchId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"status":{"type":"string","enum":["pending","processing","completed","failed","canceled"]},"totalNumbers":{"type":"number"},"completedNumbers":{"type":"number"},"failedNumbers":{"type":"number"},"validCount":{"type":"number"},"invalidCount":{"type":"number"},"cachedCount":{"type":"number"},"progressPercentage":{"type":"number","minimum":0,"maximum":100},"startedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"completedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["batchId","status","totalNumbers","completedNumbers","failedNumbers","validCount","invalidCount","cachedCount","progressPercentage","startedAt","completedAt"],"additionalProperties":false,"title":"Batch Progress Response","description":"Current progress of a number checking batch"},"BatchChecksResponse":{"type":"object","properties":{"checks":{"type":"array","items":{"$ref":"#/components/schemas/CheckResponse"}},"total":{"type":"number"}},"required":["checks","total"],"additionalProperties":false,"title":"Batch Checks Response","description":"List of checks in a batch"},"CheckResponse":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"batchId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"teamId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"phoneNumber":{"type":"string"},"status":{"type":"string","enum":["pending","queued","checking","completed","failed"]},"isOnWhatsApp":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"isCachedResult":{"type":"boolean"},"checkedBy":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"phoneNumber":{"type":"string"}},"required":["id","name","phoneNumber"],"additionalProperties":false},{"type":"null"}]},"checkedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"errorMessage":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"}},"required":["id","batchId","teamId","phoneNumber","status","isOnWhatsApp","isCachedResult","checkedBy","checkedAt","errorMessage","createdAt"],"additionalProperties":false,"title":"Check Response","description":"Individual number check result"},"SingleCheckResponse":{"type":"object","properties":{"phoneNumber":{"type":"string"},"isOnWhatsApp":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"isCached":{"type":"boolean"},"checkedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["phoneNumber","isOnWhatsApp","isCached","checkedAt"],"additionalProperties":false,"title":"Single Check Response","description":"Result of checking a single phone number"},"UserProfileResponse":{"type":"object","properties":{"id":{"type":"string"},"username":{"type":"string"},"createdAt":{"type":"string"},"isSuperUser":{"type":"boolean"}},"required":["id","username","createdAt","isSuperUser"],"additionalProperties":false,"title":"User Profile Response"},"ChangePasswordResponse":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false,"title":"Change Password Response"},"ListApiKeysResponse":{"type":"object","properties":{"apiKeys":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"keyPrefix":{"type":"string"},"lastUsedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"expiresAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"isActive":{"type":"boolean"},"createdAt":{"type":"string"},"permissions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"resource":{"type":"string","enum":["campaigns","accounts","contacts","messages","warmup","number-checking","teams","*"]},"actions":{"type":"array","items":{"type":"string","enum":["read","write","delete","*"]}},"createdAt":{"type":"string"}},"required":["id","resource","actions","createdAt"],"additionalProperties":false}}},"required":["id","name","keyPrefix","lastUsedAt","expiresAt","isActive","createdAt","permissions"],"additionalProperties":false}}},"required":["apiKeys"],"additionalProperties":false,"title":"List API Keys Response"},"CreateApiKeyResponse":{"type":"object","properties":{"apiKey":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"keyPrefix":{"type":"string"},"expiresAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"}},"required":["id","name","keyPrefix","expiresAt","createdAt"],"additionalProperties":false},"plainKey":{"type":"string"},"permissions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"resource":{"type":"string"},"actions":{"type":"array","items":{"type":"string"}}},"required":["id","resource","actions"],"additionalProperties":false}},"warning":{"type":"string","description":"Warning message that the key will only be shown once"}},"required":["apiKey","plainKey","permissions","warning"],"additionalProperties":false,"title":"Create API Key Response"},"ApiKeyResponse":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"keyPrefix":{"type":"string"},"lastUsedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"expiresAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"isActive":{"type":"boolean"},"createdAt":{"type":"string"},"permissions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"resource":{"type":"string","enum":["campaigns","accounts","contacts","messages","warmup","number-checking","teams","*"]},"actions":{"type":"array","items":{"type":"string","enum":["read","write","delete","*"]}},"createdAt":{"type":"string"}},"required":["id","resource","actions","createdAt"],"additionalProperties":false}}},"required":["id","name","keyPrefix","lastUsedAt","expiresAt","isActive","createdAt","permissions"],"additionalProperties":false,"title":"API Key Response"},"DeleteApiKeyResponse":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false,"title":"Delete API Key Response"},"UpdatePermissionsResponse":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false,"title":"Update Permissions Response"},"RevokeApiKeyResponse":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false,"title":"Revoke API Key Response"},"WebhookResponse":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"teamId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"createdBy":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"url":{"type":"string","format":"uri"},"events":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"status":{"type":"string","enum":["active","inactive","failed","paused"]},"lastDeliveryAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastSuccessAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastFailureAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"consecutiveFailures":{"type":"number"},"timeout":{"type":"number"},"retryEnabled":{"type":"boolean"},"maxRetries":{"type":"number"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","teamId","createdBy","name","description","url","events","status","lastDeliveryAt","lastSuccessAt","lastFailureAt","consecutiveFailures","timeout","retryEnabled","maxRetries","createdAt","updatedAt"],"additionalProperties":false,"title":"Webhook Response","description":"Webhook configuration and status"},"WebhookWithSecretResponse":{"type":"object","properties":{"webhook":{"$ref":"#/components/schemas/WebhookResponse"},"secret":{"type":"string"}},"required":["webhook","secret"],"additionalProperties":false,"title":"Webhook With Secret","description":"Webhook with secret - secret is only shown once on creation or regeneration"},"TestWebhookResponse":{"type":"object","properties":{"success":{"type":"boolean"},"statusCode":{"type":"number"},"responseTime":{"type":"number"},"errorMessage":{"type":"string"}},"required":["success"],"additionalProperties":false,"title":"Test Webhook Response","description":"Result of webhook test"},"WebhookEventTypeMetadata":{"type":"object","properties":{"value":{"type":"string"},"label":{"type":"string"},"description":{"type":"string"},"category":{"type":"string","enum":["message","campaign","number_check","warmup","account"]}},"required":["value","label","description","category"],"additionalProperties":false,"title":"Webhook Event Type Metadata","description":"UI Metadata for a webhook event type"},"WebhookDeliveryResponse":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"webhookId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"event":{"type":"string"},"payload":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"status":{"type":"string","enum":["pending","sending","success","failed","retrying"]},"attempt":{"type":"number"},"maxAttempts":{"type":"number"},"responseStatus":{"anyOf":[{"type":"number"},{"type":"null"}]},"responseBody":{"anyOf":[{"type":"string"},{"type":"null"}]},"responseTime":{"anyOf":[{"type":"number"},{"type":"null"}]},"errorMessage":{"anyOf":[{"type":"string"},{"type":"null"}]},"scheduledAt":{"type":"string"},"sentAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"completedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"nextRetryAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","webhookId","event","payload","status","attempt","maxAttempts","responseStatus","responseBody","responseTime","errorMessage","scheduledAt","sentAt","completedAt","nextRetryAt","createdAt","updatedAt"],"additionalProperties":false,"title":"Webhook Delivery Response","description":"Webhook delivery attempt and result"},"ImpersonateResponse":{"type":"object","properties":{"user":{"type":"object","properties":{"id":{"type":"string"},"username":{"type":"string"},"isSuperUser":{"type":"boolean"},"impersonating":{"type":"object","properties":{"userId":{"type":"string"},"username":{"type":"string"}},"required":["userId","username"],"additionalProperties":false}},"required":["id","username","isSuperUser","impersonating"],"additionalProperties":false}},"required":["user"],"additionalProperties":false,"title":"Impersonate Response","description":"Response with new token set in cookie"},"StopImpersonationResponse":{"type":"object","properties":{"user":{"type":"object","properties":{"id":{"type":"string"},"username":{"type":"string"},"isSuperUser":{"type":"boolean"}},"required":["id","username","isSuperUser"],"additionalProperties":false}},"required":["user"],"additionalProperties":false,"title":"Stop Impersonation Response","description":"Response with regular super user token set in cookie"},"ListSuperUsersResponse":{"type":"object","properties":{"users":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"username":{"type":"string"},"isSuperUser":{"type":"boolean"},"createdAt":{"type":"string"}},"required":["id","username","isSuperUser","createdAt"],"additionalProperties":false}},"total":{"type":"number"}},"required":["users","total"],"additionalProperties":false,"title":"List Super Users Response"},"CreateUserResponse":{"type":"object","properties":{"user":{"type":"object","properties":{"id":{"type":"string"},"username":{"type":"string"},"isSuperUser":{"type":"boolean"},"createdAt":{"type":"string"}},"required":["id","username","isSuperUser","createdAt"],"additionalProperties":false}},"required":["user"],"additionalProperties":false,"title":"Create User Response","description":"Response with newly created user"},"ListIpWhitelistResponse":{"type":"object","properties":{"entries":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"ipAddress":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"isActive":{"type":"boolean"},"createdBy":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","ipAddress","description","isActive","createdBy","createdAt","updatedAt"],"additionalProperties":false}},"total":{"type":"number"}},"required":["entries","total"],"additionalProperties":false,"title":"List IP Whitelist Response"},"IpWhitelistEntryResponse":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"ipAddress":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"isActive":{"type":"boolean"},"createdBy":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","ipAddress","description","isActive","createdBy","createdAt","updatedAt"],"additionalProperties":false,"title":"IP Whitelist Entry Response"},"UpdatedIpWhitelistEntryResponse":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"ipAddress":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"isActive":{"type":"boolean"},"createdBy":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","ipAddress","description","isActive","createdBy","createdAt","updatedAt"],"additionalProperties":false,"title":"Updated IP Whitelist Entry Response"},"DeleteIpWhitelistResponse":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string"}},"required":["success","message"],"additionalProperties":false,"title":"Delete IP Whitelist Response"},"ToggleIpWhitelistResponse":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"ipAddress":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"isActive":{"type":"boolean"},"createdBy":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","ipAddress","description","isActive","createdBy","createdAt","updatedAt"],"additionalProperties":false,"title":"Toggle IP Whitelist Response"},"ListPluginsResponse":{"type":"object","properties":{"plugins":{"type":"array","items":{"$ref":"#/components/schemas/PluginResponse"}}},"required":["plugins"],"additionalProperties":false,"title":"List Plugins Response"},"PluginResponse":{"type":"object","properties":{"id":{"type":"string"},"identifier":{"type":"string"},"name":{"type":"string"},"version":{"type":"string"},"manifest":{},"enabled":{"type":"boolean"},"loaded":{"type":"boolean"},"loadedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","identifier","name","version","manifest","enabled","loaded","loadedAt","createdAt","updatedAt"],"additionalProperties":false,"title":"Plugin Response"},"PluginSettingsResponse":{"type":"object","properties":{"settings":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["settings"],"additionalProperties":false,"title":"Plugin Settings Response"},"BadRequestErrorResponse":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"string","const":"BAD_REQUEST"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["message","code","details"],"additionalProperties":false},"UnauthorizedErrorResponse":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"string","const":"UNAUTHORIZED"},"details":{}},"required":["message","code"],"additionalProperties":false},"ForbiddenErrorResponse":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"string","const":"FORBIDDEN"},"details":{}},"required":["message","code"],"additionalProperties":false},"NotFoundErrorResponse":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"string","const":"NOT_FOUND"},"details":{}},"required":["message","code"],"additionalProperties":false},"ConflictErrorResponse":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"string","const":"CONFLICT"},"details":{"anyOf":[{"type":"string"},{"type":"object","properties":{},"additionalProperties":false}]}},"required":["message","code"],"additionalProperties":false},"InternalServerErrorResponse":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"string","const":"INTERNAL_ERROR"},"details":{"type":"string"}},"required":["message","code"],"additionalProperties":false},"ErrorResponse":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"string"},"details":{}},"required":["message","code"],"additionalProperties":false}},"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"HTTP Bearer authentication. Only public endpoints support this. Get your API key from the console app."},"cookieAuth":{"type":"apiKey","in":"cookie","name":"bunblast_cookie","description":"HTTP-only cookie authentication."}}}}