opportify-sdk 0.1.3__py3-none-any.whl → 0.2.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of opportify-sdk might be problematic. Click here for more details.

Files changed (69) hide show
  1. openapi_client/__init__.py +19 -1
  2. openapi_client/api/email_insights_api.py +564 -1
  3. openapi_client/api/ip_insights_api.py +564 -1
  4. openapi_client/api_client.py +2 -2
  5. openapi_client/configuration.py +1 -1
  6. openapi_client/exceptions.py +18 -1
  7. openapi_client/models/__init__.py +19 -1
  8. openapi_client/models/abuse_contact.py +1 -1
  9. openapi_client/models/admin_contact.py +1 -1
  10. openapi_client/models/analyze_email200_response.py +1 -1
  11. openapi_client/models/analyze_email400_response.py +1 -1
  12. openapi_client/models/analyze_email400_response_error.py +1 -1
  13. openapi_client/models/analyze_email403_response.py +1 -1
  14. openapi_client/models/analyze_email403_response_error.py +1 -1
  15. openapi_client/models/analyze_email500_response.py +1 -1
  16. openapi_client/models/analyze_email500_response_error.py +1 -1
  17. openapi_client/models/analyze_email_request.py +1 -1
  18. openapi_client/models/analyze_ip200_response.py +1 -1
  19. openapi_client/models/analyze_ip400_response.py +1 -1
  20. openapi_client/models/analyze_ip400_response_error.py +1 -1
  21. openapi_client/models/analyze_ip404_response.py +1 -1
  22. openapi_client/models/analyze_ip500_response.py +1 -1
  23. openapi_client/models/analyze_ip_request.py +1 -1
  24. openapi_client/models/asn.py +1 -1
  25. openapi_client/models/batch_analyze_emails202_response.py +101 -0
  26. openapi_client/models/batch_analyze_emails400_response.py +91 -0
  27. openapi_client/models/batch_analyze_emails400_response_error.py +137 -0
  28. openapi_client/models/batch_analyze_emails403_response.py +91 -0
  29. openapi_client/models/batch_analyze_emails403_response_error.py +89 -0
  30. openapi_client/models/batch_analyze_emails413_response.py +91 -0
  31. openapi_client/models/batch_analyze_emails413_response_error.py +89 -0
  32. openapi_client/models/batch_analyze_emails_request.py +91 -0
  33. openapi_client/models/batch_analyze_ips400_response.py +91 -0
  34. openapi_client/models/batch_analyze_ips400_response_error.py +137 -0
  35. openapi_client/models/batch_analyze_ips_request.py +89 -0
  36. openapi_client/models/block_listed.py +1 -1
  37. openapi_client/models/email_dns.py +1 -1
  38. openapi_client/models/geo.py +1 -1
  39. openapi_client/models/get_email_batch_status200_response.py +109 -0
  40. openapi_client/models/get_email_batch_status200_response_download_urls.py +93 -0
  41. openapi_client/models/get_email_batch_status404_response.py +91 -0
  42. openapi_client/models/get_email_batch_status404_response_error.py +89 -0
  43. openapi_client/models/internalerror.py +1 -1
  44. openapi_client/models/invaliddata.py +89 -0
  45. openapi_client/models/invaliddata1.py +89 -0
  46. openapi_client/models/invalidemail.py +1 -1
  47. openapi_client/models/invalidplan.py +1 -1
  48. openapi_client/models/invalidtoken.py +1 -1
  49. openapi_client/models/ipvalidationfailed.py +1 -1
  50. openapi_client/models/malformedrequest.py +1 -1
  51. openapi_client/models/malformedrequest1.py +1 -1
  52. openapi_client/models/malformedrequest2.py +89 -0
  53. openapi_client/models/notfound.py +1 -1
  54. openapi_client/models/organization.py +1 -1
  55. openapi_client/models/risk_report_email.py +1 -1
  56. openapi_client/models/risk_report_ip.py +1 -1
  57. openapi_client/models/tech_contact.py +1 -1
  58. openapi_client/models/trusted_provider.py +1 -1
  59. openapi_client/models/whois.py +1 -1
  60. openapi_client/rest.py +1 -1
  61. opportify_sdk/email_insights.py +79 -0
  62. opportify_sdk/ip_insights.py +74 -0
  63. opportify_sdk-0.2.0.dist-info/METADATA +239 -0
  64. opportify_sdk-0.2.0.dist-info/RECORD +70 -0
  65. {opportify_sdk-0.1.3.dist-info → opportify_sdk-0.2.0.dist-info}/WHEEL +1 -1
  66. openapi_client/models/risk_report.py +0 -89
  67. opportify_sdk-0.1.3.dist-info/METADATA +0 -115
  68. opportify_sdk-0.1.3.dist-info/RECORD +0 -53
  69. {opportify_sdk-0.1.3.dist-info → opportify_sdk-0.2.0.dist-info}/top_level.txt +0 -0
