Skip to main content

Segnivo Developer API

Project description

segnivo-python-sdk

API Version: 1.7

Date: 9th July, 2024

📄 Getting Started

This API is based on the REST API architecture, allowing the user to easily manage their data with this resource-based approach.

Every API call is established on which specific request type (GET, POST, PUT, DELETE) will be used.

The API must not be abused and should be used within acceptable limits.

To start using this API, you will need not create or access an existing Segnivo account to obtain your API key (retrievable from your account settings).

  • You must use a valid API Key to send requests to the API endpoints.

  • The API only responds to HTTPS-secured communications. Any requests sent via HTTP return an HTTP 301 redirect to the corresponding HTTPS resources.

  • The API returns request responses in JSON format. When an API request returns an error, it is sent in the JSON response as an error key or with details in the message key.

🔖 Need some help?

In case you have questions or need clarity with interacting with some endpoints feel free to create a support ticket on your account or you can send an email (developers@segnivo.com) directly and we would be happy to help.


Authentication

As noted earlier, this API uses API keys for authentication. You can generate a Segnivo API key in the API section of your account settings.

You must include an API key in each request to this API with the `X-API-KEY` request header.

Authentication error response

If an API key is missing, malformed, or invalid, you will receive an HTTP 401 Unauthorized response code.

Rate and usage limits

API access rate limits apply on a per-API endpoint basis in unit time. The limit is 10k requests per hour for most endpoints and 1m requests per hour for transactional/relay email-sending endpoints. Also, depending on your plan, you may have usage limits. If you exceed either limit, your request will return an HTTP 429 Too Many Requests status code or HTTP 403 if sending credits have been exhausted.

503 response

An HTTP `503` response from our servers may indicate there is an unexpected spike in API access traffic, while this rarely happens, we ensure the server is usually operational within the next two to five minutes. If the outage persists or you receive any other form of an HTTP `5XX` error, contact support (developers@segnivo.com).

Request headers

To make a successful request, some or all of the following headers must be passed with the request.

Header Description
Content-Type Required and should be `application/json` in most cases.
Accept Required and should be `application/json` in most cases
Content-Length Required for `POST`, `PATCH`, and `PUT` requests containing a request body. The value must be the number of bytes rather than the number of characters in the request body.
X-API-KEY Required. Specifies the API key used for authorization.
🔖 Note with example requests and code snippets

If/when you use the code snippets used as example requests, remember to calculate and add the `Content-Length` header. Some request libraries, frameworks, and tools automatically add this header for you while a few do not. Kindly check and ensure yours does or add it yourself.

This Python package is automatically generated by the OpenAPI Generator project:

  • API version: 1.0.0
  • Package version: 1.7.5
  • Generator version: 7.10.0
  • Build package: org.openapitools.codegen.languages.PythonClientCodegen

Requirements.

Python 3.8+

Installation & Usage

pip install

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

