{
    "schemes": [],
    "swagger": "2.0",
    "info": {
        "description": "",
        "title": "",
        "contact": {},
        "version": ""
    },
    "host": "",
    "basePath": "",
    "paths": {
        "/v1/device-endpoints/register": {
            "post": {
                "description": "Idempotently register or refresh a push device endpoint. Raw device_token is never returned.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "device-endpoint-actions"
                ],
                "summary": "Register device endpoint",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Tenant ID",
                        "name": "X-TENANT-ID",
                        "in": "header",
                        "required": true
                    },
                    {
                        "description": "Register request",
                        "name": "request",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/dto.DeviceEndpointRegisterRequest"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/dto.DeviceEndpointActionResponse"
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "$ref": "#/definitions/handlers.SwaggerErrorBody"
                        }
                    },
                    "409": {
                        "description": "Conflict",
                        "schema": {
                            "$ref": "#/definitions/handlers.SwaggerErrorBody"
                        }
                    }
                }
            }
        },
        "/v1/device-endpoints/{id}/disable": {
            "post": {
                "description": "Idempotently disable a push device endpoint.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "device-endpoint-actions"
                ],
                "summary": "Disable device endpoint",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Tenant ID",
                        "name": "X-TENANT-ID",
                        "in": "header",
                        "required": true
                    },
                    {
                        "type": "string",
                        "description": "Device endpoint ID",
                        "name": "id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "Disable request",
                        "name": "request",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/dto.DeviceEndpointDisableRequest"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/dto.DeviceEndpointActionResponse"
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "$ref": "#/definitions/handlers.SwaggerErrorBody"
                        }
                    },
                    "404": {
                        "description": "Not Found",
                        "schema": {
                            "$ref": "#/definitions/handlers.SwaggerErrorBody"
                        }
                    }
                }
            }
        },
        "/v1/in-app-notifications": {
            "get": {
                "description": "List current authenticated recipient in-app notifications.",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "in-app-notifications"
                ],
                "summary": "List in-app notifications",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Tenant ID",
                        "name": "X-TENANT-ID",
                        "in": "header",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/dto.InAppNotificationListResponse"
                        }
                    },
                    "401": {
                        "description": "Unauthorized",
                        "schema": {
                            "$ref": "#/definitions/handlers.SwaggerErrorBody"
                        }
                    },
                    "403": {
                        "description": "Forbidden",
                        "schema": {
                            "$ref": "#/definitions/handlers.SwaggerErrorBody"
                        }
                    }
                }
            }
        },
        "/v1/in-app-notifications/{id}/dismiss": {
            "post": {
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "in-app-notifications"
                ],
                "summary": "Dismiss in-app notification",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Tenant ID",
                        "name": "X-TENANT-ID",
                        "in": "header",
                        "required": true
                    },
                    {
                        "type": "string",
                        "description": "Notification ID",
                        "name": "id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "Dismiss request",
                        "name": "request",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/dto.InAppActionRequest"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/dto.InAppActionResponse"
                        }
                    },
                    "401": {
                        "description": "Unauthorized",
                        "schema": {
                            "$ref": "#/definitions/handlers.SwaggerErrorBody"
                        }
                    },
                    "403": {
                        "description": "Forbidden",
                        "schema": {
                            "$ref": "#/definitions/handlers.SwaggerErrorBody"
                        }
                    }
                }
            }
        },
        "/v1/in-app-notifications/{id}/read": {
            "post": {
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "in-app-notifications"
                ],
                "summary": "Mark in-app notification read",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Tenant ID",
                        "name": "X-TENANT-ID",
                        "in": "header",
                        "required": true
                    },
                    {
                        "type": "string",
                        "description": "Notification ID",
                        "name": "id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "Read request",
                        "name": "request",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/dto.InAppActionRequest"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/dto.InAppActionResponse"
                        }
                    },
                    "401": {
                        "description": "Unauthorized",
                        "schema": {
                            "$ref": "#/definitions/handlers.SwaggerErrorBody"
                        }
                    },
                    "403": {
                        "description": "Forbidden",
                        "schema": {
                            "$ref": "#/definitions/handlers.SwaggerErrorBody"
                        }
                    }
                }
            }
        },
        "/v1/in-app-notifications/{id}/unread": {
            "post": {
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "in-app-notifications"
                ],
                "summary": "Mark in-app notification unread",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Tenant ID",
                        "name": "X-TENANT-ID",
                        "in": "header",
                        "required": true
                    },
                    {
                        "type": "string",
                        "description": "Notification ID",
                        "name": "id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "Unread request",
                        "name": "request",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/dto.InAppActionRequest"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/dto.InAppActionResponse"
                        }
                    },
                    "401": {
                        "description": "Unauthorized",
                        "schema": {
                            "$ref": "#/definitions/handlers.SwaggerErrorBody"
                        }
                    },
                    "403": {
                        "description": "Forbidden",
                        "schema": {
                            "$ref": "#/definitions/handlers.SwaggerErrorBody"
                        }
                    }
                }
            }
        },
        "/v1/notifications/schedule": {
            "post": {
                "description": "Validate and enqueue a scheduled notification request.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "notification-actions"
                ],
                "summary": "Enqueue scheduled notification",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Tenant ID",
                        "name": "X-TENANT-ID",
                        "in": "header",
                        "required": true
                    },
                    {
                        "description": "Schedule request",
                        "name": "request",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/dto.NotificationActionRequest"
                        }
                    }
                ],
                "responses": {
                    "202": {
                        "description": "Accepted",
                        "schema": {
                            "$ref": "#/definitions/dto.NotificationActionResponse"
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "$ref": "#/definitions/handlers.SwaggerErrorBody"
                        }
                    },
                    "409": {
                        "description": "Conflict",
                        "schema": {
                            "$ref": "#/definitions/handlers.SwaggerErrorBody"
                        }
                    }
                }
            }
        },
        "/v1/notifications/send": {
            "post": {
                "description": "Validate and enqueue an immediate notification request without provider dispatch.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "notification-actions"
                ],
                "summary": "Enqueue notification send",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Tenant ID",
                        "name": "X-TENANT-ID",
                        "in": "header",
                        "required": true
                    },
                    {
                        "description": "Send request",
                        "name": "request",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/dto.NotificationActionRequest"
                        }
                    }
                ],
                "responses": {
                    "202": {
                        "description": "Accepted",
                        "schema": {
                            "$ref": "#/definitions/dto.NotificationActionResponse"
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "$ref": "#/definitions/handlers.SwaggerErrorBody"
                        }
                    },
                    "409": {
                        "description": "Conflict",
                        "schema": {
                            "$ref": "#/definitions/handlers.SwaggerErrorBody"
                        }
                    }
                }
            }
        },
        "/v1/webhooks/local/{channel}": {
            "post": {
                "description": "Ingest one strict local provider webhook event.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "webhooks"
                ],
                "summary": "Ingest local provider webhook",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Tenant ID",
                        "name": "X-TENANT-ID",
                        "in": "header",
                        "required": true
                    },
                    {
                        "type": "string",
                        "description": "Channel",
                        "name": "channel",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "Webhook event",
                        "name": "request",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/dto.LocalWebhookRequest"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/dto.LocalWebhookResponse"
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "$ref": "#/definitions/handlers.SwaggerErrorBody"
                        }
                    }
                }
            }
        }
    },
    "definitions": {
        "dto.DeviceEndpointActionResponse": {
            "type": "object",
            "properties": {
                "device_endpoint_id": {
                    "type": "string"
                },
                "idempotency_key": {
                    "type": "string"
                },
                "status": {
                    "type": "string"
                }
            }
        },
        "dto.DeviceEndpointDisableRequest": {
            "type": "object",
            "properties": {
                "idempotency_key": {
                    "type": "string"
                },
                "reason": {
                    "type": "string"
                }
            }
        },
        "dto.DeviceEndpointRegisterRequest": {
            "type": "object",
            "properties": {
                "app_id": {
                    "type": "string"
                },
                "contact_id": {
                    "type": "string"
                },
                "device_token": {
                    "type": "string"
                },
                "idempotency_key": {
                    "type": "string"
                },
                "metadata": {
                    "type": "object",
                    "additionalProperties": {}
                },
                "platform": {
                    "type": "string"
                },
                "provider_id": {
                    "type": "string"
                },
                "user_ref": {
                    "type": "string"
                }
            }
        },
        "dto.InAppActionRequest": {
            "type": "object",
            "properties": {
                "idempotency_key": {
                    "type": "string"
                }
            }
        },
        "dto.InAppActionResponse": {
            "type": "object",
            "properties": {
                "dismissed_at": {
                    "type": "string"
                },
                "idempotency_key": {
                    "type": "string"
                },
                "notification_id": {
                    "type": "string"
                },
                "read_at": {
                    "type": "string"
                },
                "status": {
                    "type": "string"
                }
            }
        },
        "dto.InAppNotificationListResponse": {
            "type": "object",
            "properties": {
                "items": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/dto.InAppNotificationResponse"
                    }
                },
                "unread_count": {
                    "type": "integer"
                }
            }
        },
        "dto.InAppNotificationResponse": {
            "type": "object",
            "properties": {
                "body": {
                    "type": "string"
                },
                "created_at": {
                    "type": "string"
                },
                "dismissed_at": {
                    "type": "string"
                },
                "expires_at": {
                    "type": "string"
                },
                "id": {
                    "type": "string"
                },
                "payload": {},
                "read_at": {
                    "type": "string"
                },
                "status": {
                    "type": "string"
                },
                "subject": {
                    "type": "string"
                }
            }
        },
        "dto.LocalWebhookRequest": {
            "type": "object",
            "properties": {
                "event_id": {
                    "type": "string"
                },
                "event_type": {
                    "type": "string"
                },
                "occurred_at": {
                    "type": "string"
                },
                "provider_message_id": {
                    "type": "string"
                }
            }
        },
        "dto.LocalWebhookResponse": {
            "type": "object",
            "properties": {
                "duplicate": {
                    "type": "boolean"
                },
                "event_id": {
                    "type": "string"
                },
                "notification_id": {
                    "type": "string"
                },
                "status": {
                    "type": "string"
                }
            }
        },
        "dto.NotificationActionRequest": {
            "type": "object",
            "properties": {
                "channel": {
                    "type": "string"
                },
                "class": {
                    "type": "string"
                },
                "content": {
                    "type": "object",
                    "additionalProperties": {}
                },
                "idempotency_key": {
                    "type": "string"
                },
                "metadata": {
                    "type": "object",
                    "additionalProperties": {}
                },
                "priority": {
                    "type": "string"
                },
                "provider_id": {
                    "type": "string"
                },
                "recipient": {
                    "$ref": "#/definitions/dto.NotificationRecipient"
                },
                "schedule": {
                    "$ref": "#/definitions/dto.NotificationSchedule"
                },
                "template_id": {
                    "type": "string"
                },
                "template_variables": {
                    "type": "object",
                    "additionalProperties": {}
                },
                "topic": {
                    "type": "string"
                }
            }
        },
        "dto.NotificationActionResponse": {
            "type": "object",
            "properties": {
                "idempotency_key": {
                    "type": "string"
                },
                "notification_id": {
                    "type": "string"
                },
                "scheduled_at": {
                    "type": "string"
                },
                "send_job_id": {
                    "type": "string"
                },
                "status": {
                    "type": "string"
                }
            }
        },
        "dto.NotificationRecipient": {
            "type": "object",
            "properties": {
                "contact_id": {
                    "type": "string"
                },
                "device_endpoint_id": {
                    "type": "string"
                },
                "email": {
                    "type": "string"
                },
                "phone": {
                    "type": "string"
                },
                "user_ref": {
                    "type": "string"
                }
            }
        },
        "dto.NotificationSchedule": {
            "type": "object",
            "properties": {
                "send_at": {
                    "type": "string"
                }
            }
        },
        "handlers.SwaggerErrorBody": {
            "type": "object",
            "properties": {
                "code": {
                    "type": "string"
                },
                "details": {},
                "message": {
                    "type": "string"
                },
                "request_id": {
                    "type": "string"
                }
            }
        }
    }
}