Skip to content

Latest commit

 

History

History
1101 lines (781 loc) · 46.7 KB

File metadata and controls

1101 lines (781 loc) · 46.7 KB

twentycrm_client.MessageChannelsApi

All URIs are relative to https://crm.example.com/rest

Method HTTP request Description
create_many_message_channels POST /batch/messageChannels Create Many messageChannels
create_one_message_channel POST /messageChannels Create One messageChannel
delete_many_message_channels DELETE /messageChannels Delete Many messageChannels
delete_one_message_channel DELETE /messageChannels/{id} Delete One messageChannel
find_many_message_channels GET /messageChannels Find Many messageChannels
find_message_channel_duplicates POST /messageChannels/duplicates Find messageChannel Duplicates
find_one_message_channel GET /messageChannels/{id} Find One messageChannel
group_by_message_channels GET /messageChannels/groupBy Group By messageChannels
merge_many_message_channels PATCH /messageChannels/merge Merge Many messageChannels
restore_many_message_channels PATCH /restore/messageChannels Restore Many messageChannels
restore_one_message_channel PATCH /restore/messageChannels/{id} Restore One messageChannel
update_many_message_channels PATCH /messageChannels Update Many messageChannels
update_one_message_channel PATCH /messageChannels/{id} Update One messageChannel

create_many_message_channels

CreateManyMessageChannels201Response create_many_message_channels(message_channel, depth=depth, upsert=upsert)

Create Many messageChannels

Example

  • Bearer (JWT) Authentication (bearerAuth):
import twentycrm_client
from twentycrm_client.models.create_many_message_channels201_response import CreateManyMessageChannels201Response
from twentycrm_client.models.message_channel import MessageChannel
from twentycrm_client.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://crm.example.com/rest
# See configuration.py for a list of all supported configuration parameters.
configuration = twentycrm_client.Configuration(
    host = "https://crm.example.com/rest"
)

# 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 Bearer authorization (JWT): bearerAuth
configuration = twentycrm_client.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with twentycrm_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = twentycrm_client.MessageChannelsApi(api_client)
    message_channel = [twentycrm_client.MessageChannel()] # List[MessageChannel] | 
    depth = 1 # int | Determines the level of nested related objects to include in the response.     - 0: Primary object only     - 1: Primary object + direct relations (optional) (default to 1)
    upsert = False # bool | If true, creates the object or updates it if it already exists. (optional) (default to False)

    try:
        # Create Many messageChannels
        api_response = api_instance.create_many_message_channels(message_channel, depth=depth, upsert=upsert)
        print("The response of MessageChannelsApi->create_many_message_channels:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling MessageChannelsApi->create_many_message_channels: %s\n" % e)

Parameters

Name Type Description Notes
message_channel List[MessageChannel]
depth int Determines the level of nested related objects to include in the response. - 0: Primary object only - 1: Primary object + direct relations [optional] [default to 1]
upsert bool If true, creates the object or updates it if it already exists. [optional] [default to False]

Return type

CreateManyMessageChannels201Response

Authorization

bearerAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

HTTP response details

Status code Description Response headers
201 Successful operation -
400 Bad Request -
401 Unauthorized -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

create_one_message_channel

CreateOneMessageChannel201Response create_one_message_channel(message_channel, depth=depth, upsert=upsert)

Create One messageChannel

Example

  • Bearer (JWT) Authentication (bearerAuth):
import twentycrm_client
from twentycrm_client.models.create_one_message_channel201_response import CreateOneMessageChannel201Response
from twentycrm_client.models.message_channel import MessageChannel
from twentycrm_client.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://crm.example.com/rest
# See configuration.py for a list of all supported configuration parameters.
configuration = twentycrm_client.Configuration(
    host = "https://crm.example.com/rest"
)