@@ -5,7 +5,7 @@
5
5
  """
6
6
  Opportify Insights API
7
7
 
8
- ## Overview The **Opportify Insights API** provides access to a powerful and up-to-date platform. With advanced data warehousing and AI-driven capabilities, this API is designed to empower your business to make informed, data-driven decisions and effectively assess potential risks. ### Base URL Use the following base URL for all API requests: ```plaintext https://api.opportify.ai/insights/v1/<service>/<endpoint> ``` ### Features - [**Email Insights:**](/docs/api-reference/email-insights) - Validate email syntax. - Identify email types (free, disposable, corporate or unknown). - Real time verifications: - Reachable: Confirms if the email domain has valid MX DNS records using DNS lookup. - Deliverable: Simulates an SMTP handshake to check if the email address exists and is deliverable. - Catch-All: Detects if the domain accepts all emails (catch-all configuration). - Intelligent Error Correction: Automatically corrects well-known misspelled email addresses. - Risk Report: Provides an AI-driven normalized score (200-1000) to evaluate email risk, using predefined thresholds. [Access Documentation >>](/docs/api-reference/email-insights) - [**IP Insights:**](/docs/api-reference/ip-insights) - Connection types: Detects connection types such as `wired`, `mobile`, `enterprise`, `satellite`, `VPN`, `cloud-provider`, `open-proxy`, or `Tor`. - Geo location: Delivers detailed insights such as country, city, timezone, language preferences, and additional location-based information to enhance regional understanding. - WHOIS: Provides main details including RIR, ASN, organization, and abuse/admin/technical contacts. - Trusted Provider Recognition: Identifies if the IP is part of a known trusted provider (e.g., ZTNA - Zero Trust Network Access). - Blocklist Reports: Retrieves up-to-date blocklist statuses, active reports, and the latest detections. - Risk Report: Delivers an AI-driven normalized score (200-1000) to evaluate IP risk, supported by predefined thresholds. [Access Documentation >>](/docs/api-reference/ip-insights) ### Authentication & Security - **API Key:** Access to the API requires an API key, which must be included in the request headers. Businesses can generate unlimited API keys directly from their account, offering flexibility and ease of use. - **ACL Rules:** Enhance security with Access Control Lists (ACL), allowing you to restrict API access from specific IP addresses or ranges. This feature provides an additional layer of protection by ensuring only authorized IPs can interact with the API. - **No Query Parameters:** As a precautionary measure, our API avoids the use of query parameters for all operations, including authentication and handling Personally Identifiable Information (PII). This approach minimizes security risks by preventing sensitive data from being exposed in access logs, browser history, cached URLs, debugging tools, or inadvertently shared URLs. All sensitive information is securely transmitted through headers or the request body.
8
+ ## Overview The **Opportify Insights API** provides access to a powerful and up-to-date platform. With advanced data warehousing and AI-driven capabilities, this API is designed to empower your business to make informed, data-driven decisions and effectively assess potential risks. ### Base URL Use the following base URL for all API requests: ```plaintext https://api.opportify.ai/insights/v1/<service>/<endpoint> ``` ### Features - [**Email Insights:**](/docs/api/api-reference/email-insights) - Validate email syntax. - Identify email types (free, disposable, private or unknown). - Real time verifications: - Reachable: Confirms if the email domain has valid MX DNS records using DNS lookup. - Deliverable: Simulates an SMTP handshake to check if the email address exists and is deliverable. - Catch-All: Detects if the domain accepts all emails (catch-all configuration). - Intelligent Error Correction: Automatically corrects well-known misspelled email addresses. - Risk Report: Provides an AI-driven normalized score (200-1000) to evaluate email risk, using predefined thresholds. [Access Documentation >>](/docs/api/api-reference/email-insights) - [**IP Insights:**](/docs/api/api-reference/ip-insights) - Connection types: Detects connection types such as `wired`, `mobile`, `enterprise`, `satellite`, `VPN`, `cloud-provider`, `open-proxy`, or `Tor`. - Geo location: Delivers detailed insights such as country, city, timezone, language preferences, and additional location-based information to enhance regional understanding. - WHOIS: Provides main details including RIR, ASN, organization, and abuse/admin/technical contacts. - Trusted Provider Recognition: Identifies if the IP is part of a known trusted provider (e.g., ZTNA - Zero Trust Network Access). - Blocklist Reports: Retrieves up-to-date blocklist statuses, active reports, and the latest detections. - Risk Report: Delivers an AI-driven normalized score (200-1000) to evaluate IP risk, supported by predefined thresholds. [Access Documentation >>](/docs/api/api-reference/ip-insights) ### Authentication & Security - **API Key:** Access to the API requires an API key, which must be included in the request headers. Businesses can generate unlimited API keys directly from their account, offering flexibility and ease of use. - **ACL Rules:** Enhance security with Access Control Lists (ACL), allowing you to restrict API access from specific IP addresses or ranges. This feature provides an additional layer of protection by ensuring only authorized IPs can interact with the API. - **No Query Parameters:** As a precautionary measure, our API avoids the use of query parameters for all operations, including authentication and handling Personally Identifiable Information (PII). This approach minimizes security risks by preventing sensitive data from being exposed in access logs, browser history, cached URLs, debugging tools, or inadvertently shared URLs. All sensitive information is securely transmitted through headers or the request body.
9
9
 
10
10
  The version of the OpenAPI document: 1.0.0
11
11
  Generated by OpenAPI Generator (https://openapi-generator.tech)
@@ -49,16 +49,34 @@ from openapi_client.models.analyze_ip404_response import AnalyzeIp404Response
49
49
  from openapi_client.models.analyze_ip500_response import AnalyzeIp500Response
50
50
  from openapi_client.models.analyze_ip_request import AnalyzeIpRequest
51
51
  from openapi_client.models.asn import Asn
52
+ from openapi_client.models.batch_analyze_emails202_response import BatchAnalyzeEmails202Response
53
+ from openapi_client.models.batch_analyze_emails400_response import BatchAnalyzeEmails400Response
54
+ from openapi_client.models.batch_analyze_emails400_response_error import BatchAnalyzeEmails400ResponseError
55
+ from openapi_client.models.batch_analyze_emails403_response import BatchAnalyzeEmails403Response
56
+ from openapi_client.models.batch_analyze_emails403_response_error import BatchAnalyzeEmails403ResponseError
57
+ from openapi_client.models.batch_analyze_emails413_response import BatchAnalyzeEmails413Response
58
+ from openapi_client.models.batch_analyze_emails413_response_error import BatchAnalyzeEmails413ResponseError
59
+ from openapi_client.models.batch_analyze_emails_request import BatchAnalyzeEmailsRequest
60
+ from openapi_client.models.batch_analyze_ips400_response import BatchAnalyzeIps400Response
61
+ from openapi_client.models.batch_analyze_ips400_response_error import BatchAnalyzeIps400ResponseError
62
+ from openapi_client.models.batch_analyze_ips_request import BatchAnalyzeIpsRequest
52
63
  from openapi_client.models.block_listed import BlockListed
53
64
  from openapi_client.models.email_dns import EmailDNS
54
65
  from openapi_client.models.geo import Geo
66
+ from openapi_client.models.get_email_batch_status200_response import GetEmailBatchStatus200Response
67
+ from openapi_client.models.get_email_batch_status200_response_download_urls import GetEmailBatchStatus200ResponseDownloadUrls
68
+ from openapi_client.models.get_email_batch_status404_response import GetEmailBatchStatus404Response
69
+ from openapi_client.models.get_email_batch_status404_response_error import GetEmailBatchStatus404ResponseError
55
70
  from openapi_client.models.internalerror import INTERNALERROR
71
+ from openapi_client.models.invaliddata import INVALIDDATA
72
+ from openapi_client.models.invaliddata1 import INVALIDDATA1
56
73
  from openapi_client.models.invalidemail import INVALIDEMAIL
57
74
  from openapi_client.models.invalidplan import INVALIDPLAN
58
75
  from openapi_client.models.invalidtoken import INVALIDTOKEN
59
76
  from openapi_client.models.ipvalidationfailed import IPVALIDATIONFAILED
60
77
  from openapi_client.models.malformedrequest import MALFORMEDREQUEST
61
78
  from openapi_client.models.malformedrequest1 import MALFORMEDREQUEST1
79
+ from openapi_client.models.malformedrequest2 import MALFORMEDREQUEST2
62
80
  from openapi_client.models.notfound import NOTFOUND
63
81
  from openapi_client.models.organization import Organization
64
82
  from openapi_client.models.risk_report_email import RiskReportEmail
@@ -3,7 +3,7 @@
3
3
  """
