# [SendX Python SDK](https://pypi.org/project/SendX/)
## Introduction
SendX is an email marketing product. It helps you convert website visitors to customers, send them promotional emails, engage with them using drip sequences and craft custom journeys using powerful but simple automations.
The SendX API is organized around REST. Our API has predictable resource-oriented URLs, accepts form-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.
The SendX Rest API doesn’t support bulk updates. You can work on only one object per request. <br>
## Requirements.
Python 3.7+
## Installation & Usage
### pip install
If the python package is hosted on a repository, you can install directly using:
```sh
pip install sendx
```
(you may need to run `pip` with root permission: `sudo pip install git+https://github.com/sendx/sendx-python-sdk.git`)
Then import the package:
```python
import sendx_python_sdk
```
### Setuptools
Install via [Setuptools](http://pypi.python.org/pypi/setuptools).
```sh
python setup.py install --user
```
(or `sudo python setup.py install` to install the package for all users)
Then import the package:
```python
import sendx_python_sdk
```
## Getting Started
Please follow the [installation procedure](#installation--usage) and then run the following:
```python
import sendx_python_sdk
from sendx_python_sdk.models.contact_request import ContactRequest
from sendx_python_sdk.models.response import Response
from sendx_python_sdk.rest import ApiException
from pprint import pprint
configuration = sendx_python_sdk.Configuration()
# Configure API key authorization: apiKeyAuth
configuration.api_key['apiKeyAuth'] = os.environ["API_KEY"]
# Enter a context with an instance of the API client
with sendx_python_sdk.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = sendx_python_sdk.ContactApi(api_client)
contact_request = sendx_python_sdk.ContactRequest() # ContactRequest |
contact_request.email = "johndoe@sendx.io"
contact_request.first_name = "John"
contact_request.last_name = "Doe"
contact_request.company = "SendX"
contact_request.tags = ["12nb32nk43k2", "34njnk42bkj3"]
contact_request.custom_fields = {"1434nfk324kn4d": "VIP", "34njnk42bkj3": "Gold"}
contact_request.last_tracked_ip = "34.212.42.122"
try:
# Create a contact
api_response = api_instance.create_contact(contact_request)
print("The response of ContactApi->create_contact:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling ContactApi->create_contact: %s\n" % e)
```
## Documentation for API Endpoints
All URIs are relative to *https://api.sendx.io/api/v1/rest*
Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
*CampaignApi* | [**create_campaign**](docs/CampaignApi.md#create_campaign) | **POST** /campaign | Create Campaign
*CampaignApi* | [**delete_campaign**](docs/CampaignApi.md#delete_campaign) | **DELETE** /campaign/{campaignId} | Delete Campaign
*CampaignApi* | [**edit_campaign**](docs/CampaignApi.md#edit_campaign) | **PUT** /campaign/{campaignId} | Edit Campaign
*CampaignApi* | [**get_all_campaigns**](docs/CampaignApi.md#get_all_campaigns) | **GET** /campaign | Get All Campaigns
*CampaignApi* | [**get_campaign_by_id**](docs/CampaignApi.md#get_campaign_by_id) | **GET** /campaign/{campaignId} | Get Campaign By Id
*ContactApi* | [**create_contact**](docs/ContactApi.md#create_contact) | **POST** /contact | Create a contact
*ContactApi* | [**delete_contact**](docs/ContactApi.md#delete_contact) | **DELETE** /contact/{identifier} | Delete Contact
*ContactApi* | [**get_all_contacts**](docs/ContactApi.md#get_all_contacts) | **GET** /contact | Get All Contacts
*ContactApi* | [**get_contact_by_id**](docs/ContactApi.md#get_contact_by_id) | **GET** /contact/{identifier} | Get Contact by Identifier
*ContactApi* | [**unsubscribe_contact**](docs/ContactApi.md#unsubscribe_contact) | **POST** /contact/unsubscribe/{identifier} | Unsubscribe Contact
*ContactApi* | [**update_contact**](docs/ContactApi.md#update_contact) | **PUT** /contact/{identifier} | Update Contact
*EventApi* | [**create_revenue_event**](docs/EventApi.md#create_revenue_event) | **POST** /events/revenue | Record a revenue event for a specific contact
*EventApi* | [**push_custom_event**](docs/EventApi.md#push_custom_event) | **POST** /events/custom | Push a custom event associated with a contact
*GettingStartedApi* | [**identify_contact**](docs/GettingStartedApi.md#identify_contact) | **POST** /contact/identify | Identify contact
*GettingStartedApi* | [**tracking_contact**](docs/GettingStartedApi.md#tracking_contact) | **POST** /contact/track | Add Tracking info
*ListApi* | [**create_list**](docs/ListApi.md#create_list) | **POST** /list | Create List
*ListApi* | [**delete_list**](docs/ListApi.md#delete_list) | **DELETE** /list/{listId} | Delete List
*ListApi* | [**get_all_lists**](docs/ListApi.md#get_all_lists) | **GET** /list | Get All Lists
*ListApi* | [**get_list_by_id**](docs/ListApi.md#get_list_by_id) | **GET** /list/{listId} | Get List
*ListApi* | [**update_list**](docs/ListApi.md#update_list) | **PUT** /list/{listId} | Update List
*ReportsApi* | [**get_campaign_report**](docs/ReportsApi.md#get_campaign_report) | **GET** /report/campaign/{campaignId} | Get CampaignReport Data
*SenderApi* | [**create_sender**](docs/SenderApi.md#create_sender) | **POST** /sender | Create Sender
*SenderApi* | [**get_all_senders**](docs/SenderApi.md#get_all_senders) | **GET** /sender | Get All Senders
*TagsApi* | [**create_tag**](docs/TagsApi.md#create_tag) | **POST** /tag | Create a Tag
*TagsApi* | [**delete_tag**](docs/TagsApi.md#delete_tag) | **DELETE** /tag/{tagId} | Delete a Tag
*TagsApi* | [**get_all_tags**](docs/TagsApi.md#get_all_tags) | **GET** /tag | Get All Tags
*TagsApi* | [**get_tag_by_id**](docs/TagsApi.md#get_tag_by_id) | **GET** /tag/{tagId} | Get a Tag by ID
*TagsApi* | [**update_tag**](docs/TagsApi.md#update_tag) | **PUT** /tag/{tagId} | Update a Tag
## Documentation For Models
- [Campaign](docs/Campaign.md)
- [CampaignDashboardData](docs/CampaignDashboardData.md)
- [CampaignRequest](docs/CampaignRequest.md)
- [Contact](docs/Contact.md)
- [ContactRequest](docs/ContactRequest.md)
- [CreateResponse](docs/CreateResponse.md)
- [CustomEventRequest](docs/CustomEventRequest.md)
- [DashboardStats](docs/DashboardStats.md)
- [DeleteCampaign200Response](docs/DeleteCampaign200Response.md)
- [DeleteRequest](docs/DeleteRequest.md)
- [DeleteResponse](docs/DeleteResponse.md)
- [EventResponse](docs/EventResponse.md)
- [IdentifyRequest](docs/IdentifyRequest.md)
- [IdentifyResponse](docs/IdentifyResponse.md)
- [LastSentCampaignStat](docs/LastSentCampaignStat.md)
- [ListModel](docs/ListModel.md)
- [ListRequest](docs/ListRequest.md)
- [ReportData](docs/ReportData.md)
- [Response](docs/Response.md)
- [RevenueEventRequest](docs/RevenueEventRequest.md)
- [Sender](docs/Sender.md)
- [SenderRequest](docs/SenderRequest.md)
- [SenderResponse](docs/SenderResponse.md)
- [Tag](docs/Tag.md)
- [TagRequest](docs/TagRequest.md)
- [TrackRequest](docs/TrackRequest.md)
- [TrackResponse](docs/TrackResponse.md)
<a id="documentation-for-authorization"></a>
## Documentation For Authorization
Authentication schemes defined for the API:
<a id="apiKeyAuth"></a>
### apiKeyAuth
- **Type**: API key
- **API key parameter name**: X-Team-ApiKey
- **Location**: HTTP header
## Author
support@sendx.io
Raw data
{
"_id": null,
"home_page": null,
"name": "SendX",
"maintainer": null,
"docs_url": null,
"requires_python": null,
"maintainer_email": null,
"keywords": "SendX, email marketing, SendX REST API, email, marketing",
"author": "SendX Dev Team",
"author_email": "support@sendx.io",
"download_url": "https://files.pythonhosted.org/packages/72/13/579eacf59ac455d24c31e6137a02b827cf2a480ce60d5e47d359c3df41b6/sendx-1.1.0.tar.gz",
"platform": null,
"description": "# [SendX Python SDK](https://pypi.org/project/SendX/)\n## Introduction\n\nSendX is an email marketing product. It helps you convert website visitors to customers, send them promotional emails, engage with them using drip sequences and craft custom journeys using powerful but simple automations.\n\nThe SendX API is organized around REST. Our API has predictable resource-oriented URLs, accepts form-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.\nThe SendX Rest API doesn\u2019t support bulk updates. You can work on only one object per request. <br>\n\n\n\n## Requirements.\n\nPython 3.7+\n\n## Installation & Usage\n### pip install\n\nIf the python package is hosted on a repository, you can install directly using:\n\n```sh\npip install sendx\n```\n\n(you may need to run `pip` with root permission: `sudo pip install git+https://github.com/sendx/sendx-python-sdk.git`)\n\nThen import the package:\n```python\nimport sendx_python_sdk\n```\n\n### Setuptools\n\nInstall via [Setuptools](http://pypi.python.org/pypi/setuptools).\n\n```sh\npython setup.py install --user\n```\n(or `sudo python setup.py install` to install the package for all users)\n\nThen import the package:\n```python\nimport sendx_python_sdk\n```\n\n\n## Getting Started\n\nPlease follow the [installation procedure](#installation--usage) and then run the following:\n\n```python\n\nimport sendx_python_sdk\nfrom sendx_python_sdk.models.contact_request import ContactRequest\nfrom sendx_python_sdk.models.response import Response\nfrom sendx_python_sdk.rest import ApiException\nfrom pprint import pprint\n\n\nconfiguration = sendx_python_sdk.Configuration()\n\n# Configure API key authorization: apiKeyAuth\nconfiguration.api_key['apiKeyAuth'] = os.environ[\"API_KEY\"]\n\n# Enter a context with an instance of the API client\nwith sendx_python_sdk.ApiClient(configuration) as api_client:\n # Create an instance of the API class\n api_instance = sendx_python_sdk.ContactApi(api_client)\n contact_request = sendx_python_sdk.ContactRequest() # ContactRequest | \n contact_request.email = \"johndoe@sendx.io\"\n contact_request.first_name = \"John\"\n contact_request.last_name = \"Doe\"\n contact_request.company = \"SendX\"\n contact_request.tags = [\"12nb32nk43k2\", \"34njnk42bkj3\"]\n contact_request.custom_fields = {\"1434nfk324kn4d\": \"VIP\", \"34njnk42bkj3\": \"Gold\"}\n contact_request.last_tracked_ip = \"34.212.42.122\"\n\n try:\n # Create a contact\n api_response = api_instance.create_contact(contact_request)\n print(\"The response of ContactApi->create_contact:\\n\")\n pprint(api_response)\n except Exception as e:\n print(\"Exception when calling ContactApi->create_contact: %s\\n\" % e)\n\n```\n\n## Documentation for API Endpoints\n\nAll URIs are relative to *https://api.sendx.io/api/v1/rest*\n\nClass | Method | HTTP request | Description\n------------ | ------------- | ------------- | -------------\n*CampaignApi* | [**create_campaign**](docs/CampaignApi.md#create_campaign) | **POST** /campaign | Create Campaign\n*CampaignApi* | [**delete_campaign**](docs/CampaignApi.md#delete_campaign) | **DELETE** /campaign/{campaignId} | Delete Campaign\n*CampaignApi* | [**edit_campaign**](docs/CampaignApi.md#edit_campaign) | **PUT** /campaign/{campaignId} | Edit Campaign\n*CampaignApi* | [**get_all_campaigns**](docs/CampaignApi.md#get_all_campaigns) | **GET** /campaign | Get All Campaigns\n*CampaignApi* | [**get_campaign_by_id**](docs/CampaignApi.md#get_campaign_by_id) | **GET** /campaign/{campaignId} | Get Campaign By Id\n*ContactApi* | [**create_contact**](docs/ContactApi.md#create_contact) | **POST** /contact | Create a contact\n*ContactApi* | [**delete_contact**](docs/ContactApi.md#delete_contact) | **DELETE** /contact/{identifier} | Delete Contact\n*ContactApi* | [**get_all_contacts**](docs/ContactApi.md#get_all_contacts) | **GET** /contact | Get All Contacts\n*ContactApi* | [**get_contact_by_id**](docs/ContactApi.md#get_contact_by_id) | **GET** /contact/{identifier} | Get Contact by Identifier\n*ContactApi* | [**unsubscribe_contact**](docs/ContactApi.md#unsubscribe_contact) | **POST** /contact/unsubscribe/{identifier} | Unsubscribe Contact\n*ContactApi* | [**update_contact**](docs/ContactApi.md#update_contact) | **PUT** /contact/{identifier} | Update Contact\n*EventApi* | [**create_revenue_event**](docs/EventApi.md#create_revenue_event) | **POST** /events/revenue | Record a revenue event for a specific contact\n*EventApi* | [**push_custom_event**](docs/EventApi.md#push_custom_event) | **POST** /events/custom | Push a custom event associated with a contact\n*GettingStartedApi* | [**identify_contact**](docs/GettingStartedApi.md#identify_contact) | **POST** /contact/identify | Identify contact\n*GettingStartedApi* | [**tracking_contact**](docs/GettingStartedApi.md#tracking_contact) | **POST** /contact/track | Add Tracking info\n*ListApi* | [**create_list**](docs/ListApi.md#create_list) | **POST** /list | Create List\n*ListApi* | [**delete_list**](docs/ListApi.md#delete_list) | **DELETE** /list/{listId} | Delete List\n*ListApi* | [**get_all_lists**](docs/ListApi.md#get_all_lists) | **GET** /list | Get All Lists\n*ListApi* | [**get_list_by_id**](docs/ListApi.md#get_list_by_id) | **GET** /list/{listId} | Get List\n*ListApi* | [**update_list**](docs/ListApi.md#update_list) | **PUT** /list/{listId} | Update List\n*ReportsApi* | [**get_campaign_report**](docs/ReportsApi.md#get_campaign_report) | **GET** /report/campaign/{campaignId} | Get CampaignReport Data\n*SenderApi* | [**create_sender**](docs/SenderApi.md#create_sender) | **POST** /sender | Create Sender\n*SenderApi* | [**get_all_senders**](docs/SenderApi.md#get_all_senders) | **GET** /sender | Get All Senders\n*TagsApi* | [**create_tag**](docs/TagsApi.md#create_tag) | **POST** /tag | Create a Tag\n*TagsApi* | [**delete_tag**](docs/TagsApi.md#delete_tag) | **DELETE** /tag/{tagId} | Delete a Tag\n*TagsApi* | [**get_all_tags**](docs/TagsApi.md#get_all_tags) | **GET** /tag | Get All Tags\n*TagsApi* | [**get_tag_by_id**](docs/TagsApi.md#get_tag_by_id) | **GET** /tag/{tagId} | Get a Tag by ID\n*TagsApi* | [**update_tag**](docs/TagsApi.md#update_tag) | **PUT** /tag/{tagId} | Update a Tag\n\n\n## Documentation For Models\n\n - [Campaign](docs/Campaign.md)\n - [CampaignDashboardData](docs/CampaignDashboardData.md)\n - [CampaignRequest](docs/CampaignRequest.md)\n - [Contact](docs/Contact.md)\n - [ContactRequest](docs/ContactRequest.md)\n - [CreateResponse](docs/CreateResponse.md)\n - [CustomEventRequest](docs/CustomEventRequest.md)\n - [DashboardStats](docs/DashboardStats.md)\n - [DeleteCampaign200Response](docs/DeleteCampaign200Response.md)\n - [DeleteRequest](docs/DeleteRequest.md)\n - [DeleteResponse](docs/DeleteResponse.md)\n - [EventResponse](docs/EventResponse.md)\n - [IdentifyRequest](docs/IdentifyRequest.md)\n - [IdentifyResponse](docs/IdentifyResponse.md)\n - [LastSentCampaignStat](docs/LastSentCampaignStat.md)\n - [ListModel](docs/ListModel.md)\n - [ListRequest](docs/ListRequest.md)\n - [ReportData](docs/ReportData.md)\n - [Response](docs/Response.md)\n - [RevenueEventRequest](docs/RevenueEventRequest.md)\n - [Sender](docs/Sender.md)\n - [SenderRequest](docs/SenderRequest.md)\n - [SenderResponse](docs/SenderResponse.md)\n - [Tag](docs/Tag.md)\n - [TagRequest](docs/TagRequest.md)\n - [TrackRequest](docs/TrackRequest.md)\n - [TrackResponse](docs/TrackResponse.md)\n\n\n<a id=\"documentation-for-authorization\"></a>\n## Documentation For Authorization\n\n\nAuthentication schemes defined for the API:\n<a id=\"apiKeyAuth\"></a>\n### apiKeyAuth\n\n- **Type**: API key\n- **API key parameter name**: X-Team-ApiKey\n- **Location**: HTTP header\n\n\n## Author\n\nsupport@sendx.io\n\n\n",
"bugtrack_url": null,
"license": null,
"summary": "SendX REST API",
"version": "1.1.0",
"project_urls": null,
"split_keywords": [
"sendx",
" email marketing",
" sendx rest api",
" email",
" marketing"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "f1fdeffa6026f708258daab72962af493b31f9020b659b6fac3e1fdf24062207",
"md5": "99013b845cae9120a7fce1217d32cf5d",
"sha256": "519c927a1fd7306b0ece97d96a17a7ff4779f81283537c43ca6e7beddae6324e"
},
"downloads": -1,
"filename": "SendX-1.1.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "99013b845cae9120a7fce1217d32cf5d",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 95642,
"upload_time": "2024-11-20T06:25:45",
"upload_time_iso_8601": "2024-11-20T06:25:45.859415Z",
"url": "https://files.pythonhosted.org/packages/f1/fd/effa6026f708258daab72962af493b31f9020b659b6fac3e1fdf24062207/SendX-1.1.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "7213579eacf59ac455d24c31e6137a02b827cf2a480ce60d5e47d359c3df41b6",
"md5": "c31ff82d1e2f6055ac630ecef16b590a",
"sha256": "53989965598f4975be43a7bd6abecb9e8ded706187cd6342c2e8774334daf13f"
},
"downloads": -1,
"filename": "sendx-1.1.0.tar.gz",
"has_sig": false,
"md5_digest": "c31ff82d1e2f6055ac630ecef16b590a",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 47272,
"upload_time": "2024-11-20T06:25:47",
"upload_time_iso_8601": "2024-11-20T06:25:47.613015Z",
"url": "https://files.pythonhosted.org/packages/72/13/579eacf59ac455d24c31e6137a02b827cf2a480ce60d5e47d359c3df41b6/sendx-1.1.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-11-20 06:25:47",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "sendx"
}