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.14
- 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) email_address_verification_request = segnivo_sdk.EmailAddressVerificationRequest() # EmailAddressVerificationRequest | (optional)
try:
# Email Address Verification Validation
api_response = api_instance.validate_email_post(email_address_verification_request=email_address_verification_request)
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
- AddContactRequest
- CampaignCreateRequest
- CampaignUpdateRequest
- ContactUpdateRequest
- ContactsUidAddTagPostRequest
- EmailAddressVerificationRequest
- MailingListAddFieldRequest
- MailingListRequest
- MailingListRequestContact
- RelayEmailRequest
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file segnivo_python_sdk-1.7.14.tar.gz.
File metadata
- Download URL: segnivo_python_sdk-1.7.14.tar.gz
- Upload date:
- Size: 48.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
67272627ff1c541fa639061f94ca40bb589f1b93acc334268eb2698a7dbdf32b
|
|
| MD5 |
f14e6d32a4280d18960c34a2e8dcbca6
|
|
| BLAKE2b-256 |
3c84fc824bd7884f8f0d3581c788cc2a79e575799a42814989064cf1dd71c998
|
File details
Details for the file segnivo_python_sdk-1.7.14-py3-none-any.whl.
File metadata
- Download URL: segnivo_python_sdk-1.7.14-py3-none-any.whl
- Upload date:
- Size: 88.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d3d4a67cec95fce94db11df53c64ac8e4f7fe8c3ec5d808d43d18ed375df691a
|
|
| MD5 |
63e8f038a089e7089fa144027fdec400
|
|
| BLAKE2b-256 |
66235aaaf8b9d011a336d042f704fe9d49b9d840afcf1bef2fcaa26722bb908b
|