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.3.tar.gz (42.1 kB view details)

Uploaded Source

Built Distribution

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

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: sendx-1.0.3.tar.gz
  • Upload date:
  • Size: 42.1 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.3.tar.gz
Algorithm Hash digest
SHA256 a09165c13e0cdefc1a030057c72d7c6a65c4e9962413f0c6122380e569fba4ec
MD5 0acee31a93a5d3de7105456dce5dc9b1
BLAKE2b-256 14cccc8bcfc99fe686ef2dbf7f32129cc94ad082080854aed4752622c6233105

See more details on using hashes here.

File details

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

File metadata

  • Download URL: SendX-1.0.3-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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 d3de530d6bc5efa8f0a222c57e5302d0228902d8dca46bf83e123c9b61325fee
MD5 c60e5629173f880e3f1681fdeb5f147b
BLAKE2b-256 e583b0a4c8071a373ff8322ded1723daf2364493c94e9f90585ee130aea639d0

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