# 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 Bearer authorization (JWT): bearerAuth
configuration = twentycrm_client.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with twentycrm_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = twentycrm_client.MessageChannelsApi(api_client)
    message_channel = twentycrm_client.MessageChannel() # MessageChannel | body
    depth = 1 # int | Determines the level of nested related objects to include in the response.     - 0: Primary object only     - 1: Primary object + direct relations (optional) (default to 1)
    upsert = False # bool | If true, creates the object or updates it if it already exists. (optional) (default to False)

    try:
        # Create One messageChannel
        api_response = api_instance.create_one_message_channel(message_channel, depth=depth, upsert=upsert)
        print("The response of MessageChannelsApi->create_one_message_channel:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling MessageChannelsApi->create_one_message_channel: %s\n" % e)

Parameters

Name Type Description Notes
message_channel MessageChannel body
depth int Determines the level of nested related objects to include in the response. - 0: Primary object only - 1: Primary object + direct relations [optional] [default to 1]
upsert bool If true, creates the object or updates it if it already exists. [optional] [default to False]

Return type

CreateOneMessageChannel201Response

Authorization

bearerAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

HTTP response details

Status code Description Response headers
201 Successful operation -
400 Bad Request -
401 Unauthorized -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

delete_many_message_channels

DeleteManyMessageChannels200Response delete_many_message_channels(filter=filter, soft_delete=soft_delete)

Delete Many messageChannels

Example

  • Bearer (JWT) Authentication (bearerAuth):
import twentycrm_client
from twentycrm_client.models.delete_many_message_channels200_response import DeleteManyMessageChannels200Response
from twentycrm_client.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://crm.example.com/rest
# See configuration.py for a list of all supported configuration parameters.
configuration = twentycrm_client.Configuration(
    host = "https://crm.example.com/rest"
)

# 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 Bearer authorization (JWT): bearerAuth
configuration = twentycrm_client.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with twentycrm_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = twentycrm_client.MessageChannelsApi(api_client)
    filter = 'createdAt[gte]:\"2023-01-01\"' # str | Format: field[COMPARATOR]:value,field2[COMPARATOR]:value2.     For like/ilike, use % as a wildcard (e.g. %value% for substring match).     Refer to the filter section at the top of the page for more details. (optional)
    soft_delete = False # bool | If true, soft deletes the objects. If false, objects are permanently deleted. (optional) (default to False)

    try:
        # Delete Many messageChannels
        api_response = api_instance.delete_many_message_channels(filter=filter, soft_delete=soft_delete)
        print("The response of MessageChannelsApi->delete_many_message_channels:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling MessageChannelsApi->delete_many_message_channels: %s\n" % e)

Parameters

Name Type Description Notes
filter str Format: field[COMPARATOR]:value,field2[COMPARATOR]:value2. For like/ilike, use % as a wildcard (e.g. %value% for substring match). Refer to the filter section at the top of the page for more details. [optional]
soft_delete bool If true, soft deletes the objects. If false, objects are permanently deleted. [optional] [default to False]

Return type

DeleteManyMessageChannels200Response

Authorization

bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Successful operation -
400 Bad Request -
401 Unauthorized -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

delete_one_message_channel

DeleteOneMessageChannel200Response delete_one_message_channel(id, soft_delete=soft_delete)

Delete One messageChannel

Example

  • Bearer (JWT) Authentication (bearerAuth):
import twentycrm_client
from twentycrm_client.models.delete_one_message_channel200_response import DeleteOneMessageChannel200Response
from twentycrm_client.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://crm.example.com/rest
# See configuration.py for a list of all supported configuration parameters.
configuration = twentycrm_client.Configuration(
    host = "https://crm.example.com/rest"
)

# 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 Bearer authorization (JWT): bearerAuth
configuration = twentycrm_client.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with twentycrm_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = twentycrm_client.MessageChannelsApi(api_client)
    id = UUID('38400000-8cf0-11bd-b23e-10b96e4ef00d') # UUID | Object id.
    soft_delete = False # bool | If true, soft deletes the objects. If false, objects are permanently deleted. (optional) (default to False)

    try:
        # Delete One messageChannel
        api_response = api_instance.delete_one_message_channel(id, soft_delete=soft_delete)
        print("The response of MessageChannelsApi->delete_one_message_channel:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling MessageChannelsApi->delete_one_message_channel: %s\n" % e)

