Twilio.Conversations.V1.Conversation.MessageService (twilio_elixir v0.1.1)

Copy Markdown View Source

A Message resource represents a message in a conversation.

Operations: list, create, fetch, update, delete

Summary

Functions

Add a new message to the conversation

Remove a message from the conversation

Fetch a message from the conversation

Retrieve a list of all messages in the conversation

Stream: Retrieve a list of all messages in the conversation (lazy auto-pagination).

Update an existing message in the conversation

Functions

create(client, conversation_sid, params \\ %{}, opts \\ [])

@spec create(Twilio.Client.t(), String.t(), map(), keyword()) ::
  {:ok, Twilio.Resources.Conversations.V1.Conversation.Message.t()}
  | {:ok, map(), map()}
  | :ok
  | {:error, Twilio.Error.t()}

Add a new message to the conversation

Operation: CreateConversationMessage | Tags: ConversationsV1Message

Optional Parameters

ParameterTypeDescription

credo:disable-for-next-line Credo.Check.Readability.MaxLineLength

AttributesstringA string metadata field you can use to store any data you wish. The string value must contain structurally valid JSON if specified. Note that if the attributes are not set "{}" will be returned.
AuthorstringThe channel specific identifier of the message's author. Defaults to system.
BodystringThe content of the message, can be up to 1,600 characters long.

credo:disable-for-next-line Credo.Check.Readability.MaxLineLength

| ContentSid | string | The unique ID of the multi-channel Rich Content template, required for template-generated messages. Note that if this field is set, Body and MediaSid parameters are ignored. |

credo:disable-for-next-line Credo.Check.Readability.MaxLineLength

ContentVariablesstringA structurally valid JSON string that contains values to resolve Rich Content template variables.
DateCreatedstring (date-time)The date that this resource was created.

credo:disable-for-next-line Credo.Check.Readability.MaxLineLength

DateUpdatedstring (date-time)The date that this resource was last updated. null if the message has not been edited.
MediaSidstringThe Media SID to be attached to the new Message.
SubjectstringThe subject of the message, can be up to 256 characters long.

delete(client, conversation_sid, sid, opts \\ [])

@spec delete(Twilio.Client.t(), String.t(), String.t(), keyword()) ::
  {:ok, map()} | {:ok, map(), map()} | :ok | {:error, Twilio.Error.t()}

Remove a message from the conversation

Operation: DeleteConversationMessage | Tags: ConversationsV1Message

fetch(client, conversation_sid, sid, opts \\ [])

@spec fetch(Twilio.Client.t(), String.t(), String.t(), keyword()) ::
  {:ok, Twilio.Resources.Conversations.V1.Conversation.Message.t()}
  | {:ok, map(), map()}
  | :ok
  | {:error, Twilio.Error.t()}

Fetch a message from the conversation

Operation: FetchConversationMessage | Tags: ConversationsV1Message

list(client, conversation_sid, params \\ %{}, opts \\ [])

@spec list(Twilio.Client.t(), String.t(), map(), keyword()) ::
  {:ok, Twilio.Page.t()}
  | {:ok, map(), map()}
  | :ok
  | {:error, Twilio.Error.t()}

Retrieve a list of all messages in the conversation

Operation: ListConversationMessage | Tags: ConversationsV1Message

Query Parameters

ParameterTypeDescription

credo:disable-for-next-line Credo.Check.Readability.MaxLineLength

| Order | string | The sort order of the returned messages. Can be: asc (ascending) or desc (descending), with asc as the default. |

stream(client, conversation_sid, params \\ %{}, opts \\ [])

@spec stream(Twilio.Client.t(), String.t(), map(), keyword()) :: Enumerable.t()

Stream: Retrieve a list of all messages in the conversation (lazy auto-pagination).

update(client, conversation_sid, sid, params \\ %{}, opts \\ [])

@spec update(Twilio.Client.t(), String.t(), String.t(), map(), keyword()) ::
  {:ok, Twilio.Resources.Conversations.V1.Conversation.Message.t()}
  | {:ok, map(), map()}
  | :ok
  | {:error, Twilio.Error.t()}

Update an existing message in the conversation

Operation: UpdateConversationMessage | Tags: ConversationsV1Message

Optional Parameters

ParameterTypeDescription

credo:disable-for-next-line Credo.Check.Readability.MaxLineLength

AttributesstringA string metadata field you can use to store any data you wish. The string value must contain structurally valid JSON if specified. Note that if the attributes are not set "{}" will be returned.
AuthorstringThe channel specific identifier of the message's author. Defaults to system.
BodystringThe content of the message, can be up to 1,600 characters long.
DateCreatedstring (date-time)The date that this resource was created.

credo:disable-for-next-line Credo.Check.Readability.MaxLineLength

DateUpdatedstring (date-time)The date that this resource was last updated. null if the message has not been edited.
SubjectstringThe subject of the message, can be up to 256 characters long.