Twilio.Conversations.V1.ConversationService (twilio_elixir v0.1.1)

Copy Markdown View Source

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

A Conversation resource represents an omnichannel group conversation with an ordered list of messages and a participant roster.

Operations: list, create, fetch, update, delete

Summary

Functions

Create a new conversation in your account's default service

Remove a conversation from your account's default service

Fetch a conversation from your account's default service

Retrieve a list of conversations in your account's default service

Stream: Retrieve a list of conversations in your account's default service (lazy auto-pagination).

Update an existing conversation in your account's default service

Functions

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

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

Create a new conversation in your account's default service

Operation: CreateConversation | Tags: ConversationsV1Conversation

Optional Parameters

ParameterTypeDescription

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

| Attributes | string | An optional 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. |

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

| Bindings.Email.Address | string | The default email address that will be used when sending outbound emails in this conversation. |

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

Bindings.Email.NamestringThe default name that will be used when sending outbound emails in this conversation.
DateCreatedstring (date-time)The date that this resource was created.
DateUpdatedstring (date-time)The date that this resource was last updated.
FriendlyNamestringThe human-readable name of this conversation, limited to 256 characters. Optional.

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

MessagingServiceSidstringThe unique ID of the Messaging Service this conversation belongs to.
StatestringValues: initializing, inactive, active, closed

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

| Timers.Closed | string | ISO8601 duration when conversation will be switched to closed state. Minimum value for this timer is 10 minutes. |

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

| Timers.Inactive | string | ISO8601 duration when conversation will be switched to inactive state. Minimum value for this timer is 1 minute. |

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

| UniqueName | string | An application-defined string that uniquely identifies the resource. It can be used to address the resource in place of the resource's sid in the URL. |

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

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

Remove a conversation from your account's default service

Operation: DeleteConversation | Tags: ConversationsV1Conversation

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

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

Fetch a conversation from your account's default service

Operation: FetchConversation | Tags: ConversationsV1Conversation

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

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

Retrieve a list of conversations in your account's default service

Operation: ListConversation | Tags: ConversationsV1Conversation

Query Parameters

ParameterTypeDescription

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

| StartDate | string | Specifies the beginning of the date range for filtering Conversations based on their creation date. Conversations that were created on or after this date will be included in the results. The date must be in ISO8601 format, specifically starting at the beginning of the specified date (YYYY-MM-DDT00:00:00Z), for precise filtering. This parameter can be combined with other filters. If this filter is used, the returned list is sorted by latest conversation creation date in descending order. |

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

EndDatestringDefines the end of the date range for filtering conversations by their creation date. Only conversations that were created on or before this date will appear in the results. The date must be in ISO8601 format, specifically capturing up to the end of the specified date (YYYY-MM-DDT23:59:59Z), to ensure that conversations from the entire end day are included. This parameter can be combined with other filters. If this filter is used, the returned list is sorted by latest conversation creation date in descending order.
StatestringState for sorting and filtering list of Conversations. Can be active, inactive or closed

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

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

Stream: Retrieve a list of conversations in your account's default service (lazy auto-pagination).

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

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

Update an existing conversation in your account's default service

Operation: UpdateConversation | Tags: ConversationsV1Conversation

Optional Parameters

ParameterTypeDescription

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

| Attributes | string | An optional 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. |

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

| Bindings.Email.Address | string | The default email address that will be used when sending outbound emails in this conversation. |

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

Bindings.Email.NamestringThe default name that will be used when sending outbound emails in this conversation.
DateCreatedstring (date-time)The date that this resource was created.
DateUpdatedstring (date-time)The date that this resource was last updated.
FriendlyNamestringThe human-readable name of this conversation, limited to 256 characters. Optional.

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

MessagingServiceSidstringThe unique ID of the Messaging Service this conversation belongs to.
StatestringValues: initializing, inactive, active, closed

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

| Timers.Closed | string | ISO8601 duration when conversation will be switched to closed state. Minimum value for this timer is 10 minutes. |

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

| Timers.Inactive | string | ISO8601 duration when conversation will be switched to inactive state. Minimum value for this timer is 1 minute. |

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

| UniqueName | string | An application-defined string that uniquely identifies the resource. It can be used to address the resource in place of the resource's sid in the URL. |