Parameters

Name Type Description Notes
id UUID Object id.
soft_delete bool If true, soft deletes the objects. If false, objects are permanently deleted. [optional] [default to False]

Return type

DeleteOneMessageChannel200Response

Authorization

bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Successful operation -
400 Bad Request -
401 Unauthorized -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

find_many_message_channels

FindManyMessageChannels200Response find_many_message_channels(order_by=order_by, filter=filter, limit=limit, depth=depth, starting_after=starting_after, ending_before=ending_before)

Find Many messageChannels

order_by, filter, limit, depth, starting_after or ending_before can be provided to request your messageChannels

Example

  • Bearer (JWT) Authentication (bearerAuth):
import twentycrm_client
from twentycrm_client.models.find_many_message_channels200_response import FindManyMessageChannels200Response
from twentycrm_client.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://crm.example.com/rest
# See configuration.py for a list of all supported configuration parameters.
configuration = twentycrm_client.Configuration(
    host = "https://crm.example.com/rest"
)

# 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 Bearer authorization (JWT): bearerAuth
configuration = twentycrm_client.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with twentycrm_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = twentycrm_client.MessageChannelsApi(api_client)
    order_by = 'createdAt' # str | Format: **field_name_1,field_name_2[DIRECTION_2]     Refer to the filter section at the top of the page for more details. (optional)
    filter = 'createdAt[gte]:\"2023-01-01\"' # str | Format: field[COMPARATOR]:value,field2[COMPARATOR]:value2.     For like/ilike, use % as a wildcard (e.g. %value% for substring match).     Refer to the filter section at the top of the page for more details. (optional)
    limit = 60 # int | Limits the number of objects returned. (optional) (default to 60)
    depth = 1 # int | Determines the level of nested related objects to include in the response.     - 0: Primary object only     - 1: Primary object + direct relations (optional) (default to 1)
    starting_after = 'starting_after_example' # str | Returns objects starting after a specific cursor. You can find cursors in **startCursor** and **endCursor** in **pageInfo** in response data (optional)
    ending_before = 'ending_before_example' # str | Returns objects ending before a specific cursor. You can find cursors in **startCursor** and **endCursor** in **pageInfo** in response data (optional)

    try:
        # Find Many messageChannels
        api_response = api_instance.find_many_message_channels(order_by=order_by, filter=filter, limit=limit, depth=depth, starting_after=starting_after, ending_before=ending_before)
        print("The response of MessageChannelsApi->find_many_message_channels:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling MessageChannelsApi->find_many_message_channels: %s\n" % e)

Parameters

Name Type Description Notes
order_by str Format: **field_name_1,field_name_2[DIRECTION_2] Refer to the filter section at the top of the page for more details. [optional]
filter str Format: field[COMPARATOR]:value,field2[COMPARATOR]:value2. For like/ilike, use % as a wildcard (e.g. %value% for substring match). Refer to the filter section at the top of the page for more details. [optional]
limit int Limits the number of objects returned. [optional] [default to 60]
depth int Determines the level of nested related objects to include in the response. - 0: Primary object only - 1: Primary object + direct relations [optional] [default to 1]
starting_after str Returns objects starting after a specific cursor. You can find cursors in startCursor and endCursor in pageInfo in response data [optional]
ending_before str Returns objects ending before a specific cursor. You can find cursors in startCursor and endCursor in pageInfo in response data [optional]

Return type

FindManyMessageChannels200Response

Authorization

bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Successful operation -
400 Bad Request -
401 Unauthorized -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

find_message_channel_duplicates

FindMessageChannelDuplicates200Response find_message_channel_duplicates(find_message_channel_duplicates_request, depth=depth)

Find messageChannel Duplicates

depth can be provided to request your messageChannel

Example

  • Bearer (JWT) Authentication (bearerAuth):
