sinch.domains.conversation.api.v1.consents_apis module

class sinch.domains.conversation.api.v1.consents_apis.Consents(sinch)[source]

Bases: BaseConversation

list_identities(
app_id: str,
list_type: Literal['OPT_OUT_ALL', 'OPT_OUT_MARKETING', 'OPT_OUT_NOTIFICATION'] | Annotated[str, Strict(strict=True)],
page_size: int | None = None,
page_token: str | None = None,
**kwargs,
) → Paginator[ListConsentIdentitiesResponse, ConsentIdentityResponse][source]

Get all identities contained within a consent list for a given project id, app id, and list type.

Parameters:
  • app_id (str) – (required) The unique ID of the app.

  • list_type (ConsentsListType) – (required) The consent list type. One of OPT_OUT_ALL, OPT_OUT_MARKETING and OPT_OUT_NOTIFICATION.

  • page_size (Optional[int]) – (optional) The maximum number of records to fetch. The server default is 10 and the maximum is 50.

  • page_token (Optional[str]) – (optional) A page token, received from a previous call. Provide this to retrieve a subsequent page.

  • **kwargs –

    Additional parameters for the request.

Returns:

A paginator for iterating through the identities of the consent list.

Return type:

Paginator[ListConsentIdentitiesResponse, ConsentIdentityResponse]

For detailed documentation, visit https://developers.sinch.com/docs/conversation/.

list_audit_records(
app_id: str,
identity: str,
**kwargs,
) → AuditRecordsResponse[source]

Get all audit records associated with the given identity from the consent lists within the specified project and app.

Parameters:
  • app_id (str) – (required) The unique ID of the app.

  • identity (str) – (required) An identity to use on Consent audit records queries.

  • **kwargs –

    Additional parameters for the request.

Returns:

The identity and its audit records.

Return type:

AuditRecordsResponse

For detailed documentation, visit https://developers.sinch.com/docs/conversation/.