Search owned text messaging numbers.
Method | URI | Description |
---|---|---|
GET | /users/{user_id}/text_numbers |
Search user owned text numbers |
{
"data": [
{
"id": 1,
"owner_type": "users",
"owner_id": 1,
"provider": "Twilio",
"phone_number": "+1234567890",
"name": "Phone Number Name",
"description": null,
"reply_action": "Standard",
"reply_forward_to": null,
"reply_text": null,
"call_action": "Forward",
"call_forward_to": "1234567890",
"status": "Active",
"created_at": "2019-10-17T02:04:28Z",
"updated_at": "2019-10-17T02:04:59Z",
"deleted_at": null
}
],
"links": {
"first": "http://myauth.happygrasshopper.com/v3/users/77179/text_numbers?page=1",
"last": "http://myauth.happygrasshopper.com/v3/users/77179/text_numbers?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"path": "http://myauth.happygrasshopper.com/v3/users/77179/text_numbers",
"per_page": 15,
"to": 1,
"total": 1
}
}
Create a text message number.
Method | URI | Description |
---|---|---|
POST | /users/{user_id}/text_numbers |
Create a a text message number |
{
"provider": "Twilio",
"phone_number": "+1234567890",
"name": "Phone Number Name",
"description": null,
"reply_action": "Standard",
"reply_forward_to": null,
"reply_text": null,
"call_action": "Forward",
"call_forward_to": "1234567890"
}
{
"id": 1,
"owner_type": "users",
"owner_id": 1,
"provider": "Twilio",
"phone_number": "+1234567890",
"name": "Phone Number Name",
"description": null,
"reply_action": "Standard",
"reply_forward_to": null,
"reply_text": null,
"call_action": "Forward",
"call_forward_to": "1234567890",
"status": "Active",
"created_at": "2019-10-17T02:04:28Z",
"updated_at": "2019-10-17T02:04:59Z",
"deleted_at": null
}
Retrieve a text message number.
Method | URI | Description |
---|---|---|
GET | /text_numbers/{number_id} |
Retrieve a number by it's id |
{
"id": 1,
"owner_type": "users",
"owner_id": 1,
"provider": "Twilio",
"phone_number": "+1234567890",
"name": "Phone Number Name",
"description": null,
"reply_action": "Standard",
"reply_forward_to": null,
"reply_text": null,
"call_action": "Forward",
"call_forward_to": "1234567890",
"status": "Active",
"created_at": "2019-10-17T02:04:28Z",
"updated_at": "2019-10-17T02:04:59Z",
"deleted_at": null
}
Update a text messaging number.
Method | URI | Description |
---|---|---|
PUT | /text_numbers/{number_id} |
Update a number |
{
"name": "Phone Number Name",
"description": null,
"reply_action": "Standard",
"reply_forward_to": null,
"reply_text": null,
"call_action": "Forward",
"call_forward_to": "1234567890"
}
{
"id": 1,
"owner_type": "users",
"owner_id": 1,
"provider": "Twilio",
"phone_number": "+1234567890",
"name": "Phone Number Name",
"description": null,
"reply_action": "Standard",
"reply_forward_to": null,
"reply_text": null,
"call_action": "Forward",
"call_forward_to": "1234567890",
"status": "Active",
"created_at": "2019-10-17T02:04:28Z",
"updated_at": "2019-10-17T02:04:59Z",
"deleted_at": null
}
Delete a text message number.
Method | URI | Description |
---|---|---|
DELETE | /text_numbers/{number_id} |
Delete a number by it's id |
{
"success": true
}
Search owned text messaging channels.
Method | URI | Description |
---|---|---|
GET | /users/{user_id}/text_channels |
Search user owned text channels |
{
"data": [
{
"id": 1,
"owner_type": "users",
"owner_id": 1,
"text_number_id": 1,
"name": "Channel Name",
"subject": "Channel Subject",
"description": "Channel description",
"greeting_with_first_name": "Hi { {c.first_name} },",
"greeting_without_first_name": "Hi,",
"body": "Body of message",
"text": "Text representation of message body",
"status": "Saved",
"reason": null,
"send_type": null,
"send_at": null,
"sending_at": null,
"sent_at": null,
"recipients": [],
"exclusions": null,
"text_number": null,
"reporting": null,
"created_at": "2020-01-30T14:10:07Z",
"updated_at": "2020-01-30T14:10:07Z",
"deleted_at": null,
"unread_threads": 0
}
],
"links": {
"first": "http://myauth.happygrasshopper.com/v3/users/77179/text_channels?page=1",
"last": "http://myauth.happygrasshopper.com/v3/users/77179/text_channels?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"path": "http://myauth.happygrasshopper.com/v3/users/77179/text_channels",
"per_page": 15,
"to": 1,
"total": 1
}
}
Create a text message channel.
Method | URI | Description |
---|---|---|
POST | /users/{user_id}/text_channels |
Create a a text message channel |
{
"name": "Channel Name",
"subject": "Channel Subject",
"description": "Channel description",
"greeting_with_first_name": "Hi { {c.first_name} },",
"greeting_without_first_name": "Hi,",
"body": "Body of message",
"text": "Text representation of message body",
"status": "Saved",
"send_type": null,
"send_at": null,
"recipients": [],
"exclusions": null
}
{
"id": 1,
"owner_type": "users",
"owner_id": 1,
"text_number_id": 1,
"name": "Channel Name",
"subject": "Channel Subject",
"description": "Channel description",
"greeting_with_first_name": "Hi { {c.first_name} },",
"greeting_without_first_name": "Hi,",
"body": "Body of message",
"text": "Text representation of message body",
"status": "Saved",
"reason": null,
"send_type": null,
"send_at": null,
"sending_at": null,
"sent_at": null,
"recipients": [],
"exclusions": null,
"text_number": null,
"reporting": null,
"created_at": "2020-01-30T14:10:07Z",
"updated_at": "2020-01-30T14:10:07Z",
"deleted_at": null,
"unread_threads": 0
}
Retrieve a text message channel.
Method | URI | Description |
---|---|---|
GET | /text_channels/{channel_id} |
Retrieve a channel by it's id |
{
"id": 1,
"owner_type": "users",
"owner_id": 1,
"text_number_id": 1,
"name": "Channel Name",
"subject": "Channel Subject",
"description": "Channel description",
"greeting_with_first_name": "Hi { {c.first_name} },",
"greeting_without_first_name": "Hi,",
"body": "Body of message",
"text": "Text representation of message body",
"status": "Saved",
"reason": null,
"send_type": null,
"send_at": null,
"sending_at": null,
"sent_at": null,
"recipients": [],
"exclusions": null,
"text_number": null,
"reporting": null,
"created_at": "2020-01-30T14:10:07Z",
"updated_at": "2020-01-30T14:10:07Z",
"deleted_at": null,
"unread_threads": 0
}
Update a text messaging channel.
Method | URI | Description |
---|---|---|
PUT | /text_channels/{channel_id} |
Update a channel |
{
"name": "Channel Name",
"subject": "Channel Subject",
"description": "Channel description",
"greeting_with_first_name": "Hi { {c.first_name} },",
"greeting_without_first_name": "Hi,",
"body": "Body of message",
"text": "Text representation of message body",
"status": "Saved",
"send_type": null,
"send_at": null,
"recipients": [],
"exclusions": null
}
{
"id": 1,
"owner_type": "users",
"owner_id": 1,
"text_number_id": 1,
"name": "Channel Name",
"subject": "Channel Subject",
"description": "Channel description",
"greeting_with_first_name": "Hi { {c.first_name} },",
"greeting_without_first_name": "Hi,",
"body": "Body of message",
"text": "Text representation of message body",
"status": "Saved",
"reason": null,
"send_type": null,
"send_at": null,
"sending_at": null,
"sent_at": null,
"recipients": [],
"exclusions": null,
"text_number": null,
"reporting": null,
"created_at": "2020-01-30T14:10:07Z",
"updated_at": "2020-01-30T14:10:07Z",
"deleted_at": null,
"unread_threads": 0
}
Delete a text message channel.
Method | URI | Description |
---|---|---|
DELETE | /text_channels/{number_id} |
Delete a channel by it's id |
{
"success": true
}
Index threads inside a sent text messaging channel.
Method | URI | Description |
---|---|---|
GET | /text_channels/{channel_id}/threads |
Index threads inside sent channel |
{
"data": [
{
"id": 1,
"text_channel_id": 1,
"receiver_type": "contacts",
"receiver_id": 1,
"last_replied_at": "2019-11-28T16:53:49Z",
"last_read_at": null,
"is_unread": true
}
],
"links": {
"first": "http://myauth.happygrasshopper.com/v3/users/77179/text_numbers?page=1",
"last": "http://myauth.happygrasshopper.com/v3/users/77179/text_numbers?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"path": "http://myauth.happygrasshopper.com/v3/users/77179/text_numbers",
"per_page": 15,
"to": 1,
"total": 1
}
}
Index messages to a contact using a text messaging number.
Method | URI | Description |
---|---|---|
GET | /text_numbers/{number_id}/contacts/{contact_id} |
Index messages sent to a contact |
{
"data": [
{
"id": 1,
"text_channel_id": null,
"thread_id": null,
"sender_type": "users",
"sender_id": 1,
"sender_phone": "+1234567890",
"receiver_type": "contacts",
"receiver_id": 1,
"receiver_phone": "+1234567890",
"body": "Message body",
"status": "Delivered",
"reason": null,
"provider": "Twilio",
"provider_id": "someidentifier",
"created_at": "2019-11-15T22:50:15Z",
"updated_at": "2019-11-15T22:50:37Z",
"deleted_at": null
}
],
"links": {
"first": "http://myauth.happygrasshopper.com/v3/users/77179/text_numbers?page=1",
"last": "http://myauth.happygrasshopper.com/v3/users/77179/text_numbers?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"path": "http://myauth.happygrasshopper.com/v3/users/77179/text_numbers",
"per_page": 15,
"to": 1,
"total": 1
}
}
Send a message to a contact.
Method | URI | Description |
---|---|---|
POST | /text_numbers/{number_id}/contacts/{contact_id} |
Send a message to a specific contact |
{
"body": "Message body here ..."
}
{
"id": 1,
"text_channel_id": null,
"thread_id": null,
"sender_type": "users",
"sender_id": 1,
"sender_phone": "+1234567890",
"receiver_type": "contacts",
"receiver_id": 1,
"receiver_phone": "+1234567890",
"body": "Message body",
"status": "Delivered",
"reason": null,
"provider": "Twilio",
"provider_id": "someidentifier",
"created_at": "2019-11-15T22:50:15Z",
"updated_at": "2019-11-15T22:50:37Z",
"deleted_at": null
}