import twentycrm_client
from twentycrm_client.models.find_message_channel_duplicates200_response import FindMessageChannelDuplicates200Response
from twentycrm_client.models.find_message_channel_duplicates_request import FindMessageChannelDuplicatesRequest
from twentycrm_client.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://crm.example.com/rest
# See configuration.py for a list of all supported configuration parameters.
configuration = twentycrm_client.Configuration(
    host = "https://crm.example.com/rest"
)

# 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 Bearer authorization (JWT): bearerAuth
configuration = twentycrm_client.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with twentycrm_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = twentycrm_client.MessageChannelsApi(api_client)
    find_message_channel_duplicates_request = twentycrm_client.FindMessageChannelDuplicatesRequest() # FindMessageChannelDuplicatesRequest | body
    depth = 1 # int | Determines the level of nested related objects to include in the response.     - 0: Primary object only     - 1: Primary object + direct relations (optional) (default to 1)

    try:
        # Find messageChannel Duplicates
        api_response = api_instance.find_message_channel_duplicates(find_message_channel_duplicates_request, depth=depth)
        print("The response of MessageChannelsApi->find_message_channel_duplicates:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling MessageChannelsApi->find_message_channel_duplicates: %s\n" % e)

Parameters

Name Type Description Notes
find_message_channel_duplicates_request FindMessageChannelDuplicatesRequest body
depth int Determines the level of nested related objects to include in the response. - 0: Primary object only - 1: Primary object + direct relations [optional] [default to 1]

Return type

FindMessageChannelDuplicates200Response

Authorization

bearerAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Successful operation -
400 Bad Request -
401 Unauthorized -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

find_one_message_channel

FindOneMessageChannel200Response find_one_message_channel(id, depth=depth)

Find One messageChannel

depth can be provided to request your messageChannel

Example

  • Bearer (JWT) Authentication (bearerAuth):
import twentycrm_client
from twentycrm_client.models.find_one_message_channel200_response import FindOneMessageChannel200Response
from twentycrm_client.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://crm.example.com/rest
# See configuration.py for a list of all supported configuration parameters.
configuration = twentycrm_client.Configuration(
    host = "https://crm.example.com/rest"
)

# 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 Bearer authorization (JWT): bearerAuth
configuration = twentycrm_client.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with twentycrm_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = twentycrm_client.MessageChannelsApi(api_client)
    id = UUID('38400000-8cf0-11bd-b23e-10b96e4ef00d') # UUID | Object id.
    depth = 1 # int | Determines the level of nested related objects to include in the response.     - 0: Primary object only     - 1: Primary object + direct relations (optional) (default to 1)

    try:
        # Find One messageChannel
        api_response = api_instance.find_one_message_channel(id, depth=depth)
        print("The response of MessageChannelsApi->find_one_message_channel:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling MessageChannelsApi->find_one_message_channel: %s\n" % e)

Parameters

Name Type Description Notes
id UUID Object id.
depth int Determines the level of nested related objects to include in the response. - 0: Primary object only - 1: Primary object + direct relations [optional] [default to 1]

Return type

FindOneMessageChannel200Response

Authorization

bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Successful operation -
400 Bad Request -
401 Unauthorized -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

group_by_message_channels

GroupByMessageChannels200Response group_by_message_channels(group_by, filter=filter, order_by=order_by, limit=limit, view_id=view_id, aggregate=aggregate, include_records_sample=include_records_sample, order_by_for_records=order_by_for_records)

Group By messageChannels

Groups messageChannels by specified fields and optionally computes aggregate values for each group.

Example

  • Bearer (JWT) Authentication (bearerAuth):
import twentycrm_client
from twentycrm_client.models.group_by_message_channels200_response import GroupByMessageChannels200Response
from twentycrm_client.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://crm.example.com/rest
# See configuration.py for a list of all supported configuration parameters.
configuration = twentycrm_client.Configuration(
    host = "https://crm.example.com/rest"
)

