Skip to main content

SendX REST API

Project description

SendX Python SDK

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.

Requirements.

Python 3.7+

Installation & Usage

pip install

If the python package is hosted on a repository, you can install directly using:

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:

import sendx_python_sdk

Setuptools

Install via Setuptools.

python setup.py install --user

(or sudo python setup.py install to install the package for all users)

Then import the package:

import sendx_python_sdk

Getting Started

Please follow the installation procedure and then run the following:

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 POST /campaign Create Campaign
CampaignApi delete_campaign DELETE /campaign/{campaignId} Delete Campaign
CampaignApi edit_campaign PUT /campaign/{campaignId} Edit Campaign
CampaignApi get_all_campaigns GET /campaign Get All Campaigns
CampaignApi get_campaign_by_id GET /campaign/{campaignId} Get Campaign By Id
ContactApi create_contact POST /contact Create a contact
ContactApi delete_contact DELETE /contact/{contactId} Delete Contact
ContactApi get_all_contacts GET /contact Get All Contacts
ContactApi get_contact_by_id GET /contact/{contactId} Get Contact by ID
ContactApi unsubscribe_contact PUT /contact/unsubscribe/{contactId} Unsubscribe Contact
ContactApi update_contact PUT /contact/{contactId} Update Contact
ListApi create_list POST /list Create List
ListApi delete_list DELETE /list/{listId} Delete List
ListApi get_all_lists GET /list Get All Lists
ListApi get_list_by_id GET /list/{listId} Get List
ListApi update_list PUT /list/{listId} Update List
ReportsApi get_campaign_report GET /report/campaign/{campaignId} Get CampaignReport Data
SenderApi create_sender POST /sender Create Sender
SenderApi get_all_senders GET /sender Get All Senders
TagsApi create_tag POST /tag Create a Tag
TagsApi delete_tag DELETE /tag/{tagId} Delete a Tag
TagsApi get_all_tags GET /tag Get All Tags
TagsApi get_tag_by_id GET /tag/{tagId} Get a Tag by ID
TagsApi update_tag PUT /tag/{tagId} Update a Tag

Documentation For Models

Documentation For Authorization

Authentication schemes defined for the API:

apiKeyAuth

  • Type: API key
  • API key parameter name: X-Team-ApiKey
  • Location: HTTP header

Author

support@sendx.io

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sendx-1.0.2.tar.gz (42.0 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

sendx-1.0.2-py3-none-any.whl (341.0 kB view details)

Uploaded Python 3

SendX-1.0.2-py3-none-any.whl (78.5 kB view details)

Uploaded Python 3

File details

Details for the file sendx-1.0.2.tar.gz.

File metadata

  • Download URL: sendx-1.0.2.tar.gz
  • Upload date:
  • Size: 42.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.20

File hashes

Hashes for sendx-1.0.2.tar.gz
Algorithm Hash digest
SHA256 3a32d451010bbc9863709bcebc1067354ac2c919625b25ea1c22eb42a1932d09
MD5 a9f0d1efa559ab6d086590ab45845de2
BLAKE2b-256 231108c82dc087d05635767eb60c4ffde39d51b4c0c098e7d17e2f4d0cb3311c

See more details on using hashes here.

File details

Details for the file sendx-1.0.2-py3-none-any.whl.

File metadata

  • Download URL: sendx-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 341.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.23

File hashes

Hashes for sendx-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 bcbbaf84b6a6a0b5f4d69c5db5171904b2ec93292e92e5de57d0045b9b5bab71
MD5 5e15ff9f0fffc9c4a2c948233a8f7ed3
BLAKE2b-256 157f59a740a91ac36a35a69739d20b599b938fe98f7348cee3356c1eba0df5a4

See more details on using hashes here.

File details

Details for the file SendX-1.0.2-py3-none-any.whl.

File metadata

  • Download URL: SendX-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 78.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.20

File hashes

Hashes for SendX-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 894f61b9f8805db464cd1a27dacca5e0e0f868190f073fb8840014f7ad6b4be9
MD5 ca9fb81a146d602b72bc2ef790223815
BLAKE2b-256 60e23bf40171f28c518424acc4c84dc29ed84d4c9cafd292cb4a257083d64d2d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page