{
	"info": {
		"_postman_id": "notification-microservice-v1",
		"name": "Notification Microservice API",
		"description": "Multi-tenant B2B notification platform API collection",
		"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
		"_exporter_id": "notification-microservice"
	},
	"item": [
		{
			"name": "Authentication",
			"item": [
				{
					"name": "User Register",
					"request": {
						"method": "POST",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json"
							},
							{
								"key": "X-API-Key",
								"value": "{{API_KEY}}",
								"description": "Project API Key"
							},
							{
								"key": "X-API-Secret",
								"value": "{{SECRET}}",
								"description": "Project API Secret"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n  \"email\": \"user@example.com\",\n  \"password\": \"securePassword123\",\n  \"fullName\": \"John Doe\",\n  \"externalUserId\": \"ext_user_123\",\n  \"roles\": [\"user\"]\n}"
						},
						"url": {
							"raw": "{{BASE_URL}}/auth/register",
							"host": ["{{BASE_URL}}"],
							"path": ["auth", "register"]
						},
						"description": "Register a new user. User status will be set to 'pending' until approved by admin."
					}
				},
				{
					"name": "User Login",
					"request": {
						"method": "POST",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json"
							},
							{
								"key": "X-API-Key",
								"value": "{{API_KEY}}"
							},
							{
								"key": "X-API-Secret",
								"value": "{{SECRET}}"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n  \"email\": \"user@example.com\",\n  \"password\": \"securePassword123\"\n}"
						},
						"url": {
							"raw": "{{BASE_URL}}/auth/login",
							"host": ["{{BASE_URL}}"],
							"path": ["auth", "login"]
						},
						"description": "Login and receive JWT access token and refresh token."
					}
				},
				{
					"name": "Refresh Token",
					"request": {
						"method": "POST",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n  \"refreshToken\": \"{{refresh_token}}\"\n}"
						},
						"url": {
							"raw": "{{BASE_URL}}/auth/refresh",
							"host": ["{{BASE_URL}}"],
							"path": ["auth", "refresh"]
						},
						"description": "Refresh access token using refresh token."
					}
				},
				{
					"name": "Platform Admin Login",
					"request": {
						"method": "POST",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n  \"email\": \"admin@platform.com\",\n  \"password\": \"adminPassword123\"\n}"
						},
						"url": {
							"raw": "{{BASE_URL}}/platform/auth/login",
							"host": ["{{BASE_URL}}"],
							"path": ["platform", "auth", "login"]
						},
						"description": "Login as platform super admin."
					}
				},
				{
					"name": "Platform Admin Refresh",
					"request": {
						"method": "POST",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n  \"refreshToken\": \"{{platform_refresh_token}}\"\n}"
						},
						"url": {
							"raw": "{{BASE_URL}}/platform/auth/refresh",
							"host": ["{{BASE_URL}}"],
							"path": ["platform", "auth", "refresh"]
						},
						"description": "Refresh platform admin token."
					}
				}
			]
		},
		{
			"name": "Events",
			"item": [
				{
					"name": "Create Event",
					"request": {
						"method": "POST",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json"
							},
							{
								"key": "X-API-Key",
								"value": "{{API_KEY}}"
							},
							{
								"key": "X-API-Secret",
								"value": "{{SECRET}}"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n  \"type\": \"pending_transaction\",\n  \"payload\": {\n    \"transactionId\": \"TX_123\",\n    \"amount\": 50000,\n    \"currency\": \"NGN\",\n    \"status\": \"pending\"\n  },\n  \"clientEventId\": \"client_event_123\"\n}"
						},
						"url": {
							"raw": "{{BASE_URL}}/events",
							"host": ["{{BASE_URL}}"],
							"path": ["events"]
						},
						"description": "Ingest a new event. Automatically scoped to project via API key."
					}
				},
				{
					"name": "Create Batch Events",
					"request": {
						"method": "POST",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json"
							},
							{
								"key": "X-API-Key",
								"value": "{{API_KEY}}"
							},
							{
								"key": "X-API-Secret",
								"value": "{{SECRET}}"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n  \"events\": [\n    {\n      \"type\": \"pending_transaction\",\n      \"payload\": {\n        \"transactionId\": \"TX_123\",\n        \"amount\": 50000\n      }\n    },\n    {\n      \"type\": \"balance_update\",\n      \"payload\": {\n        \"accountId\": \"ACC_456\",\n        \"newBalance\": 1000000\n      }\n    }\n  ]\n}"
						},
						"url": {
							"raw": "{{BASE_URL}}/events/batch",
							"host": ["{{BASE_URL}}"],
							"path": ["events", "batch"]
						},
						"description": "Ingest multiple events in a single request."
					}
				},
				{
					"name": "Get Event",
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "X-API-Key",
								"value": "{{API_KEY}}"
							},
							{
								"key": "X-API-Secret",
								"value": "{{SECRET}}"
							}
						],
						"url": {
							"raw": "{{BASE_URL}}/events/:id",
							"host": ["{{BASE_URL}}"],
							"path": ["events", ":id"],
							"variable": [
								{
									"key": "id",
									"value": "event-uuid-here"
								}
							]
						},
						"description": "Get event details by ID."
					}
				}
			]
		},
		{
			"name": "Rules",
			"item": [
				{
					"name": "Create Rule",
					"request": {
						"method": "POST",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json"
							},
							{
								"key": "Authorization",
								"value": "Bearer {{jwt_token}}"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n  \"name\": \"High Value Transaction Alert\",\n  \"condition\": \"event.type == 'pending_transaction' && event.payload.amount > 10000\",\n  \"targetRoles\": [\"admin\", \"finance\"],\n  \"title\": \"High Value Transaction\",\n  \"message\": \"Transaction {{event.payload.transactionId}} for {{event.payload.amount}} is pending\",\n  \"sound\": \"alert.mp3\",\n  \"action\": {\n    \"type\": \"open_webview\",\n    \"url\": \"https://app.example.com/transactions/{{event.payload.transactionId}}\",\n    \"editableAddressBar\": true\n  },\n  \"active\": true\n}"
						},
						"url": {
							"raw": "{{BASE_URL}}/rules",
							"host": ["{{BASE_URL}}"],
							"path": ["rules"]
						},
						"description": "Create a new notification rule. Requires admin or rule_manager role."
					}
				},
				{
					"name": "List Rules",
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "Authorization",
								"value": "Bearer {{jwt_token}}"
							}
						],
						"url": {
							"raw": "{{BASE_URL}}/rules",
							"host": ["{{BASE_URL}}"],
							"path": ["rules"]
						},
						"description": "List all rules for the current project."
					}
				},
				{
					"name": "Get Rule",
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "Authorization",
								"value": "Bearer {{jwt_token}}"
							}
						],
						"url": {
							"raw": "{{BASE_URL}}/rules/:id",
							"host": ["{{BASE_URL}}"],
							"path": ["rules", ":id"],
							"variable": [
								{
									"key": "id",
									"value": "rule-uuid-here"
								}
							]
						},
						"description": "Get rule details by ID."
					}
				},
				{
					"name": "Update Rule",
					"request": {
						"method": "PATCH",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json"
							},
							{
								"key": "Authorization",
								"value": "Bearer {{jwt_token}}"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n  \"active\": false,\n  \"condition\": \"event.type == 'pending_transaction' && event.payload.amount > 50000\"\n}"
						},
						"url": {
							"raw": "{{BASE_URL}}/rules/:id",
							"host": ["{{BASE_URL}}"],
							"path": ["rules", ":id"],
							"variable": [
								{
									"key": "id",
									"value": "rule-uuid-here"
								}
							]
						},
						"description": "Update a rule. Requires admin or rule_manager role."
					}
				},
				{
					"name": "Delete Rule",
					"request": {
						"method": "DELETE",
						"header": [
							{
								"key": "Authorization",
								"value": "Bearer {{jwt_token}}"
							}
						],
						"url": {
							"raw": "{{BASE_URL}}/rules/:id",
							"host": ["{{BASE_URL}}"],
							"path": ["rules", ":id"],
							"variable": [
								{
									"key": "id",
									"value": "rule-uuid-here"
								}
							]
						},
						"description": "Delete a rule. Requires admin or rule_manager role."
					}
				},
				{
					"name": "Test Rule",
					"request": {
						"method": "POST",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json"
							},
							{
								"key": "Authorization",
								"value": "Bearer {{jwt_token}}"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n  \"event\": {\n    \"type\": \"pending_transaction\",\n    \"payload\": {\n      \"transactionId\": \"TX_TEST\",\n      \"amount\": 15000\n    }\n  }\n}"
						},
						"url": {
							"raw": "{{BASE_URL}}/rules/:id/test",
							"host": ["{{BASE_URL}}"],
							"path": ["rules", ":id", "test"],
							"variable": [
								{
									"key": "id",
									"value": "rule-uuid-here"
								}
							]
						},
						"description": "Test a rule against a sample event. Requires admin or rule_manager role."
					}
				}
			]
		},
		{
			"name": "Notifications",
			"item": [
				{
					"name": "List Notifications",
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "Authorization",
								"value": "Bearer {{jwt_token}}"
							}
						],
						"url": {
							"raw": "{{BASE_URL}}/notifications?page=1&limit=20",
							"host": ["{{BASE_URL}}"],
							"path": ["notifications"],
							"query": [
								{
									"key": "page",
									"value": "1"
								},
								{
									"key": "limit",
									"value": "20"
								}
							]
						},
						"description": "Get user's notifications with pagination."
					}
				},
				{
					"name": "Get Notification",
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "Authorization",
								"value": "Bearer {{jwt_token}}"
							}
						],
						"url": {
							"raw": "{{BASE_URL}}/notifications/:id",
							"host": ["{{BASE_URL}}"],
							"path": ["notifications", ":id"],
							"variable": [
								{
									"key": "id",
									"value": "notification-uuid-here"
								}
							]
						},
						"description": "Get notification details by ID."
					}
				},
				{
					"name": "Acknowledge Notification",
					"request": {
						"method": "POST",
						"header": [
							{
								"key": "Authorization",
								"value": "Bearer {{jwt_token}}"
							}
						],
						"url": {
							"raw": "{{BASE_URL}}/notifications/:id/acknowledge",
							"host": ["{{BASE_URL}}"],
							"path": ["notifications", ":id", "acknowledge"],
							"variable": [
								{
									"key": "id",
									"value": "notification-uuid-here"
								}
							]
						},
						"description": "Mark notification as acknowledged by current user."
					}
				},
				{
					"name": "Get Unread Count",
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "Authorization",
								"value": "Bearer {{jwt_token}}"
							}
						],
						"url": {
							"raw": "{{BASE_URL}}/notifications/unread/count",
							"host": ["{{BASE_URL}}"],
							"path": ["notifications", "unread", "count"]
						},
						"description": "Get count of unread notifications for current user."
					}
				}
			]
		},
		{
			"name": "Users",
			"item": [
				{
					"name": "Create User",
					"request": {
						"method": "POST",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json"
							},
							{
								"key": "X-API-Key",
								"value": "{{API_KEY}}"
							},
							{
								"key": "X-API-Secret",
								"value": "{{SECRET}}"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n  \"email\": \"user@example.com\",\n  \"password\": \"securePassword123\",\n  \"fullName\": \"John Doe\",\n  \"externalUserId\": \"ext_user_123\",\n  \"roles\": [\"user\"]\n}"
						},
						"url": {
							"raw": "{{BASE_URL}}/users",
							"host": ["{{BASE_URL}}"],
							"path": ["users"]
						},
						"description": "Create a new user. Requires API key authentication."
					}
				},
				{
					"name": "List Users",
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "Authorization",
								"value": "Bearer {{jwt_token}}"
							}
						],
						"url": {
							"raw": "{{BASE_URL}}/users?page=1&limit=20&status=active",
							"host": ["{{BASE_URL}}"],
							"path": ["users"],
							"query": [
								{
									"key": "page",
									"value": "1"
								},
								{
									"key": "limit",
									"value": "20"
								},
								{
									"key": "status",
									"value": "active"
								}
							]
						},
						"description": "List all users. Requires admin role."
					}
				},
				{
					"name": "Get Pending Users",
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "Authorization",
								"value": "Bearer {{jwt_token}}"
							}
						],
						"url": {
							"raw": "{{BASE_URL}}/users/pending",
							"host": ["{{BASE_URL}}"],
							"path": ["users", "pending"]
						},
						"description": "Get list of pending users awaiting approval. Requires admin role."
					}
				},
				{
					"name": "Get Current User",
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "Authorization",
								"value": "Bearer {{jwt_token}}"
							}
						],
						"url": {
							"raw": "{{BASE_URL}}/users/me",
							"host": ["{{BASE_URL}}"],
							"path": ["users", "me"]
						},
						"description": "Get current authenticated user profile."
					}
				},
				{
					"name": "Update Current User",
					"request": {
						"method": "PATCH",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json"
							},
							{
								"key": "Authorization",
								"value": "Bearer {{jwt_token}}"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n  \"fullName\": \"John Updated\",\n  \"phone\": \"+1234567890\"\n}"
						},
						"url": {
							"raw": "{{BASE_URL}}/users/me",
							"host": ["{{BASE_URL}}"],
							"path": ["users", "me"]
						},
						"description": "Update current user profile."
					}
				},
				{
					"name": "Update Push Tokens",
					"request": {
						"method": "PATCH",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json"
							},
							{
								"key": "Authorization",
								"value": "Bearer {{jwt_token}}"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n  \"fcm\": \"fcm_token_here\",\n  \"apns\": \"apns_token_here\"\n}"
						},
						"url": {
							"raw": "{{BASE_URL}}/users/me/push-tokens",
							"host": ["{{BASE_URL}}"],
							"path": ["users", "me", "push-tokens"]
						},
						"description": "Update push notification tokens for current user."
					}
				},
				{
					"name": "Get Pusher Auth",
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "Authorization",
								"value": "Bearer {{jwt_token}}"
							}
						],
						"url": {
							"raw": "{{BASE_URL}}/users/me/pusher-auth?socket_id=123.456&channel_name=private-user-123",
							"host": ["{{BASE_URL}}"],
							"path": ["users", "me", "pusher-auth"],
							"query": [
								{
									"key": "socket_id",
									"value": "123.456"
								},
								{
									"key": "channel_name",
									"value": "private-user-123"
								}
							]
						},
						"description": "Get Pusher authentication signature for private channels."
					}
				},
				{
					"name": "Get User",
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "Authorization",
								"value": "Bearer {{jwt_token}}"
							}
						],
						"url": {
							"raw": "{{BASE_URL}}/users/:id",
							"host": ["{{BASE_URL}}"],
							"path": ["users", ":id"],
							"variable": [
								{
									"key": "id",
									"value": "user-uuid-here"
								}
							]
						},
						"description": "Get user details by ID. Requires admin role."
					}
				},
				{
					"name": "Update User",
					"request": {
						"method": "PATCH",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json"
							},
							{
								"key": "Authorization",
								"value": "Bearer {{jwt_token}}"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n  \"fullName\": \"Updated Name\",\n  \"roles\": [\"admin\", \"user\"]\n}"
						},
						"url": {
							"raw": "{{BASE_URL}}/users/:id",
							"host": ["{{BASE_URL}}"],
							"path": ["users", ":id"],
							"variable": [
								{
									"key": "id",
									"value": "user-uuid-here"
								}
							]
						},
						"description": "Update user. Requires admin role."
					}
				},
				{
					"name": "Delete User",
					"request": {
						"method": "DELETE",
						"header": [
							{
								"key": "Authorization",
								"value": "Bearer {{jwt_token}}"
							}
						],
						"url": {
							"raw": "{{BASE_URL}}/users/:id",
							"host": ["{{BASE_URL}}"],
							"path": ["users", ":id"],
							"variable": [
								{
									"key": "id",
									"value": "user-uuid-here"
								}
							]
						},
						"description": "Soft delete a user. Requires admin role."
					}
				},
				{
					"name": "Sync Users",
					"request": {
						"method": "POST",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json"
							},
							{
								"key": "X-API-Key",
								"value": "{{API_KEY}}"
							},
							{
								"key": "X-API-Secret",
								"value": "{{SECRET}}"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n  \"users\": [\n    {\n      \"email\": \"user1@example.com\",\n      \"externalUserId\": \"ext_1\",\n      \"fullName\": \"User One\",\n      \"roles\": [\"user\"]\n    },\n    {\n      \"email\": \"user2@example.com\",\n      \"externalUserId\": \"ext_2\",\n      \"fullName\": \"User Two\",\n      \"roles\": [\"admin\"]\n    }\n  ]\n}"
						},
						"url": {
							"raw": "{{BASE_URL}}/users/sync",
							"host": ["{{BASE_URL}}"],
							"path": ["users", "sync"]
						},
						"description": "Bulk sync users from client system. Requires API key authentication."
					}
				},
				{
					"name": "Approve User",
					"request": {
						"method": "POST",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json"
							},
							{
								"key": "Authorization",
								"value": "Bearer {{jwt_token}}"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n  \"roles\": [\"admin\", \"finance\"]\n}"
						},
						"url": {
							"raw": "{{BASE_URL}}/users/:id/approve",
							"host": ["{{BASE_URL}}"],
							"path": ["users", ":id", "approve"],
							"variable": [
								{
									"key": "id",
									"value": "user-uuid-here"
								}
							]
						},
						"description": "Approve a pending user and assign roles. Requires admin role."
					}
				}
			]
		},
		{
			"name": "Roles",
			"item": [
				{
					"name": "Create Role",
					"request": {
						"method": "POST",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json"
							},
							{
								"key": "Authorization",
								"value": "Bearer {{jwt_token}}"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n  \"name\": \"finance\",\n  \"permissions\": [\"view_transactions\", \"approve_transactions\"],\n  \"description\": \"Finance team role\"\n}"
						},
						"url": {
							"raw": "{{BASE_URL}}/roles",
							"host": ["{{BASE_URL}}"],
							"path": ["roles"]
						},
						"description": "Create a new role. Requires admin role."
					}
				},
				{
					"name": "List Roles",
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "Authorization",
								"value": "Bearer {{jwt_token}}"
							}
						],
						"url": {
							"raw": "{{BASE_URL}}/roles",
							"host": ["{{BASE_URL}}"],
							"path": ["roles"]
						},
						"description": "List all roles in the project."
					}
				},
				{
					"name": "Get Role",
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "Authorization",
								"value": "Bearer {{jwt_token}}"
							}
						],
						"url": {
							"raw": "{{BASE_URL}}/roles/:id",
							"host": ["{{BASE_URL}}"],
							"path": ["roles", ":id"],
							"variable": [
								{
									"key": "id",
									"value": "role-uuid-here"
								}
							]
						},
						"description": "Get role details by ID."
					}
				},
				{
					"name": "Update Role",
					"request": {
						"method": "PATCH",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json"
							},
							{
								"key": "Authorization",
								"value": "Bearer {{jwt_token}}"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n  \"permissions\": [\"view_transactions\", \"approve_transactions\", \"delete_transactions\"],\n  \"description\": \"Updated finance role\"\n}"
						},
						"url": {
							"raw": "{{BASE_URL}}/roles/:id",
							"host": ["{{BASE_URL}}"],
							"path": ["roles", ":id"],
							"variable": [
								{
									"key": "id",
									"value": "role-uuid-here"
								}
							]
						},
						"description": "Update a role. Requires admin role."
					}
				},
				{
					"name": "Delete Role",
					"request": {
						"method": "DELETE",
						"header": [
							{
								"key": "Authorization",
								"value": "Bearer {{jwt_token}}"
							}
						],
						"url": {
							"raw": "{{BASE_URL}}/roles/:id",
							"host": ["{{BASE_URL}}"],
							"path": ["roles", ":id"],
							"variable": [
								{
									"key": "id",
									"value": "role-uuid-here"
								}
							]
						},
						"description": "Delete a role. Requires admin role."
					}
				}
			]
		},
		{
			"name": "Projects",
			"item": [
				{
					"name": "Get Current Project",
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "Authorization",
								"value": "Bearer {{jwt_token}}"
							}
						],
						"url": {
							"raw": "{{BASE_URL}}/projects/me",
							"host": ["{{BASE_URL}}"],
							"path": ["projects", "me"]
						},
						"description": "Get current project details for authenticated user."
					}
				}
			]
		},
		{
			"name": "Platform (Super Admin)",
			"item": [
				{
					"name": "Create Project",
					"request": {
						"method": "POST",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json"
							},
							{
								"key": "Authorization",
								"value": "Bearer {{platform_jwt_token}}"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n  \"name\": \"Client Project\",\n  \"status\": \"trial\",\n  \"plan\": \"free\",\n  \"billingEmail\": \"billing@client.com\",\n  \"webhookUrl\": \"https://client.com/webhooks\",\n  \"webhookSecret\": \"webhook_secret_123\",\n  \"pusherConfig\": {\n    \"appId\": \"pusher_app_id\",\n    \"key\": \"pusher_key\",\n    \"secret\": \"pusher_secret\",\n    \"cluster\": \"us2\"\n  },\n  \"fcmConfig\": {\n    \"projectId\": \"my-firebase-project-id\",\n    \"privateKey\": \"-----BEGIN PRIVATE KEY-----\\n...\\n-----END PRIVATE KEY-----\\n\",\n    \"clientEmail\": \"firebase-adminsdk@project.iam.gserviceaccount.com\",\n    \"serviceAccountPath\": null\n  }\n}"
						},
						"url": {
							"raw": "{{BASE_URL}}/platform/projects",
							"host": ["{{BASE_URL}}"],
							"path": ["platform", "projects"]
						},
						"description": "Create a new project. Returns project with plain API secret (only shown once)."
					}
				},
				{
					"name": "List All Projects",
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "Authorization",
								"value": "Bearer {{platform_jwt_token}}"
							}
						],
						"url": {
							"raw": "{{BASE_URL}}/platform/projects",
							"host": ["{{BASE_URL}}"],
							"path": ["platform", "projects"]
						},
						"description": "List all projects. Requires platform admin authentication."
					}
				},
				{
					"name": "Get Project",
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "Authorization",
								"value": "Bearer {{platform_jwt_token}}"
							}
						],
						"url": {
							"raw": "{{BASE_URL}}/platform/projects/:id",
							"host": ["{{BASE_URL}}"],
							"path": ["platform", "projects", ":id"],
							"variable": [
								{
									"key": "id",
									"value": "project-uuid-here"
								}
							]
						},
						"description": "Get project details by ID. Requires platform admin authentication."
					}
				},
				{
					"name": "Update Project",
					"request": {
						"method": "PUT",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json"
							},
							{
								"key": "Authorization",
								"value": "Bearer {{platform_jwt_token}}"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n  \"name\": \"Updated Project Name\",\n  \"status\": \"active\",\n  \"plan\": \"professional\",\n  \"webhookUrl\": \"https://client.com/webhooks/updated\",\n  \"pusherConfig\": {\n    \"appId\": \"updated_pusher_app_id\",\n    \"key\": \"updated_pusher_key\",\n    \"secret\": \"updated_pusher_secret\",\n    \"cluster\": \"us2\"\n  },\n  \"fcmConfig\": {\n    \"projectId\": \"updated-firebase-project-id\",\n    \"privateKey\": \"-----BEGIN PRIVATE KEY-----\\n...\\n-----END PRIVATE KEY-----\\n\",\n    \"clientEmail\": \"firebase-adminsdk@updated-project.iam.gserviceaccount.com\"\n  }\n}"
						},
						"url": {
							"raw": "{{BASE_URL}}/platform/projects/:id",
							"host": ["{{BASE_URL}}"],
							"path": ["platform", "projects", ":id"],
							"variable": [
								{
									"key": "id",
									"value": "project-uuid-here"
								}
							]
						},
						"description": "Update project configuration including pusherConfig, fcmConfig, webhookUrl, etc. Can update any project fields except apiKey and apiSecret. Requires platform admin authentication."
					}
				}
			]
		},
		{
			"name": "Billing",
			"item": [
				{
					"name": "Get Billing Info",
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "X-API-Key",
								"value": "{{API_KEY}}"
							},
							{
								"key": "X-API-Secret",
								"value": "{{SECRET}}"
							}
						],
						"url": {
							"raw": "{{BASE_URL}}/billing",
							"host": ["{{BASE_URL}}"],
							"path": ["billing"]
						},
						"description": "Get billing information for current project."
					}
				},
				{
					"name": "Update Plan",
					"request": {
						"method": "PUT",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json"
							},
							{
								"key": "Authorization",
								"value": "Bearer {{jwt_token}}"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n  \"plan\": \"professional\",\n  \"stripeCustomerId\": \"cus_123\",\n  \"subscriptionId\": \"sub_456\"\n}"
						},
						"url": {
							"raw": "{{BASE_URL}}/billing/plan",
							"host": ["{{BASE_URL}}"],
							"path": ["billing", "plan"]
						},
						"description": "Update project plan. Requires admin role."
					}
				}
			]
		},
		{
			"name": "Analytics",
			"item": [
				{
					"name": "Get Delivery Rates",
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "Authorization",
								"value": "Bearer {{jwt_token}}"
							}
						],
						"url": {
							"raw": "{{BASE_URL}}/analytics/delivery-rates",
							"host": ["{{BASE_URL}}"],
							"path": ["analytics", "delivery-rates"]
						},
						"description": "Get notification delivery rate analytics. Requires admin role."
					}
				},
				{
					"name": "Get User Engagement",
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "Authorization",
								"value": "Bearer {{jwt_token}}"
							}
						],
						"url": {
							"raw": "{{BASE_URL}}/analytics/user-engagement",
							"host": ["{{BASE_URL}}"],
							"path": ["analytics", "user-engagement"]
						},
						"description": "Get user engagement metrics. Requires admin role."
					}
				}
			]
		},
		{
			"name": "Audit",
			"item": [
				{
					"name": "Query Audit Logs",
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "Authorization",
								"value": "Bearer {{jwt_token}}"
							}
						],
						"url": {
							"raw": "{{BASE_URL}}/audit?page=1&limit=50&action=user.created",
							"host": ["{{BASE_URL}}"],
							"path": ["audit"],
							"query": [
								{
									"key": "page",
									"value": "1"
								},
								{
									"key": "limit",
									"value": "50"
								},
								{
									"key": "action",
									"value": "user.created"
								}
							]
						},
						"description": "Query audit logs with filters. Requires admin role."
					}
				},
				{
					"name": "Export Audit Logs",
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "Authorization",
								"value": "Bearer {{jwt_token}}"
							}
						],
						"url": {
							"raw": "{{BASE_URL}}/audit/export?startDate=2024-01-01&endDate=2024-12-31",
							"host": ["{{BASE_URL}}"],
							"path": ["audit", "export"],
							"query": [
								{
									"key": "startDate",
									"value": "2024-01-01"
								},
								{
									"key": "endDate",
									"value": "2024-12-31"
								}
							]
						},
						"description": "Export audit logs as CSV. Requires admin role."
					}
				}
			]
		},
		{
			"name": "Sounds",
			"item": [
				{
					"name": "Upload Sound",
					"request": {
						"method": "POST",
						"header": [
							{
								"key": "Authorization",
								"value": "Bearer {{jwt_token}}"
							}
						],
						"body": {
							"mode": "formdata",
							"formdata": [
								{
									"key": "file",
									"type": "file",
									"src": []
								},
								{
									"key": "name",
									"value": "alert_sound",
									"type": "text"
								}
							]
						},
						"url": {
							"raw": "{{BASE_URL}}/sounds",
							"host": ["{{BASE_URL}}"],
							"path": ["sounds"]
						},
						"description": "Upload a sound file. Requires admin role."
					}
				},
				{
					"name": "List Sounds",
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "Authorization",
								"value": "Bearer {{jwt_token}}"
							}
						],
						"url": {
							"raw": "{{BASE_URL}}/sounds",
							"host": ["{{BASE_URL}}"],
							"path": ["sounds"]
						},
						"description": "List all sounds in the project."
					}
				},
				{
					"name": "Get Sound",
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "Authorization",
								"value": "Bearer {{jwt_token}}"
							}
						],
						"url": {
							"raw": "{{BASE_URL}}/sounds/:id",
							"host": ["{{BASE_URL}}"],
							"path": ["sounds", ":id"],
							"variable": [
								{
									"key": "id",
									"value": "sound-uuid-here"
								}
							]
						},
						"description": "Get sound details by ID."
					}
				},
				{
					"name": "Delete Sound",
					"request": {
						"method": "DELETE",
						"header": [
							{
								"key": "Authorization",
								"value": "Bearer {{jwt_token}}"
							}
						],
						"url": {
							"raw": "{{BASE_URL}}/sounds/:id",
							"host": ["{{BASE_URL}}"],
							"path": ["sounds", ":id"],
							"variable": [
								{
									"key": "id",
									"value": "sound-uuid-here"
								}
							]
						},
						"description": "Delete a sound. Requires admin role."
					}
				}
			]
		},
		{
			"name": "Transfer Buckets",
			"item": [
				{
					"name": "List Buckets",
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "Authorization",
								"value": "Bearer {{jwt_token}}"
							}
						],
						"url": {
							"raw": "{{BASE_URL}}/transfer-buckets",
							"host": ["{{BASE_URL}}"],
							"path": ["transfer-buckets"]
						},
						"description": "List all transfer buckets in the project."
					}
				},
				{
					"name": "Get Bucket",
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "Authorization",
								"value": "Bearer {{jwt_token}}"
							}
						],
						"url": {
							"raw": "{{BASE_URL}}/transfer-buckets/:id",
							"host": ["{{BASE_URL}}"],
							"path": ["transfer-buckets", ":id"],
							"variable": [
								{
									"key": "id",
									"value": "bucket-uuid-here"
								}
							]
						},
						"description": "Get transfer bucket details by ID."
					}
				},
				{
					"name": "Update Threshold",
					"request": {
						"method": "PUT",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json"
							},
							{
								"key": "Authorization",
								"value": "Bearer {{jwt_token}}"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n  \"threshold\": 1000000\n}"
						},
						"url": {
							"raw": "{{BASE_URL}}/transfer-buckets/:id/threshold",
							"host": ["{{BASE_URL}}"],
							"path": ["transfer-buckets", ":id", "threshold"],
							"variable": [
								{
									"key": "id",
									"value": "bucket-uuid-here"
								}
							]
						},
						"description": "Update transfer bucket threshold. Requires admin role."
					}
				}
			]
		},
		{
			"name": "Health",
			"item": [
				{
					"name": "Basic Health Check",
					"request": {
						"method": "GET",
						"header": [],
						"url": {
							"raw": "{{BASE_URL}}/health",
							"host": ["{{BASE_URL}}"],
							"path": ["health"]
						},
						"description": "Basic health check endpoint (public)."
					}
				},
				{
					"name": "System Status",
					"request": {
						"method": "GET",
						"header": [],
						"url": {
							"raw": "{{BASE_URL}}/status",
							"host": ["{{BASE_URL}}"],
							"path": ["status"]
						},
						"description": "Detailed system status including database, Redis, and queue health."
					}
				},
				{
					"name": "Project Status",
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "Authorization",
								"value": "Bearer {{jwt_token}}"
							}
						],
						"url": {
							"raw": "{{BASE_URL}}/projects/me/status",
							"host": ["{{BASE_URL}}"],
							"path": ["projects", "me", "status"]
						},
						"description": "Project-specific health status."
					}
				}
			]
		}
	],
	"variable": [
		{
			"key": "BASE_URL",
			"value": "http://localhost:3000",
			"type": "string"
		},
		{
			"key": "API_KEY",
			"value": "pk_dev_your_API_KEY_here",
			"type": "string"
		},
		{
			"key": "SECRET",
			"value": "sk_dev_your_SECRET_here",
			"type": "string"
		},
		{
			"key": "jwt_token",
			"value": "your_jwt_token_here",
			"type": "string"
		},
		{
			"key": "refresh_token",
			"value": "your_refresh_token_here",
			"type": "string"
		},
		{
			"key": "platform_jwt_token",
			"value": "your_platform_jwt_token_here",
			"type": "string"
		},
		{
			"key": "platform_refresh_token",
			"value": "your_platform_refresh_token_here",
			"type": "string"
		}
	]
}