# 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 Bearer authorization (JWT): bearerAuth
configuration = twentycrm_client.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with twentycrm_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = twentycrm_client.MessageChannelsApi(api_client)
    group_by = '[{\"updatedAt\": true}]' # str | Array of fields to group by. Each element can specify a field and optionally a subfield or granularity for date fields.
    filter = 'createdAt[gte]:\"2023-01-01\"' # str | Format: field[COMPARATOR]:value,field2[COMPARATOR]:value2.     For like/ilike, use % as a wildcard (e.g. %value% for substring match).     Refer to the filter section at the top of the page for more details. (optional)
    order_by = 'createdAt' # str | Format: **field_name_1,field_name_2[DIRECTION_2]     Refer to the filter section at the top of the page for more details. (optional)
    limit = 60 # int | Limits the number of objects returned. (optional) (default to 60)
    view_id = UUID('38400000-8cf0-11bd-b23e-10b96e4ef00d') # UUID | View ID to apply filters from. (optional)
    aggregate = '[\"countNotEmptyId\"]' # str | Array of aggregate operations to compute for each group. (optional)
    include_records_sample = False # bool | If true, includes a sample of records for each group in the response. (optional) (default to False)
    order_by_for_records = 'createdAt' # str | Order by clause for records within each group. Only applicable when include_records_sample is true. (optional)

    try:
        # Group By messageChannels
        api_response = api_instance.group_by_message_channels(group_by, filter=filter, order_by=order_by, limit=limit, view_id=view_id, aggregate=aggregate, include_records_sample=include_records_sample, order_by_for_records=order_by_for_records)
        print("The response of MessageChannelsApi->group_by_message_channels:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling MessageChannelsApi->group_by_message_channels: %s\n" % e)

Parameters

Name Type Description Notes
group_by str Array of fields to group by. Each element can specify a field and optionally a subfield or granularity for date fields.
filter str Format: field[COMPARATOR]:value,field2[COMPARATOR]:value2. For like/ilike, use % as a wildcard (e.g. %value% for substring match). Refer to the filter section at the top of the page for more details. [optional]
order_by str Format: **field_name_1,field_name_2[DIRECTION_2] Refer to the filter section at the top of the page for more details. [optional]
limit int Limits the number of objects returned. [optional] [default to 60]
view_id UUID View ID to apply filters from. [optional]
aggregate str Array of aggregate operations to compute for each group. [optional]
include_records_sample bool If true, includes a sample of records for each group in the response. [optional] [default to False]
order_by_for_records str Order by clause for records within each group. Only applicable when include_records_sample is true. [optional]

Return type

GroupByMessageChannels200Response

Authorization

bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Successful operation -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

merge_many_message_channels

MergeManyMessageChannels200Response merge_many_message_channels(merge_many_message_channels_request, depth=depth)

Merge Many messageChannels

Example

  • Bearer (JWT) Authentication (bearerAuth):
import twentycrm_client
from twentycrm_client.models.merge_many_message_channels200_response import MergeManyMessageChannels200Response
from twentycrm_client.models.merge_many_message_channels_request import MergeManyMessageChannelsRequest
from twentycrm_client.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://crm.example.com/rest
# See configuration.py for a list of all supported configuration parameters.
configuration = twentycrm_client.Configuration(
    host = "https://crm.example.com/rest"
)

# 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 Bearer authorization (JWT): bearerAuth
configuration = twentycrm_client.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with twentycrm_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = twentycrm_client.MessageChannelsApi(api_client)
    merge_many_message_channels_request = twentycrm_client.MergeManyMessageChannelsRequest() # MergeManyMessageChannelsRequest | body
    depth = 1 # int | Determines the level of nested related objects to include in the response.     - 0: Primary object only     - 1: Primary object + direct relations (optional) (default to 1)

    try:
        # Merge Many messageChannels
        api_response = api_instance.merge_many_message_channels(merge_many_message_channels_request, depth=depth)
        print("The response of MessageChannelsApi->merge_many_message_channels:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling MessageChannelsApi->merge_many_message_channels: %s\n" % e)

Parameters

