All URIs are relative to https://api.smooch.io
| Method | HTTP request | Description |
|---|---|---|
| create_webhook | POST /v2/apps/{appId}/integrations/{integrationId}/webhooks | Create Webhook |
| delete_webhook | DELETE /v2/apps/{appId}/integrations/{integrationId}/webhooks/{webhookId} | Delete Webhook |
| get_webhook | GET /v2/apps/{appId}/integrations/{integrationId}/webhooks/{webhookId} | Get Webhook |
| list_webhooks | GET /v2/apps/{appId}/integrations/{integrationId}/webhooks | List Webhooks |
| update_webhook | PATCH /v2/apps/{appId}/integrations/{integrationId}/webhooks/{webhookId} | Update Webhook |
WebhookResponse create_webhook(app_id, integration_id, webhook_create_body)
Create Webhook
Creates a new webhook associated with a Sunshine Conversations Connect integration or a custom integration.
- Basic Authentication (basicAuth):
- Bearer (JWT) Authentication (bearerAuth):
import sunshine_conversations_client
from sunshine_conversations_client.models.webhook_create_body import WebhookCreateBody
from sunshine_conversations_client.models.webhook_response import WebhookResponse
from sunshine_conversations_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.smooch.io
# See configuration.py for a list of all supported configuration parameters.
configuration = sunshine_conversations_client.Configuration(
host = "https://api.smooch.io"
)
# 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 HTTP basic authorization: basicAuth
configuration = sunshine_conversations_client.Configuration(
username = os.environ["USERNAME"],
password = os.environ["PASSWORD"]
)
# Configure Bearer authorization (JWT): bearerAuth
configuration = sunshine_conversations_client.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with sunshine_conversations_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = sunshine_conversations_client.WebhooksApi(api_client)
app_id = '5d8cff3cd55b040010928b5b' # str | Identifies the app.
integration_id = '029c31f25a21b47effd7be90' # str | The id of the integration.
webhook_create_body = sunshine_conversations_client.WebhookCreateBody() # WebhookCreateBody |
try:
# Create Webhook
api_response = api_instance.create_webhook(app_id, integration_id, webhook_create_body)
print("The response of WebhooksApi->create_webhook:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling WebhooksApi->create_webhook: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| app_id | str | Identifies the app. | |
| integration_id | str | The id of the integration. | |
| webhook_create_body | WebhookCreateBody |
- Content-Type: application/json
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 201 | Created | - |
| 400 | Bad request | - |
| 403 | Forbidden | - |
| 404 | Not found | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
object delete_webhook(app_id, integration_id, webhook_id)
Delete Webhook
Deletes the specified webhook associated with a Sunshine Conversations Connect integration or a custom integration.
- Basic Authentication (basicAuth):
- Bearer (JWT) Authentication (bearerAuth):
import sunshine_conversations_client
from sunshine_conversations_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.smooch.io
# See configuration.py for a list of all supported configuration parameters.
configuration = sunshine_conversations_client.Configuration(
host = "https://api.smooch.io"
)
# 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 HTTP basic authorization: basicAuth
configuration = sunshine_conversations_client.Configuration(
username = os.environ["USERNAME"],
password = os.environ["PASSWORD"]
)
# Configure Bearer authorization (JWT): bearerAuth
configuration = sunshine_conversations_client.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with sunshine_conversations_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = sunshine_conversations_client.WebhooksApi(api_client)
app_id = '5d8cff3cd55b040010928b5b' # str | Identifies the app.
integration_id = '029c31f25a21b47effd7be90' # str | The id of the integration.
webhook_id = '029c31f25a21b47effd7be90' # str | The id of the webhook.
try:
# Delete Webhook
api_response = api_instance.delete_webhook(app_id, integration_id, webhook_id)
print("The response of WebhooksApi->delete_webhook:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling WebhooksApi->delete_webhook: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| app_id | str | Identifies the app. | |
| integration_id | str | The id of the integration. | |
| webhook_id | str | The id of the webhook. |
object
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Ok | - |
| 404 | Not found | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
WebhookResponse get_webhook(app_id, integration_id, webhook_id)
Get Webhook
Gets the specified webhook associated with a Sunshine Conversations Connect integration or a custom integration.
- Basic Authentication (basicAuth):
- Bearer (JWT) Authentication (bearerAuth):
import sunshine_conversations_client
from sunshine_conversations_client.models.webhook_response import WebhookResponse
from sunshine_conversations_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.smooch.io
# See configuration.py for a list of all supported configuration parameters.
configuration = sunshine_conversations_client.Configuration(
host = "https://api.smooch.io"
)
# 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 HTTP basic authorization: basicAuth
configuration = sunshine_conversations_client.Configuration(
username = os.environ["USERNAME"],
password = os.environ["PASSWORD"]
)
# Configure Bearer authorization (JWT): bearerAuth
configuration = sunshine_conversations_client.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with sunshine_conversations_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = sunshine_conversations_client.WebhooksApi(api_client)
app_id = '5d8cff3cd55b040010928b5b' # str | Identifies the app.
integration_id = '029c31f25a21b47effd7be90' # str | The id of the integration.
webhook_id = '029c31f25a21b47effd7be90' # str | The id of the webhook.
try:
# Get Webhook
api_response = api_instance.get_webhook(app_id, integration_id, webhook_id)
print("The response of WebhooksApi->get_webhook:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling WebhooksApi->get_webhook: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| app_id | str | Identifies the app. | |
| integration_id | str | The id of the integration. | |
| webhook_id | str | The id of the webhook. |
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Ok | - |
| 404 | Not found | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
WebhookListResponse list_webhooks(app_id, integration_id)
List Webhooks
Lists all webhooks for a given Sunshine Conversations Connect integration or custom integration.
- Basic Authentication (basicAuth):
- Bearer (JWT) Authentication (bearerAuth):
import sunshine_conversations_client
from sunshine_conversations_client.models.webhook_list_response import WebhookListResponse
from sunshine_conversations_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.smooch.io
# See configuration.py for a list of all supported configuration parameters.
configuration = sunshine_conversations_client.Configuration(
host = "https://api.smooch.io"
)
# 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 HTTP basic authorization: basicAuth
configuration = sunshine_conversations_client.Configuration(
username = os.environ["USERNAME"],
password = os.environ["PASSWORD"]
)
# Configure Bearer authorization (JWT): bearerAuth
configuration = sunshine_conversations_client.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with sunshine_conversations_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = sunshine_conversations_client.WebhooksApi(api_client)
app_id = '5d8cff3cd55b040010928b5b' # str | Identifies the app.
integration_id = '029c31f25a21b47effd7be90' # str | The id of the integration.
try:
# List Webhooks
api_response = api_instance.list_webhooks(app_id, integration_id)
print("The response of WebhooksApi->list_webhooks:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling WebhooksApi->list_webhooks: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| app_id | str | Identifies the app. | |
| integration_id | str | The id of the integration. |
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Ok | - |
| 403 | Forbidden | - |
| 404 | Not found | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
WebhookResponse update_webhook(app_id, integration_id, webhook_id, webhook_body)
Update Webhook
Updates the specified webhook associated with a Sunshine Conversations Connect integration or a custom integration.
- Basic Authentication (basicAuth):
- Bearer (JWT) Authentication (bearerAuth):
import sunshine_conversations_client
from sunshine_conversations_client.models.webhook_body import WebhookBody
from sunshine_conversations_client.models.webhook_response import WebhookResponse
from sunshine_conversations_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.smooch.io
# See configuration.py for a list of all supported configuration parameters.
configuration = sunshine_conversations_client.Configuration(
host = "https://api.smooch.io"
)
# 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 HTTP basic authorization: basicAuth
configuration = sunshine_conversations_client.Configuration(
username = os.environ["USERNAME"],
password = os.environ["PASSWORD"]
)
# Configure Bearer authorization (JWT): bearerAuth
configuration = sunshine_conversations_client.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with sunshine_conversations_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = sunshine_conversations_client.WebhooksApi(api_client)
app_id = '5d8cff3cd55b040010928b5b' # str | Identifies the app.
integration_id = '029c31f25a21b47effd7be90' # str | The id of the integration.
webhook_id = '029c31f25a21b47effd7be90' # str | The id of the webhook.
webhook_body = sunshine_conversations_client.WebhookBody() # WebhookBody |
try:
# Update Webhook
api_response = api_instance.update_webhook(app_id, integration_id, webhook_id, webhook_body)
print("The response of WebhooksApi->update_webhook:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling WebhooksApi->update_webhook: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| app_id | str | Identifies the app. | |
| integration_id | str | The id of the integration. | |
| webhook_id | str | The id of the webhook. | |
| webhook_body | WebhookBody |
- Content-Type: application/json
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Ok | - |
| 400 | Bad request | - |
| 404 | Not found | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]