4
4
  Opportify Insights API
5
5
 
6
- ## Overview The **Opportify Insights API** provides access to a powerful and up-to-date platform. With advanced data warehousing and AI-driven capabilities, this API is designed to empower your business to make informed, data-driven decisions and effectively assess potential risks. ### Base URL Use the following base URL for all API requests: ```plaintext https://api.opportify.ai/insights/v1/<service>/<endpoint> ``` ### Features - [**Email Insights:**](/docs/api-reference/email-insights) - Validate email syntax. - Identify email types (free, disposable, corporate or unknown). - Real time verifications: - Reachable: Confirms if the email domain has valid MX DNS records using DNS lookup. - Deliverable: Simulates an SMTP handshake to check if the email address exists and is deliverable. - Catch-All: Detects if the domain accepts all emails (catch-all configuration). - Intelligent Error Correction: Automatically corrects well-known misspelled email addresses. - Risk Report: Provides an AI-driven normalized score (200-1000) to evaluate email risk, using predefined thresholds. [Access Documentation >>](/docs/api-reference/email-insights) - [**IP Insights:**](/docs/api-reference/ip-insights) - Connection types: Detects connection types such as `wired`, `mobile`, `enterprise`, `satellite`, `VPN`, `cloud-provider`, `open-proxy`, or `Tor`. - Geo location: Delivers detailed insights such as country, city, timezone, language preferences, and additional location-based information to enhance regional understanding. - WHOIS: Provides main details including RIR, ASN, organization, and abuse/admin/technical contacts. - Trusted Provider Recognition: Identifies if the IP is part of a known trusted provider (e.g., ZTNA - Zero Trust Network Access). - Blocklist Reports: Retrieves up-to-date blocklist statuses, active reports, and the latest detections. - Risk Report: Delivers an AI-driven normalized score (200-1000) to evaluate IP risk, supported by predefined thresholds. [Access Documentation >>](/docs/api-reference/ip-insights) ### Authentication & Security - **API Key:** Access to the API requires an API key, which must be included in the request headers. Businesses can generate unlimited API keys directly from their account, offering flexibility and ease of use. - **ACL Rules:** Enhance security with Access Control Lists (ACL), allowing you to restrict API access from specific IP addresses or ranges. This feature provides an additional layer of protection by ensuring only authorized IPs can interact with the API. - **No Query Parameters:** As a precautionary measure, our API avoids the use of query parameters for all operations, including authentication and handling Personally Identifiable Information (PII). This approach minimizes security risks by preventing sensitive data from being exposed in access logs, browser history, cached URLs, debugging tools, or inadvertently shared URLs. All sensitive information is securely transmitted through headers or the request body.
6
+ ## Overview The **Opportify Insights API** provides access to a powerful and up-to-date platform. With advanced data warehousing and AI-driven capabilities, this API is designed to empower your business to make informed, data-driven decisions and effectively assess potential risks. ### Base URL Use the following base URL for all API requests: ```plaintext https://api.opportify.ai/insights/v1/<service>/<endpoint> ``` ### Features - [**Email Insights:**](/docs/api/api-reference/email-insights) - Validate email syntax. - Identify email types (free, disposable, private or unknown). - Real time verifications: - Reachable: Confirms if the email domain has valid MX DNS records using DNS lookup. - Deliverable: Simulates an SMTP handshake to check if the email address exists and is deliverable. - Catch-All: Detects if the domain accepts all emails (catch-all configuration). - Intelligent Error Correction: Automatically corrects well-known misspelled email addresses. - Risk Report: Provides an AI-driven normalized score (200-1000) to evaluate email risk, using predefined thresholds. [Access Documentation >>](/docs/api/api-reference/email-insights) - [**IP Insights:**](/docs/api/api-reference/ip-insights) - Connection types: Detects connection types such as `wired`, `mobile`, `enterprise`, `satellite`, `VPN`, `cloud-provider`, `open-proxy`, or `Tor`. - Geo location: Delivers detailed insights such as country, city, timezone, language preferences, and additional location-based information to enhance regional understanding. - WHOIS: Provides main details including RIR, ASN, organization, and abuse/admin/technical contacts. - Trusted Provider Recognition: Identifies if the IP is part of a known trusted provider (e.g., ZTNA - Zero Trust Network Access). - Blocklist Reports: Retrieves up-to-date blocklist statuses, active reports, and the latest detections. - Risk Report: Delivers an AI-driven normalized score (200-1000) to evaluate IP risk, supported by predefined thresholds. [Access Documentation >>](/docs/api/api-reference/ip-insights) ### Authentication & Security - **API Key:** Access to the API requires an API key, which must be included in the request headers. Businesses can generate unlimited API keys directly from their account, offering flexibility and ease of use. - **ACL Rules:** Enhance security with Access Control Lists (ACL), allowing you to restrict API access from specific IP addresses or ranges. This feature provides an additional layer of protection by ensuring only authorized IPs can interact with the API. - **No Query Parameters:** As a precautionary measure, our API avoids the use of query parameters for all operations, including authentication and handling Personally Identifiable Information (PII). This approach minimizes security risks by preventing sensitive data from being exposed in access logs, browser history, cached URLs, debugging tools, or inadvertently shared URLs. All sensitive information is securely transmitted through headers or the request body.
7
7
 