Name Type Description Notes
merge_many_message_channels_request MergeManyMessageChannelsRequest body
depth int Determines the level of nested related objects to include in the response. - 0: Primary object only - 1: Primary object + direct relations [optional] [default to 1]

Return type

MergeManyMessageChannels200Response

Authorization

bearerAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Successful operation -
400 Bad Request -
401 Unauthorized -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

restore_many_message_channels

RestoreManyMessageChannels200Response restore_many_message_channels(filter=filter, depth=depth)

Restore Many messageChannels

Example

  • Bearer (JWT) Authentication (bearerAuth):
import twentycrm_client
from twentycrm_client.models.restore_many_message_channels200_response import RestoreManyMessageChannels200Response
from twentycrm_client.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://crm.example.com/rest
# See configuration.py for a list of all supported configuration parameters.
configuration = twentycrm_client.Configuration(
    host = "https://crm.example.com/rest"
)

# 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 Bearer authorization (JWT): bearerAuth
configuration = twentycrm_client.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with twentycrm_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = twentycrm_client.MessageChannelsApi(api_client)
    filter = 'createdAt[gte]:\"2023-01-01\"' # str | Format: field[COMPARATOR]:value,field2[COMPARATOR]:value2.     For like/ilike, use % as a wildcard (e.g. %value% for substring match).     Refer to the filter section at the top of the page for more details. (optional)
    depth = 1 # int | Determines the level of nested related objects to include in the response.     - 0: Primary object only     - 1: Primary object + direct relations (optional) (default to 1)

    try:
        # Restore Many messageChannels
        api_response = api_instance.restore_many_message_channels(filter=filter, depth=depth)
        print("The response of MessageChannelsApi->restore_many_message_channels:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling MessageChannelsApi->restore_many_message_channels: %s\n" % e)

Parameters

Name Type Description Notes
filter str Format: field[COMPARATOR]:value,field2[COMPARATOR]:value2. For like/ilike, use % as a wildcard (e.g. %value% for substring match). Refer to the filter section at the top of the page for more details. [optional]
depth int Determines the level of nested related objects to include in the response. - 0: Primary object only - 1: Primary object + direct relations [optional] [default to 1]

Return type

RestoreManyMessageChannels200Response

Authorization

bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Successful operation -
400 Bad Request -
401 Unauthorized -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

restore_one_message_channel

RestoreOneMessageChannel200Response restore_one_message_channel(id, depth=depth)

Restore One messageChannel

Example

  • Bearer (JWT) Authentication (bearerAuth):
import twentycrm_client
from twentycrm_client.models.restore_one_message_channel200_response import RestoreOneMessageChannel200Response
from twentycrm_client.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://crm.example.com/rest
# See configuration.py for a list of all supported configuration parameters.
configuration = twentycrm_client.Configuration(
    host = "https://crm.example.com/rest"
)

# 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 Bearer authorization (JWT): bearerAuth
configuration = twentycrm_client.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with twentycrm_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = twentycrm_client.MessageChannelsApi(api_client)
    id = UUID('38400000-8cf0-11bd-b23e-10b96e4ef00d') # UUID | Object id.
    depth = 1 # int | Determines the level of nested related objects to include in the response.     - 0: Primary object only     - 1: Primary object + direct relations (optional) (default to 1)

    try:
        # Restore One messageChannel
        api_response = api_instance.restore_one_message_channel(id, depth=depth)
        print("The response of MessageChannelsApi->restore_one_message_channel:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling MessageChannelsApi->restore_one_message_channel: %s\n" % e)

Parameters

Name Type Description Notes
id UUID Object id.
depth int Determines the level of nested related objects to include in the response. - 0: Primary object only - 1: Primary object + direct relations [optional] [default to 1]

Return type

RestoreOneMessageChannel200Response

Authorization

bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Successful operation -
400 Bad Request -
401 Unauthorized -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

update_many_message_channels

UpdateManyMessageChannels200Response update_many_message_channels(message_channel_for_update, depth=depth, filter=filter)

