java.lang.Object
com.ringcentral.paths.restapi.account.messagethreads.messages.Index

public class Index extends Object
  • Field Details

  • Constructor Details

    • Index

      public Index(Index parent)
  • Method Details

    • path

      public String path()
    • path

      public String path(Boolean withParameter)
    • get

      Returns a list of messages across one or more threads. All filters are applied as "AND" conditions.

      The records are sorted by `creationTime` in ascending order.

      HTTP Method: get Endpoint: /restapi/{apiVersion}/account/{accountId}/message-threads/messages Rate Limit Group: Medium App Permission: SMS

      Throws:
      RestException
      IOException
    • get

      Throws:
      RestException
      IOException
    • post

      public ThreadMessageModel post(MthSendMessageRequest mthSendMessageRequest) throws RestException, IOException
      Creates and sends a new message to one or more recipients.

      The message is automatically attached to the thread specified in the `threadId` parameter. If `threadId` is omitted, it is routed to the matching thread based on the `from` and `to` phone numbers; a new thread is created automatically when no matching thread exists.

      The endpoint accepts two request formats: - `application/json` - for text-only messages. - `multipart/form-data` - to send a message together with one or more binary attachments (for MMS / rich messages). Put the message fields in the `metadata` part and each file in an `attachments` part, as shown in the example below.

      Note: a suggested attachment filename is optional; when needed, provide it via the `filename` field in the `Content-Disposition` header.

      HTTP Method: post Endpoint: /restapi/{apiVersion}/account/{accountId}/message-threads/messages Rate Limit Group: Medium App Permission: SMS

      Throws:
      RestException
      IOException
    • delete

      public String delete(ThreadMessagesDeleteRequest threadMessagesDeleteRequest) throws RestException, IOException
      Deletes thread message(s).

      HTTP Method: delete Endpoint: /restapi/{apiVersion}/account/{accountId}/message-threads/messages Rate Limit Group: Medium App Permission: SMS

      Throws:
      RestException
      IOException
    • content

      public Index content()
    • content

      public Index content(String attachmentId)