```sh pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git ``` (you may need to run `pip` with root permission: `sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git\`)

Then import the package: ```python import segnivo_sdk ```

Setuptools

Install via 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 segnivo_sdk ```

Tests

Execute `pytest` to run the tests.

Getting Started

Please follow the installation procedure and then run the following:

```python

import segnivo_sdk from segnivo_sdk.rest import ApiException from pprint import pprint

Defining the host is optional and defaults to https://api.segnivo.com/v1

See configuration.py for a list of all supported configuration parameters.

configuration = segnivo_sdk.Configuration( host = "https://api.segnivo.com/v1" )

The client must configure the authentication and authorization parameters

in accordance with the API server security policy.

Examples for each auth method are provided below, use the example that

satisfies your auth use case.

Configure API key authorization: apiKeyAuth

configuration.api_key['apiKeyAuth'] = os.environ["API_KEY"]

Uncomment below to setup prefix (e.g. Bearer) for API key, if needed

configuration.api_key_prefix['apiKeyAuth'] = 'Bearer'

Enter a context with an instance of the API client

with segnivo_sdk.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = segnivo_sdk.EmailAddressVerificationApi(api_client) body = None # object | (optional)

try:
    # Email Address Verification Validation
    api_response = api_instance.validate_email_post(body=body)
    print("The response of EmailAddressVerificationApi->validate_email_post:

") pprint(api_response) except ApiException as e: print("Exception when calling EmailAddressVerificationApi->validate_email_post: %s " % e)

```

Documentation for API Endpoints

All URIs are relative to https://api.segnivo.com/v1

Class Method HTTP request Description
EmailAddressVerificationApi validate_email_post POST /validate-email Email Address Verification Validation
EmailCampaignsApi messages_get GET /messages Get campaigns
EmailCampaignsApi messages_post POST /messages Create a Campaign
EmailCampaignsApi messages_uid_delete_post POST /messages/{uid}/delete Delete a campaign
EmailCampaignsApi messages_uid_get GET /messages/{uid} Get a campaign
EmailCampaignsApi messages_uid_patch PATCH /messages/{uid} Update Campaign
EmailCampaignsApi messages_uid_pause_post POST /messages/{uid}/pause Pause a campaign
EmailCampaignsApi messages_uid_resume_post POST /messages/{uid}/resume Resume the delivery of a campaign
MailingListsApi lists_get GET /lists Get mailing lists
MailingListsApi lists_post POST /lists Create a Mailing List
MailingListsApi lists_uid_add_field_post POST /lists/{uid}/add-field Add a field
MailingListsApi lists_uid_delete_post POST /lists/{uid}/delete Delete a list
MailingListsApi lists_uid_get GET /lists/{uid} Get a list
MailingListsApi lists_uid_patch PATCH /lists/{uid} Update a List
RelayApi relay_emails_id_get GET /relay/emails/{id} Fetch Emails
RelayApi relay_raw_post POST /relay/raw Send a Raw Email Message
RelayTransactionalEmailsApi relay_send_post POST /relay/send Send an Email
SubscribersContactsApi contacts_get GET /contacts Get contacts
SubscribersContactsApi contacts_post POST /contacts Add a Contact
SubscribersContactsApi contacts_uid_add_tag_post POST /contacts/{uid}/add-tag Add tags to a contact
SubscribersContactsApi contacts_uid_delete_post POST /contacts/{uid}/delete Delete a contact
SubscribersContactsApi contacts_uid_get GET /contacts/{uid} Get a contact
SubscribersContactsApi contacts_uid_patch PATCH /contacts/{uid} Update Contact
SubscribersContactsApi contacts_uid_subscribe_patch PATCH /contacts/{uid}/subscribe Subscribe a contact
SubscribersContactsApi contacts_uid_unsubscribe_patch PATCH /contacts/{uid}/unsubscribe Unsubscribe a contact

Documentation For Models

Documentation For Authorization

Authentication schemes defined for the API:

apiKeyAuth

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

Author

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

segnivo_python_sdk-1.7.5.tar.gz (41.8 kB view details)

Uploaded Source

Built Distribution

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

segnivo_python_sdk-1.7.5-py3-none-any.whl (58.3 kB view details)

Uploaded Python 3

File details

Details for the file segnivo_python_sdk-1.7.5.tar.gz.

File metadata

  • Download URL: segnivo_python_sdk-1.7.5.tar.gz
  • Upload date:
  • Size: 41.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.10.0

File hashes

Hashes for segnivo_python_sdk-1.7.5.tar.gz
Algorithm Hash digest
SHA256 0d8e9aae55d6e600e36c3c3aeb1fc5aa4a1dfb5307a4273512c1e35ae80a521d
MD5 4d8afb286828cb4379b4f21519eeaff0
BLAKE2b-256 8c40f0d65f6bf5241040d2b2b7cc58df27e5fad04ad4b8846978dadda64c1654

See more details on using hashes here.

File details

Details for the file segnivo_python_sdk-1.7.5-py3-none-any.whl.

File metadata

File hashes

Hashes for segnivo_python_sdk-1.7.5-py3-none-any.whl
Algorithm Hash digest
SHA256 738e66eb669095dc68e48a536676e602ca308815d81da3a65d0ce91351b3daf2
MD5 6a8a93f34cac964b6fb1a7af5ebc20f7
BLAKE2b-256 5515d7867daa22afd83c019b3856d7b8c480f403faa8264c68442534e0d77270

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