[ Web Proxy ]
URL:
Viewing: https://raw.githubusercontent.com/BunsDev/httpsms/main/api/docs/docs.go [Back]  [Original]

// Package docs GENERATED BY SWAG; DO NOT EDIT
// This file was generated by swaggo/swag
package docs

import "github.com/swaggo/swag"

const docTemplate = `{
    "schemes": {{ marshal .Schemes }},
    "swagger": "2.0",
    "info": {
        "description": "{{escape .Description}}",
        "title": "{{.Title}}",
        "contact": {
            "name": "support@httpsms.com",
            "email": "support@httpsms.com"
        },
        "license": {
            "name": "AGPL-3.0",
            "url": "https://raw.githubusercontent.com/NdoleStudio/http-sms-manager/main/LICENSE"
        },
        "version": "{{.Version}}"
    },
    "host": "{{.Host}}",
    "basePath": "{{.BasePath}}",
    "paths": {
        "/billing/usage": {
            "get": {
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "description": "Get the summary of sent and received messages for a user in the current month",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Billing"
                ],
                "summary": "Get Billing Usage.",
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/responses.BillingUsageResponse"
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "$ref": "#/definitions/responses.BadRequest"
                        }
                    },
                    "401": {
                        "description": "Unauthorized",
                        "schema": {
                            "$ref": "#/definitions/responses.Unauthorized"
                        }
                    },
                    "422": {
                        "description": "Unprocessable Entity",
                        "schema": {
                            "$ref": "#/definitions/responses.UnprocessableEntity"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/responses.InternalServerError"
                        }
                    }
                }
            }
        },
        "/billing/usage-history": {
            "get": {
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "description": "Get billing usage records of sent and received messages for a user in the past. It will be sorted by timestamp in descending order.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Billing"
                ],
                "summary": "Get billing usage history.",
                "parameters": [
                    {
                        "minimum": 0,
                        "type": "integer",
                        "description": "number of heartbeats to skip",
                        "name": "skip",
                        "in": "query"
                    },
                    {
                        "maximum": 100,
                        "minimum": 1,
                        "type": "integer",
                        "description": "number of heartbeats to return",
                        "name": "limit",
                        "in": "query"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/responses.BillingUsagesResponse"
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "$ref": "#/definitions/responses.BadRequest"
                        }
                    },
                    "401": {
                        "description": "Unauthorized",
                        "schema": {
                            "$ref": "#/definitions/responses.Unauthorized"
                        }
                    },
                    "422": {
                        "description": "Unprocessable Entity",
                        "schema": {
                            "$ref": "#/definitions/responses.UnprocessableEntity"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/responses.InternalServerError"
                        }
                    }
                }
            }
        },
        "/bulk-messages": {
            "post": {
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "description": "Sends bulk SMS messages to multiple users from a CSV or Excel file.",
                "consumes": [
                    "multipart/form-data"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "BulkSMS"
                ],
                "summary": "Store bulk SMS file",
                "parameters": [
                    {
                        "type": "file",
                        "description": "The Excel or CSV file formatted according to the templates",
                        "name": "document",
                        "in": "formData",
                        "required": true
                    }
                ],
                "responses": {
                    "202": {
                        "description": "Accepted",
                        "schema": {
                            "$ref": "#/definitions/responses.NoContent"
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "$ref": "#/definitions/responses.BadRequest"
                        }
                    },
                    "401": {
                        "description": "Unauthorized",
                        "schema": {
                            "$ref": "#/definitions/responses.Unauthorized"
                        }
                    },
                    "422": {
                        "description": "Unprocessable Entity",
                        "schema": {
                            "$ref": "#/definitions/responses.UnprocessableEntity"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/responses.InternalServerError"
                        }
                    }
                }
            }
        },
        "/discord-integrations": {
            "get": {
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "description": "Get the discord integrations of a user",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "DiscordIntegration"
                ],
                "summary": "Get discord integrations of a user",
                "parameters": [
                    {
                        "minimum": 0,
                        "type": "integer",
                        "description": "number of discord integrations to skip",
                        "name": "skip",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "description": "filter discord integrations containing query",
                        "name": "query",
                        "in": "query"
                    },
                    {
                        "maximum": 20,
                        "minimum": 1,
                        "type": "integer",
                        "description": "number of discord integrations to return",
                        "name": "limit",
                        "in": "query"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/responses.DiscordsResponse"
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "$ref": "#/definitions/responses.BadRequest"
                        }
                    },
                    "401": {
                        "description": "Unauthorized",
                        "schema": {
                            "$ref": "#/definitions/responses.Unauthorized"
                        }
                    },
                    "422": {
                        "description": "Unprocessable Entity",
                        "schema": {
                            "$ref": "#/definitions/responses.UnprocessableEntity"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/responses.InternalServerError"
                        }
                    }
                }
            },
            "post": {
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "description": "Store a discord integration for the authenticated user",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "DiscordIntegration"
                ],
                "summary": "Store discord integration",
                "parameters": [
                    {
                        "description": "Payload of the discord integration request",
                        "name": "payload",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/requests.DiscordStore"
                        }
                    }
                ],
                "responses": {
                    "201": {
                        "description": "Created",
                        "schema": {
                            "$ref": "#/definitions/responses.DiscordResponse"
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "$ref": "#/definitions/responses.BadRequest"
                        }
                    },
                    "401": {
                        "description": "Unauthorized",
                        "schema": {
                            "$ref": "#/definitions/responses.Unauthorized"
                        }
                    },
                    "422": {
                        "description": "Unprocessable Entity",
                        "schema": {
                            "$ref": "#/definitions/responses.UnprocessableEntity"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/responses.InternalServerError"
                        }
                    }
                }
            }
        },
        "/discord-integrations/{discordID}": {
            "put": {
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "description": "Update a discord integration for the currently authenticated user",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "DiscordIntegration"
                ],
                "summary": "Update a discord integration",
                "parameters": [
                    {
                        "type": "string",
                        "default": "32343a19-da5e-4b1b-a767-3298a73703ca",
                        "description": "ID of the discord integration",
                        "name": "discordID",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "Payload of discord integration to update",
                        "name": "payload",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/requests.DiscordUpdate"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/responses.DiscordResponse"
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "$ref": "#/definitions/responses.BadRequest"
                        }
                    },
                    "401": {
                        "description": "Unauthorized",
                        "schema": {
                            "$ref": "#/definitions/responses.Unauthorized"
                        }
                    },
                    "422": {
                        "description": "Unprocessable Entity",
                        "schema": {
                            "$ref": "#/definitions/responses.UnprocessableEntity"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/responses.InternalServerError"
                        }
                    }
                }
            },
            "delete": {
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "description": "Delete a discord integration for a user",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Webhooks"
                ],
                "summary": "Delete discord integration",
                "parameters": [
                    {
                        "type": "string",
                        "default": "32343a19-da5e-4b1b-a767-3298a73703ca",
                        "description": "ID of the discord integration",
                        "name": "discordID",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "204": {
                        "description": "No Content",
                        "schema": {
                            "$ref": "#/definitions/responses.NoContent"
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "$ref": "#/definitions/responses.BadRequest"
                        }
                    },
                    "401": {
                        "description": "Unauthorized",
                        "schema": {
                            "$ref": "#/definitions/responses.Unauthorized"
                        }
                    },
                    "422": {
                        "description": "Unprocessable Entity",
                        "schema": {
                            "$ref": "#/definitions/responses.UnprocessableEntity"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/responses.InternalServerError"
                        }
                    }
                }
            }
        },
        "/discord/event": {
            "post": {
                "description": "Publish a discord event to the registered listeners",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Discord"
                ],
                "summary": "Consume a discord event",
                "responses": {
                    "204": {
                        "description": "No Content",
                        "schema": {
                            "$ref": "#/definitions/responses.NoContent"
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "$ref": "#/definitions/responses.BadRequest"
                        }
                    },
                    "401": {
                        "description": "Unauthorized",
                        "schema": {
                            "$ref": "#/definitions/responses.Unauthorized"
                        }
                    },
                    "422": {
                        "description": "Unprocessable Entity",
                        "schema": {
                            "$ref": "#/definitions/responses.UnprocessableEntity"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/responses.InternalServerError"
                        }
                    }
                }
            }
        },
        "/heartbeats": {
            "get": {
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "description": "Get the last time a phone number requested for outstanding messages. It will be sorted by timestamp in descending order.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Heartbeats"
                ],
                "summary": "Get heartbeats of an owner phone number",
                "parameters": [
                    {
                        "type": "string",
                        "default": "+18005550199",
                        "description": "the owner's phone number",
                        "name": "owner",
                        "in": "query",
                        "required": true
                    },
                    {
                        "minimum": 0,
                        "type": "integer",
                        "description": "number of heartbeats to skip",
                        "name": "skip",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "description": "filter containing query",
                        "name": "query",
                        "in": "query"
                    },
                    {
                        "maximum": 20,
                        "minimum": 1,
                        "type": "integer",
                        "description": "number of heartbeats to return",
                        "name": "limit",
                        "in": "query"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/responses.HeartbeatsResponse"
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "$ref": "#/definitions/responses.BadRequest"
                        }
                    },
                    "401": {
                        "description": "Unauthorized",
                        "schema": {
                            "$ref": "#/definitions/responses.Unauthorized"
                        }
                    },
                    "422": {
                        "description": "Unprocessable Entity",
                        "schema": {
                            "$ref": "#/definitions/responses.UnprocessableEntity"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/responses.InternalServerError"
                        }
                    }
                }
            },
            "post": {
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "description": "Store the heartbeat to make notify that a phone number is still active",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Heartbeats"
                ],
                "summary": "Register heartbeat of an owner phone number",
                "parameters": [
                    {
                        "description": "Payload of the heartbeat request",
                        "name": "payload",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/requests.HeartbeatStore"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/responses.HeartbeatResponse"
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "$ref": "#/definitions/responses.BadRequest"
                        }
                    },
                    "401": {
                        "description": "Unauthorized",
                        "schema": {
                            "$ref": "#/definitions/responses.Unauthorized"
                        }
                    },
                    "422": {
                        "description": "Unprocessable Entity",
                        "schema": {
                            "$ref": "#/definitions/responses.UnprocessableEntity"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/responses.InternalServerError"
                        }
                    }
                }
            }
        },
        "/integration/3cx/messages": {
            "post": {
                "description": "Sends an SMS message from the 3CX platform",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "3CXIntegration"
                ],
                "summary": "Sends a 3CX SMS message",
                "responses": {
                    "204": {
                        "description": "No Content",
                        "schema": {
                            "$ref": "#/definitions/responses.NoContent"
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "$ref": "#/definitions/responses.BadRequest"
                        }
                    },
                    "401": {
                        "description": "Unauthorized",
                        "schema": {
                            "$ref": "#/definitions/responses.Unauthorized"
                        }
                    },
                    "422": {
                        "description": "Unprocessable Entity",
                        "schema": {
                            "$ref": "#/definitions/responses.UnprocessableEntity"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/responses.InternalServerError"
                        }
                    }
                }
            }
        },
        "/lemonsqueezy/event": {
            "post": {
                "description": "Publish a lemonsqueezy event to the registered listeners",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Lemonsqueezy"
                ],
                "summary": "Consume a lemonsqueezy event",
                "responses": {
                    "204": {
                        "description": "No Content",
                        "schema": {
                            "$ref": "#/definitions/responses.NoContent"
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "$ref": "#/definitions/responses.BadRequest"
                        }
                    },
                    "401": {
                        "description": "Unauthorized",
                        "schema": {
                            "$ref": "#/definitions/responses.Unauthorized"
                        }
                    },
                    "422": {
                        "description": "Unprocessable Entity",
                        "schema": {
                            "$ref": "#/definitions/responses.UnprocessableEntity"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/responses.InternalServerError"
                        }
                    }
                }
            }
        },
        "/message-threads": {
            "get": {
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "description": "Get list of contacts which a phone number has communicated with (threads). It will be sorted by timestamp in descending order.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "MessageThreads"
                ],
                "summary": "Get message threads for a phone number",
                "parameters": [
                    {
                        "type": "string",
                        "default": "+18005550199",
                        "description": "owner phone number",
                        "name": "owner",
                        "in": "query",
                        "required": true
                    },
                    {
                        "minimum": 0,
                        "type": "integer",
                        "description": "number of messages to skip",
                        "name": "skip",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "description": "filter message threads containing query",
                        "name": "query",
                        "in": "query"
                    },
                    {
                        "maximum": 20,
                        "minimum": 1,
                        "type": "integer",
                        "description": "number of messages to return",
                        "name": "limit",
                        "in": "query"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/responses.MessageThreadsResponse"
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "$ref": "#/definitions/responses.BadRequest"
                        }
                    },
                    "401": {
                        "description": "Unauthorized",
                        "schema": {
                            "$ref": "#/definitions/responses.Unauthorized"
                        }
                    },
                    "422": {
                        "description": "Unprocessable Entity",
                        "schema": {
                            "$ref": "#/definitions/responses.UnprocessableEntity"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/responses.InternalServerError"
                        }
                    }
                }
            }
        },
        "/message-threads/{messageThreadID}": {
            "put": {
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "description": "Updates the details of a message thread",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "MessageThreads"
                ],
                "summary": "Update a message thread",
                "parameters": [
                    {
                        "type": "string",
                        "default": "32343a19-da5e-4b1b-a767-3298a73703ca",
                        "description": "ID of the message thread",
                        "name": "messageThreadID",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "Payload of message thread details to update",
                        "name": "payload",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/requests.MessageThreadUpdate"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/responses.PhoneResponse"
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "$ref": "#/definitions/responses.BadRequest"
                        }
                    },
                    "401": {
                        "description": "Unauthorized",
                        "schema": {
                            "$ref": "#/definitions/responses.Unauthorized"
                        }
                    },
                    "422": {
                        "description": "Unprocessable Entity",
                        "schema": {
                            "$ref": "#/definitions/responses.UnprocessableEntity"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/responses.InternalServerError"
                        }
                    }
                }
            },
            "delete": {
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "description": "Delete a message thread from the database and also deletes all the messages in the thread.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "MessageThreads"
                ],
                "summary": "Delete a message thread from the database.",
                "parameters": [
                    {
                        "type": "string",
                        "default": "32343a19-da5e-4b1b-a767-3298a73703ca",
                        "description": "ID of the message thread",
                        "name": "messageThreadID",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "204": {
                        "description": "No Content",
                        "schema": {
                            "$ref": "#/definitions/responses.NoContent"
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "$ref": "#/definitions/responses.BadRequest"
                        }
                    },
                    "401": {
                        "description": "Unauthorized",
                        "schema": {
                            "$ref": "#/definitions/responses.Unauthorized"
                        }
                    },
                    "404": {
                        "description": "Not Found",
                        "schema": {
                            "$ref": "#/definitions/responses.NotFound"
                        }
                    },
                    "422": {
                        "description": "Unprocessable Entity",
                        "schema": {
                            "$ref": "#/definitions/responses.UnprocessableEntity"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/responses.InternalServerError"
                        }
                    }
                }
            }
        },
        "/messages": {
            "get": {
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "description": "Get list of messages which are sent between 2 phone numbers. It will be sorted by timestamp in descending order.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Messages"
                ],
                "summary": "Get messages which are sent between 2 phone numbers",
                "parameters": [
                    {
                        "type": "string",
                        "default": "+18005550199",
                        "description": "the owner's phone number",
                        "name": "owner",
                        "in": "query",
                        "required": true
                    },
                    {
                        "type": "string",
                        "default": "+18005550100",
                        "description": "the contact's phone number",
                        "name": "contact",
                        "in": "query",
                        "required": true
                    },
                    {
                        "minimum": 0,
                        "type": "integer",
                        "description": "number of messages to skip",
                        "name": "skip",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "description": "filter messages containing query",
                        "name": "query",
                        "in": "query"
                    },
                    {
                        "maximum": 20,
                        "minimum": 1,
                        "type": "integer",
                        "description": "number of messages to return",
                        "name": "limit",
                        "in": "query"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/responses.MessagesResponse"
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "$ref": "#/definitions/responses.BadRequest"
                        }
                    },
                    "401": {
                        "description": "Unauthorized",
                        "schema": {
                            "$ref": "#/definitions/responses.Unauthorized"
                        }
                    },
                    "422": {
                        "description": "Unprocessable Entity",
                        "schema": {
                            "$ref": "#/definitions/responses.UnprocessableEntity"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/responses.InternalServerError"
                        }
                    }
                }
            }
        },
        "/messages/bulk-send": {
            "post": {
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "description": "Add bulk SMS messages to be sent by the android phone",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Messages"
                ],
                "summary": "Send bulk SMS messages",
                "parameters": [
                    {
                        "description": "Bulk send message request payload",
                        "name": "payload",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/requests.MessageBulkSend"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "type": "array",
                            "items": {
                                "$ref": "#/definitions/responses.MessagesResponse"
                            }
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "$ref": "#/definitions/responses.BadRequest"
                        }
                    },
                    "401": {
                        "description": "Unauthorized",
                        "schema": {
                            "$ref": "#/definitions/responses.Unauthorized"
                        }
                    },
                    "422": {
                        "description": "Unprocessable Entity",
                        "schema": {
                            "$ref": "#/definitions/responses.UnprocessableEntity"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/responses.InternalServerError"
                        }
                    }
                }
            }
        },
        "/messages/calls/missed": {
            "post": {
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "description": "This endpoint is called by the httpSMS android app to register a missed call event on the mobile phone.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Messages"
                ],
                "summary": "Register a missed call event on the mobile phone",
                "parameters": [
                    {
                        "description": "Payload of the missed call event.",
                        "name": "payload",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/requests.MessageCallMissed"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/responses.MessageResponse"
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "$ref": "#/definitions/responses.BadRequest"
                        }
                    },
                    "401": {
                        "description": "Unauthorized",
                        "schema": {
                            "$ref": "#/definitions/responses.Unauthorized"
                        }
                    },
                    "404": {
                        "description": "Not Found",
                        "schema": {
                            "$ref": "#/definitions/responses.NotFound"
                        }
                    },
                    "422": {
                        "description": "Unprocessable Entity",
                        "schema": {
                            "$ref": "#/definitions/responses.UnprocessableEntity"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/responses.InternalServerError"
                        }
                    }
                }
            }
        },
        "/messages/outstanding": {
            "get": {
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "description": "Get an outstanding message to be sent by an android phone",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Messages"
                ],
                "summary": "Get an outstanding message",
                "parameters": [
                    {
                        "type": "string",
                        "default": "32343a19-da5e-4b1b-a767-3298a73703cb",
                        "description": "The ID of the message",
                        "name": "message_id",
                        "in": "query",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/responses.MessageResponse"
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "$ref": "#/definitions/responses.BadRequest"
                        }
                    },
                    "401": {
                        "description": "Unauthorized",
                        "schema": {
                            "$ref": "#/definitions/responses.Unauthorized"
                        }
                    },
                    "422": {
                        "description": "Unprocessable Entity",
                        "schema": {
                            "$ref": "#/definitions/responses.UnprocessableEntity"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/responses.InternalServerError"
                        }
                    }
                }
            }
        },
        "/messages/receive": {
            "post": {
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "description": "Add a new message received from a mobile phone",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Messages"
                ],
                "summary": "Receive a new SMS message from a mobile phone",
                "parameters": [
                    {
                        "description": "Received message request payload",
                        "name": "payload",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/requests.MessageReceive"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/responses.MessageResponse"
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "$ref": "#/definitions/responses.BadRequest"
                        }
                    },
                    "422": {
                        "description": "Unprocessable Entity",
                        "schema": {
                            "$ref": "#/definitions/responses.UnprocessableEntity"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/responses.InternalServerError"
                        }
                    }
                }
            }
        },
        "/messages/search": {
            "get": {
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "description": "This returns the list of all messages based on the filter criteria including missed calls",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Messages"
                ],
                "summary": "Search all messages of a user",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Cloudflare turnstile token https://www.cloudflare.com/en-gb/application-services/products/turnstile/",
                        "name": "token",
                        "in": "header",
                        "required": true
                    },
                    {
                        "type": "string",
                        "default": "+18005550199,+18005550100",
                        "description": "the owner's phone numbers",
                        "name": "owners",
                        "in": "query",
                        "required": true
                    },
                    {
                        "minimum": 0,
                        "type": "integer",
                        "description": "number of messages to skip",
                        "name": "skip",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "description": "filter messages containing query",
                        "name": "query",
                        "in": "query"
                    },
                    {
                        "maximum": 200,
                        "minimum": 1,
                        "type": "integer",
                        "description": "number of messages to return",
                        "name": "limit",
                        "in": "query"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/responses.MessagesResponse"
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "$ref": "#/definitions/responses.BadRequest"
                        }
                    },
                    "401": {
                        "description": "Unauthorized",
                        "schema": {
                            "$ref": "#/definitions/responses.Unauthorized"
                        }
                    },
                    "422": {
                        "description": "Unprocessable Entity",
                        "schema": {
                            "$ref": "#/definitions/responses.UnprocessableEntity"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/responses.InternalServerError"
                        }
                    }
                }
            }
        },
        "/messages/send": {
            "post": {
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "description": "Add a new SMS message to be sent by the android phone",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Messages"
                ],
                "summary": "Send a new SMS message",
                "parameters": [
                    {
                        "description": "PostSend message request payload",
                        "name": "payload",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/requests.MessageSend"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/responses.MessageResponse"
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "$ref": "#/definitions/responses.BadRequest"
                        }
                    },
                    "401": {
                        "description": "Unauthorized",
                        "schema": {
                            "$ref": "#/definitions/responses.Unauthorized"
                        }
                    },
                    "422": {
                        "description": "Unprocessable Entity",
                        "schema": {
                            "$ref": "#/definitions/responses.UnprocessableEntity"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/responses.InternalServerError"
                        }
                    }
                }
            }
        },
        "/messages/{messageID}": {
            "delete": {
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "description": "Delete a message from the database and removes the message content from the list of threads.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Messages"
                ],
                "summary": "Delete a message from the database.",
                "parameters": [
                    {
                        "type": "string",
                        "default": "32343a19-da5e-4b1b-a767-3298a73703ca",
                        "description": "ID of the message",
                        "name": "messageID",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "204": {
                        "description": "No Content",
                        "schema": {
                            "$ref": "#/definitions/responses.NoContent"
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "$ref": "#/definitions/responses.BadRequest"
                        }
                    },
                    "401": {
                        "description": "Unauthorized",
                        "schema": {
                            "$ref": "#/definitions/responses.Unauthorized"
                        }
                    },
                    "404": {
                        "description": "Not Found",
                        "schema": {
                            "$ref": "#/definitions/responses.NotFound"
                        }
                    },
                    "422": {
                        "description": "Unprocessable Entity",
                        "schema": {
                            "$ref": "#/definitions/responses.UnprocessableEntity"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/responses.InternalServerError"
                        }
                    }
                }
            }
        },
        "/messages/{messageID}/events": {
            "post": {
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "description": "Use this endpoint to send events for a message when it is failed, sent or delivered by the mobile phone.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Messages"
                ],
                "summary": "Upsert an event for a message on the mobile phone",
                "parameters": [
                    {
                        "type": "string",
                        "default": "32343a19-da5e-4b1b-a767-3298a73703ca",
                        "description": "ID of the message",
                        "name": "messageID",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "Payload of the event emitted.",
                        "name": "payload",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/requests.MessageEvent"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/responses.MessageResponse"
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "$ref": "#/definitions/responses.BadRequest"
                        }
                    },
                    "401": {
                        "description": "Unauthorized",
                        "schema": {
                            "$ref": "#/definitions/responses.Unauthorized"
                        }
                    },
                    "404": {
                        "description": "Not Found",
                        "schema": {
                            "$ref": "#/definitions/responses.NotFound"
                        }
                    },
                    "422": {
                        "description": "Unprocessable Entity",
                        "schema": {
                            "$ref": "#/definitions/responses.UnprocessableEntity"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/responses.InternalServerError"
                        }
                    }
                }
            }
        },
        "/phone-api-keys": {
            "get": {
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "description": "Get list phone API keys which a user has registered on the httpSMS application",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "PhoneAPIKeys"
                ],
                "summary": "Get the phone API keys of a user",
                "parameters": [
                    {
                        "minimum": 0,
                        "type": "integer",
                        "description": "number of phone api keys to skip",
                        "name": "skip",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "description": "filter phone api keys with name containing query",
                        "name": "query",
                        "in": "query"
                    },
                    {
                        "maximum": 100,
                        "minimum": 1,
                        "type": "integer",
                        "description": "number of phone api keys to return",
                        "name": "limit",
                        "in": "query"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/responses.PhoneAPIKeysResponse"
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "$ref": "#/definitions/responses.BadRequest"
                        }
                    },
                    "401": {
                        "description": "Unauthorized",
                        "schema": {
                            "$ref": "#/definitions/responses.Unauthorized"
                        }
                    },
                    "422": {
                        "description": "Unprocessable Entity",
                        "schema": {
                            "$ref": "#/definitions/responses.UnprocessableEntity"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/responses.InternalServerError"
                        }
                    }
                }
            },
            "post": {
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "description": "Creates a new phone API key which can be used to log in to the httpSMS app on your Android phone",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "PhoneAPIKeys"
                ],
                "summary": "Store phone API key",
                "parameters": [
                    {
                        "description": "Payload of new phone API key.",
                        "name": "payload",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/requests.PhoneAPIKeyStoreRequest"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/responses.PhoneAPIKeyResponse"
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "$ref": "#/definitions/responses.BadRequest"
                        }
                    },
                    "401": {
                        "description": "Unauthorized",
                        "schema": {
                            "$ref": "#/definitions/responses.Unauthorized"
                        }
                    },
                    "422": {
                        "description": "Unprocessable Entity",
                        "schema": {
                            "$ref": "#/definitions/responses.UnprocessableEntity"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/responses.InternalServerError"
                        }
                    }
                }
            }
        },
        "/phone-api-keys/{phoneAPIKeyID}": {
            "delete": {
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "description": "Delete a phone API Key from the database and cannot be used for authentication anymore.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "PhoneAPIKeys"
                ],
                "summary": "Delete a phone API key from the database.",
                "parameters": [
                    {
                        "type": "string",
                        "default": "32343a19-da5e-4b1b-a767-3298a73703ca",
                        "description": "ID of the phone API key",
                        "name": "phoneAPIKeyID",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "204": {
                        "description": "No Content",
                        "schema": {
                            "$ref": "#/definitions/responses.NoContent"
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "$ref": "#/definitions/responses.BadRequest"
                        }
                    },
                    "401": {
                        "description": "Unauthorized",
                        "schema": {
                            "$ref": "#/definitions/responses.Unauthorized"
                        }
                    },
                    "404": {
                        "description": "Not Found",
                        "schema": {
                            "$ref": "#/definitions/responses.NotFound"
                        }
                    },
                    "422": {
                        "description": "Unprocessable Entity",
                        "schema": {
                            "$ref": "#/definitions/responses.UnprocessableEntity"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/responses.InternalServerError"
                        }
                    }
                }
            }
        },
        "/phone-api-keys/{phoneAPIKeyID}/phones/{phoneID}": {
            "delete": {
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "description": "You will need to login again to the httpSMS app on your Android phone with a new phone API key.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "PhoneAPIKeys"
                ],
                "summary": "Remove the association of a phone from the phone API key.",
                "parameters": [
                    {
                        "type": "string",
                        "default": "32343a19-da5e-4b1b-a767-3298a73703ca",
                        "description": "ID of the phone API key",
                        "name": "phoneAPIKeyID",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "string",
                        "default": "32343a19-da5e-4b1b-a767-3298a73703ca",
                        "description": "ID of the phone",
                        "name": "phoneID",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "204": {
                        "description": "No Content",
                        "schema": {
                            "$ref": "#/definitions/responses.NoContent"
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "$ref": "#/definitions/responses.BadRequest"
                        }
                    },
                    "401": {
                        "description": "Unauthorized",
                        "schema": {
                            "$ref": "#/definitions/responses.Unauthorized"
                        }
                    },
                    "404": {
                        "description": "Not Found",
                        "schema": {
                            "$ref": "#/definitions/responses.NotFound"
                        }
                    },
                    "422": {
                        "description": "Unprocessable Entity",
                        "schema": {
                            "$ref": "#/definitions/responses.UnprocessableEntity"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/responses.InternalServerError"
                        }
                    }
                }
            }
        },
        "/phones": {
            "get": {
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "description": "Get list of phones which a user has registered on the http sms application",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Phones"
                ],
                "summary": "Get phones of a user",
                "parameters": [
                    {
                        "minimum": 0,
                        "type": "integer",
                        "description": "number of heartbeats to skip",
                        "name": "skip",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "description": "filter phones containing query",
                        "name": "query",
                        "in": "query"
                    },
                    {
                        "maximum": 20,
                        "minimum": 1,
                        "type": "integer",
                        "description": "number of phones to return",
                        "name": "limit",
                        "in": "query"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/responses.PhonesResponse"
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "$ref": "#/definitions/responses.BadRequest"
                        }
                    },
                    "401": {
                        "description": "Unauthorized",
                        "schema": {
                            "$ref": "#/definitions/responses.Unauthorized"
                        }
                    },
                    "422": {
                        "description": "Unprocessable Entity",
                        "schema": {
                            "$ref": "#/definitions/responses.UnprocessableEntity"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/responses.InternalServerError"
                        }
                    }
                }
            },
            "put": {
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "description": "Updates properties of a user's phone. If the phone with this number does not exist, a new one will be created. Think of this method like an 'upsert'",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Phones"
                ],
                "summary": "Upsert Phone",
                "parameters": [
                    {
                        "description": "Payload of new phone number.",
                        "name": "payload",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/requests.PhoneUpsert"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/responses.PhoneResponse"
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "$ref": "#/definitions/responses.BadRequest"
                        }
                    },
                    "401": {
                        "description": "Unauthorized",
                        "schema": {
                            "$ref": "#/definitions/responses.Unauthorized"
                        }
                    },
                    "422": {
                        "description": "Unprocessable Entity",
                        "schema": {
                            "$ref": "#/definitions/responses.UnprocessableEntity"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/responses.InternalServerError"
                        }
                    }
                }
            }
        },
        "/phones/fcm-token": {
            "put": {
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "description": "Updates the FCM token of a phone. If the phone with this number does not exist, a new one will be created. Think of this method like an 'upsert'",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Phones"
                ],
                "summary": "Upserts the FCM token of a phone",
                "parameters": [
                    {
                        "description": "Payload of new FCM token.",
                        "name": "payload",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/requests.PhoneFCMToken"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/responses.PhoneResponse"
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "$ref": "#/definitions/responses.BadRequest"
                        }
                    },
                    "401": {
                        "description": "Unauthorized",
                        "schema": {
                            "$ref": "#/definitions/responses.Unauthorized"
                        }
                    },
                    "422": {
                        "description": "Unprocessable Entity",
                        "schema": {
                            "$ref": "#/definitions/responses.UnprocessableEntity"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/responses.InternalServerError"
                        }
                    }
                }
            }
        },
        "/phones/{phoneID}": {
            "delete": {
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "description": "Delete a phone that has been sored in the database",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Phones"
                ],
                "summary": "Delete Phone",
                "parameters": [
                    {
                        "type": "string",
                        "default": "32343a19-da5e-4b1b-a767-3298a73703ca",
                        "description": "ID of the phone",
                        "name": "phoneID",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "204": {
                        "description": "No Content",
                        "schema": {
                            "$ref": "#/definitions/responses.NoContent"
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "$ref": "#/definitions/responses.BadRequest"
                        }
                    },
                    "401": {
                        "description": "Unauthorized",
                        "schema": {
                            "$ref": "#/definitions/responses.Unauthorized"
                        }
                    },
                    "422": {
                        "description": "Unprocessable Entity",
                        "schema": {
                            "$ref": "#/definitions/responses.UnprocessableEntity"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/responses.InternalServerError"
                        }
                    }
                }
            }
        },
        "/users/me": {
            "get": {
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "description": "Get details of the currently authenticated user",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Users"
                ],
                "summary": "Get current user",
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/responses.UserResponse"
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "$ref": "#/definitions/responses.BadRequest"
                        }
                    },
                    "401": {
                        "description": "Unauthorized",
                        "schema": {
                            "$ref": "#/definitions/responses.Unauthorized"
                        }
                    },
                    "422": {
                        "description": "Unprocessable Entity",
                        "schema": {
                            "$ref": "#/definitions/responses.UnprocessableEntity"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/responses.InternalServerError"
                        }
                    }
                }
            },
            "put": {
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "description": "Updates the details of the currently authenticated user",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Users"
                ],
                "summary": "Update a user",
                "parameters": [
                    {
                        "description": "Payload of user details to update",
                        "name": "payload",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/requests.UserUpdate"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/responses.PhoneResponse"
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "$ref": "#/definitions/responses.BadRequest"
                        }
                    },
                    "401": {
                        "description": "Unauthorized",
                        "schema": {
                            "$ref": "#/definitions/responses.Unauthorized"
                        }
                    },
                    "422": {
                        "description": "Unprocessable Entity",
                        "schema": {
                            "$ref": "#/definitions/responses.UnprocessableEntity"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/responses.InternalServerError"
                        }
                    }
                }
            },
            "delete": {
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "description": "Deletes the currently authenticated user together with all their data.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Users"
                ],
                "summary": "Delete a user",
                "responses": {
                    "201": {
                        "description": "Created",
                        "schema": {
                            "$ref": "#/definitions/responses.NoContent"
                        }
                    },
                    "401": {
                        "description": "Unauthorized",
                        "schema": {
                            "$ref": "#/definitions/responses.Unauthorized"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/responses.InternalServerError"
                        }
                    }
                }
            }
        },
        "/users/subscription": {
            "delete": {
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "description": "Cancel the subscription of the authenticated user.",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Users"
                ],
                "summary": "Cancel the user's subscription",
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/responses.NoContent"
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "$ref": "#/definitions/responses.BadRequest"
                        }
                    },
                    "401": {
                        "description": "Unauthorized",
                        "schema": {
                            "$ref": "#/definitions/responses.Unauthorized"
                        }
                    },
                    "422": {
                        "description": "Unprocessable Entity",
                        "schema": {
                            "$ref": "#/definitions/responses.UnprocessableEntity"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/responses.InternalServerError"
                        }
                    }
                }
            }
        },
        "/users/subscription-update-url": {
            "get": {
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "description": "Fetches the subscription URL of the authenticated user.",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Users"
                ],
                "summary": "Currently authenticated user subscription update URL",
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/responses.OkString"
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "$ref": "#/definitions/responses.BadRequest"
                        }
                    },
                    "401": {
                        "description": "Unauthorized",
                        "schema": {
                            "$ref": "#/definitions/responses.Unauthorized"
                        }
                    },
                    "422": {
                        "description": "Unprocessable Entity",
                        "schema": {
                            "$ref": "#/definitions/responses.UnprocessableEntity"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/responses.InternalServerError"
                        }
                    }
                }
            }
        },
        "/users/{userID}/api-keys": {
            "delete": {
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "description": "Rotate the user's API key in case the current API Key is compromised",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Users"
                ],
                "summary": "Rotate the user's API Key",
                "parameters": [
                    {
                        "type": "string",
                        "default": "32343a19-da5e-4b1b-a767-3298a73703ca",
                        "description": "ID of the user to update",
                        "name": "userID",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/responses.UserResponse"
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "$ref": "#/definitions/responses.BadRequest"
                        }
                    },
                    "401": {
                        "description": "Unauthorized",
                        "schema": {
                            "$ref": "#/definitions/responses.Unauthorized"
                        }
                    },
                    "422": {
                        "description": "Unprocessable Entity",
                        "schema": {
                            "$ref": "#/definitions/responses.UnprocessableEntity"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/responses.InternalServerError"
                        }
                    }
                }
            }
        },
        "/users/{userID}/notifications": {
            "put": {
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "description": "Update the email notification settings for a user",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Users"
                ],
                "summary": "Update notification settings",
                "parameters": [
                    {
                        "type": "string",
                        "default": "32343a19-da5e-4b1b-a767-3298a73703ca",
                        "description": "ID of the user to update",
                        "name": "userID",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "User notification details to update",
                        "name": "payload",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/requests.UserNotificationUpdate"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/responses.UserResponse"
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "$ref": "#/definitions/responses.BadRequest"
                        }
                    },
                    "401": {
                        "description": "Unauthorized",
                        "schema": {
                            "$ref": "#/definitions/responses.Unauthorized"
                        }
                    },
                    "422": {
                        "description": "Unprocessable Entity",
                        "schema": {
                            "$ref": "#/definitions/responses.UnprocessableEntity"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/responses.InternalServerError"
                        }
                    }
                }
            }
        },
        "/webhooks": {
            "get": {
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "description": "Get the webhooks of a user",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Webhooks"
                ],
                "summary": "Get webhooks of a user",
                "parameters": [
                    {
                        "minimum": 0,
                        "type": "integer",
                        "description": "number of webhooks to skip",
                        "name": "skip",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "description": "filter webhooks containing query",
                        "name": "query",
                        "in": "query"
                    },
                    {
                        "maximum": 20,
                        "minimum": 1,
                        "type": "integer",
                        "description": "number of webhooks to return",
                        "name": "limit",
                        "in": "query"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/responses.WebhooksResponse"
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "$ref": "#/definitions/responses.BadRequest"
                        }
                    },
                    "401": {
                        "description": "Unauthorized",
                        "schema": {
                            "$ref": "#/definitions/responses.Unauthorized"
                        }
                    },
                    "422": {
                        "description": "Unprocessable Entity",
                        "schema": {
                            "$ref": "#/definitions/responses.UnprocessableEntity"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/responses.InternalServerError"
                        }
                    }
                }
            },
            "post": {
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "description": "Store a webhook for the authenticated user",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Webhooks"
                ],
                "summary": "Store a webhook",
                "parameters": [
                    {
                        "description": "Payload of the webhook request",
                        "name": "payload",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/requests.WebhookStore"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/responses.WebhookResponse"
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "$ref": "#/definitions/responses.BadRequest"
                        }
                    },
                    "401": {
                        "description": "Unauthorized",
                        "schema": {
                            "$ref": "#/definitions/responses.Unauthorized"
                        }
                    },
                    "422": {
                        "description": "Unprocessable Entity",
                        "schema": {
                            "$ref": "#/definitions/responses.UnprocessableEntity"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/responses.InternalServerError"
                        }
                    }
                }
            }
        },
        "/webhooks/{webhookID}": {
            "put": {
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "description": "Update a webhook for the currently authenticated user",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Webhooks"
                ],
                "summary": "Update a webhook",
                "parameters": [
                    {
                        "type": "string",
                        "default": "32343a19-da5e-4b1b-a767-3298a73703ca",
                        "description": "ID of the webhook",
                        "name": "webhookID",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "Payload of webhook details to update",
                        "name": "payload",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/requests.WebhookUpdate"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/responses.WebhookResponse"
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "$ref": "#/definitions/responses.BadRequest"
                        }
                    },
                    "401": {
                        "description": "Unauthorized",
                        "schema": {
                            "$ref": "#/definitions/responses.Unauthorized"
                        }
                    },
                    "422": {
                        "description": "Unprocessable Entity",
                        "schema": {
                            "$ref": "#/definitions/responses.UnprocessableEntity"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/responses.InternalServerError"
                        }
                    }
                }
            },
            "delete": {
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "description": "Delete a webhook for a user",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Webhooks"
                ],
                "summary": "Delete webhook",
                "parameters": [
                    {
                        "type": "string",
                        "default": "32343a19-da5e-4b1b-a767-3298a73703ca",
                        "description": "ID of the webhook",
                        "name": "webhookID",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "204": {
                        "description": "No Content",
                        "schema": {
                            "$ref": "#/definitions/responses.NoContent"
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "$ref": "#/definitions/responses.BadRequest"
                        }
                    },
                    "401": {
                        "description": "Unauthorized",
                        "schema": {
                            "$ref": "#/definitions/responses.Unauthorized"
                        }
                    },
                    "422": {
                        "description": "Unprocessable Entity",
                        "schema": {
                            "$ref": "#/definitions/responses.UnprocessableEntity"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/responses.InternalServerError"
                        }
                    }
                }
            }
        }
    },
    "definitions": {
        "entities.BillingUsage": {
            "type": "object",
            "required": [
                "created_at",
                "end_timestamp",
                "id",
                "received_messages",
                "sent_messages",
                "start_timestamp",
                "total_cost",
                "updated_at",
                "user_id"
            ],
            "properties": {
                "created_at": {
                    "type": "string",
                    "example": "2022-06-05T14:26:02.302718+03:00"
                },
                "end_timestamp": {
                    "type": "string",
                    "example": "2022-01-31T23:59:59+00:00"
                },
                "id": {
                    "type": "string",
                    "example": "32343a19-da5e-4b1b-a767-3298a73703cb"
                },
                "received_messages": {
                    "type": "integer",
                    "example": 465
                },
                "sent_messages": {
                    "type": "integer",
                    "example": 321
                },
                "start_timestamp": {
                    "type": "string",
                    "example": "2022-01-01T00:00:00+00:00"
                },
                "total_cost": {
                    "type": "integer",
                    "example": 0
                },
                "updated_at": {
                    "type": "string",
                    "example": "2022-06-05T14:26:10.303278+03:00"
                },
                "user_id": {
                    "type": "string",
                    "example": "WB7DRDWrJZRGbYrv2CKGkqbzvqdC"
                }
            }
        },
        "entities.Discord": {
            "type": "object",
            "required": [
                "created_at",
                "id",
                "incoming_channel_id",
                "name",
                "server_id",
                "updated_at",
                "user_id"
            ],
            "properties": {
                "created_at": {
                    "type": "string",
                    "example": "2022-06-05T14:26:02.302718+03:00"
                },
                "id": {
                    "type": "string",
                    "example": "32343a19-da5e-4b1b-a767-3298a73703cb"
                },
                "incoming_channel_id": {
                    "type": "string",
                    "example": "1095780203256627291"
                },
                "name": {
                    "type": "string",
                    "example": "Game Server"
                },
                "server_id": {
                    "type": "string",
                    "example": "1095778291488653372"
                },
                "updated_at": {
                    "type": "string",
                    "example": "2022-06-05T14:26:10.303278+03:00"
                },
                "user_id": {
                    "type": "string",
                    "example": "WB7DRDWrJZRGbYrv2CKGkqbzvqdC"
                }
            }
        },
        "entities.Heartbeat": {
            "type": "object",
            "required": [
                "charging",
                "id",
                "owner",
                "timestamp",
                "user_id",
                "version"
            ],
            "properties": {
                "charging": {
                    "type": "boolean",
                    "example": true
                },
                "id": {
                    "type": "string",
                    "example": "32343a19-da5e-4b1b-a767-3298a73703cb"
                },
                "owner": {
                    "type": "string",
                    "example": "+18005550199"
                },
                "timestamp": {
                    "type": "string",
                    "example": "2022-06-05T14:26:01.520828+03:00"
                },
                "user_id": {
                    "type": "string",
                    "example": "WB7DRDWrJZRGbYrv2CKGkqbzvqdC"
                },
                "version": {
                    "type": "string",
                    "example": "344c10f"
                }
            }
        },
        "entities.Message": {
            "type": "object",
            "required": [
                "can_be_polled",
                "contact",
                "content",
                "created_at",
                "delivered_at",
                "encrypted",
                "expired_at",
                "failed_at",
                "failure_reason",
                "id",
                "last_attempted_at",
                "max_send_attempts",
                "order_timestamp",
                "owner",
                "received_at",
                "request_id",
                "request_received_at",
                "scheduled_at",
                "scheduled_send_time",
                "send_attempt_count",
                "send_time",
                "sent_at",
                "sim",
                "status",
                "type",
                "updated_at",
                "user_id"
            ],
            "properties": {
                "can_be_polled": {
                    "type": "boolean",
                    "example": false
                },
                "contact": {
                    "type": "string",
                    "example": "+18005550100"
                },
                "content": {
                    "type": "string",
                    "example": "This is a sample text message"
                },
                "created_at": {
                    "type": "string",
                    "example": "2022-06-05T14:26:02.302718+03:00"
                },
                "delivered_at": {
                    "type": "string",
                    "example": "2022-06-05T14:26:09.527976+03:00"
                },
                "encrypted": {
                    "type": "boolean",
                    "example": false
                },
                "expired_at": {
                    "type": "string",
                    "example": "2022-06-05T14:26:09.527976+03:00"
                },
                "failed_at": {
                    "type": "string",
                    "example": "2022-06-05T14:26:09.527976+03:00"
                },
                "failure_reason": {
                    "type": "string",
                    "example": "UNKNOWN"
                },
                "id": {
                    "type": "string",
                    "example": "32343a19-da5e-4b1b-a767-3298a73703cb"
                },
                "last_attempted_at": {
                    "type": "string",
                    "example": "2022-06-05T14:26:09.527976+03:00"
                },
                "max_send_attempts": {
                    "type": "integer",
                    "example": 1
                },
                "order_timestamp": {
                    "type": "string",
                    "example": "2022-06-05T14:26:09.527976+03:00"
                },
                "owner": {
                    "type": "string",
                    "example": "+18005550199"
                },
                "received_at": {
                    "type": "string",
                    "example": "2022-06-05T14:26:09.527976+03:00"
                },
                "request_id": {
                    "type": "string",
                    "example": "153554b5-ae44-44a0-8f4f-7bbac5657ad4"
                },
                "request_received_at": {
                    "type": "string",
                    "example": "2022-06-05T14:26:01.520828+03:00"
                },
                "scheduled_at": {
                    "type": "string",
                    "example": "2022-06-05T14:26:09.527976+03:00"
                },
                "scheduled_send_time": {
                    "type": "string",
                    "example": "2022-06-05T14:26:09.527976+03:00"
                },
                "send_attempt_count": {
                    "type": "integer",
                    "example": 0
                },
                "send_time": {
                    "description": "SendDuration is the number of nanoseconds from when the request was received until when the mobile phone send the message",
                    "type": "integer",
                    "example": 133414
                },
                "sent_at": {
                    "type": "string",
                    "example": "2022-06-05T14:26:09.527976+03:00"
                },
                "sim": {
                    "description": "SIM is the SIM card to use to send the message\n* SMS1: use the SIM card in slot 1\n* SMS2: use the SIM card in slot 2\n* DEFAULT: used the default communication SIM card",
                    "type": "string",
                    "example": "DEFAULT"
                },
                "status": {
                    "type": "string",
                    "example": "pending"
                },
                "type": {
                    "type": "string",
                    "example": "mobile-terminated"
                },
                "updated_at": {
                    "type": "string",
                    "example": "2022-06-05T14:26:10.303278+03:00"
                },
                "user_id": {
                    "type": "string",
                    "example": "WB7DRDWrJZRGbYrv2CKGkqbzvqdC"
                }
            }
        },
        "entities.MessageThread": {
            "type": "object",
            "required": [
                "color",
                "contact",
                "created_at",
                "id",
                "is_archived",
                "last_message_content",
                "last_message_id",
                "order_timestamp",
                "owner",
                "status",
                "updated_at",
                "user_id"
            ],
            "properties": {
                "color": {
                    "type": "string",
                    "example": "indigo"
                },
                "contact": {
                    "type": "string",
                    "example": "+18005550100"
                },
                "created_at": {
                    "type": "string",
                    "example": "2022-06-05T14:26:09.527976+03:00"
                },
                "id": {
                    "type": "string",
                    "example": "32343a19-da5e-4b1b-a767-3298a73703ca"
                },
                "is_archived": {
                    "type": "boolean",
                    "example": false
                },
                "last_message_content": {
                    "type": "string",
                    "example": "This is a sample message content"
                },
                "last_message_id": {
                    "type": "string",
                    "example": "32343a19-da5e-4b1b-a767-3298a73703ca"
                },
                "order_timestamp": {
                    "type": "string",
                    "example": "2022-06-05T14:26:09.527976+03:00"
                },
                "owner": {
                    "type": "string",
                    "example": "+18005550199"
                },
                "status": {
                    "type": "string",
                    "example": "PENDING"
                },
                "updated_at": {
                    "type": "string",
                    "example": "2022-06-05T14:26:09.527976+03:00"
                },
                "user_id": {
                    "type": "string",
                    "example": "WB7DRDWrJZRGbYrv2CKGkqbzvqdC"
                }
            }
        },
        "entities.Phone": {
            "type": "object",
            "required": [
                "created_at",
                "fcm_token",
                "id",
                "max_send_attempts",
                "message_expiration_seconds",
                "messages_per_minute",
                "missed_call_auto_reply",
                "phone_number",
                "sim",
                "updated_at",
                "user_id"
            ],
            "properties": {
                "created_at": {
                    "type": "string",
                    "example": "2022-06-05T14:26:02.302718+03:00"
                },
                "fcm_token": {
                    "type": "string",
                    "example": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzd....."
                },
                "id": {
                    "type": "string",
                    "example": "32343a19-da5e-4b1b-a767-3298a73703cb"
                },
                "max_send_attempts": {
                    "description": "MaxSendAttempts determines how many times to retry sending an SMS message",
                    "type": "integer",
                    "example": 2
                },
                "message_expiration_seconds": {
                    "description": "MessageExpirationSeconds is the duration in seconds after sending a message when it is considered to be expired.",
                    "type": "integer"
                },
                "messages_per_minute": {
                    "type": "integer",
                    "example": 1
                },
                "missed_call_auto_reply": {
                    "type": "string",
                    "example": "This phone cannot receive calls. Please send an SMS instead."
                },
                "phone_number": {
                    "type": "string",
                    "example": "+18005550199"
                },
                "sim": {
                    "description": "SIM card that received the message",
                    "type": "string"
                },
                "updated_at": {
                    "type": "string",
                    "example": "2022-06-05T14:26:10.303278+03:00"
                },
                "user_id": {
                    "type": "string",
                    "example": "WB7DRDWrJZRGbYrv2CKGkqbzvqdC"
                }
            }
        },
        "entities.PhoneAPIKey": {
            "type": "object",
            "required": [
                "api_key",
                "created_at",
                "id",
                "name",
                "phone_ids",
                "phone_numbers",
                "updated_at",
                "user_email",
                "user_id"
            ],
            "properties": {
                "api_key": {
                    "type": "string",
                    "example": "pk_DGW8NwQp7mxKaSZ72Xq9v6xxxxx"
                },
                "created_at": {
                    "type": "string",
                    "example": "2022-06-05T14:26:02.302718+03:00"
                },
                "id": {
                    "type": "string",
                    "example": "32343a19-da5e-4b1b-a767-3298a73703cb"
                },
                "name": {
                    "type": "string",
                    "example": "Business Phone Key"
                },
                "phone_ids": {
                    "type": "array",
                    "items": {
                        "type": "string"
                    },
                    "example": [
                        "32343a19-da5e-4b1b-a767-3298a73703cb",
                        "32343a19-da5e-4b1b-a767-3298a73703cc"
                    ]
                },
                "phone_numbers": {
                    "type": "array",
                    "items": {
                        "type": "string"
                    },
                    "example": [
                        "+18005550199",
                        "+18005550100"
                    ]
                },
                "updated_at": {
                    "type": "string",
                    "example": "2022-06-05T14:26:02.302718+03:00"
                },
                "user_email": {
                    "type": "string",
                    "example": "user@gmail.com"
                },
                "user_id": {
                    "type": "string",
                    "example": "WB7DRDWrJZRGbYrv2CKGkqbzvqdC"
                }
            }
        },
        "entities.User": {
            "type": "object",
            "required": [
                "active_phone_id",
                "api_key",
                "created_at",
                "email",
                "id",
                "notification_heartbeat_enabled",
                "notification_message_status_enabled",
                "notification_newsletter_enabled",
                "notification_webhook_enabled",
                "subscription_ends_at",
                "subscription_id",
                "subscription_name",
                "subscription_renews_at",
                "subscription_status",
                "timezone",
                "updated_at"
            ],
            "properties": {
                "active_phone_id": {
                    "type": "string",
                    "example": "32343a19-da5e-4b1b-a767-3298a73703cb"
                },
                "api_key": {
                    "type": "string",
                    "example": "x-api-key"
                },
                "created_at": {
                    "type": "string",
                    "example": "2022-06-05T14:26:02.302718+03:00"
                },
                "email": {
                    "type": "string",
                    "example": "name@email.com"
                },
                "id": {
                    "type": "string",
                    "example": "WB7DRDWrJZRGbYrv2CKGkqbzvqdC"
                },
                "notification_heartbeat_enabled": {
                    "type": "boolean",
                    "example": true
                },
                "notification_message_status_enabled": {
                    "type": "boolean",
                    "example": true
                },
                "notification_newsletter_enabled": {
                    "type": "boolean",
                    "example": true
                },
                "notification_webhook_enabled": {
                    "type": "boolean",
                    "example": true
                },
                "subscription_ends_at": {
                    "type": "string",
                    "example": "2022-06-05T14:26:02.302718+03:00"
                },
                "subscription_id": {
                    "type": "string",
                    "example": "8f9c71b8-b84e-4417-8408-a62274f65a08"
                },
                "subscription_name": {
                    "type": "string",
                    "example": "free"
                },
                "subscription_renews_at": {
                    "type": "string",
                    "example": "2022-06-05T14:26:02.302718+03:00"
                },
                "subscription_status": {
                    "type": "string",
                    "example": "on_trial"
                },
                "timezone": {
                    "type": "string",
                    "example": "Europe/Helsinki"
                },
                "updated_at": {
                    "type": "string",
                    "example": "2022-06-05T14:26:10.303278+03:00"
                }
            }
        },
        "entities.Webhook": {
            "type": "object",
            "required": [
                "created_at",
                "events",
                "id",
                "phone_numbers",
                "signing_key",
                "updated_at",
                "url",
                "user_id"
            ],
            "properties": {
                "created_at": {
                    "type": "string",
                    "example": "2022-06-05T14:26:02.302718+03:00"
                },
                "events": {
                    "type": "array",
                    "items": {
                        "type": "string"
                    },
                    "example": [
                        "message.phone.received"
                    ]
                },
                "id": {
                    "type": "string",
                    "example": "32343a19-da5e-4b1b-a767-3298a73703cb"
                },
                "phone_numbers": {
                    "type": "array",
                    "items": {
                        "type": "string"
                    },
                    "example": [
                        "+18005550199",
                        "+18005550100"
                    ]
                },
                "signing_key": {
                    "type": "string",
                    "example": "DGW8NwQp7mxKaSZ72Xq9v67SLqSbWQvckzzmK8D6rvd7NywSEkdMJtuxKyEkYnCY"
                },
                "updated_at": {
                    "type": "string",
                    "example": "2022-06-05T14:26:10.303278+03:00"
                },
                "url": {
                    "type": "string",
                    "example": "https://example.com"
                },
                "user_id": {
                    "type": "string",
                    "example": "WB7DRDWrJZRGbYrv2CKGkqbzvqdC"
                }
            }
        },
        "requests.DiscordStore": {
            "type": "object",
            "required": [
                "incoming_channel_id",
                "name",
                "server_id"
            ],
            "properties": {
                "incoming_channel_id": {
                    "type": "string"
                },
                "name": {
                    "type": "string"
                },
                "server_id": {
                    "type": "string"
                }
            }
        },
        "requests.DiscordUpdate": {
            "type": "object",
            "required": [
                "incoming_channel_id",
                "name",
                "server_id"
            ],
            "properties": {
                "incoming_channel_id": {
                    "type": "string"
                },
                "name": {
                    "type": "string"
                },
                "server_id": {
                    "type": "string"
                }
            }
        },
        "requests.HeartbeatStore": {
            "type": "object",
            "required": [
                "charging",
                "phone_numbers"
            ],
            "properties": {
                "charging": {
                    "type": "boolean"
                },
                "phone_numbers": {
                    "type": "array",
                    "items": {
                        "type": "string"
                    }
                }
            }
        },
        "requests.MessageBulkSend": {
            "type": "object",
            "required": [
                "content",
                "encrypted",
                "from",
                "to"
            ],
            "properties": {
                "content": {
                    "type": "string",
                    "example": "This is a sample text message"
                },
                "encrypted": {
                    "description": "Encrypted is used to determine if the content is end-to-end encrypted. Make sure to set the encryption key on the httpSMS mobile app",
                    "type": "boolean",
                    "example": false
                },
                "from": {
                    "type": "string",
                    "example": "+18005550199"
                },
                "request_id": {
                    "description": "RequestID is an optional parameter used to track a request from the client's perspective",
                    "type": "string",
                    "example": "153554b5-ae44-44a0-8f4f-7bbac5657ad4"
                },
                "to": {
                    "type": "array",
                    "items": {
                        "type": "string"
                    },
                    "example": [
                        "+18005550100",
                        "+18005550100"
                    ]
                }
            }
        },
        "requests.MessageCallMissed": {
            "type": "object",
            "required": [
                "from",
                "sim",
                "timestamp",
                "to"
            ],
            "properties": {
                "from": {
                    "type": "string",
                    "example": "+18005550199"
                },
                "sim": {
                    "type": "string",
                    "example": "SIM1"
                },
                "timestamp": {
                    "type": "string",
                    "example": "2022-06-05T14:26:09.527976+03:00"
                },
                "to": {
                    "type": "string",
                    "example": "+18005550100"
                }
            }
        },
        "requests.MessageEvent": {
            "type": "object",
            "required": [
                "event_name",
                "reason",
                "timestamp"
            ],
            "properties": {
                "event_name": {
                    "description": "EventName is the type of event\n* SENT: is emitted when a message is sent by the mobile phone\n* FAILED: is event is emitted when the message could not be sent by the mobile phone\n* DELIVERED: is event is emitted when a delivery report has been received by the mobile phone",
                    "type": "string",
                    "example": "SENT"
                },
                "reason": {
                    "description": "Reason is the exact error message in case the event is an error",
                    "type": "string"
                },
                "timestamp": {
                    "description": "Timestamp is the time when the event was emitted, Please send the timestamp in UTC with as much precision as possible",
                    "type": "string",
                    "example": "2022-06-05T14:26:09.527976+03:00"
                }
            }
        },
        "requests.MessageReceive": {
            "type": "object",
            "required": [
                "content",
                "encrypted",
                "from",
                "sim",
                "timestamp",
                "to"
            ],
            "properties": {
                "content": {
                    "type": "string",
                    "example": "This is a sample text message received on a phone"
                },
                "encrypted": {
                    "description": "Encrypted is used to determine if the content is end-to-end encrypted. Make sure to set the encryption key on the httpSMS mobile app",
                    "type": "boolean",
                    "example": false
                },
                "from": {
                    "type": "string",
                    "example": "+18005550199"
                },
                "sim": {
                    "description": "SIM card that received the message",
                    "type": "string",
                    "example": "SIM1"
                },
                "timestamp": {
                    "description": "Timestamp is the time when the event was emitted, Please send the timestamp in UTC with as much precision as possible",
                    "type": "string",
                    "example": "2022-06-05T14:26:09.527976+03:00"
                },
                "to": {
                    "type": "string",
                    "example": "+18005550100"
                }
            }
        },
        "requests.MessageSend": {
            "type": "object",
            "required": [
                "content",
                "from",
                "to"
            ],
            "properties": {
                "content": {
                    "type": "string",
                    "example": "This is a sample text message"
                },
                "encrypted": {
                    "description": "Encrypted is an optional parameter used to determine if the content is end-to-end encrypted. Make sure to set the encryption key on the httpSMS mobile app",
                    "type": "boolean",
                    "example": false
                },
                "from": {
                    "type": "string",
                    "example": "+18005550199"
                },
                "request_id": {
                    "description": "RequestID is an optional parameter used to track a request from the client's perspective",
                    "type": "string",
                    "example": "153554b5-ae44-44a0-8f4f-7bbac5657ad4"
                },
                "send_at": {
                    "description": "SendAt is an optional parameter used to schedule a message to be sent in the future. The time is considered to be in your profile's local timezone.",
                    "type": "string",
                    "example": "2022-06-05T14:26:09.527976+03:00"
                },
                "to": {
                    "type": "string",
                    "example": "+18005550100"
                }
            }
        },
        "requests.MessageThreadUpdate": {
            "type": "object",
            "required": [
                "is_archived"
            ],
            "properties": {
                "is_archived": {
                    "type": "boolean",
                    "example": true
                }
            }
        },
        "requests.PhoneAPIKeyStoreRequest": {
            "type": "object",
            "required": [
                "name"
            ],
            "properties": {
                "name": {
                    "type": "string",
                    "example": "My Phone API Key"
                }
            }
        },
        "requests.PhoneFCMToken": {
            "type": "object",
            "required": [
                "fcm_token",
                "phone_number",
                "sim"
            ],
            "properties": {
                "fcm_token": {
                    "type": "string",
                    "example": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzd....."
                },
                "phone_number": {
                    "type": "string",
                    "example": "[+18005550199]"
                },
                "sim": {
                    "description": "SIM is the SIM slot of the phone in case the phone has more than 1 SIM slot",
                    "type": "string",
                    "example": "SIM1"
                }
            }
        },
        "requests.PhoneUpsert": {
            "type": "object",
            "required": [
                "fcm_token",
                "max_send_attempts",
                "message_expiration_seconds",
                "messages_per_minute",
                "missed_call_auto_reply",
                "phone_number",
                "sim"
            ],
            "properties": {
                "fcm_token": {
                    "type": "string",
                    "example": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzd....."
                },
                "max_send_attempts": {
                    "description": "MaxSendAttempts is the number of attempts when sending an SMS message to handle the case where the phone is offline.",
                    "type": "integer",
                    "example": 2
                },
                "message_expiration_seconds": {
                    "description": "MessageExpirationSeconds is the duration in seconds after sending a message when it is considered to be expired.",
                    "type": "integer",
                    "example": 12345
                },
                "messages_per_minute": {
                    "type": "integer",
                    "example": 1
                },
                "missed_call_auto_reply": {
                    "type": "string",
                    "example": "e.g. This phone cannot receive calls. Please send an SMS instead."
                },
                "phone_number": {
                    "type": "string",
                    "example": "+18005550199"
                },
                "sim": {
                    "description": "SIM is the SIM slot of the phone in case the phone has more than 1 SIM slot",
                    "type": "string",
                    "example": "SIM1"
                }
            }
        },
        "requests.UserNotificationUpdate": {
            "type": "object",
            "required": [
                "heartbeat_enabled",
                "message_status_enabled",
                "newsletter_enabled",
                "webhook_enabled"
            ],
            "properties": {
                "heartbeat_enabled": {
                    "type": "boolean",
                    "example": true
                },
                "message_status_enabled": {
                    "type": "boolean",
                    "example": true
                },
                "newsletter_enabled": {
                    "type": "boolean",
                    "example": true
                },
                "webhook_enabled": {
                    "type": "boolean",
                    "example": true
                }
            }
        },
        "requests.UserUpdate": {
            "type": "object",
            "required": [
                "active_phone_id",
                "timezone"
            ],
            "properties": {
                "active_phone_id": {
                    "type": "string",
                    "example": "32343a19-da5e-4b1b-a767-3298a73703cb"
                },
                "timezone": {
                    "type": "string",
                    "example": "Europe/Helsinki"
                }
            }
        },
        "requests.WebhookStore": {
            "type": "object",
            "required": [
                "events",
                "phone_numbers",
                "signing_key",
                "url"
            ],
            "properties": {
                "events": {
                    "type": "array",
                    "items": {
                        "type": "string"
                    }
                },
                "phone_numbers": {
                    "type": "array",
                    "items": {
                        "type": "string"
                    },
                    "example": [
                        "+18005550100",
                        "+18005550100"
                    ]
                },
                "signing_key": {
                    "type": "string"
                },
                "url": {
                    "type": "string"
                }
            }
        },
        "requests.WebhookUpdate": {
            "type": "object",
            "required": [
                "events",
                "phone_numbers",
                "signing_key",
                "url"
            ],
            "properties": {
                "events": {
                    "type": "array",
                    "items": {
                        "type": "string"
                    }
                },
                "phone_numbers": {
                    "type": "array",
                    "items": {
                        "type": "string"
                    },
                    "example": [
                        "+18005550100",
                        "+18005550100"
                    ]
                },
                "signing_key": {
                    "type": "string"
                },
                "url": {
                    "type": "string"
                }
            }
        },
        "responses.BadRequest": {
            "type": "object",
            "required": [
                "data",
                "message",
                "status"
            ],
            "properties": {
                "data": {
                    "type": "string",
                    "example": "The request body is not a valid JSON string"
                },
                "message": {
                    "type": "string",
                    "example": "The request isn't properly formed"
                },
                "status": {
                    "type": "string",
                    "example": "error"
                }
            }
        },
        "responses.BillingUsageResponse": {
            "type": "object",
            "required": [
                "data",
                "message",
                "status"
            ],
            "properties": {
                "data": {
                    "$ref": "#/definitions/entities.BillingUsage"
                },
                "message": {
                    "type": "string",
                    "example": "Request handled successfully"
                },
                "status": {
                    "type": "string",
                    "example": "success"
                }
            }
        },
        "responses.BillingUsagesResponse": {
            "type": "object",
            "required": [
                "data",
                "message",
                "status"
            ],
            "properties": {
                "data": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/entities.BillingUsage"
                    }
                },
                "message": {
                    "type": "string",
                    "example": "Request handled successfully"
                },
                "status": {
                    "type": "string",
                    "example": "success"
                }
            }
        },
        "responses.DiscordResponse": {
            "type": "object",
            "required": [
                "data",
                "message",
                "status"
            ],
            "properties": {
                "data": {
                    "$ref": "#/definitions/entities.Discord"
                },
                "message": {
                    "type": "string",
                    "example": "Request handled successfully"
                },
                "status": {
                    "type": "string",
                    "example": "success"
                }
            }
        },
        "responses.DiscordsResponse": {
            "type": "object",
            "required": [
                "data",
                "message",
                "status"
            ],
            "properties": {
                "data": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/entities.Discord"
                    }
                },
                "message": {
                    "type": "string",
                    "example": "Request handled successfully"
                },
                "status": {
                    "type": "string",
                    "example": "success"
                }
            }
        },
        "responses.HeartbeatResponse": {
            "type": "object",
            "required": [
                "data",
                "message",
                "status"
            ],
            "properties": {
                "data": {
                    "$ref": "#/definitions/entities.Heartbeat"
                },
                "message": {
                    "type": "string",
                    "example": "Request handled successfully"
                },
                "status": {
                    "type": "string",
                    "example": "success"
                }
            }
        },
        "responses.HeartbeatsResponse": {
            "type": "object",
            "required": [
                "data",
                "message",
                "status"
            ],
            "properties": {
                "data": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/entities.Heartbeat"
                    }
                },
                "message": {
                    "type": "string",
                    "example": "Request handled successfully"
                },
                "status": {
                    "type": "string",
                    "example": "success"
                }
            }
        },
        "responses.InternalServerError": {
            "type": "object",
            "required": [
                "message",
                "status"
            ],
            "properties": {
                "message": {
                    "type": "string",
                    "example": "We ran into an internal error while handling the request."
                },
                "status": {
                    "type": "string",
                    "example": "error"
                }
            }
        },
        "responses.MessageResponse": {
            "type": "object",
            "required": [
                "data",
                "message",
                "status"
            ],
            "properties": {
                "data": {
                    "$ref": "#/definitions/entities.Message"
                },
                "message": {
                    "type": "string",
                    "example": "Request handled successfully"
                },
                "status": {
                    "type": "string",
                    "example": "success"
                }
            }
        },
        "responses.MessageThreadsResponse": {
            "type": "object",
            "required": [
                "data",
                "message",
                "status"
            ],
            "properties": {
                "data": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/entities.MessageThread"
                    }
                },
                "message": {
                    "type": "string",
                    "example": "Request handled successfully"
                },
                "status": {
                    "type": "string",
                    "example": "success"
                }
            }
        },
        "responses.MessagesResponse": {
            "type": "object",
            "required": [
                "data",
                "message",
                "status"
            ],
            "properties": {
                "data": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/entities.Message"
                    }
                },
                "message": {
                    "type": "string",
                    "example": "Request handled successfully"
                },
                "status": {
                    "type": "string",
                    "example": "success"
                }
            }
        },
        "responses.NoContent": {
            "type": "object",
            "required": [
                "message",
                "status"
            ],
            "properties": {
                "message": {
                    "type": "string",
                    "example": "action performed successfully"
                },
                "status": {
                    "type": "string",
                    "example": "success"
                }
            }
        },
        "responses.NotFound": {
            "type": "object",
            "required": [
                "message",
                "status"
            ],
            "properties": {
                "message": {
                    "type": "string",
                    "example": "cannot find message with ID [32343a19-da5e-4b1b-a767-3298a73703ca]"
                },
                "status": {
                    "type": "string",
                    "example": "error"
                }
            }
        },
        "responses.OkString": {
            "type": "object",
            "required": [
                "data",
                "message",
                "status"
            ],
            "properties": {
                "data": {
                    "type": "string"
                },
                "message": {
                    "type": "string",
                    "example": "Request handled successfully"
                },
                "status": {
                    "type": "string",
                    "example": "success"
                }
            }
        },
        "responses.PhoneAPIKeyResponse": {
            "type": "object",
            "required": [
                "data",
                "message",
                "status"
            ],
            "properties": {
                "data": {
                    "$ref": "#/definitions/entities.PhoneAPIKey"
                },
                "message": {
                    "type": "string",
                    "example": "Request handled successfully"
                },
                "status": {
                    "type": "string",
                    "example": "success"
                }
            }
        },
        "responses.PhoneAPIKeysResponse": {
            "type": "object",
            "required": [
                "data",
                "message",
                "status"
            ],
            "properties": {
                "data": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/entities.PhoneAPIKey"
                    }
                },
                "message": {
                    "type": "string",
                    "example": "Request handled successfully"
                },
                "status": {
                    "type": "string",
                    "example": "success"
                }
            }
        },
        "responses.PhoneResponse": {
            "type": "object",
            "required": [
                "data",
                "message",
                "status"
            ],
            "properties": {
                "data": {
                    "$ref": "#/definitions/entities.Phone"
                },
                "message": {
                    "type": "string",
                    "example": "Request handled successfully"
                },
                "status": {
                    "type": "string",
                    "example": "success"
                }
            }
        },
        "responses.PhonesResponse": {
            "type": "object",
            "required": [
                "data",
                "message",
                "status"
            ],
            "properties": {
                "data": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/entities.Phone"
                    }
                },
                "message": {
                    "type": "string",
                    "example": "Request handled successfully"
                },
                "status": {
                    "type": "string",
                    "example": "success"
                }
            }
        },
        "responses.Unauthorized": {
            "type": "object",
            "required": [
                "data",
                "message",
                "status"
            ],
            "properties": {
                "data": {
                    "type": "string",
                    "example": "Make sure your API key is set in the [X-API-Key] header in the request"
                },
                "message": {
                    "type": "string",
                    "example": "You are not authorized to carry out this request."
                },
                "status": {
                    "type": "string",
                    "example": "error"
                }
            }
        },
        "responses.UnprocessableEntity": {
            "type": "object",
            "required": [
                "data",
                "message",
                "status"
            ],
            "properties": {
                "data": {
                    "type": "object",
                    "additionalProperties": {
                        "type": "array",
                        "items": {
                            "type": "string"
                        }
                    }
                },
                "message": {
                    "type": "string",
                    "example": "validation errors while handling request"
                },
                "status": {
                    "type": "string",
                    "example": "error"
                }
            }
        },
        "responses.UserResponse": {
            "type": "object",
            "required": [
                "data",
                "message",
                "status"
            ],
            "properties": {
                "data": {
                    "$ref": "#/definitions/entities.User"
                },
                "message": {
                    "type": "string",
                    "example": "Request handled successfully"
                },
                "status": {
                    "type": "string",
                    "example": "success"
                }
            }
        },
        "responses.WebhookResponse": {
            "type": "object",
            "required": [
                "data",
                "message",
                "status"
            ],
            "properties": {
                "data": {
                    "$ref": "#/definitions/entities.Webhook"
                },
                "message": {
                    "type": "string",
                    "example": "Request handled successfully"
                },
                "status": {
                    "type": "string",
                    "example": "success"
                }
            }
        },
        "responses.WebhooksResponse": {
            "type": "object",
            "required": [
                "data",
                "message",
                "status"
            ],
            "properties": {
                "data": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/entities.Webhook"
                    }
                },
                "message": {
                    "type": "string",
                    "example": "Request handled successfully"
                },
                "status": {
                    "type": "string",
                    "example": "success"
                }
            }
        }
    },
    "securityDefinitions": {
        "ApiKeyAuth": {
            "type": "apiKey",
            "name": "x-api-Key",
            "in": "header"
        }
    }
}`

// SwaggerInfo holds exported Swagger Info so clients can modify it
var SwaggerInfo = &swag.Spec{
	Version:          "1.0",
	Host:             "api.httpsms.com",
	BasePath:         "/v1",
	Schemes:          []string{"https"},
	Title:            "httpSMS API Reference",
	Description:      "Use your Android phone to send and receive SMS messages via a simple programmable API with end-to-end encryption.",
	InfoInstanceName: "swagger",
	SwaggerTemplate:  docTemplate,
}

func init() {
	swag.Register(SwaggerInfo.InstanceName(), SwaggerInfo)
}

Web Proxy Viewer  |  New URL  |  Original Page