sinch.domains.conversation.api.v1.event_destinations_apis module
- class sinch.domains.conversation.api.v1.event_destinations_apis.EventDestinations(sinch)[source]
Bases:
BaseConversation- create(
- app_id: str,
- target: str,
- client_credentials: ClientCredentialsDict | None | Unset = <sinch.core.sentinel.Unset object>,
- secret: str | None | Unset = <sinch.core.sentinel.Unset object>,
- target_type: Literal['DISMISS',
- 'HTTP'] | ~typing.Annotated[str,
- ~pydantic.types.Strict(strict=True)] | None | ~sinch.core.sentinel.Unset = <sinch.core.sentinel.Unset object>,
- triggers: Literal['UNSPECIFIED_TRIGGER',
- 'MESSAGE_DELIVERY',
- 'EVENT_DELIVERY',
- 'MESSAGE_INBOUND',
- 'EVENT_INBOUND',
- 'CONVERSATION_START',
- 'CONVERSATION_STOP',
- 'CONTACT_CREATE',
- 'CONTACT_DELETE',
- 'CONTACT_MERGE',
- 'CONTACT_UPDATE',
- 'UNSUPPORTED',
- 'OPT_IN',
- 'OPT_OUT',
- 'CAPABILITY',
- 'CONVERSATION_DELETE',
- 'CONTACT_IDENTITIES_DUPLICATION',
- 'CHANNEL_EVENT',
- 'SMART_CONVERSATION',
- 'MESSAGE_INBOUND_SMART_CONVERSATION_REDACTION',
- 'RECORD_NOTIFICATION',
- 'MESSAGE_SUBMIT'] | ~typing.Annotated[str,
- ~pydantic.types.Strict(strict=True)]] | None | ~sinch.core.sentinel.Unset = <sinch.core.sentinel.Unset object>,
- **kwargs,
Creates an event destination for receiving events on specific triggers. You can create up to 5 event destinations per app.
- Parameters:
app_id (str) – The app that this event destination belongs to.
target (str) – The target url where events should be sent to. Maximum URL length is 742. The conversation-api.*.sinch.com subdomains are forbidden.
client_credentials (UnsetOr[Optional[ClientCredentialsDict]]) – Optional. Used for OAuth2 authentication.
secret (UnsetOr[Optional[str]]) – Optional secret used to sign the contents of the events.
target_type (UnsetOr[Optional[EventDestinationTargetType]]) – The type of the target.
triggers (UnsetOr[Optional[List[EventDestinationTriggerType]]]) – The triggers that result in an event being sent to the target.
**kwargs –
Additional parameters for the request.
- Returns:
The created event destination.
- Return type:
For detailed documentation, visit https://developers.sinch.com/docs/conversation/.
- list(
- app_id: str,
- **kwargs,
List all event destinations for a given app as specified by the App ID.
- Parameters:
app_id (str) – The ID of the app.
**kwargs –
Additional parameters for the request.
- Returns:
A paginator for iterating through the event destinations.
- Return type:
Paginator[ListEventDestinationsResponse, EventDestinationResponse]
For detailed documentation, visit https://developers.sinch.com/docs/conversation/.
- get(
- event_destination_id: str,
- **kwargs,
Get an event destination as specified by the event destination ID.
- Parameters:
event_destination_id (str) – The ID of the event destination to retrieve.
**kwargs –
Additional parameters for the request.
- Returns:
The event destination details.
- Return type:
For detailed documentation, visit https://developers.sinch.com/docs/conversation/.
- update(
- event_destination_id: str,
- app_id: str | Unset = <sinch.core.sentinel.Unset object>,
- target: str | Unset = <sinch.core.sentinel.Unset object>,
- client_credentials: ClientCredentialsDict | None | Unset = <sinch.core.sentinel.Unset object>,
- secret: str | None | Unset = <sinch.core.sentinel.Unset object>,
- target_type: Literal['DISMISS',
- 'HTTP'] | ~typing.Annotated[str,
- ~pydantic.types.Strict(strict=True)] | None | ~sinch.core.sentinel.Unset = <sinch.core.sentinel.Unset object>,
- triggers: Literal['UNSPECIFIED_TRIGGER',
- 'MESSAGE_DELIVERY',
- 'EVENT_DELIVERY',
- 'MESSAGE_INBOUND',
- 'EVENT_INBOUND',
- 'CONVERSATION_START',
- 'CONVERSATION_STOP',
- 'CONTACT_CREATE',
- 'CONTACT_DELETE',
- 'CONTACT_MERGE',
- 'CONTACT_UPDATE',
- 'UNSUPPORTED',
- 'OPT_IN',
- 'OPT_OUT',
- 'CAPABILITY',
- 'CONVERSATION_DELETE',
- 'CONTACT_IDENTITIES_DUPLICATION',
- 'CHANNEL_EVENT',
- 'SMART_CONVERSATION',
- 'MESSAGE_INBOUND_SMART_CONVERSATION_REDACTION',
- 'RECORD_NOTIFICATION',
- 'MESSAGE_SUBMIT'] | ~typing.Annotated[str,
- ~pydantic.types.Strict(strict=True)]] | None | ~sinch.core.sentinel.Unset = <sinch.core.sentinel.Unset object>,
- **kwargs,
Updates an existing event destination as specified by the event destination ID.
Omitted parameters are left untouched on the server; passing
Noneexplicitly clears the field.- Parameters:
event_destination_id (str) – The ID of the event destination to update.
app_id (UnsetOr[Optional[str]]) – The app that this event destination belongs to.
target (UnsetOr[Optional[str]]) – The target url where events should be sent to.
client_credentials (UnsetOr[Optional[ClientCredentialsDict]]) – Optional. Used for OAuth2 authentication.
secret (UnsetOr[Optional[str]]) – Optional secret used to sign the contents of the events.
target_type (UnsetOr[Optional[EventDestinationTargetType]]) – The type of the target.
triggers (UnsetOr[Optional[List[EventDestinationTriggerType]]]) – The triggers that result in an event being sent to the target.
**kwargs –
Additional parameters for the request.
- Returns:
The updated event destination.
- Return type:
For detailed documentation, visit https://developers.sinch.com/docs/conversation/.
- delete(event_destination_id: str, **kwargs) None[source]
Deletes an event destination as specified by the event destination ID.
- Parameters:
event_destination_id (str) – The ID of the event destination to delete.
**kwargs –
Additional parameters for the request.
- Returns:
None
- Return type:
None
For detailed documentation, visit https://developers.sinch.com/docs/conversation/.