MailSlurpAPI.Api.SmsController (mailslurp v15.17.22)

API calls for all endpoints tagged SmsController.

Summary

Functions

Delete SMS message. Delete an SMS message

Delete all SMS messages Delete all SMS messages or all messages for a given phone number

Get reply for an SMS message Get reply for an SMS message.

Get SMS content including body. Expects SMS to exist by ID. For SMS that may not have arrived yet use the WaitForController. Returns a SMS summary object with content.

Get all SMS messages in all phone numbers in paginated form. . By default returns all SMS messages across all phone numbers sorted by ascending created at date. Responses are paginated. You can restrict results to a list of phone number IDs. You can also filter out read messages

Get unread SMS count Get number of SMS unread. Unread means has not been viewed in dashboard or returned in an email API response

Send a reply to a received SMS message. Replies are sent from the receiving number. Reply to an SMS message.

Functions

Link to this function

delete_sms_message(connection, sms_id, opts \\ [])

@spec delete_sms_message(Tesla.Env.client(), String.t(), keyword()) ::
  {:ok, nil} | {:error, Tesla.Env.t()}

Delete SMS message. Delete an SMS message

Parameters

  • connection (MailSlurpAPI.Connection): Connection to server
  • sms_id (String.t):
  • opts (KeywordList): [optional] Optional parameters

Returns

} on success {:error, info} on failure

Link to this function

delete_sms_messages(connection, opts \\ [])

@spec delete_sms_messages(Tesla.Env.client(), keyword()) ::
  {:ok, nil} | {:error, Tesla.Env.t()}

Delete all SMS messages Delete all SMS messages or all messages for a given phone number

Parameters

  • connection (MailSlurpAPI.Connection): Connection to server
  • opts (KeywordList): [optional] Optional parameters
    • :phone_number_id (String.t):

Returns

} on success {:error, info} on failure

Link to this function

get_reply_for_sms_message(connection, sms_id, opts \\ [])

@spec get_reply_for_sms_message(Tesla.Env.client(), String.t(), keyword()) ::
  {:ok, MailSlurpAPI.Model.ReplyForSms.t()} | {:error, Tesla.Env.t()}

Get reply for an SMS message Get reply for an SMS message.

Parameters

  • connection (MailSlurpAPI.Connection): Connection to server
  • sms_id (String.t):
  • opts (KeywordList): [optional] Optional parameters

Returns

} on success {:error, info} on failure

Link to this function

get_sms_message(connection, sms_id, opts \\ [])

@spec get_sms_message(Tesla.Env.client(), String.t(), keyword()) ::
  {:ok, MailSlurpAPI.Model.SmsDto.t()} | {:error, Tesla.Env.t()}

Get SMS content including body. Expects SMS to exist by ID. For SMS that may not have arrived yet use the WaitForController. Returns a SMS summary object with content.

Parameters

  • connection (MailSlurpAPI.Connection): Connection to server
  • sms_id (String.t):
  • opts (KeywordList): [optional] Optional parameters

Returns

} on success {:error, info} on failure

Link to this function

get_sms_messages_paginated(connection, opts \\ [])

@spec get_sms_messages_paginated(Tesla.Env.client(), keyword()) ::
  {:ok, MailSlurpAPI.Model.PageSmsProjection.t()} | {:error, Tesla.Env.t()}

Get all SMS messages in all phone numbers in paginated form. . By default returns all SMS messages across all phone numbers sorted by ascending created at date. Responses are paginated. You can restrict results to a list of phone number IDs. You can also filter out read messages

Parameters

  • connection (MailSlurpAPI.Connection): Connection to server
  • opts (KeywordList): [optional] Optional parameters
    • :phone_number (String.t): Optional receiving phone number to filter SMS messages for
    • :page (integer()): Optional page index in SMS list pagination
    • :size (integer()): Optional page size in SMS list pagination. Maximum size is 100. Use page index and sort to page through larger results
    • :sort (String.t): Optional createdAt sort direction ASC or DESC
    • :unread_only (boolean()): Optional filter for unread SMS only. All SMS are considered unread until they are viewed in the dashboard or requested directly
    • :since (DateTime.t): Optional filter SMSs received after given date time
    • :before (DateTime.t): Optional filter SMSs received before given date time

Returns

} on success {:error, info} on failure

Link to this function

get_unread_sms_count(connection, opts \\ [])

@spec get_unread_sms_count(Tesla.Env.client(), keyword()) ::
  {:ok, MailSlurpAPI.Model.UnreadCount.t()} | {:error, Tesla.Env.t()}

Get unread SMS count Get number of SMS unread. Unread means has not been viewed in dashboard or returned in an email API response

Parameters

  • connection (MailSlurpAPI.Connection): Connection to server
  • opts (KeywordList): [optional] Optional parameters

Returns

} on success {:error, info} on failure

Link to this function

reply_to_sms_message(connection, sms_id, sms_reply_options, opts \\ [])

@spec reply_to_sms_message(
  Tesla.Env.client(),
  String.t(),
  MailSlurpAPI.Model.SmsReplyOptions.t(),
  keyword()
) :: {:ok, MailSlurpAPI.Model.SentSmsDto.t()} | {:error, Tesla.Env.t()}

Send a reply to a received SMS message. Replies are sent from the receiving number. Reply to an SMS message.

Parameters

  • connection (MailSlurpAPI.Connection): Connection to server
  • sms_id (String.t):
  • sms_reply_options (SmsReplyOptions):
  • opts (KeywordList): [optional] Optional parameters

Returns

} on success {:error, info} on failure