### GET /devices Source: https://capcom6.github.io/android-sms-gateway/swagger.json Returns list of registered devices ```markdown ### Responses #### 200 - Device list - Array of smsgateway.Device #### 400 - Invalid request **smsgateway.ErrorResponse** - **code** (integer): Error code - **data** (object): Error context - **message** (string): Error message (example: "An error occurred") #### 401 - Unauthorized **smsgateway.ErrorResponse** - **code** (integer): Error code - **data** (object): Error context - **message** (string): Error message (example: "An error occurred") #### 403 - Forbidden **smsgateway.ErrorResponse** - **code** (integer): Error code - **data** (object): Error context - **message** (string): Error message (example: "An error occurred") #### 500 - Internal server error **smsgateway.ErrorResponse** - **code** (integer): Error code - **data** (object): Error context - **message** (string): Error message (example: "An error occurred") ### Example Usage ```bash curl -X GET "//devices" ``` ``` -------------------------------- ### GET /settings Source: https://capcom6.github.io/android-sms-gateway/swagger.json Returns settings for a specific user ```markdown ### Responses #### 200 - Settings **smsgateway.DeviceSettings** - **encryption** (object) - **passphrase** (string): Passphrase is the encryption passphrase. If nil or empty, encryption is disabled. Must not be used with Cloud Server. - **gateway** (object) - **cloud_url** (string): CloudURL is the URL of the cloud server. Must not be used with Cloud Server. - **notification_channel** (string (AUTO|SSE_ONLY)): NotificationChannel is the way device receives notifications. ("AUTO"|"SSE_ONLY") - **private_token** (string): PrivateToken is the auth token for the private server. Must not be used with Cloud Server. - **logs** (object) - **lifetime_days** (integer): LifetimeDays is the number of days to retain logs. Must be at least 1 when provided. - **messages** (object) - **limit_period** (string (Disabled|PerMinute|PerHour|PerDay)) ("Disabled"|"PerMinute"|"PerHour"|"PerDay") - **limit_value** (integer): LimitValue is the maximum number of messages allowed per limit period. Must be at least 1 when provided. - **log_lifetime_days** (integer): LogLifetimeDays is the number of days to retain message logs. Must be at least 1 when provided. - **processing_order** (string (LIFO|FIFO)) ("LIFO"|"FIFO") - **send_interval_max** (integer): SendIntervalMax is the maximum interval between message sends (in seconds). Must be at least 1 when provided and greater than or equal to SendIntervalMin. - **send_interval_min** (integer): SendIntervalMin is the minimum interval between message sends (in seconds). Must be at least 1 when provided. - **sim_selection_mode** (string (OSDefault|RoundRobin|Random)) ("OSDefault"|"RoundRobin"|"Random") - **ping** (object) - **interval_seconds** (integer): IntervalSeconds is the interval between ping requests (in seconds). Must be at least 1 when provided. - **webhooks** (object) - **internet_required** (boolean): InternetRequired indicates whether internet access is required for webhooks. - **retry_count** (integer): RetryCount is the number of times to retry failed webhook deliveries. Must be at least 1 when provided. - **signing_key** (string): SigningKey is the secret key used for signing webhook payloads. Must not be used with Cloud Server. #### 401 - Unauthorized **smsgateway.ErrorResponse** - **code** (integer): Error code - **data** (object): Error context - **message** (string): Error message (example: "An error occurred") #### 403 - Forbidden **smsgateway.ErrorResponse** - **code** (integer): Error code - **data** (object): Error context - **message** (string): Error message (example: "An error occurred") #### 500 - Internal server error **smsgateway.ErrorResponse** - **code** (integer): Error code - **data** (object): Error context - **message** (string): Error message (example: "An error occurred") ### Example Usage ```bash curl -X GET "//settings" ``` ``` -------------------------------- ### GET /health/startup Source: https://capcom6.github.io/android-sms-gateway/swagger.json Checks if service has completed initialization (startup probe) ```markdown ### Responses #### 200 - Service has completed initialization **smsgateway.HealthResponse** - **checks** (object) - **releaseId** (integer): Release ID of the application. It is used to identify the version of the application. - **status** (string (pass|warn|fail)) ("pass"|"warn"|"fail") - **version** (string): Version of the application. #### 503 - Service has not completed initialization **smsgateway.HealthResponse** - **checks** (object) - **releaseId** (integer): Release ID of the application. It is used to identify the version of the application. - **status** (string (pass|warn|fail)) ("pass"|"warn"|"fail") - **version** (string): Version of the application. ### Example Usage ```bash curl -X GET "//health/startup" ``` ``` -------------------------------- ### GET /webhooks Source: https://capcom6.github.io/android-sms-gateway/swagger.json Returns list of registered webhooks ```markdown ### Responses #### 200 - Webhook list - Array of smsgateway.Webhook #### 401 - Unauthorized **smsgateway.ErrorResponse** - **code** (integer): Error code - **data** (object): Error context - **message** (string): Error message (example: "An error occurred") #### 403 - Forbidden **smsgateway.ErrorResponse** - **code** (integer): Error code - **data** (object): Error context - **message** (string): Error message (example: "An error occurred") #### 500 - Internal server error **smsgateway.ErrorResponse** - **code** (integer): Error code - **data** (object): Error context - **message** (string): Error message (example: "An error occurred") ### Example Usage ```bash curl -X GET "//webhooks" ``` ``` -------------------------------- ### GET /health/ready Source: https://capcom6.github.io/android-sms-gateway/swagger.json Checks if service is ready to serve traffic (readiness probe) ```markdown ### Responses #### 200 - Service is ready **smsgateway.HealthResponse** - **checks** (object) - **releaseId** (integer): Release ID of the application. It is used to identify the version of the application. - **status** (string (pass|warn|fail)) ("pass"|"warn"|"fail") - **version** (string): Version of the application. #### 503 - Service is not ready **smsgateway.HealthResponse** - **checks** (object) - **releaseId** (integer): Release ID of the application. It is used to identify the version of the application. - **status** (string (pass|warn|fail)) ("pass"|"warn"|"fail") - **version** (string): Version of the application. ### Example Usage ```bash curl -X GET "//health/ready" ``` ``` -------------------------------- ### GET /health/live Source: https://capcom6.github.io/android-sms-gateway/swagger.json Checks if service is running (liveness probe) ```markdown ### Responses #### 200 - Service is alive **smsgateway.HealthResponse** - **checks** (object) - **releaseId** (integer): Release ID of the application. It is used to identify the version of the application. - **status** (string (pass|warn|fail)) ("pass"|"warn"|"fail") - **version** (string): Version of the application. #### 503 - Service is not alive **smsgateway.HealthResponse** - **checks** (object) - **releaseId** (integer): Release ID of the application. It is used to identify the version of the application. - **status** (string (pass|warn|fail)) ("pass"|"warn"|"fail") - **version** (string): Version of the application. ### Example Usage ```bash curl -X GET "//health/live" ``` ``` -------------------------------- ### GET /health Source: https://capcom6.github.io/android-sms-gateway/swagger.json Checks if service is ready to serve traffic (readiness probe) ```markdown ### Responses #### 200 - Service is ready **smsgateway.HealthResponse** - **checks** (object) - **releaseId** (integer): Release ID of the application. It is used to identify the version of the application. - **status** (string (pass|warn|fail)) ("pass"|"warn"|"fail") - **version** (string): Version of the application. #### 503 - Service is not ready **smsgateway.HealthResponse** - **checks** (object) - **releaseId** (integer): Release ID of the application. It is used to identify the version of the application. - **status** (string (pass|warn|fail)) ("pass"|"warn"|"fail") - **version** (string): Version of the application. ### Example Usage ```bash curl -X GET "//health" ``` ``` -------------------------------- ### GET /logs Source: https://capcom6.github.io/android-sms-gateway/swagger.json Retrieve a list of log entries within a specified time range. ```markdown ### Parameters - **from** (string (date-time), query, optional): The start of the time range for the logs to retrieve. Logs created after this timestamp will be included. - **to** (string (date-time), query, optional): The end of the time range for the logs to retrieve. Logs created before this timestamp will be included. ### Responses #### 200 - Log entries - Array of smsgateway.LogEntry #### 401 - Unauthorized **smsgateway.ErrorResponse** - **code** (integer): Error code - **data** (object): Error context - **message** (string): Error message (example: "An error occurred") #### 403 - Forbidden **smsgateway.ErrorResponse** - **code** (integer): Error code - **data** (object): Error context - **message** (string): Error message (example: "An error occurred") #### 500 - Internal server error **smsgateway.ErrorResponse** - **code** (integer): Error code - **data** (object): Error context - **message** (string): Error message (example: "An error occurred") #### 501 - Not implemented **smsgateway.ErrorResponse** - **code** (integer): Error code - **data** (object): Error context - **message** (string): Error message (example: "An error occurred") ### Example Usage ```bash curl -X GET "//logs?from=2023-01-01T00:00:00Z&to=2023-01-01T00:00:00Z" ``` ``` -------------------------------- ### GET /messages Source: https://capcom6.github.io/android-sms-gateway/swagger.json Retrieves a list of messages with filtering and pagination ```markdown ### Parameters - **from** (string (date-time), query, optional): Start date in RFC3339 format - **to** (string (date-time), query, optional): End date in RFC3339 format - **state** (string, query, optional): Filter messages by processing state - **deviceId** (string, query, optional): Filter by device ID - **limit** (integer, query, optional): Pagination limit - **offset** (integer, query, optional): Pagination offset - **includeContent** (boolean, query, optional): Include textMessage/dataMessage content for each message. Default is false ### Responses #### 200 - A list of messages - Array of smsgateway.MessageState #### 400 - Invalid request **smsgateway.ErrorResponse** - **code** (integer): Error code - **data** (object): Error context - **message** (string): Error message (example: "An error occurred") #### 401 - Unauthorized **smsgateway.ErrorResponse** - **code** (integer): Error code - **data** (object): Error context - **message** (string): Error message (example: "An error occurred") #### 403 - Forbidden **smsgateway.ErrorResponse** - **code** (integer): Error code - **data** (object): Error context - **message** (string): Error message (example: "An error occurred") #### 500 - Internal server error **smsgateway.ErrorResponse** - **code** (integer): Error code - **data** (object): Error context - **message** (string): Error message (example: "An error occurred") ### Example Usage ```bash curl -X GET "//messages?from=2023-01-01T00:00:00Z&to=2023-01-01T00:00:00Z&state=string&deviceId=string&limit=50&offset=0&includeContent=false" ``` ``` -------------------------------- ### GET /messages/{id} Source: https://capcom6.github.io/android-sms-gateway/swagger.json Returns message state by ID ```markdown ### Parameters - **id** (string, path, required): Message ID ### Responses #### 200 - Message state **smsgateway.GetMessageResponse** - **dataMessage** (object) - **data** (string (byte)) (required): Data is the base64-encoded payload. (example: "SGVsbG8gV29ybGQh") - **port** (integer) (required): Port is the destination port. (example: 53739) - **deviceId** (string) (required): Device ID (example: "PyDmBQZZXYmyxMwED8Fzy") - **hashedMessage** (object) - **hash** (string) (required) (example: "1d4b6e3b1b6e3b1b6e3b1b6e3b1b6e3b1b6e3b1b") - **id** (string) (required): Message ID (example: "PyDmBQZZXYmyxMwED8Fzy") - **isEncrypted** (boolean): Encrypted (example: false) - **isHashed** (boolean): Hashed (example: false) - **recipients** (array (smsgateway.RecipientState)) (required): Recipients states Array items: - **error** (string): Error (for `Failed` state) (example: "timeout") - **phoneNumber** (string) (required): Phone number or first 16 symbols of SHA256 hash (example: "79990001234") - **state** (string (Pending|Processed|Sent|Delivered|Failed)) (required) ("Pending"|"Processed"|"Sent"|"Delivered"|"Failed") - **state** (string (Pending|Processed|Sent|Delivered|Failed)) (required) ("Pending"|"Processed"|"Sent"|"Delivered"|"Failed") - **states** (object): History of states - **textMessage** (object) - **text** (string) (required): Text is the message text. (example: "Hello World!") #### 400 - Invalid request **smsgateway.ErrorResponse** - **code** (integer): Error code - **data** (object): Error context - **message** (string): Error message (example: "An error occurred") #### 401 - Unauthorized **smsgateway.ErrorResponse** - **code** (integer): Error code - **data** (object): Error context - **message** (string): Error message (example: "An error occurred") #### 403 - Forbidden **smsgateway.ErrorResponse** - **code** (integer): Error code - **data** (object): Error context - **message** (string): Error message (example: "An error occurred") #### 500 - Internal server error **smsgateway.ErrorResponse** - **code** (integer): Error code - **data** (object): Error context - **message** (string): Error message (example: "An error occurred") ### Example Usage ```bash curl -X GET "//messages/{id}" ``` ``` -------------------------------- ### GET /inbox Source: https://capcom6.github.io/android-sms-gateway/swagger.json Retrieves incoming messages with filtering and pagination. ```markdown ### Parameters - **type** (string (SMS|DATA_SMS|MMS|MMS_DOWNLOADED), query, optional): Filter incoming messages by type - **limit** (integer, query, optional): Maximum number of messages to return - **offset** (integer, query, optional): Number of messages to skip - **from** (string (date-time), query, optional): Start of date range (ISO 8601) - **to** (string (date-time), query, optional): End of date range (ISO 8601) - **deviceId** (string, query, optional): Device ID ### Responses #### 200 - A list of incoming messages - Array of smsgateway.IncomingMessage #### 400 - Invalid request **smsgateway.ErrorResponse** - **code** (integer): Error code - **data** (object): Error context - **message** (string): Error message (example: "An error occurred") #### 401 - Unauthorized **smsgateway.ErrorResponse** - **code** (integer): Error code - **data** (object): Error context - **message** (string): Error message (example: "An error occurred") #### 403 - Forbidden **smsgateway.ErrorResponse** - **code** (integer): Error code - **data** (object): Error context - **message** (string): Error message (example: "An error occurred") #### 500 - Internal server error **smsgateway.ErrorResponse** - **code** (integer): Error code - **data** (object): Error context - **message** (string): Error message (example: "An error occurred") #### 501 - Not implemented **smsgateway.ErrorResponse** - **code** (integer): Error code - **data** (object): Error context - **message** (string): Error message (example: "An error occurred") ### Example Usage ```bash curl -X GET "//inbox?type=SMS&limit=50&offset=0&from=2023-01-01T00:00:00Z&to=2023-01-01T00:00:00Z&deviceId=string" ``` ``` -------------------------------- ### PUT /settings Source: https://capcom6.github.io/android-sms-gateway/swagger.json Replaces settings ```markdown ### Request Body **Content-Type:** application/json - **encryption** (object) - **passphrase** (string): Passphrase is the encryption passphrase. If nil or empty, encryption is disabled. Must not be used with Cloud Server. - **gateway** (object) - **cloud_url** (string): CloudURL is the URL of the cloud server. Must not be used with Cloud Server. - **notification_channel** (string (AUTO|SSE_ONLY)): NotificationChannel is the way device receives notifications. ("AUTO"|"SSE_ONLY") - **private_token** (string): PrivateToken is the auth token for the private server. Must not be used with Cloud Server. - **logs** (object) - **lifetime_days** (integer): LifetimeDays is the number of days to retain logs. Must be at least 1 when provided. - **messages** (object) - **limit_period** (string (Disabled|PerMinute|PerHour|PerDay)) ("Disabled"|"PerMinute"|"PerHour"|"PerDay") - **limit_value** (integer): LimitValue is the maximum number of messages allowed per limit period. Must be at least 1 when provided. - **log_lifetime_days** (integer): LogLifetimeDays is the number of days to retain message logs. Must be at least 1 when provided. - **processing_order** (string (LIFO|FIFO)) ("LIFO"|"FIFO") - **send_interval_max** (integer): SendIntervalMax is the maximum interval between message sends (in seconds). Must be at least 1 when provided and greater than or equal to SendIntervalMin. - **send_interval_min** (integer): SendIntervalMin is the minimum interval between message sends (in seconds). Must be at least 1 when provided. - **sim_selection_mode** (string (OSDefault|RoundRobin|Random)) ("OSDefault"|"RoundRobin"|"Random") - **ping** (object) - **interval_seconds** (integer): IntervalSeconds is the interval between ping requests (in seconds). Must be at least 1 when provided. - **webhooks** (object) - **internet_required** (boolean): InternetRequired indicates whether internet access is required for webhooks. - **retry_count** (integer): RetryCount is the number of times to retry failed webhook deliveries. Must be at least 1 when provided. - **signing_key** (string): SigningKey is the secret key used for signing webhook payloads. Must not be used with Cloud Server. ### Responses #### 200 - Settings updated #### 400 - Invalid request **smsgateway.ErrorResponse** - **code** (integer): Error code - **data** (object): Error context - **message** (string): Error message (example: "An error occurred") #### 401 - Unauthorized **smsgateway.ErrorResponse** - **code** (integer): Error code - **data** (object): Error context - **message** (string): Error message (example: "An error occurred") #### 403 - Forbidden **smsgateway.ErrorResponse** - **code** (integer): Error code - **data** (object): Error context - **message** (string): Error message (example: "An error occurred") #### 500 - Internal server error **smsgateway.ErrorResponse** - **code** (integer): Error code - **data** (object): Error context - **message** (string): Error message (example: "An error occurred") ### Example Usage ```bash curl -X PUT "//settings" \ -H "Content-Type: application/json" \ -d '{ "encryption": "value", "gateway": "value", "logs": "value", "messages": "value", "ping": "value", "webhooks": "value" }' ``` ``` -------------------------------- ### Schema: smsgateway.SettingsPing Source: https://capcom6.github.io/android-sms-gateway/swagger.json Schema definition for smsgateway.SettingsPing ```markdown ## Schema: smsgateway.SettingsPing Schema definition for smsgateway.SettingsPing **Type:** object - **interval_seconds** (integer): IntervalSeconds is the interval between ping requests (in seconds). Must be at least 1 when provided. ``` -------------------------------- ### Schema: smsgateway.SettingsWebhooks Source: https://capcom6.github.io/android-sms-gateway/swagger.json Schema definition for smsgateway.SettingsWebhooks ```markdown ## Schema: smsgateway.SettingsWebhooks Schema definition for smsgateway.SettingsWebhooks **Type:** object - **internet_required** (boolean): InternetRequired indicates whether internet access is required for webhooks. - **retry_count** (integer): RetryCount is the number of times to retry failed webhook deliveries. Must be at least 1 when provided. - **signing_key** (string): SigningKey is the secret key used for signing webhook payloads. Must not be used with Cloud Server. ``` -------------------------------- ### Schema: SystemPingPayload Source: https://capcom6.github.io/android-sms-gateway/swagger.json Payload of `system:ping` event. ```markdown ## Schema: SystemPingPayload Payload of `system:ping` event. **Type:** object ``` -------------------------------- ### Security: Authorization Source: https://capcom6.github.io/android-sms-gateway/swagger.json Private server authentication ```markdown ## Security: Authorization **Description:** Private server authentication **Type:** apiKey ``` -------------------------------- ### Schema: smsgateway.DeviceSettings Source: https://capcom6.github.io/android-sms-gateway/swagger.json Schema definition for smsgateway.DeviceSettings ```markdown ## Schema: smsgateway.DeviceSettings Schema definition for smsgateway.DeviceSettings **Type:** object - **encryption** (object) - **passphrase** (string): Passphrase is the encryption passphrase. If nil or empty, encryption is disabled. Must not be used with Cloud Server. - **gateway** (object) - **cloud_url** (string): CloudURL is the URL of the cloud server. Must not be used with Cloud Server. - **notification_channel** (string (AUTO|SSE_ONLY)): NotificationChannel is the way device receives notifications. ("AUTO"|"SSE_ONLY") - **private_token** (string): PrivateToken is the auth token for the private server. Must not be used with Cloud Server. - **logs** (object) - **lifetime_days** (integer): LifetimeDays is the number of days to retain logs. Must be at least 1 when provided. - **messages** (object) - **limit_period** (string (Disabled|PerMinute|PerHour|PerDay)) ("Disabled"|"PerMinute"|"PerHour"|"PerDay") - **limit_value** (integer): LimitValue is the maximum number of messages allowed per limit period. Must be at least 1 when provided. - **log_lifetime_days** (integer): LogLifetimeDays is the number of days to retain message logs. Must be at least 1 when provided. - **processing_order** (string (LIFO|FIFO)) ("LIFO"|"FIFO") - **send_interval_max** (integer): SendIntervalMax is the maximum interval between message sends (in seconds). Must be at least 1 when provided and greater than or equal to SendIntervalMin. - **send_interval_min** (integer): SendIntervalMin is the minimum interval between message sends (in seconds). Must be at least 1 when provided. - **sim_selection_mode** (string (OSDefault|RoundRobin|Random)) ("OSDefault"|"RoundRobin"|"Random") - **ping** (object) - **interval_seconds** (integer): IntervalSeconds is the interval between ping requests (in seconds). Must be at least 1 when provided. - **webhooks** (object) - **internet_required** (boolean): InternetRequired indicates whether internet access is required for webhooks. - **retry_count** (integer): RetryCount is the number of times to retry failed webhook deliveries. Must be at least 1 when provided. - **signing_key** (string): SigningKey is the secret key used for signing webhook payloads. Must not be used with Cloud Server. ``` -------------------------------- ### Schema: smsgateway.SettingsGateway Source: https://capcom6.github.io/android-sms-gateway/swagger.json Schema definition for smsgateway.SettingsGateway ```markdown ## Schema: smsgateway.SettingsGateway Schema definition for smsgateway.SettingsGateway **Type:** object - **cloud_url** (string): CloudURL is the URL of the cloud server. Must not be used with Cloud Server. - **notification_channel** (string (AUTO|SSE_ONLY)): NotificationChannel is the way device receives notifications. ("AUTO"|"SSE_ONLY") - **private_token** (string): PrivateToken is the auth token for the private server. Must not be used with Cloud Server. ``` -------------------------------- ### POST /auth/token Source: https://capcom6.github.io/android-sms-gateway/swagger.json Generate new access token with specified scopes and ttl ```markdown ### Request Body **Content-Type:** application/json - **scopes** (array (string)) (required): scopes for which the access token is valid - **ttl** (integer): lifetime of the access token in seconds ### Responses #### 201 - Token **smsgateway.TokenResponse** - **access_token** (string): actual access token - **expires_at** (string (date-time)): time at which the access token is no longer valid - **id** (string): unique identifier for the access token - **refresh_token** (string): refresh token - **token_type** (string): type of the access token #### 400 - Invalid request **smsgateway.ErrorResponse** - **code** (integer): Error code - **data** (object): Error context - **message** (string): Error message (example: "An error occurred") #### 401 - Unauthorized **smsgateway.ErrorResponse** - **code** (integer): Error code - **data** (object): Error context - **message** (string): Error message (example: "An error occurred") #### 403 - Forbidden **smsgateway.ErrorResponse** - **code** (integer): Error code - **data** (object): Error context - **message** (string): Error message (example: "An error occurred") #### 500 - Internal server error **smsgateway.ErrorResponse** - **code** (integer): Error code - **data** (object): Error context - **message** (string): Error message (example: "An error occurred") #### 501 - Not implemented **smsgateway.ErrorResponse** - **code** (integer): Error code - **data** (object): Error context - **message** (string): Error message (example: "An error occurred") ### Example Usage ```bash curl -X POST "//auth/token" \ -H "Content-Type: application/json" \ -d '{ "scopes": [ "string" ], "ttl": "0" }' ``` ``` -------------------------------- ### PATCH /settings Source: https://capcom6.github.io/android-sms-gateway/swagger.json Partially updates settings for a specific user ```markdown ### Request Body **Content-Type:** application/json - **encryption** (object) - **passphrase** (string): Passphrase is the encryption passphrase. If nil or empty, encryption is disabled. Must not be used with Cloud Server. - **gateway** (object) - **cloud_url** (string): CloudURL is the URL of the cloud server. Must not be used with Cloud Server. - **notification_channel** (string (AUTO|SSE_ONLY)): NotificationChannel is the way device receives notifications. ("AUTO"|"SSE_ONLY") - **private_token** (string): PrivateToken is the auth token for the private server. Must not be used with Cloud Server. - **logs** (object) - **lifetime_days** (integer): LifetimeDays is the number of days to retain logs. Must be at least 1 when provided. - **messages** (object) - **limit_period** (string (Disabled|PerMinute|PerHour|PerDay)) ("Disabled"|"PerMinute"|"PerHour"|"PerDay") - **limit_value** (integer): LimitValue is the maximum number of messages allowed per limit period. Must be at least 1 when provided. - **log_lifetime_days** (integer): LogLifetimeDays is the number of days to retain message logs. Must be at least 1 when provided. - **processing_order** (string (LIFO|FIFO)) ("LIFO"|"FIFO") - **send_interval_max** (integer): SendIntervalMax is the maximum interval between message sends (in seconds). Must be at least 1 when provided and greater than or equal to SendIntervalMin. - **send_interval_min** (integer): SendIntervalMin is the minimum interval between message sends (in seconds). Must be at least 1 when provided. - **sim_selection_mode** (string (OSDefault|RoundRobin|Random)) ("OSDefault"|"RoundRobin"|"Random") - **ping** (object) - **interval_seconds** (integer): IntervalSeconds is the interval between ping requests (in seconds). Must be at least 1 when provided. - **webhooks** (object) - **internet_required** (boolean): InternetRequired indicates whether internet access is required for webhooks. - **retry_count** (integer): RetryCount is the number of times to retry failed webhook deliveries. Must be at least 1 when provided. - **signing_key** (string): SigningKey is the secret key used for signing webhook payloads. Must not be used with Cloud Server. ### Responses #### 200 - Settings updated #### 400 - Invalid request **smsgateway.ErrorResponse** - **code** (integer): Error code - **data** (object): Error context - **message** (string): Error message (example: "An error occurred") #### 401 - Unauthorized **smsgateway.ErrorResponse** - **code** (integer): Error code - **data** (object): Error context - **message** (string): Error message (example: "An error occurred") #### 403 - Forbidden **smsgateway.ErrorResponse** - **code** (integer): Error code - **data** (object): Error context - **message** (string): Error message (example: "An error occurred") #### 500 - Internal server error **smsgateway.ErrorResponse** - **code** (integer): Error code - **data** (object): Error context - **message** (string): Error message (example: "An error occurred") ### Example Usage ```bash curl -X PATCH "//settings" \ -H "Content-Type: application/json" \ -d '{ "encryption": "value", "gateway": "value", "logs": "value", "messages": "value", "ping": "value", "webhooks": "value" }' ``` ``` -------------------------------- ### POST /webhooks Source: https://capcom6.github.io/android-sms-gateway/swagger.json Registers webhook. If webhook with same ID already exists, it will be replaced ```markdown ### Request Body **Content-Type:** application/json - **deviceId** (string): The unique identifier of the device the webhook is associated with. (example: "PyDmBQZZXYmyxMwED8Fzy") - **event** (string (sms:received|sms:data-received|sms:sent|sms:delivered|sms:failed|system:ping|mms:received|mms:downloaded)) (required) ("sms:received"|"sms:data-received"|"sms:sent"|"sms:delivered"|"sms:failed"|"system:ping"|"mms:received"|"mms:downloaded") - **id** (string): The unique identifier of the webhook. (example: "123e4567-e89b-12d3-a456-426614174000") - **url** (string) (required): The URL the webhook will be sent to. (example: "https://example.com/webhook") ### Responses #### 201 - Created **smsgateway.Webhook** - **deviceId** (string): The unique identifier of the device the webhook is associated with. (example: "PyDmBQZZXYmyxMwED8Fzy") - **event** (string (sms:received|sms:data-received|sms:sent|sms:delivered|sms:failed|system:ping|mms:received|mms:downloaded)) (required) ("sms:received"|"sms:data-received"|"sms:sent"|"sms:delivered"|"sms:failed"|"system:ping"|"mms:received"|"mms:downloaded") - **id** (string): The unique identifier of the webhook. (example: "123e4567-e89b-12d3-a456-426614174000") - **url** (string) (required): The URL the webhook will be sent to. (example: "https://example.com/webhook") #### 400 - Invalid request **smsgateway.ErrorResponse** - **code** (integer): Error code - **data** (object): Error context - **message** (string): Error message (example: "An error occurred") #### 401 - Unauthorized **smsgateway.ErrorResponse** - **code** (integer): Error code - **data** (object): Error context - **message** (string): Error message (example: "An error occurred") #### 403 - Forbidden **smsgateway.ErrorResponse** - **code** (integer): Error code - **data** (object): Error context - **message** (string): Error message (example: "An error occurred") #### 500 - Internal server error **smsgateway.ErrorResponse** - **code** (integer): Error code - **data** (object): Error context - **message** (string): Error message (example: "An error occurred") ### Example Usage ```bash curl -X POST "//webhooks" \ -H "Content-Type: application/json" \ -d '{ "deviceId": "PyDmBQZZXYmyxMwED8Fzy", "event": "sms:received", "id": "123e4567-e89b-12d3-a456-426614174000", "url": "https://example.com/webhook" }' ``` ``` -------------------------------- ### Security: Authorization Source: https://capcom6.github.io/android-sms-gateway/swagger.json User one-time code authentication ```markdown ## Security: Authorization **Description:** User one-time code authentication **Type:** apiKey ``` -------------------------------- ### Schema: smsgateway.SettingsLogs Source: https://capcom6.github.io/android-sms-gateway/swagger.json Schema definition for smsgateway.SettingsLogs ```markdown ## Schema: smsgateway.SettingsLogs Schema definition for smsgateway.SettingsLogs **Type:** object - **lifetime_days** (integer): LifetimeDays is the number of days to retain logs. Must be at least 1 when provided. ``` -------------------------------- ### Schema: smsgateway.LogEntry Source: https://capcom6.github.io/android-sms-gateway/swagger.json Schema definition for smsgateway.LogEntry ```markdown ## Schema: smsgateway.LogEntry Schema definition for smsgateway.LogEntry **Type:** object - **context** (object): Additional context information related to the log entry, typically including data relevant to the log event. - **createdAt** (string (date-time)): The timestamp when this log entry was created. - **id** (integer): A unique identifier for the log entry. - **message** (string): A message describing the log event. - **module** (string): The module or component of the system that generated the log entry. - **priority** (string (DEBUG|INFO|WARN|ERROR)) ("DEBUG"|"INFO"|"WARN"|"ERROR") ``` -------------------------------- ### Schema: smsgateway.Device Source: https://capcom6.github.io/android-sms-gateway/swagger.json Schema definition for smsgateway.Device ```markdown ## Schema: smsgateway.Device Schema definition for smsgateway.Device **Type:** object - **createdAt** (string): Created at (read only) (example: "2020-01-01T00:00:00Z") - **deletedAt** (string): Deleted at (read only) (example: "2020-01-01T00:00:00Z") - **id** (string): ID (example: "PyDmBQZZXYmyxMwED8Fzy") - **lastSeen** (string): Last seen at (read only) (example: "2020-01-01T00:00:00Z") - **name** (string): Name (example: "My Device") - **updatedAt** (string): Updated at (read only) (example: "2020-01-01T00:00:00Z") ``` -------------------------------- ### Security: Authorization Source: https://capcom6.github.io/android-sms-gateway/swagger.json JWT authentication ```markdown ## Security: Authorization **Description:** JWT authentication **Type:** apiKey ``` -------------------------------- ### Schema: smsgateway.SettingsEncryption Source: https://capcom6.github.io/android-sms-gateway/swagger.json Schema definition for smsgateway.SettingsEncryption ```markdown ## Schema: smsgateway.SettingsEncryption Schema definition for smsgateway.SettingsEncryption **Type:** object - **passphrase** (string): Passphrase is the encryption passphrase. If nil or empty, encryption is disabled. Must not be used with Cloud Server. ``` -------------------------------- ### Schema: smsgateway.SimSelectionMode Source: https://capcom6.github.io/android-sms-gateway/swagger.json Schema definition for smsgateway.SimSelectionMode ```markdown ## Schema: smsgateway.SimSelectionMode Schema definition for smsgateway.SimSelectionMode **Type:** string ``` -------------------------------- ### Schema: WebHookEvent Source: https://capcom6.github.io/android-sms-gateway/swagger.json Schema definition for WebHookEvent ```markdown ## Schema: WebHookEvent Schema definition for WebHookEvent **Type:** object - **deviceId** (string) (required): The unique identifier of the device. - **event** (string (sms:received|sms:data-received|sms:sent|sms:delivered|sms:failed|system:ping|mms:received|mms:downloaded)) (required) ("sms:received"|"sms:data-received"|"sms:sent"|"sms:delivered"|"sms:failed"|"system:ping"|"mms:received"|"mms:downloaded") - **id** (string) (required): The unique identifier of the webhook event. - **payload** (object) (required): Base payload for message-related events. - **messageId** (string): The unique identifier of the message. - **phoneNumber** (string): The phone number of the sender (for incoming messages) or recipient (for outgoing messages). - **recipient** (string): The phone number of the message recipient. For incoming messages, this is the device's/SIM's phone number that received the message; for outgoing messages, this is the recipient's phone number. May be `null` for device's phone number. - **sender** (string): The phone number of the message sender. For incoming messages, this is the external sender; for outgoing messages, this is the device's phone number. May be `null` for device's phone number. - **simNumber** (integer): The SIM card number that sent or received the SMS. May be `null` if the SIM cannot be determined or the default was used. - **message** (string): The content of the SMS message received. - **receivedAt** (string (date-time)): The timestamp when the SMS message was received. - **webhookId** (string) (required): The identifier of the webhook configuration that triggered this event. ``` -------------------------------- ### Security: Authorization Source: https://capcom6.github.io/android-sms-gateway/swagger.json Mobile device token ```markdown ## Security: Authorization **Description:** Mobile device token **Type:** apiKey ``` -------------------------------- ### Schema: SmsSentPayload Source: https://capcom6.github.io/android-sms-gateway/swagger.json Payload of `sms:sent` event. ```markdown ## Schema: SmsSentPayload Payload of `sms:sent` event. **Type:** object - **messageId** (string): The unique identifier of the message. - **phoneNumber** (string): The phone number of the sender (for incoming messages) or recipient (for outgoing messages). - **recipient** (string): The phone number of the message recipient. For incoming messages, this is the device's/SIM's phone number that received the message; for outgoing messages, this is the recipient's phone number. May be `null` for device's phone number. - **sender** (string): The phone number of the message sender. For incoming messages, this is the external sender; for outgoing messages, this is the device's phone number. May be `null` for device's phone number. - **simNumber** (integer): The SIM card number that sent or received the SMS. May be `null` if the SIM cannot be determined or the default was used. - **sentAt** (string (date-time)): The timestamp when the SMS message was sent. ``` -------------------------------- ### Security: ApiAuth Source: https://capcom6.github.io/android-sms-gateway/swagger.json Security scheme: ApiAuth ```markdown ## Security: ApiAuth **Description:** Security scheme: ApiAuth **Type:** http **Scheme:** basic ``` -------------------------------- ### Schema: smsgateway.WebhookEvent Source: https://capcom6.github.io/android-sms-gateway/swagger.json Schema definition for smsgateway.WebhookEvent ```markdown ## Schema: smsgateway.WebhookEvent Schema definition for smsgateway.WebhookEvent **Type:** string ``` -------------------------------- ### Schema: smsgateway.Webhook Source: https://capcom6.github.io/android-sms-gateway/swagger.json Schema definition for smsgateway.Webhook ```markdown ## Schema: smsgateway.Webhook Schema definition for smsgateway.Webhook **Type:** object - **deviceId** (string): The unique identifier of the device the webhook is associated with. (example: "PyDmBQZZXYmyxMwED8Fzy") - **event** (string (sms:received|sms:data-received|sms:sent|sms:delivered|sms:failed|system:ping|mms:received|mms:downloaded)) (required) ("sms:received"|"sms:data-received"|"sms:sent"|"sms:delivered"|"sms:failed"|"system:ping"|"mms:received"|"mms:downloaded") - **id** (string): The unique identifier of the webhook. (example: "123e4567-e89b-12d3-a456-426614174000") - **url** (string) (required): The URL the webhook will be sent to. (example: "https://example.com/webhook") ``` -------------------------------- ### POST /auth/token/refresh Source: https://capcom6.github.io/android-sms-gateway/swagger.json Refresh access token with specified refresh token ```markdown ### Responses #### 201 - Token **smsgateway.TokenResponse** - **access_token** (string): actual access token - **expires_at** (string (date-time)): time at which the access token is no longer valid - **id** (string): unique identifier for the access token - **refresh_token** (string): refresh token - **token_type** (string): type of the access token #### 401 - Unauthorized **smsgateway.ErrorResponse** - **code** (integer): Error code - **data** (object): Error context - **message** (string): Error message (example: "An error occurred") #### 403 - Forbidden **smsgateway.ErrorResponse** - **code** (integer): Error code - **data** (object): Error context - **message** (string): Error message (example: "An error occurred") #### 500 - Internal server error **smsgateway.ErrorResponse** - **code** (integer): Error code - **data** (object): Error context - **message** (string): Error message (example: "An error occurred") #### 501 - Not implemented **smsgateway.ErrorResponse** - **code** (integer): Error code - **data** (object): Error context - **message** (string): Error message (example: "An error occurred") ### Example Usage ```bash curl -X POST "//auth/token/refresh" ``` ```