Update Many messageChannels

Example

  • Bearer (JWT) Authentication (bearerAuth):
import twentycrm_client
from twentycrm_client.models.message_channel_for_update import MessageChannelForUpdate
from twentycrm_client.models.update_many_message_channels200_response import UpdateManyMessageChannels200Response
from twentycrm_client.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://crm.example.com/rest
# See configuration.py for a list of all supported configuration parameters.
configuration = twentycrm_client.Configuration(
    host = "https://crm.example.com/rest"
)

# 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 Bearer authorization (JWT): bearerAuth
configuration = twentycrm_client.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with twentycrm_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = twentycrm_client.MessageChannelsApi(api_client)
    message_channel_for_update = twentycrm_client.MessageChannelForUpdate() # MessageChannelForUpdate | body
    depth = 1 # int | Determines the level of nested related objects to include in the response.     - 0: Primary object only     - 1: Primary object + direct relations (optional) (default to 1)
    filter = 'createdAt[gte]:\"2023-01-01\"' # str | Format: field[COMPARATOR]:value,field2[COMPARATOR]:value2.     For like/ilike, use % as a wildcard (e.g. %value% for substring match).     Refer to the filter section at the top of the page for more details. (optional)

    try:
        # Update Many messageChannels
        api_response = api_instance.update_many_message_channels(message_channel_for_update, depth=depth, filter=filter)
        print("The response of MessageChannelsApi->update_many_message_channels:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling MessageChannelsApi->update_many_message_channels: %s\n" % e)

Parameters

Name Type Description Notes
message_channel_for_update MessageChannelForUpdate body
depth int Determines the level of nested related objects to include in the response. - 0: Primary object only - 1: Primary object + direct relations [optional] [default to 1]
filter str Format: field[COMPARATOR]:value,field2[COMPARATOR]:value2. For like/ilike, use % as a wildcard (e.g. %value% for substring match). Refer to the filter section at the top of the page for more details. [optional]

Return type

UpdateManyMessageChannels200Response

Authorization

bearerAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Successful operation -
400 Bad Request -
401 Unauthorized -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

update_one_message_channel

UpdateOneMessageChannel200Response update_one_message_channel(id, message_channel_for_update, depth=depth)

Update One messageChannel

Example

  • Bearer (JWT) Authentication (bearerAuth):
import twentycrm_client
from twentycrm_client.models.message_channel_for_update import MessageChannelForUpdate
from twentycrm_client.models.update_one_message_channel200_response import UpdateOneMessageChannel200Response
from twentycrm_client.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://crm.example.com/rest
# See configuration.py for a list of all supported configuration parameters.
configuration = twentycrm_client.Configuration(
    host = "https://crm.example.com/rest"
)

# 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 Bearer authorization (JWT): bearerAuth
configuration = twentycrm_client.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with twentycrm_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = twentycrm_client.MessageChannelsApi(api_client)
    id = UUID('38400000-8cf0-11bd-b23e-10b96e4ef00d') # UUID | Object id.
    message_channel_for_update = twentycrm_client.MessageChannelForUpdate() # MessageChannelForUpdate | body
    depth = 1 # int | Determines the level of nested related objects to include in the response.     - 0: Primary object only     - 1: Primary object + direct relations (optional) (default to 1)

    try:
        # Update One messageChannel
        api_response = api_instance.update_one_message_channel(id, message_channel_for_update, depth=depth)
        print("The response of MessageChannelsApi->update_one_message_channel:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling MessageChannelsApi->update_one_message_channel: %s\n" % e)

Parameters

Name Type Description Notes
id UUID Object id.
message_channel_for_update MessageChannelForUpdate body
depth int Determines the level of nested related objects to include in the response. - 0: Primary object only - 1: Primary object + direct relations [optional] [default to 1]

Return type

UpdateOneMessageChannel200Response

Authorization

bearerAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Successful operation -
400 Bad Request -
401 Unauthorized -

[Back to top] [Back to API list] [Back to Model list] [Back to README]