8
8
  The version of the OpenAPI document: 1.0.0
9
9
  Generated by OpenAPI Generator (https://openapi-generator.tech)
@@ -16,8 +16,13 @@ from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
16
16
  from typing import Any, Dict, List, Optional, Tuple, Union
17
17
  from typing_extensions import Annotated
18
18
 
19
+ from pydantic import Field, StrictStr
20
+ from typing_extensions import Annotated
19
21
  from openapi_client.models.analyze_email200_response import AnalyzeEmail200Response
20
22
  from openapi_client.models.analyze_email_request import AnalyzeEmailRequest
23
+ from openapi_client.models.batch_analyze_emails202_response import BatchAnalyzeEmails202Response
24
+ from openapi_client.models.batch_analyze_emails_request import BatchAnalyzeEmailsRequest
25
+ from openapi_client.models.get_email_batch_status200_response import GetEmailBatchStatus200Response
21
26
 
22
27
  from openapi_client.api_client import ApiClient, RequestSerialized
23
28
  from openapi_client.api_response import ApiResponse
@@ -318,3 +323,561 @@ class EmailInsightsApi:
318
323
  )
319
324
 
320
325
 
326
+
327
+
328
+ @validate_call
329
+ def batch_analyze_emails(
330
+ self,
331
+ batch_analyze_emails_request: BatchAnalyzeEmailsRequest,
332
+ _request_timeout: Union[
333
+ None,
334
+ Annotated[StrictFloat, Field(gt=0)],
335
+ Tuple[
336
+ Annotated[StrictFloat, Field(gt=0)],
337
+ Annotated[StrictFloat, Field(gt=0)]
338
+ ]
339
+ ] = None,
340
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
341
+ _content_type: Optional[StrictStr] = None,
342
+ _headers: Optional[Dict[StrictStr, Any]] = None,
343
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
344
+ ) -> BatchAnalyzeEmails202Response:
345
+ """Batch Analyze Emails
346
+
347
+ The **Batch Analyze Emails** endpoint enables processing of large volumes of email addresses asynchronously. This endpoint accepts various input formats and returns a job ID for tracking the analysis progress. ### Features: - **Asynchronous Processing**: Submit large lists of emails for background processing. - **Multiple Input Formats**: Submit data as JSON arrays, CSV files, or line-separated text. - **Job Tracking**: Monitor processing status using the returned job ID. ### Input Formats: - **JSON Array**: Submit a JSON object containing an array of email addresses. - **CSV Upload**: Upload a CSV file with email addresses in a single column (with header row). - **Line-Separated Text**: Submit a plain text file with one email address per line. ### Example JSON Request: ```json { \"emails\": [ \"first-email@domain.com\", \"second-email@domain.com\", \"third-email@domain.com\" ] } ``` ### Authentication & Security - **API Key:** Access requires an API key in the request headers. - **ACL Rules:** Optional IP-based access restrictions for enhanced security. - **No Query Parameters:** All data is transmitted securely through headers or request body. ### Payload Limits - Maximum payload size: 3MB
348
+
349
+ :param batch_analyze_emails_request: (required)
350
+ :type batch_analyze_emails_request: BatchAnalyzeEmailsRequest
351
+ :param _request_timeout: timeout setting for this request. If one
352
+ number provided, it will be total request
353
+ timeout. It can also be a pair (tuple) of
354
+ (connection, read) timeouts.
355
+ :type _request_timeout: int, tuple(int, int), optional
356
+ :param _request_auth: set to override the auth_settings for an a single
357
+ request; this effectively ignores the
358
+ authentication in the spec for a single request.
359
+ :type _request_auth: dict, optional
360
+ :param _content_type: force content-type for the request.
361
+ :type _content_type: str, Optional
362
+ :param _headers: set to override the headers for a single
363
+ request; this effectively ignores the headers
364
+ in the spec for a single request.
365
+ :type _headers: dict, optional
366
+ :param _host_index: set to override the host_index for a single
367
+ request; this effectively ignores the host_index
368
+ in the spec for a single request.
369
+ :type _host_index: int, optional
370
+ :return: Returns the result object.
371
+ """ # noqa: E501
372
+
373
+ _param = self._batch_analyze_emails_serialize(
374
+ batch_analyze_emails_request=batch_analyze_emails_request,
375
+ _request_auth=_request_auth,
376
+ _content_type=_content_type,
377
+ _headers=_headers,
378
+ _host_index=_host_index
379
+ )
380
+
381
+ _response_types_map: Dict[str, Optional[str]] = {
382
+ '202': "BatchAnalyzeEmails202Response",
383
+ '400': "BatchAnalyzeEmails400Response",
384
+ '413': "BatchAnalyzeEmails413Response",
385
+ '403': "BatchAnalyzeEmails403Response",
386
+ '500': "AnalyzeEmail500Response",
387
+ }
388
+ response_data = self.api_client.call_api(
389
+ *_param,
390
+ _request_timeout=_request_timeout
391
+ )
392
+ response_data.read()
393
+ return self.api_client.response_deserialize(
394
+ response_data=response_data,
395
+ response_types_map=_response_types_map,
396
+ ).data
397
+
398
+
399
+ @validate_call
400
+ def batch_analyze_emails_with_http_info(
401
+ self,
402
+ batch_analyze_emails_request: BatchAnalyzeEmailsRequest,
403
+ _request_timeout: Union[
404
+ None,
405
+ Annotated[StrictFloat, Field(gt=0)],
406
+ Tuple[
407
+ Annotated[StrictFloat, Field(gt=0)],
408
+ Annotated[StrictFloat, Field(gt=0)]
409
+ ]
410
+ ] = None,
411
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
412
+ _content_type: Optional[StrictStr] = None,
413
+ _headers: Optional[Dict[StrictStr, Any]] = None,
414
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
415
+ ) -> ApiResponse[BatchAnalyzeEmails202Response]:
416
+ """Batch Analyze Emails
417
+
418
+ The **Batch Analyze Emails** endpoint enables processing of large volumes of email addresses asynchronously. This endpoint accepts various input formats and returns a job ID for tracking the analysis progress. ### Features: - **Asynchronous Processing**: Submit large lists of emails for background processing. - **Multiple Input Formats**: Submit data as JSON arrays, CSV files, or line-separated text. - **Job Tracking**: Monitor processing status using the returned job ID. ### Input Formats: - **JSON Array**: Submit a JSON object containing an array of email addresses. - **CSV Upload**: Upload a CSV file with email addresses in a single column (with header row). - **Line-Separated Text**: Submit a plain text file with one email address per line. ### Example JSON Request: ```json { \"emails\": [ \"first-email@domain.com\", \"second-email@domain.com\", \"third-email@domain.com\" ] } ``` ### Authentication & Security - **API Key:** Access requires an API key in the request headers. - **ACL Rules:** Optional IP-based access restrictions for enhanced security. - **No Query Parameters:** All data is transmitted securely through headers or request body. ### Payload Limits - Maximum payload size: 3MB
419
+
420
+ :param batch_analyze_emails_request: (required)
421
+ :type batch_analyze_emails_request: BatchAnalyzeEmailsRequest
422
+ :param _request_timeout: timeout setting for this request. If one
423
+ number provided, it will be total request
424
+ timeout. It can also be a pair (tuple) of
425
+ (connection, read) timeouts.
426
+ :type _request_timeout: int, tuple(int, int), optional
427
+ :param _request_auth: set to override the auth_settings for an a single
428
+ request; this effectively ignores the
429
+ authentication in the spec for a single request.
430
+ :type _request_auth: dict, optional
431
+ :param _content_type: force content-type for the request.
432
+ :type _content_type: str, Optional
433
+ :param _headers: set to override the headers for a single
434
+ request; this effectively ignores the headers
435
+ in the spec for a single request.
436
+ :type _headers: dict, optional
437
+ :param _host_index: set to override the host_index for a single
438
+ request; this effectively ignores the host_index
439
+ in the spec for a single request.
440
+ :type _host_index: int, optional
441
+ :return: Returns the result object.
442
+ """ # noqa: E501
443
+
444
+ _param = self._batch_analyze_emails_serialize(
445
+ batch_analyze_emails_request=batch_analyze_emails_request,
446
+ _request_auth=_request_auth,
447
+ _content_type=_content_type,
448
+ _headers=_headers,
449
+ _host_index=_host_index
450
+ )
451
+
452
+ _response_types_map: Dict[str, Optional[str]] = {
453
+ '202': "BatchAnalyzeEmails202Response",
454
+ '400': "BatchAnalyzeEmails400Response",
455
+ '413': "BatchAnalyzeEmails413Response",
456
+ '403': "BatchAnalyzeEmails403Response",
457
+ '500': "AnalyzeEmail500Response",
458
+ }
459
+ response_data = self.api_client.call_api(
460
+ *_param,
461
+ _request_timeout=_request_timeout
462
+ )
463
+ response_data.read()
464
+ return self.api_client.response_deserialize(
465
+ response_data=response_data,
466
+ response_types_map=_response_types_map,
467
+ )
468
+
469
+
470
+ @validate_call
471
+ def batch_analyze_emails_without_preload_content(
472
+ self,
473
+ batch_analyze_emails_request: BatchAnalyzeEmailsRequest,
474
+ _request_timeout: Union[
475
+ None,
476
+ Annotated[StrictFloat, Field(gt=0)],
477
+ Tuple[
478
+ Annotated[StrictFloat, Field(gt=0)],
479
+ Annotated[StrictFloat, Field(gt=0)]
480
+ ]
481
+ ] = None,
482
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
483
+ _content_type: Optional[StrictStr] = None,
484
+ _headers: Optional[Dict[StrictStr, Any]] = None,
485
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
486
+ ) -> RESTResponseType:
487
+ """Batch Analyze Emails
488
+
489
+ The **Batch Analyze Emails** endpoint enables processing of large volumes of email addresses asynchronously. This endpoint accepts various input formats and returns a job ID for tracking the analysis progress. ### Features: - **Asynchronous Processing**: Submit large lists of emails for background processing. - **Multiple Input Formats**: Submit data as JSON arrays, CSV files, or line-separated text. - **Job Tracking**: Monitor processing status using the returned job ID. ### Input Formats: - **JSON Array**: Submit a JSON object containing an array of email addresses. - **CSV Upload**: Upload a CSV file with email addresses in a single column (with header row). - **Line-Separated Text**: Submit a plain text file with one email address per line. ### Example JSON Request: ```json { \"emails\": [ \"first-email@domain.com\", \"second-email@domain.com\", \"third-email@domain.com\" ] } ``` ### Authentication & Security - **API Key:** Access requires an API key in the request headers. - **ACL Rules:** Optional IP-based access restrictions for enhanced security. - **No Query Parameters:** All data is transmitted securely through headers or request body. ### Payload Limits - Maximum payload size: 3MB
490
+
491
+ :param batch_analyze_emails_request: (required)
492
+ :type batch_analyze_emails_request: BatchAnalyzeEmailsRequest
493
+ :param _request_timeout: timeout setting for this request. If one
494
+ number provided, it will be total request
495
+ timeout. It can also be a pair (tuple) of
496
+ (connection, read) timeouts.
497
+ :type _request_timeout: int, tuple(int, int), optional
498
+ :param _request_auth: set to override the auth_settings for an a single
499
+ request; this effectively ignores the
500
+ authentication in the spec for a single request.
501
+ :type _request_auth: dict, optional
502
+ :param _content_type: force content-type for the request.
503
+ :type _content_type: str, Optional
504
+ :param _headers: set to override the headers for a single
505
+ request; this effectively ignores the headers
506
+ in the spec for a single request.
507
+ :type _headers: dict, optional
508
+ :param _host_index: set to override the host_index for a single
509
+ request; this effectively ignores the host_index
510
+ in the spec for a single request.
511
+ :type _host_index: int, optional
512
+ :return: Returns the result object.
513
+ """ # noqa: E501
514
+
515
+ _param = self._batch_analyze_emails_serialize(
516
+ batch_analyze_emails_request=batch_analyze_emails_request,
517
+ _request_auth=_request_auth,
518
+ _content_type=_content_type,
519
+ _headers=_headers,
520
+ _host_index=_host_index
521
+ )
522
+
523
+ _response_types_map: Dict[str, Optional[str]] = {
524
+ '202': "BatchAnalyzeEmails202Response",
525
+ '400': "BatchAnalyzeEmails400Response",
526
+ '413': "BatchAnalyzeEmails413Response",
527
+ '403': "BatchAnalyzeEmails403Response",
528
+ '500': "AnalyzeEmail500Response",
529
+ }
530
+ response_data = self.api_client.call_api(
531
+ *_param,
532
+ _request_timeout=_request_timeout
533
+ )
534
+ return response_data.response
535
+
536
+
537
+ def _batch_analyze_emails_serialize(
538
+ self,
539
+ batch_analyze_emails_request,
540
+ _request_auth,
541
+ _content_type,
542
+ _headers,
543
+ _host_index,
544
+ ) -> RequestSerialized:
545
+
546
+ _host = None
547
+
548
+ _collection_formats: Dict[str, str] = {
549
+ }
550
+
551
+ _path_params: Dict[str, str] = {}
552
+ _query_params: List[Tuple[str, str]] = []
553
+ _header_params: Dict[str, Optional[str]] = _headers or {}
554
+ _form_params: List[Tuple[str, str]] = []
555
+ _files: Dict[
556
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
557
+ ] = {}
558
+ _body_params: Optional[bytes] = None
559
+
560
+ # process the path parameters
561
+ # process the query parameters
562
+ # process the header parameters
563
+ # process the form parameters
564
+ # process the body parameter
565
+ if batch_analyze_emails_request is not None:
566
+ _body_params = batch_analyze_emails_request
567
+
568
+
569
+ # set the HTTP header `Accept`
570
+ if 'Accept' not in _header_params:
571
+ _header_params['Accept'] = self.api_client.select_header_accept(
572
+ [
573
+ 'application/json'
574
+ ]
575
+ )
576
+
577
+ # set the HTTP header `Content-Type`
578
+ if _content_type:
579
+ _header_params['Content-Type'] = _content_type
580
+ else:
581
+ _default_content_type = (
582
+ self.api_client.select_header_content_type(
583
+ [
584
+ 'application/json',
585
+ 'multipart/form-data',
586
+ 'text/plain'
587
+ ]
588
+ )
589
+ )
590
+ if _default_content_type is not None:
591
+ _header_params['Content-Type'] = _default_content_type
592
+
593
+ # authentication setting
594
+ _auth_settings: List[str] = [
595
+ 'opportifyToken'
596
+ ]
597
+
598
+ return self.api_client.param_serialize(
599
+ method='POST',
600
+ resource_path='/email/batch',
601
+ path_params=_path_params,
602
+ query_params=_query_params,
603
+ header_params=_header_params,
604
+ body=_body_params,
605
+ post_params=_form_params,
606
+ files=_files,
607
+ auth_settings=_auth_settings,
608
+ collection_formats=_collection_formats,
609
+ _host=_host,
610
+ _request_auth=_request_auth
611
+ )
612
+
613
+
614
+
615
+
616
+ @validate_call
617
+ def get_email_batch_status(
618
+ self,
619
+ job_id: Annotated[StrictStr, Field(description="The unique identifier of the batch job to retrieve status for.")],
620
+ _request_timeout: Union[
621
+ None,
622
+ Annotated[StrictFloat, Field(gt=0)],
623
+ Tuple[
624
+ Annotated[StrictFloat, Field(gt=0)],
625
+ Annotated[StrictFloat, Field(gt=0)]
626
+ ]
627
+ ] = None,
628
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
629
+ _content_type: Optional[StrictStr] = None,
630
+ _headers: Optional[Dict[StrictStr, Any]] = None,
631
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
632
+ ) -> GetEmailBatchStatus200Response:
633
+ """Get Email Batch Status
634
+
635
+ The **Get Email Batch Status** endpoint allows you to retrieve the current status of a previously submitted batch processing job. Use this endpoint to track the progress of your batch email analysis request and retrieve results when processing is complete. ### Response Information: - When status is `QUEUED`: The job is in the processing queue waiting to be processed. - When status is `PROCESSING`: The job is actively being processed. - When status is `COMPLETED`: The job has finished successfully. - When status is `ERROR`: An issue occurred during processing; check the statusDescription for details.
636
+
637
+ :param job_id: The unique identifier of the batch job to retrieve status for. (required)
638
+ :type job_id: str
639
+ :param _request_timeout: timeout setting for this request. If one
640
+ number provided, it will be total request
641
+ timeout. It can also be a pair (tuple) of
642
+ (connection, read) timeouts.
643
+ :type _request_timeout: int, tuple(int, int), optional
644
+ :param _request_auth: set to override the auth_settings for an a single
645
+ request; this effectively ignores the
646
+ authentication in the spec for a single request.
647
+ :type _request_auth: dict, optional
648
+ :param _content_type: force content-type for the request.
649
+ :type _content_type: str, Optional
650
+ :param _headers: set to override the headers for a single
651
+ request; this effectively ignores the headers
652
+ in the spec for a single request.
653
+ :type _headers: dict, optional
654
+ :param _host_index: set to override the host_index for a single
655
+ request; this effectively ignores the host_index
656
+ in the spec for a single request.
657
+ :type _host_index: int, optional
658
+ :return: Returns the result object.
659
+ """ # noqa: E501
660
+
661
+ _param = self._get_email_batch_status_serialize(
662
+ job_id=job_id,
663
+ _request_auth=_request_auth,
664
+ _content_type=_content_type,
665
+ _headers=_headers,
666
+ _host_index=_host_index
667
+ )
668
+
669
+ _response_types_map: Dict[str, Optional[str]] = {
670
+ '200': "GetEmailBatchStatus200Response",
671
+ '404': "GetEmailBatchStatus404Response",
672
+ '403': "BatchAnalyzeEmails403Response",
673
+ '500': "AnalyzeEmail500Response",
674
+ }
675
+ response_data = self.api_client.call_api(
676
+ *_param,
677
+ _request_timeout=_request_timeout
678
+ )
679
+ response_data.read()
680
+ return self.api_client.response_deserialize(
681
+ response_data=response_data,
682
+ response_types_map=_response_types_map,
683
+ ).data
684
+
685
+
686
+ @validate_call
687
+ def get_email_batch_status_with_http_info(
688
+ self,
689
+ job_id: Annotated[StrictStr, Field(description="The unique identifier of the batch job to retrieve status for.")],
690
+ _request_timeout: Union[
691
+ None,
692
+ Annotated[StrictFloat, Field(gt=0)],
693
+ Tuple[
694
+ Annotated[StrictFloat, Field(gt=0)],
695
+ Annotated[StrictFloat, Field(gt=0)]
696
+ ]
697
+ ] = None,
698
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
699
+ _content_type: Optional[StrictStr] = None,
700
+ _headers: Optional[Dict[StrictStr, Any]] = None,
701
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
702
+ ) -> ApiResponse[GetEmailBatchStatus200Response]:
703
+ """Get Email Batch Status
704
+
705
+ The **Get Email Batch Status** endpoint allows you to retrieve the current status of a previously submitted batch processing job. Use this endpoint to track the progress of your batch email analysis request and retrieve results when processing is complete. ### Response Information: - When status is `QUEUED`: The job is in the processing queue waiting to be processed. - When status is `PROCESSING`: The job is actively being processed. - When status is `COMPLETED`: The job has finished successfully. - When status is `ERROR`: An issue occurred during processing; check the statusDescription for details.
706
+
707
+ :param job_id: The unique identifier of the batch job to retrieve status for. (required)
708
+ :type job_id: str
709
+ :param _request_timeout: timeout setting for this request. If one
710
+ number provided, it will be total request
711
+ timeout. It can also be a pair (tuple) of
712
+ (connection, read) timeouts.
713
+ :type _request_timeout: int, tuple(int, int), optional
714
+ :param _request_auth: set to override the auth_settings for an a single
715
+ request; this effectively ignores the
716
+ authentication in the spec for a single request.
717
+ :type _request_auth: dict, optional
718
+ :param _content_type: force content-type for the request.
719
+ :type _content_type: str, Optional
720
+ :param _headers: set to override the headers for a single
721
+ request; this effectively ignores the headers
722
+ in the spec for a single request.
723
+ :type _headers: dict, optional
724
+ :param _host_index: set to override the host_index for a single
725
+ request; this effectively ignores the host_index
726
+ in the spec for a single request.
727
+ :type _host_index: int, optional
728
+ :return: Returns the result object.
729
+ """ # noqa: E501
730
+
731
+ _param = self._get_email_batch_status_serialize(
732
+ job_id=job_id,
733
+ _request_auth=_request_auth,
734
+ _content_type=_content_type,
735
+ _headers=_headers,
736
+ _host_index=_host_index
737
+ )
738
+
739
+ _response_types_map: Dict[str, Optional[str]] = {
740
+ '200': "GetEmailBatchStatus200Response",
741
+ '404': "GetEmailBatchStatus404Response",
742
+ '403': "BatchAnalyzeEmails403Response",
743
+ '500': "AnalyzeEmail500Response",
744
+ }
745
+ response_data = self.api_client.call_api(
746
+ *_param,
747
+ _request_timeout=_request_timeout
748
+ )
749
+ response_data.read()
750
+ return self.api_client.response_deserialize(
751
+ response_data=response_data,
752
+ response_types_map=_response_types_map,
753
+ )
754
+
755
+
756
+ @validate_call
757
+ def get_email_batch_status_without_preload_content(
758
+ self,
759
+ job_id: Annotated[StrictStr, Field(description="The unique identifier of the batch job to retrieve status for.")],
760
+ _request_timeout: Union[
761
+ None,
762
+ Annotated[StrictFloat, Field(gt=0)],
763
+ Tuple[
764
+ Annotated[StrictFloat, Field(gt=0)],
765
+ Annotated[StrictFloat, Field(gt=0)]
766
+ ]
767
+ ] = None,
768
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
769
+ _content_type: Optional[StrictStr] = None,
770
+ _headers: Optional[Dict[StrictStr, Any]] = None,
771
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
772
+ ) -> RESTResponseType:
773
+ """Get Email Batch Status
774
+
775
+ The **Get Email Batch Status** endpoint allows you to retrieve the current status of a previously submitted batch processing job. Use this endpoint to track the progress of your batch email analysis request and retrieve results when processing is complete. ### Response Information: - When status is `QUEUED`: The job is in the processing queue waiting to be processed. - When status is `PROCESSING`: The job is actively being processed. - When status is `COMPLETED`: The job has finished successfully. - When status is `ERROR`: An issue occurred during processing; check the statusDescription for details.
776
+
777
+ :param job_id: The unique identifier of the batch job to retrieve status for. (required)
778
+ :type job_id: str
779
+ :param _request_timeout: timeout setting for this request. If one
780
+ number provided, it will be total request
781
+ timeout. It can also be a pair (tuple) of
782
+ (connection, read) timeouts.
783
+ :type _request_timeout: int, tuple(int, int), optional
784
+ :param _request_auth: set to override the auth_settings for an a single
785
+ request; this effectively ignores the
786
+ authentication in the spec for a single request.
787
+ :type _request_auth: dict, optional
788
+ :param _content_type: force content-type for the request.
789
+ :type _content_type: str, Optional
790
+ :param _headers: set to override the headers for a single
791
+ request; this effectively ignores the headers
792
+ in the spec for a single request.
793
+ :type _headers: dict, optional
794
+ :param _host_index: set to override the host_index for a single
795
+ request; this effectively ignores the host_index
796
+ in the spec for a single request.
797
+ :type _host_index: int, optional
798
+ :return: Returns the result object.
799
+ """ # noqa: E501
800
+
801
+ _param = self._get_email_batch_status_serialize(
802
+ job_id=job_id,
803
+ _request_auth=_request_auth,
804
+ _content_type=_content_type,
805
+ _headers=_headers,
806
+ _host_index=_host_index
807
+ )
808
+
809
+ _response_types_map: Dict[str, Optional[str]] = {
810
+ '200': "GetEmailBatchStatus200Response",
811
+ '404': "GetEmailBatchStatus404Response",
812
+ '403': "BatchAnalyzeEmails403Response",
813
+ '500': "AnalyzeEmail500Response",
814
+ }
815
+ response_data = self.api_client.call_api(
816
+ *_param,
817
+ _request_timeout=_request_timeout
818
+ )
819
+ return response_data.response
820
+
821
+
822
+ def _get_email_batch_status_serialize(
823
+ self,
824
+ job_id,
825
+ _request_auth,
826
+ _content_type,
827
+ _headers,
828
+ _host_index,
829
+ ) -> RequestSerialized:
830
+
831
+ _host = None
832
+
833
+ _collection_formats: Dict[str, str] = {
834
+ }
835
+
836
+ _path_params: Dict[str, str] = {}
837
+ _query_params: List[Tuple[str, str]] = []
838
+ _header_params: Dict[str, Optional[str]] = _headers or {}
839
+ _form_params: List[Tuple[str, str]] = []
840
+ _files: Dict[
841
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
842
+ ] = {}
843
+ _body_params: Optional[bytes] = None
844
+
845
+ # process the path parameters
846
+ if job_id is not None:
847
+ _path_params['jobId'] = job_id
848
+ # process the query parameters
849
+ # process the header parameters
850
+ # process the form parameters
851
+ # process the body parameter
852
+
853
+
854
+ # set the HTTP header `Accept`
855
+ if 'Accept' not in _header_params:
856
+ _header_params['Accept'] = self.api_client.select_header_accept(
857
+ [
858
+ 'application/json'
859
+ ]
860
+ )
861
+
862
+
863
+ # authentication setting
864
+ _auth_settings: List[str] = [
865
+ 'opportifyToken'
866
+ ]
867
+
868
+ return self.api_client.param_serialize(
869
+ method='GET',
870
+ resource_path='/email/batch/{jobId}',
871
+ path_params=_path_params,
872
+ query_params=_query_params,
873
+ header_params=_header_params,
874
+ body=_body_params,
875
+ post_params=_form_params,
876
+ files=_files,
877
+ auth_settings=_auth_settings,
878
+ collection_formats=_collection_formats,
879
+ _host=_host,
880
+ _request_auth=_request_auth
881
+ )
882
+
883
+