TextrequestClient
Attributes
TRIGGER_OPERATIONS
module-attribute
TRIGGER_OPERATIONS: Dict[str, Dict[str, Any]] = {'TextingWebhook': {'operation_id': 'TextingWebhook', 'path': '/{connectionId}/dashboards/{dashboard_id}/hooks', 'method': 'post', 'required_parameters': ['dashboard_id', 'body'], 'callback_payload_type': 'TextingWebhookResponse'}}
Classes
GetMessagesByContactPhoneResponse
dataclass
GetMessagesByContactPhoneResponse(meta: Optional[Dict[str, Any]] = None, items: Optional[List[Dict[str, Any]]] = None)
Response for Get a conversation's messages by a contact's phone number
Attributes
meta
class-attribute
instance-attribute
Metadata about the data returned by this request. This data is returned by all bulk GET requests.
SendMessageByPhoneNumberInput
dataclass
SendMessageByPhoneNumberInput(body: Optional[str] = None, sender_name: Optional[str] = None, status_callback: Optional[str] = None, location_callback: Optional[str] = None, mms_media: Optional[List[str]] = None)
Send a message to the contact with the given phone number
Attributes
sender_name
class-attribute
instance-attribute
The name of the message sender. This is shown in the TextRequest web app and api when retrieving this message.
status_callback
class-attribute
instance-attribute
Url for the web app to hit with a POST command whenever this message's status goes from undelivered to sent (or error).
location_callback
class-attribute
instance-attribute
Location callback url to hit with a POST command when the user accesses and approves sharing their location with the sender. To include the link, add [Location Request] to the message body. This callback is not required for location requests, but it can be useful for APIs.
SendMessageByPhoneNumberResponse
dataclass
SendMessageByPhoneNumberResponse(message_id: Optional[str] = None, body: Optional[str] = None, message_direction: Optional[str] = None, response_by_username: Optional[str] = None, message_timestamp_utc: Optional[str] = None, delivery_status: Optional[str] = None, delivery_error: Optional[str] = None, mms_media: Optional[List[str]] = None)
Response for Send a message to the contact with the given phone number
Attributes
message_id
class-attribute
instance-attribute
Id of the message. This value is unique for each message.
message_direction
class-attribute
instance-attribute
Singular character, either R or S, denoting whether this message was received from the contact or sent to them, respectively.
response_by_username
class-attribute
instance-attribute
Username of the Text Request user that last sent a message to this user.
message_timestamp_utc
class-attribute
instance-attribute
Timestamp of when the message was sent or received by Text Request.
delivery_status
class-attribute
instance-attribute
Current status of this message. This can be 'sending', 'delivered', 'error', or 'send'.
delivery_error
class-attribute
instance-attribute
Error that caused this message to not be delivered. If the delivery_status is not 'error', this value will be null.
GetContactByPhoneNumberResponse
dataclass
GetContactByPhoneNumberResponse(phone_number: Optional[str] = None, first_name: Optional[str] = None, last_name: Optional[str] = None, display_name: Optional[str] = None, is_suppressed: Optional[bool] = None, is_archived: Optional[bool] = None, is_blocked: Optional[bool] = None, suppressed_reason: Optional[str] = None, note: Optional[str] = None, groups: Optional[List[int]] = None, contact_tags: Optional[List[str]] = None, custom_fields: Optional[List[Dict[str, Any]]] = None, is_resolved: Optional[bool] = None, first_contact_utc: Optional[str] = None, opted_out_utc: Optional[str] = None, last_msg_sent_utc: Optional[str] = None, last_msg_received_utc: Optional[str] = None, total_msgs_sent: Optional[int] = None, total_msgs_received: Optional[int] = None, response_count: Optional[int] = None, date_created_utc: Optional[str] = None, last_contact_date_utc: Optional[str] = None, last_message: Optional[Dict[str, Any]] = None)
Response for Gets the contact with the specified phone number
Attributes
phone_number
class-attribute
instance-attribute
Phone number of this contact.
first_name
class-attribute
instance-attribute
First name of this contact.
last_name
class-attribute
instance-attribute
Last name of this contact.
display_name
class-attribute
instance-attribute
Full name of this contact. This is the default name displayed in the web app when viewing contacts.
is_suppressed
class-attribute
instance-attribute
Whether the conversation with this contact are suppressed, and therefore not pushed to the top of the message queue when received.
is_archived
class-attribute
instance-attribute
Whether the conversation with this contact are archived, and therefore cannot be seen when querying conversations (by default).
is_blocked
class-attribute
instance-attribute
Whether the conversation with this contact are blocked, and therefore not received or stored.
suppressed_reason
class-attribute
instance-attribute
Phrase describing the reason for suppressing contact. If is_suppressed is false, this will be null.
note
class-attribute
instance-attribute
Short phrase describing contact. Used for convenience. This is never shown to the contact.
groups
class-attribute
instance-attribute
Array of integer ids referring to groups this contact belongs to.
contact_tags
class-attribute
instance-attribute
Array of guids referring to tags attached to this contact.
custom_fields
class-attribute
instance-attribute
Array of custom field ids and values defined for this contact.
is_resolved
class-attribute
instance-attribute
Whether the conversation with this contact is resolved. Any new texts received by this contact will set this false.
first_contact_utc
class-attribute
instance-attribute
Timestamp of when the first message was sent to this contact.
opted_out_utc
class-attribute
instance-attribute
Timestamp of when this contact opted out to receiving messages.
last_msg_sent_utc
class-attribute
instance-attribute
Timestamp of when the last message was sent to this contact.
last_msg_received_utc
class-attribute
instance-attribute
Timestamp of when the last message was received from this contact.
total_msgs_sent
class-attribute
instance-attribute
The number of total messages sent to this contact.
total_msgs_received
class-attribute
instance-attribute
The number of total messages received from this contact.
response_count
class-attribute
instance-attribute
The total number of response messages from the contact.
date_created_utc
class-attribute
instance-attribute
The timestamp of when ths contact was created.
last_contact_date_utc
class-attribute
instance-attribute
The timestamp of when the last message was sent or received from this contact.
CreateContactInput
dataclass
CreateContactInput(first_name: Optional[str] = None, last_name: Optional[str] = None, display_name: Optional[str] = None, is_suppressed: Optional[bool] = None, is_archived: Optional[bool] = None, is_blocked: Optional[bool] = None, suppressed_reason: Optional[str] = None, note: Optional[str] = None, groups: Optional[List[int]] = None, contact_tags: Optional[List[str]] = None, custom_fields: Optional[List[Dict[str, Any]]] = None, is_resolved: Optional[bool] = None)
Create or update a contact
Attributes
first_name
class-attribute
instance-attribute
The new first name of the contact.
last_name
class-attribute
instance-attribute
The new last name of the contact.
display_name
class-attribute
instance-attribute
The new full name of the contact. This is the default name displayed in the web app when viewing contacts.
is_suppressed
class-attribute
instance-attribute
Determines whether conversations with this contact are suppressed, and therefore not pushed to the top of the message queue when received.
is_archived
class-attribute
instance-attribute
Determines whether conversations with this contact are archived, and therefore cannot be seen when querying conversations (by default).
is_blocked
class-attribute
instance-attribute
Determines whether conversations with this contact are blocked, and therefore not received or stored.
suppressed_reason
class-attribute
instance-attribute
Phrase describing the reason for suppressing contact.
note
class-attribute
instance-attribute
Short phrase describing contact. Used for convenience. This is never shown to the contact.
groups
class-attribute
instance-attribute
Array of integer ids referring to groups this contact will belong to.
contact_tags
class-attribute
instance-attribute
Array of guids referring to tags attached to this contact.
custom_fields
class-attribute
instance-attribute
Array of custom field ids and values defined for this contact.
CreateContactResponse
dataclass
CreateContactResponse(phone_number: Optional[str] = None, first_name: Optional[str] = None, last_name: Optional[str] = None, display_name: Optional[str] = None, is_suppressed: Optional[bool] = None, is_archived: Optional[bool] = None, is_blocked: Optional[bool] = None, suppressed_reason: Optional[str] = None, note: Optional[str] = None, groups: Optional[List[int]] = None, contact_tags: Optional[List[str]] = None, custom_fields: Optional[List[Dict[str, Any]]] = None, is_resolved: Optional[bool] = None, first_contact_utc: Optional[str] = None, opted_out_utc: Optional[str] = None, last_msg_sent_utc: Optional[str] = None, last_msg_received_utc: Optional[str] = None, total_msgs_sent: Optional[int] = None, total_msgs_received: Optional[int] = None, response_count: Optional[int] = None, date_created_utc: Optional[str] = None, last_contact_date_utc: Optional[str] = None, last_message: Optional[Dict[str, Any]] = None)
Response for Create or update a contact
Attributes
phone_number
class-attribute
instance-attribute
Phone number of this contact.
first_name
class-attribute
instance-attribute
First name of this contact.
last_name
class-attribute
instance-attribute
Last name of this contact.
display_name
class-attribute
instance-attribute
Full name of this contact. This is the default name displayed in the web app when viewing contacts.
is_suppressed
class-attribute
instance-attribute
Whether the conversation with this contact are suppressed, and therefore not pushed to the top of the message queue when received.
is_archived
class-attribute
instance-attribute
Whether the conversation with this contact are archived, and therefore cannot be seen when querying conversations (by default).
is_blocked
class-attribute
instance-attribute
Whether the conversation with this contact are blocked, and therefore not received or stored.
suppressed_reason
class-attribute
instance-attribute
Phrase describing the reason for suppressing contact. If is_suppressed is false, this will be null.
note
class-attribute
instance-attribute
Short phrase describing contact. Used for convenience. This is never shown to the contact.
groups
class-attribute
instance-attribute
Array of integer ids referring to groups this contact belongs to.
contact_tags
class-attribute
instance-attribute
Array of guids referring to tags attached to this contact.
custom_fields
class-attribute
instance-attribute
Array of custom field ids and values defined for this contact.
is_resolved
class-attribute
instance-attribute
Whether the conversation with this contact is resolved. Any new texts received by this contact will set this false.
first_contact_utc
class-attribute
instance-attribute
Timestamp of when the first message was sent to this contact.
opted_out_utc
class-attribute
instance-attribute
Timestamp of when this contact opted out to receiving messages.
last_msg_sent_utc
class-attribute
instance-attribute
Timestamp of when the last message was sent to this contact.
last_msg_received_utc
class-attribute
instance-attribute
Timestamp of when the last message was received from this contact.
total_msgs_sent
class-attribute
instance-attribute
The number of total messages sent to this contact.
total_msgs_received
class-attribute
instance-attribute
The number of total messages received from this contact.
response_count
class-attribute
instance-attribute
Total number of response messages from the contact.
date_created_utc
class-attribute
instance-attribute
Timestamp of when ths contact was created.
last_contact_date_utc
class-attribute
instance-attribute
Timestamp of when the last message was sent or received from this contact.
GetContactsResponse
dataclass
GetContactsResponse(meta: Optional[Dict[str, Any]] = None, items: Optional[List[Dict[str, Any]]] = None)
Response for Get all contacts that match the specified filtering criterion
Attributes
meta
class-attribute
instance-attribute
Metadata about the data returned by this request. This data is returned by all bulk GET requests.
GetGroupByIdResponse
dataclass
GetGroupByIdResponse(id: Optional[int] = None, group_member_count: Optional[int] = None, is_keyword: Optional[bool] = None, name: Optional[str] = None, notes: Optional[str] = None, last_message_sent_utc: Optional[str] = None)
Response for Get a group by its id
Attributes
group_member_count
class-attribute
instance-attribute
The number of members of the group.
is_keyword
class-attribute
instance-attribute
Wheter this group is a keyword group. Such groups are autogenerated when a user sets up a keyword. Contacts are automatically added when they enroll.
UpdateGroupInput
dataclass
UpdateGroupResponse
dataclass
UpdateGroupResponse(id: Optional[int] = None, group_member_count: Optional[int] = None, is_keyword: Optional[bool] = None, name: Optional[str] = None, notes: Optional[str] = None, last_message_sent_utc: Optional[str] = None)
Response for Updates a group with the given id
Attributes
group_member_count
class-attribute
instance-attribute
The number of members of the group.
is_keyword
class-attribute
instance-attribute
Wheter this group is a keyword group. Such groups are autogenerated when a user sets up a keyword. Contacts are automatically added when they enroll.
GetGroupsResponse
dataclass
GetGroupsResponse(meta: Optional[Dict[str, Any]] = None, items: Optional[List[Dict[str, Any]]] = None)
Response for Gets all groups
Attributes
meta
class-attribute
instance-attribute
Metadata about the data returned by this request. This data is returned by all bulk GET requests.
CreateGroupInput
dataclass
CreateGroupResponse
dataclass
CreateGroupResponse(id: Optional[int] = None, group_member_count: Optional[int] = None, is_keyword: Optional[bool] = None, name: Optional[str] = None, notes: Optional[str] = None, last_message_sent_utc: Optional[str] = None)
Response for Creates a new group
Attributes
group_member_count
class-attribute
instance-attribute
The number of members of the group.
is_keyword
class-attribute
instance-attribute
Wheter this group is a keyword group. Such groups are autogenerated when a user sets up a keyword. Contacts are automatically added when they enroll.
GetTagsResponse
dataclass
GetTagsResponse(meta: Optional[Dict[str, Any]] = None, items: Optional[List[Dict[str, Any]]] = None)
Response for Gets all tags
Attributes
meta
class-attribute
instance-attribute
Metadata about the data returned by this request. This data is returned by all bulk GET requests.
GetPaymentResponse
dataclass
GetPaymentResponse(payment_id: Optional[int] = None, request_date: Optional[str] = None, recipient: Optional[str] = None, description: Optional[str] = None, customer_phone: Optional[str] = None, amount_requested: Optional[float] = None, is_past_due: Optional[bool] = None, reminder_was_sent: Optional[bool] = None, transaction_status: Optional[str] = None, textrequest_payment_status: Optional[str] = None, reference_number: Optional[str] = None)
Response for Gets the payment with the specified id
Attributes
payment_id
class-attribute
instance-attribute
The numerical id of the payment.
request_date
class-attribute
instance-attribute
The timestamp of when this payment's initial message was queued to be sent.
recipient
class-attribute
instance-attribute
The name of the payment recipient. This may be null if the contact does not have a name associated with their phone number.
description
class-attribute
instance-attribute
The description of the payment. This is not shown to the contact. It is only used by internal users for context about payments.
customer_phone
class-attribute
instance-attribute
The phone number of the contact who is being sent this payment.
amount_requested
class-attribute
instance-attribute
The amount in dollars requested by this payment.
is_past_due
class-attribute
instance-attribute
Whether this payment is past the request date.
reminder_was_sent
class-attribute
instance-attribute
Whether a text reminder has already been sent for this payment.
transaction_status
class-attribute
instance-attribute
The status of the transaction in authvia. This value starts as Unknown.
textrequest_payment_status
class-attribute
instance-attribute
The status of the transaction in Text Request. This represents that status shown in the payments page on the Text Request app. It starts as Sent.
MarkPaymentPaidResponse
dataclass
MarkPaymentPaidResponse(payment_id: Optional[int] = None, request_date: Optional[str] = None, recipient: Optional[str] = None, description: Optional[str] = None, customer_phone: Optional[str] = None, amount_requested: Optional[float] = None, is_past_due: Optional[bool] = None, reminder_was_sent: Optional[bool] = None, transaction_status: Optional[str] = None, textrequest_payment_status: Optional[str] = None, reference_number: Optional[str] = None)
Response for Mark a payment as paid
Attributes
payment_id
class-attribute
instance-attribute
The numerical id of the payment.
request_date
class-attribute
instance-attribute
The timestamp of when this payment's initial message was queued to be sent.
recipient
class-attribute
instance-attribute
The name of the payment recipient. This may be null if the contact does not have a name associated with their phone number.
description
class-attribute
instance-attribute
The description of the payment. This is not shown to the contact. It is only used by internal users for context about payments.
customer_phone
class-attribute
instance-attribute
The phone number of the contact who is being sent this payment.
amount_requested
class-attribute
instance-attribute
The amount in dollars requested by this payment.
is_past_due
class-attribute
instance-attribute
Whether this payment is past the request date.
reminder_was_sent
class-attribute
instance-attribute
Whether a text reminder has already been sent for this payment.
transaction_status
class-attribute
instance-attribute
The status of the transaction in authvia. This value starts as Unknown.
textrequest_payment_status
class-attribute
instance-attribute
The status of the transaction in Text Request. This represents that status shown in the payments page on the Text Request app. It starts as Sent.
SendPaymentReminderResponse
dataclass
SendPaymentReminderResponse(payment_id: Optional[int] = None, request_date: Optional[str] = None, recipient: Optional[str] = None, description: Optional[str] = None, customer_phone: Optional[str] = None, amount_requested: Optional[float] = None, is_past_due: Optional[bool] = None, reminder_was_sent: Optional[bool] = None, transaction_status: Optional[str] = None, textrequest_payment_status: Optional[str] = None, reference_number: Optional[str] = None)
Response for Send a follow-up text reminding the user to pay the specified payment
Attributes
payment_id
class-attribute
instance-attribute
The numerical id of the payment.
request_date
class-attribute
instance-attribute
The timestamp of when this payment's initial message was queued to be sent.
recipient
class-attribute
instance-attribute
The name of the payment recipient. This may be null if the contact does not have a name associated with their phone number.
description
class-attribute
instance-attribute
The description of the payment. This is not shown to the contact. It is only used by internal users for context about payments.
customer_phone
class-attribute
instance-attribute
The phone number of the contact who is being sent this payment.
amount_requested
class-attribute
instance-attribute
The amount in dollars requested by this payment.
is_past_due
class-attribute
instance-attribute
Whether this payment is past the request date.
reminder_was_sent
class-attribute
instance-attribute
Whether a text reminder has already been sent for this payment.
transaction_status
class-attribute
instance-attribute
The status of the transaction in authvia. This value starts as Unknown.
textrequest_payment_status
class-attribute
instance-attribute
The status of the transaction in Text Request. This represents that status shown in the payments page on the Text Request app. It starts as Sent.
CancelPaymentResponse
dataclass
CancelPaymentResponse(payment_id: Optional[int] = None, request_date: Optional[str] = None, recipient: Optional[str] = None, description: Optional[str] = None, customer_phone: Optional[str] = None, amount_requested: Optional[float] = None, is_past_due: Optional[bool] = None, reminder_was_sent: Optional[bool] = None, transaction_status: Optional[str] = None, textrequest_payment_status: Optional[str] = None, reference_number: Optional[str] = None)
Response for Cancels the specified payment
Attributes
payment_id
class-attribute
instance-attribute
The numerical id of the payment.
request_date
class-attribute
instance-attribute
The timestamp of when this payment's initial message was queued to be sent.
recipient
class-attribute
instance-attribute
The name of the payment recipient. This may be null if the contact does not have a name associated with their phone number.
description
class-attribute
instance-attribute
The description of the payment. This is not shown to the contact. It is only used by internal users for context about payments.
customer_phone
class-attribute
instance-attribute
The phone number of the contact who is being sent this payment.
amount_requested
class-attribute
instance-attribute
The amount in dollars requested by this payment.
is_past_due
class-attribute
instance-attribute
Whether this payment is past the request date.
reminder_was_sent
class-attribute
instance-attribute
Whether a text reminder has already been sent for this payment.
transaction_status
class-attribute
instance-attribute
The status of the transaction in authvia. This value starts as Unknown.
textrequest_payment_status
class-attribute
instance-attribute
The status of the transaction in Text Request. This represents that status shown in the payments page on the Text Request app. It starts as Sent.
GetPaymentsResponse
dataclass
GetPaymentsResponse(meta: Optional[Dict[str, Any]] = None, items: Optional[List[Dict[str, Any]]] = None)
Response for Gets all payments
Attributes
meta
class-attribute
instance-attribute
Metadata about the data returned by this request. This data is returned by all bulk GET requests.
CreatePaymentInput
dataclass
CreatePaymentInput(description: Optional[str] = None, customer_phone: Optional[str] = None, amount_requested: Optional[float] = None, message: Optional[str] = None, reference_number: Optional[str] = None)
Creates a new payment
Attributes
description
class-attribute
instance-attribute
Description of the payment. Description is not shown to the contact and is only used by internal users for context about payments.
customer_phone
class-attribute
instance-attribute
Phone number of the contact this payment will be sent to.
amount_requested
class-attribute
instance-attribute
The amount in dollars requested by this payment.
message
class-attribute
instance-attribute
Message text to send to contact along with payment link.
CreatePaymentResponse
dataclass
CreatePaymentResponse(payment_id: Optional[int] = None, request_date: Optional[str] = None, recipient: Optional[str] = None, description: Optional[str] = None, customer_phone: Optional[str] = None, amount_requested: Optional[float] = None, is_past_due: Optional[bool] = None, reminder_was_sent: Optional[bool] = None, transaction_status: Optional[str] = None, textrequest_payment_status: Optional[str] = None, reference_number: Optional[str] = None)
Response for Creates a new payment
Attributes
payment_id
class-attribute
instance-attribute
The numerical id of the payment.
request_date
class-attribute
instance-attribute
The timestamp of when this payment's initial message was queued to be sent.
recipient
class-attribute
instance-attribute
The name of the payment recipient. This may be null if the contact does not have a name associated with their phone number.
description
class-attribute
instance-attribute
The description of the payment. This is not shown to the contact. It is only used by internal users for context about payments.
customer_phone
class-attribute
instance-attribute
The phone number of the contact who is being sent this payment.
amount_requested
class-attribute
instance-attribute
The amount in dollars requested by this payment.
is_past_due
class-attribute
instance-attribute
Whether this payment is past the request date.
reminder_was_sent
class-attribute
instance-attribute
Whether a text reminder has already been sent for this payment.
transaction_status
class-attribute
instance-attribute
The status of the transaction in authvia. This value starts as Unknown.
textrequest_payment_status
class-attribute
instance-attribute
The status of the transaction in Text Request. This represents that status shown in the payments page on the Text Request app. It starts as Sent.
GetDashboardResponse
dataclass
GetDashboardResponse(id: Optional[int] = None, name: Optional[str] = None, phone: Optional[str] = None)
Response for Get info on this specific dashboard
Attributes
UpdateDashboardsNameInput
dataclass
UpdateDashboardsNameResponse
dataclass
UpdateDashboardsNameResponse(id: Optional[int] = None, name: Optional[str] = None, phone: Optional[str] = None)
Response for Update a specific dashboard's name
Attributes
GetConversationsResponse
dataclass
GetConversationsResponse(meta: Optional[Dict[str, Any]] = None, items: Optional[List[Dict[str, Any]]] = None)
Response for Gets all conversations for this dashboard
Attributes
meta
class-attribute
instance-attribute
Metadata about the data returned by this request. This data is returned by all bulk GET requests.
GetDashboardsResponse
dataclass
GetDashboardsResponse(meta: Optional[Dict[str, Any]] = None, items: Optional[List[Dict[str, Any]]] = None)
Response for Get all dashboards in an account
Attributes
meta
class-attribute
instance-attribute
Metadata about the data returned by this request. This data is returned by all bulk GET requests.
CreateDashboardInput
dataclass
CreateDashboardResponse
dataclass
CreateDashboardResponse(id: Optional[int] = None, name: Optional[str] = None, phone: Optional[str] = None)
Response for Create a new dashboard with the given name and phone number
Attributes
TextingWebhookInput
dataclass
TextingWebhookInput(target_url: Optional[str] = None, event: Optional[str] = None, http_verb: Optional[str] = None)
Triggers when a text is sent or received
Attributes
target_url
class-attribute
instance-attribute
Url the webhook will redirect to
TextingWebhookResponse
dataclass
TextingWebhookResponse(id: Optional[int] = None, target_url: Optional[str] = None, event: Optional[str] = None)
Response for Triggers when a text is sent or received
Attributes
target_url
class-attribute
instance-attribute
The url the webhook will post to
TextrequestClient
TextrequestClient(connection_runtime_url: str, token_provider: Optional[TokenProvider] = None, options: Optional[ConnectorClientOptions] = None)
Bases: ConnectorClientBase
Typed client for textrequest connector.
Initialize a TextrequestClient.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
connection_runtime_url
|
str
|
The connection runtime URL from Azure Portal. |
required |
token_provider
|
Optional[TokenProvider]
|
Optional token provider. Defaults to ManagedIdentityTokenProvider. |
None
|
options
|
Optional[ConnectorClientOptions]
|
Optional connector client options. |
None
|
Methods:
get_messages_by_contact_phone_async
async
get_messages_by_contact_phone_async(dashboard_id: int, phone_number: str, page: int, page_size: int) -> dict[str, Any] | None
Get a conversation's messages by a contact's phone number
Get the conversation between the specified dashboard and phone number.
send_message_by_phone_number_async
async
send_message_by_phone_number_async(input: SendMessageByPhoneNumberInput, dashboard_id: int, phone_number: str) -> dict[str, Any] | None
Send a message to the contact with the given phone number
Sends a message (starting a new conversation if the given phone number has no message history).
archive_conversation_async
async
Archive a Conversation
Archives a conversation, removing it from the results of all conversation retrieval endpoints. A conversation will be automatically unarchived if the customer sends a text to your Text Request number, or if you send the customer a text from your Text Request number. Archiving conversations is a good way to remove clutter from customers you don't plan on talking to in the future. Note that if a customer texts in "STOP" to prevent you from sending them any further SMS messages, the conversation is automatically archived.
unarchive_conversation_async
async
Unarchive a Conversation
Unarchives a conversation. Once a conversation is unarchived, it will once again appear in the queue. it will also appear in conversations returned by the /conversations endpoint. If a conversation is already unarchived, this method has no effect.
get_contact_by_phone_number_async
async
Gets the contact with the specified phone number
Gets the contact with the specified phone number
delete_contact_async
async
Deletes the contact with the specified phone number
Deletes the contact with the specified phone number
create_contact_async
async
create_contact_async(input: CreateContactInput, dashboard_id: int, phone_number: str) -> dict[str, Any] | None
Create or update a contact
Creates or updates a contact (depending on whether one already exists with the given phone number).
get_contacts_async
async
get_contacts_async(dashboard_id: int, page: int, page_size: int, contact_phone_number: Optional[str] = None, last_message_timestamp_before_utc: Optional[str] = None, last_message_timestamp_after_utc: Optional[str] = None, contact_created_before: Optional[str] = None, contact_created_after: Optional[str] = None, is_resolved: Optional[bool] = None, is_blocked: Optional[bool] = None, is_archived: Optional[bool] = None, is_suppressed: Optional[bool] = None, has_opted_out: Optional[bool] = None, last_message_sent_before: Optional[str] = None, last_message_sent_after: Optional[str] = None, last_message_received_before: Optional[str] = None, last_message_received_after: Optional[str] = None, tags: Optional[str] = None, groups: Optional[str] = None, custom_field_id1: Optional[str] = None, custom_field_value1: Optional[str] = None, custom_field_id2: Optional[str] = None, custom_field_value2: Optional[str] = None, custom_field_id3: Optional[str] = None, custom_field_value3: Optional[str] = None) -> dict[str, Any] | None
Get all contacts that match the specified filtering criterion
Gets all contacts that match the specified filtering criterion. Only the dashboard specified will be searched; there is no account level search for a number available.
bulk_update_contacts_async
async
bulk_update_contacts_async(input: BulkUpdateContactsInput, dashboard_id: int) -> dict[str, Any] | None
Bulk update contacts
Only the dashboard specified will have contacts added; contacts are organized by dashboard, and there is no account level search for a number available.
get_group_by_id_async
async
Get a group by its id
Gets the group with the specified id.
delete_group_async
async
Deletes the group with the specified id
Deletes the group with the specified id. This will succeed even if there are contacts that are members of the group (the contacts will not be deleted).
update_group_async
async
update_group_async(input: UpdateGroupInput, dashboard_id: int, group_id: int) -> dict[str, Any] | None
Updates a group with the given id
Updates a group's name using the group's numerical id. If the passed in group id does not exist, the call will fail.
get_groups_async
async
Gets all groups
Gets all groups for the user's account.
create_group_async
async
Creates a new group
Creates a new group with the provided name.
get_tags_async
async
Gets all tags
Gets all the tags for this dashboard. Tags are unique between dashboards.
get_custom_fields_async
async
Gets all custom fields
Gets all custom fields for this dashboard. Custom fields are unique between dashboards.
get_payment_async
async
Gets the payment with the specified id
Gets the payment with the specified id.
mark_payment_paid_async
async
Mark a payment as paid
Closes a payment as "paid". Use this endpoint for when the payment is paid through a means other than the payment request portal. This will close the payment and add its payment amount to your statistics. This endpoint is not required for payments paid through the payments-portal sent through Text Request; that will automatically mark a payment as paid.
send_payment_reminder_async
async
Send a follow-up text reminding the user to pay the specified payment
Sends a reminder to the contact to pay the specified payment. The content of the message is auto-generated. To avoid spam, only one reminder can be sent per payment
cancel_payment_async
async
Cancels the specified payment
Cancels the specified payment, texting the user that the payment has been canceled. Payments cannot be edited, so canceling and issuing a new payment is the best way to correct a payment.
get_payments_async
async
get_payments_async(dashboard_id: int, page: int, page_size: int, reference_number: Optional[str] = None, phone_number: Optional[str] = None, sort_type: Optional[str] = None, sort_direction: Optional[str] = None) -> dict[str, Any] | None
Gets all payments
Gets all payments, including canceled and paid payments. These can be filtered using the query parameters.
create_payment_async
async
Creates a new payment
Creates a new payment with the provided message to the provided contact.
get_dashboard_async
async
Get info on this specific dashboard
Returns the name and phone of the dashboard.
delete_dashboard_async
async
Deletes the specified dashboard
Deletes the specified dashboard.
update_dashboards_name_async
async
update_dashboards_name_async(input: UpdateDashboardsNameInput, dashboard_id: int) -> dict[str, Any] | None
Update a specific dashboard's name
Updates a dashboard. This does not change a dashboard's phone number. If you want a new number with another dashboard's contacts, you will have to create a new dashboard with a POST and add the contacts with a bulk export/import.
get_conversations_async
async
get_conversations_async(dashboard_id: int, tags: Optional[str] = None, show_unresolved_only: Optional[str] = None, include_archived: Optional[str] = None, search: Optional[str] = None, page: Optional[int] = None, page_size: Optional[int] = None) -> dict[str, Any] | None
Gets all conversations for this dashboard
Gets all conversations for this dashboard, and includes info on the last message for each conversation.
get_dashboards_async
async
get_dashboards_async(page: Optional[int] = None, page_size: Optional[int] = None) -> dict[str, Any] | None
Get all dashboards in an account
Gets all dashboards in an account.
create_dashboard_async
async
Create a new dashboard with the given name and phone number
Creates a new dashboard in the account. Once the dashboard is created, admins will be emailed about the change and can begin assigning users. This endpoint can make a dashboard for any provisioned numbers. You can search for provisioned numbers in a specific area code using GET /dashboards/provisioning. If the phone number is already in use, a Bad Request exception will be thrown.