segnivo-python-sdk 1.7.16
Segnivo Developer API
Keywords: OpenAPI, OpenAPI-Generator, Segnivo Developer API

# 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](https://messaging.segnivo.com/account/api)).

- 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 ([<i>developers@segnivo.com</i>](https://mailto: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](https://messaging.segnivo.com/account/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 ([<i>developers@segnivo.com</i>](https://mailto: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](https://openapi-generator.tech) project:

- API version: 1.0.0
- Package version: 1.7.16
- Generator version: 7.10.0
- Build package: org.openapitools.codegen.languages.PythonClientCodegen

## Requirements.

Python 3.8+

## Installation & Usage

## Getting Started

Please follow the [installation procedure](#installation--usage) 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**](docs/EmailAddressVerificationApi.md#validate_email_post) | **POST** /validate-email | Email Address Verification Validation
*EmailCampaignsApi* | [**messages_get**](docs/EmailCampaignsApi.md#messages_get) | **GET** /messages | Get campaigns
*EmailCampaignsApi* | [**messages_post**](docs/EmailCampaignsApi.md#messages_post) | **POST** /messages | Create a Campaign
*EmailCampaignsApi* | [**messages_uid_delete_post**](docs/EmailCampaignsApi.md#messages_uid_delete_post) | **POST** /messages/{uid}/delete | Delete a campaign
*EmailCampaignsApi* | [**messages_uid_get**](docs/EmailCampaignsApi.md#messages_uid_get) | **GET** /messages/{uid} | Get a campaign
*EmailCampaignsApi* | [**messages_uid_patch**](docs/EmailCampaignsApi.md#messages_uid_patch) | **PATCH** /messages/{uid} | Update Campaign
*EmailCampaignsApi* | [**messages_uid_pause_post**](docs/EmailCampaignsApi.md#messages_uid_pause_post) | **POST** /messages/{uid}/pause | Pause a campaign
*EmailCampaignsApi* | [**messages_uid_resume_post**](docs/EmailCampaignsApi.md#messages_uid_resume_post) | **POST** /messages/{uid}/resume | Resume the delivery of a campaign
*MailingListsApi* | [**lists_get**](docs/MailingListsApi.md#lists_get) | **GET** /lists | Get mailing lists
*MailingListsApi* | [**lists_post**](docs/MailingListsApi.md#lists_post) | **POST** /lists | Create a Mailing List
*MailingListsApi* | [**lists_uid_add_field_post**](docs/MailingListsApi.md#lists_uid_add_field_post) | **POST** /lists/{uid}/add-field | Add a field
*MailingListsApi* | [**lists_uid_delete_post**](docs/MailingListsApi.md#lists_uid_delete_post) | **POST** /lists/{uid}/delete | Delete a list
*MailingListsApi* | [**lists_uid_get**](docs/MailingListsApi.md#lists_uid_get) | **GET** /lists/{uid} | Get a list
*MailingListsApi* | [**lists_uid_patch**](docs/MailingListsApi.md#lists_uid_patch) | **PATCH** /lists/{uid} | Update a List
*RelayApi* | [**relay_emails_id_get**](docs/RelayApi.md#relay_emails_id_get) | **GET** /relay/emails/{id} | Fetch Emails
*RelayApi* | [**relay_raw_post**](docs/RelayApi.md#relay_raw_post) | **POST** /relay/raw | Send a Raw Email Message
*RelayTransactionalEmailsApi* | [**relay_send_post**](docs/RelayTransactionalEmailsApi.md#relay_send_post) | **POST** /relay/send | Send an Email
*SubscribersContactsApi* | [**contacts_get**](docs/SubscribersContactsApi.md#contacts_get) | **GET** /contacts | Get contacts
*SubscribersContactsApi* | [**contacts_post**](docs/SubscribersContactsApi.md#contacts_post) | **POST** /contacts | Add a Contact
*SubscribersContactsApi* | [**contacts_uid_add_tag_post**](docs/SubscribersContactsApi.md#contacts_uid_add_tag_post) | **POST** /contacts/{uid}/add-tag | Add tags to a contact
*SubscribersContactsApi* | [**contacts_uid_delete_post**](docs/SubscribersContactsApi.md#contacts_uid_delete_post) | **POST** /contacts/{uid}/delete | Delete a contact
*SubscribersContactsApi* | [**contacts_uid_get**](docs/SubscribersContactsApi.md#contacts_uid_get) | **GET** /contacts/{uid} | Get a contact
*SubscribersContactsApi* | [**contacts_uid_patch**](docs/SubscribersContactsApi.md#contacts_uid_patch) | **PATCH** /contacts/{uid} | Update Contact
*SubscribersContactsApi* | [**contacts_uid_subscribe_patch**](docs/SubscribersContactsApi.md#contacts_uid_subscribe_patch) | **PATCH** /contacts/{uid}/subscribe | Subscribe a contact
*SubscribersContactsApi* | [**contacts_uid_unsubscribe_patch**](docs/SubscribersContactsApi.md#contacts_uid_unsubscribe_patch) | **PATCH** /contacts/{uid}/unsubscribe | Unsubscribe a contact


## Documentation For Models

 - [AddContactRequest](docs/AddContactRequest.md)
 - [CampaignCreateRequest](docs/CampaignCreateRequest.md)
 - [CampaignUpdateRequest](docs/CampaignUpdateRequest.md)
 - [ContactUpdateRequest](docs/ContactUpdateRequest.md)
 - [ContactsUidAddTagPostRequest](docs/ContactsUidAddTagPostRequest.md)
 - [EmailAddressVerificationRequest](docs/EmailAddressVerificationRequest.md)
 - [MailingListAddFieldRequest](docs/MailingListAddFieldRequest.md)
 - [MailingListRequest](docs/MailingListRequest.md)
 - [MailingListRequestContact](docs/MailingListRequestContact.md)
 - [RelayEmailRequest](docs/RelayEmailRequest.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-API-KEY
- **Location**: HTTP header


## Author