### Create Spam Filter Rule (POST Request Example) Source: https://api.telzio.com/v3/index.html Example of how to create a new spam filter rule using a POST request. This involves sending a request body with the desired action type and optionally a specific number ID. The response includes details of the created rule. ```http POST /v3/spam_filter Host: api.telzio.com Content-Type: application/x-www-form-urlencoded Authorization: Bearer YOUR_API_TOKEN action=reject&number_id=num_AzlD0az28nbV ``` -------------------------------- ### Retrieve Spam Filter Rule (GET Request Example) Source: https://api.telzio.com/v3/index.html Example of how to retrieve a specific spam filter rule using its ID. This is a GET request to the specified endpoint. The response will contain the details of the requested rule if found, or an error if not. ```http GET /v3/spam_filter/rules/{rule_id} Host: api.telzio.com Authorization: Bearer YOUR_API_TOKEN ``` -------------------------------- ### GET /v3/preferences Source: https://api.telzio.com/v3/index.html Retrieve a list of all preference bundles associated with the authenticated user. ```APIDOC ## GET /v3/preferences ### Description Lists all preference bundles for the user, including user details, password settings, and features. ### Method GET ### Endpoint https://api.telzio.com/v3/preferences ### Parameters #### Headers - **Authorization** (string) - Required - Bearer Token ### Response #### Success Response (200) - **data** (Array) - List of preference bundles (UserDetails, UnansweredCalls, Password, etc.) #### Response Example { "data": [ { "type": "user_details", "username": "pgriffin", "first_name": "Peter", "last_name": "Griffin", "email": "pgriffin@pawtucketpatriotale.com" } ] } ``` -------------------------------- ### Example JSON Response for SMS Source: https://api.telzio.com/v3/index.html This is an example JSON response for a successful SMS operation. It includes details such as conversation ID, SMS ID, creation timestamp, status, direction, sender, recipient, and any attached media. ```json { "conversation_id": "cnv_jxEPmNwvk9WJ", "sms_id": "msg_yZG8nn6E8239", "text": "There's A Message In My Alpha-Bits...", "created": "1992-07-18T19:30:22Z", "status": "active", "direction": "inbound", "sender": { "type": "string", "phone_number": { "raw": "8889989080", "e164": "+18889989080", "international_format": "+1 888-998-9080", "local_format": "(888) 998-9080", "country_iso": "US", "cnam": "GRIFFIN, PETER", "region": "Los Angeles, CA" } }, "recipient": { "type": "string", "phone_number": { "raw": "8889989080", "e164": "+18889989080", "international_format": "+1 888-998-9080", "local_format": "(888) 998-9080", "country_iso": "US", "cnam": "GRIFFIN, PETER", "region": "Los Angeles, CA" } }, "number": { "number_id": "num_AzlD0az28nbV", "number_type": "local", "phone_number": { "raw": "8889989080", "e164": "+18889989080", "international_format": "+1 888-998-9080", "local_format": "(888) 998-9080", "country_iso": "US", "cnam": "GRIFFIN, PETER", "region": "Los Angeles, CA" }, "status": "pending", "created": "2013-08-12T09:30:22Z" }, "media_attachments": [ { "sms_media_id": "mms_gGzkagLe8KO3", "sms_id": "msg_wOWDeXXvwk15", "status": "active", "created": "1992-07-18T19:30:22Z", "mime_type": "image/jpg", "filename": "peter_pumpkineater.jpg" } ] } ``` -------------------------------- ### Provisioning API Request (cURL) Source: https://api.telzio.com/v3/index.html Example cURL command to request provisioning data from the Telzio API. This request requires a Bearer Token for authorization. ```bash curl -X GET \ https://api.telzio.com/v3/auth/provision \ -H 'Authorization: Bearer YOUR_ACCESS_TOKEN' ``` -------------------------------- ### Spam Filter Rule Response Schema Example (JSON) Source: https://api.telzio.com/v3/index.html An example of the JSON response when a spam filter rule is successfully retrieved or updated. It includes the action, rule ID, threshold, and associated number details. ```json { "action": "string", "spam_filter_rule_id": "sfr_wQX8M3ObkVd9", "threshold": 80, "number": { "number_id": "num_AzlD0az28nbV", "number_type": "local", "phone_number": { "raw": "8889989080", "e164": "+18889989080", "international_format": "+1 888-998-9080", "local_format": "(888) 998-9080", "country_iso": "US", "cnam": "GRIFFIN, PETER", "region": "Los Angeles, CA" }, "status": "pending", "created": "2013-08-12T09:30:22Z" } } ``` -------------------------------- ### GET /v3/recordings/{recording_id}/download Source: https://api.telzio.com/v3/index.html Downloads the MP3 file for a specified recording. ```APIDOC ## Download MP3 ### Description Download the MP3 file of a recording. ### Method GET ### Endpoint /v3/recordings/{recording_id}/download ### Parameters #### Path Parameters - **recording_id** (string) - Required - The ID of the recording to download. Example: rec_EWdkW2AXPMw6 ### Responses #### Success Response (200) OK (audio/mp3 - binary data) #### Error Responses - **400** Bad Request - **401** Unauthorized - **403** Forbidden ``` -------------------------------- ### GET /v3/auth/sip/parameters Source: https://api.telzio.com/v3/index.html Generates a one-time use set of parameters required to establish a SIP connection and initialize a WebRTC session. ```APIDOC ## GET /v3/auth/sip/parameters ### Description Generates a one-time use set of parameters needed to create a SIP Connection and WebRTC Session. ### Method GET ### Endpoint https://api.telzio.com/v3/auth/sip/parameters ### Response #### Success Response (200) - **from_name** (string) - Name portion of from header to use - **sip_uri** (string) - SIP URI used when creating a sip connection - **web_rtc_peer_connection_data** (object) - WebRtcPeerConnectionData object - **ws_sip_endpoints** (array) - List of available websocket sip endpoints #### Response Example { "sip_uri": "string", "from_name": "string", "ws_sip_endpoints": ["string"], "web_rtc_peer_connection_data": { "bundle_policy": "string", "ice_candidate_pool_size": 0, "turn_servers": {}, "stun_servers": ["string"] } } ``` -------------------------------- ### GET /v3/preferences/{bundle_type} Source: https://api.telzio.com/v3/index.html Retrieves a specific preference bundle based on the provided bundle type. ```APIDOC ## GET /v3/preferences/{bundle_type} ### Description Retrieves a specific preference bundle for the authenticated user. ### Method GET ### Endpoint /v3/preferences/{bundle_type} ### Parameters #### Path Parameters - **bundle_type** (string) - Required - The type of preference bundle to retrieve. Enum: "user_details", "unanswered_calls", "password", "features", "availability", "sounds". ### Response #### Success Response (200) - **type** (string) - The type of the bundle. - **username** (string) - The user's username. - **first_name** (string) - The user's first name. - **last_name** (string) - The user's last name. - **email** (string) - The user's email address. - **editable_fields** (object) - A list of fields the user is permitted to edit. - **has_avatar** (boolean) - Defines whether or not the user has a custom avatar. #### Response Example { "type": "user_details", "username": "pgriffin", "first_name": "Peter", "last_name": "Griffin", "email": "pgriffin@pawtucketpatriotale.com", "has_avatar": true } ``` -------------------------------- ### Create a TTS Preview Source: https://api.telzio.com/v3/index.html Creates and returns an audio file to be used for text-to-speech previews. ```APIDOC ## Create a TTS Preview ### Description Creates and returns an audio file to be used for text-to-speech previews. ### Method GET ### Endpoint /v3/utilities/tts_preview ### Parameters #### Query Parameters - **text** (string) - Required - The text used when generating the preview (<= 3000 characters). - **voice_id** (string) - Optional - The unique ID of the voice used to generate the preview. ### Response #### Success Response (200) - **binary** - The audio file (mpeg) for the text-to-speech preview. #### Error Responses - **400** Bad Request - **401** Unauthorized - **403** Forbidden ``` -------------------------------- ### Create TTS Preview - GET Request Source: https://api.telzio.com/v3/index.html Generates and returns an audio file for text-to-speech preview. Requires a Bearer Token. Accepts 'text' and optional 'voice_id' as query parameters. ```http GET /v3/utilities/tts_preview?text=Hello%20world&voice_id=tts_eqVDwZMgkbXv Host: api.telzio.com Authorization: Bearer YOUR_API_TOKEN ``` -------------------------------- ### Delete Spam Filter Rule (DELETE Request Example) Source: https://api.telzio.com/v3/index.html Example of how to delete a spam filter rule using its ID. This is a DELETE request to the specified endpoint. A successful deletion will typically return an empty JSON object. ```http DELETE /v3/spam_filter/rules/{rule_id} Host: api.telzio.com Authorization: Bearer YOUR_API_TOKEN ``` -------------------------------- ### List Faxes with Query Parameters Source: https://api.telzio.com/v3/index.html This snippet demonstrates how to list faxes using various query parameters. Supported parameters include `ending_before`, `filter_by`, `limit`, `starting_after`, and `tags`. The response includes an array of fax items and a boolean indicating if more faxes are available. ```HTTP GET /v3/faxes?ending_before=fax_JVBDQbqX8mOw&filter_by=sent&limit=100&starting_after=fax_zdVPy547Pgvx&tags=tag_alpDrZeND6Gb HTTP/1.1 Host: api.telzio.com Authorization: Bearer YOUR_ACCESS_TOKEN ``` -------------------------------- ### Update Spam Filter Rule (POST Request Example) Source: https://api.telzio.com/v3/index.html Example of how to update an existing spam filter rule. This uses a POST request to the rule's endpoint, allowing modification of the action type and associated number ID. The response mirrors the structure of a retrieved rule. ```http POST /v3/spam_filter/{rule_id} Host: api.telzio.com Content-Type: application/x-www-form-urlencoded Authorization: Bearer YOUR_API_TOKEN action=prepend_cnam&number_id=num_AzlD0az28nbV ``` -------------------------------- ### GET /v3/users/groups Source: https://api.telzio.com/v3/index.html Retrieves a list of all user groups associated with the account. ```APIDOC ## GET /v3/users/groups ### Description Retrieves a list of user groups on the account. ### Method GET ### Endpoint https://api.telzio.com/v3/users/groups ### Parameters #### Query Parameters - **ending_before** (string) - Optional - Cursor for pagination. - **limit** (integer) - Optional - Number of items to return (1-100, default 30). - **starting_after** (string) - Optional - Cursor for pagination. ### Response #### Success Response (200) - **data** (Array) - List of user groups. - **has_more** (boolean) - Indicates if more records are available. #### Response Example { "data": [ { "user_group_id": "usg_wQX8MNRbPVd9", "group_name": "Sales Department", "extension": "850" } ], "has_more": true } ``` -------------------------------- ### User Data Response Sample (JSON) Source: https://api.telzio.com/v3/index.html This JSON object represents a successful response (200 OK) when retrieving user information. It includes details such as user ID, status, contact information, group memberships, availability, and associated queue agent data with call and billing information. ```json { "user_id": "usr_6Jl81JoVPrbV", "status": "active", "username": "pgriffin", "first_name": "Peter", "last_name": "Griffin", "email": "pgriffin@pawtucketpatriotale.com", "extension": "420", "has_avatar": true, "groups": [ { "user_group_id": "usg_wQX8MNRbPVd9", "group_name": "Sales Department", "extension": "850" } ], "availability": { "username": "pgriffin", "status": "offline" }, "queue_agents": [ { "user": { }, "status": "offline", "enabled": true, "grace_time": 0, "gracing_time_left": 0, "queue": { "queue_id": "que_QypkdVw3z8nY", "name": "string", "agents": [ { } ], "calls": [ { "call": { "call_id": "11-600ef9dd-17v6", "from": { "type": "string", "user": { } }, "to": { "type": "string", "user": { } }, "created": "2020-03-15 13:05:20.000Z", "status": "initializing", "duration": 184, "direction": "inbound", "legs": [ { "call_id": "11-600ef9dd-17v6", "from": "jsmith", "from_name": "John Smith", "to": "+18889989080", "status": "initializing", "hangup_cause": "Normal Clearing", "duration": 184, "billing_details": { "price": null, "fees": null, "total_price": null, "free_minutes": null }, "direction": "inbound", "call_date": "2020-03-15 13:05:20.000Z", "answer_date": "2020-03-15 13:05:35.000Z", "end_date": "2020-03-15 13:08:12.000Z" } ], "number": { "number_id": "num_AzlD0az28nbV", "number_type": "local", "phone_number": { "raw": "8889989080", "e164": "+18889989080", "international_format": "+1 888-998-9080", "local_format": "(888) 998-9080", "country_iso": "US", "cnam": "GRIFFIN, PETER", "region": "Los Angeles, CA" }, "status": "pending", "created": "2013-08-12T09:30:22Z" }, "events": [ { "date": "2019-08-24T14:15:22Z", "message": "string" } ], "billing_details": { "price": 12.5, "fees": 3.1, "total_price": 15.6, "free_minutes": 3 }, "spam_details": { "spam_score": 89, "spam_action": "string", "blacklisted": true }, "voicemail_id": "vm_Aq1kXjdK8rJ7", "recording_id": "rec_AV98V7O7PlYd", "fax_id": "fax_pWw8O171kV12", "tags": [ { "tag_id": "tag_alpDrBZMD6Gb", "name": "string", "active": true } ] }, "status": "waiting", "event_timestamps": { "waiting": "2019-08-24T14:15:22Z", "connected": "2019-08-24T14:15:22Z", "completed": "2019-08-24T14:15:22Z", "timeout": "2019-08-24T14:15:22Z", "abandoned": "2019-08-24T14:15:22Z", "no_agents": "2019-08-24T14:15:22Z", "error": "2019-08-24T14:15:22Z", "kicked": "2019-08-24T14:15:22Z" }, "event_durations": { "waiting": 0, "connected": 0, "completed": 0, "timeout": 0, "abandoned": 0, "no_agents": 0, "error": 0, "kicked": 0 }, "connected_agent": { } } ], "summary": { "agents_total": 0, "agents_idle": 0, "agents_busy": 0, "agents_gracing": 0, "agents_offline": 0, "calls_waiting": 0, "calls_connected": 0, "longest_hold_time": 0, "average_hold_time": 0 } } } ] } ``` -------------------------------- ### GET /v3/auth/provision Source: https://api.telzio.com/v3/index.html Refreshes the user's initial provisioning data, including basic account information and data about available numbers. This endpoint requires Bearer Token authorization. ```APIDOC ## GET /v3/auth/provision ### Description Refreshes the user's initial provisioning data, including basic account information and data about available numbers. ### Method GET ### Endpoint /v3/auth/provision ### Parameters #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (200) - **account** (object) - Account details. - **account_groups** (array of objects) - A list of groups on the account. - **account_tags** (array of objects) - A list of tags on the Telzio Account. - **assigned_groups** (array of objects) - A list of groups the user is a member of. - **assigned_number** (object) - The user's assigned number. - **available_numbers** (array of objects) - A list of numbers on the Telzio Account that this user is allowed to make calls from. - **device_id** (string) - A unique ID representing the device. - **user** (object) - User details. - **user_type** (string) - Enum: "user", "administrator", "account_owner". - **claims_token** (string or null) - If returned, this value must be used as "Bearer Token" on future requests. - **legal_policies** (array of objects or null) - Contains a list of policies the user must consent to. - **resource_configurations** (array of objects or null) - Configuration details for resources. #### Response Example ```json { "account": { "account_id": "acc_Q3KkjVVRkeqd", "company_name": "Pawtucket Patriot Ale", "created": "1984-06-05T19:30:22Z", "default_timezone": "America/Los_Angeles" }, "account_groups": [ { "group_name": "Sales Department", "extension": "850" } ], "account_tags": [ { "tag_id": "tag_alpDrBZMD6Gb", "name": "string", "active": true } ], "assigned_groups": [], "assigned_number": { "number_id": "num_AzlD0az28nbV", "number_type": "local", "phone_number": { "raw": "8889989080", "e164": "+18889989080", "international_format": "+1 888-998-9080", "local_format": "(888) 998-9080", "country_iso": "US", "cnam": "GRIFFIN, PETER", "region": "Los Angeles, CA" }, "status": "pending", "created": "2013-08-12T09:30:22Z" }, "available_numbers": [ { "number_id": "num_AzlD0az28nbV", "number_type": "local", "phone_number": { "raw": "8889989080", "e164": "+18889989080", "international_format": "+1 888-998-9080", "local_format": "(888) 998-9080", "country_iso": "US", "cnam": "GRIFFIN, PETER", "region": "Los Angeles, CA" }, "status": "pending", "created": "2013-08-12T09:30:22Z" } ], "device_id": "some_device_id", "user": { "user_id": "usr_abc123", "email": "user@example.com", "first_name": "Peter", "last_name": "Griffin", "created": "2013-08-12T09:30:22Z" }, "user_type": "user", "claims_token": "new_bearer_token_if_applicable", "legal_policies": [ { "policy_key": "terms_of_service", "policy_version": 1, "title": "Terms of Service", "body": "These are the terms of service...", "effective_date": "2019-08-24T14:15:22Z", "superceeding_key": null, "superceeding_version": 0, "consent_required": true, "consent": { "created": "2019-08-24T14:15:22Z", "ip": "192.168.1.1", "user_agent": "Mozilla/5.0..." } } ], "resource_configurations": [ { "type": "customer_io", "site_id": "site_123", "api_key": "cio_abc", "cdp_api_key": "cdp_xyz" } ] } ``` #### Error Responses **400** Bad Request **401** Unauthorized **403** Forbidden ``` -------------------------------- ### GET /v3/voicemails/{voicemail_id}/assignments Source: https://api.telzio.com/v3/index.html Retrieves the history of assignments for a specific voicemail. ```APIDOC ## GET /v3/voicemails/{voicemail_id}/assignments ### Description Returns history of assignments for the voicemail. ### Method GET ### Endpoint https://api.telzio.com/v3/voicemails/{voicemail_id}/assignments ### Parameters #### Path Parameters - **voicemail_id** (string) - Required - The ID of the voicemail. ### Response #### Success Response (200) - **data** (Array) - List of assigned users or groups. - **has_more** (boolean) - Indicates if more objects are available via paging. #### Response Example { "data": [], "has_more": false } ``` -------------------------------- ### Data Retention Settings Response Sample (JSON) Source: https://api.telzio.com/v3/index.html This JSON sample illustrates the response for listing data retention settings. It returns an array of objects, where each object specifies a `settingType` (e.g., 'call_log') and the number of `days` data is retained. ```json { "data": [ { "settingType": "call_log", "days": 0 } ] } ``` -------------------------------- ### GET /v3/users/{user_id}/avatar Source: https://api.telzio.com/v3/index.html Retrieves the avatar image for a specific user. ```APIDOC ## GET /v3/users/{user_id}/avatar ### Description Returns a jpg of the user's avatar. ### Method GET ### Endpoint https://api.telzio.com/v3/users/{user_id}/avatar ### Parameters #### Path Parameters - **user_id** (string) - Required - The unique ID of the user. #### Query Parameters - **size** (string) - Optional - Avatar size (small, medium, large). ### Response #### Success Response (200) - **binary** (string) - The avatar image data. ``` -------------------------------- ### Download Media Response Sample (Binary) Source: https://api.telzio.com/v3/index.html This represents the response schema for downloading media. The API returns the raw binary data of the media file, such as an image or audio file, associated with a specific SMS within a conversation. ```binary ``` -------------------------------- ### GET /v3/users/query/availability Source: https://api.telzio.com/v3/index.html Queries the current status of specific users on the Telzio platform. ```APIDOC ## GET /v3/users/query/availability ### Description Retrieves a snapshot of the queried users' current status. You can query up to 50 usernames. ### Method GET ### Endpoint https://api.telzio.com/v3/users/query/availability ### Parameters #### Query Parameters - **u** (Array of strings) - Required - Username(s) to query. ### Response #### Success Response (200) - **data** (Array) - List of user availability objects. - **has_more** (boolean) - Pagination indicator. #### Response Example { "data": [ { "username": "pgriffin", "status": "offline" } ], "has_more": true } ``` -------------------------------- ### Telzio API v3 200 OK Response Sample Source: https://api.telzio.com/v3/index.html This is a sample JSON response for a successful API request (HTTP 200 OK). It includes details about devices, user information, call logs, and billing. This response is typically returned when retrieving data related to user accounts, devices, or call records. ```json { "device_id": "dv_zdVPyZaGkgvx", "claims_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c", "user": { "user_id": "usr_6Jl81JoVPrbV", "status": "active", "username": "pgriffin", "first_name": "Peter", "last_name": "Griffin", "email": "pgriffin@pawtucketpatriotale.com", "extension": "420", "has_avatar": true, "groups": [ { "user_group_id": "usg_wQX8MNRbPVd9", "group_name": "Sales Department", "extension": "850" } ], "availability": { "username": "pgriffin", "status": "offline" }, "queue_agents": [ { "user": { }, "status": "offline", "enabled": true, "grace_time": 0, "gracing_time_left": 0, "queue": { "queue_id": "que_QypkdVw3z8nY", "name": "string", "agents": [ { } ], "calls": [ { "call": { "call_id": "11-600ef9dd-17v6", "from": { "type": "string", "user": { } }, "to": { "type": "string", "user": { } }, "created": "2020-03-15 13:05:20.000Z", "status": "initializing", "duration": 184, "direction": "inbound", "legs": [ { "call_id": null, "from": null, "from_name": null, "to": null, "status": null, "hangup_cause": null, "duration": null, "billing_details": null, "direction": null, "call_date": null, "answer_date": null, "end_date": null } ], "number": { "number_id": "num_AzlD0az28nbV", "number_type": "local", "phone_number": { "raw": null, "e164": null, "international_format": null, "local_format": null, "country_iso": null, "cnam": null, "region": null }, "status": "pending", "created": "2013-08-12T09:30:22Z" }, "events": [ { "date": null, "message": null } ], "billing_details": { "price": 12.5, "fees": 3.1, "total_price": 15.6, "free_minutes": 3 }, "spam_details": { "spam_score": 89, "spam_action": "string", "blacklisted": true }, "voicemail_id": "vm_Aq1kXjdK8rJ7", "recording_id": "rec_AV98V7O7PlYd", "fax_id": "fax_pWw8O171kV12", "tags": [ { "tag_id": null, "name": null, "active": null } ] }, "status": "waiting", "event_timestamps": { "waiting": "2019-08-24T14:15:22Z", "connected": "2019-08-24T14:15:22Z", "completed": "2019-08-24T14:15:22Z", "timeout": "2019-08-24T14:15:22Z", "abandoned": "2019-08-24T14:15:22Z", "no_agents": "2019-08-24T14:15:22Z", "error": "2019-08-24T14:15:22Z", "kicked": "2019-08-24T14:15:22Z" }, "event_durations": { "waiting": 0, "connected": 0, "completed": 0, "timeout": 0, "abandoned": 0, "no_agents": 0, "error": 0, "kicked": 0 }, "connected_agent": { } } ], "summary": { "agents_total": 0, "agents_idle": 0, "agents_busy": 0, "agents_gracing": 0, "agents_offline": 0, "calls_waiting": 0, "calls_connected": 0, "longest_hold_time": 0, "average_hold_time": 0 } } } ] }, "user_type": "user", "assigned_groups": [ { "user_group_id": "usg_wQX8MNRbPVd9", "group_name": "Sales Department", "extension": "850" } ], "account_groups": [ { "user_group_id": "usg_wQX8MNRbPVd9" } ] } ``` -------------------------------- ### GET /v3/users/groups/{user_group_id} Source: https://api.telzio.com/v3/index.html Retrieves details for a specific user group by its ID. ```APIDOC ## GET /v3/users/groups/{user_group_id} ### Description Retrieves a single user group. ### Method GET ### Endpoint https://api.telzio.com/v3/users/groups/{user_group_id} ### Parameters #### Path Parameters - **user_group_id** (string) - Required - The unique ID representing this user group. ### Response #### Success Response (200) - **user_group_id** (string) - The unique ID. - **group_name** (string) - The name of the group. - **extension** (string) - The group's extension. #### Response Example { "user_group_id": "usg_wQX8MNRbPVd9", "group_name": "Sales Department", "extension": "850" } ``` -------------------------------- ### GET /v3/spam_filter/rules Source: https://api.telzio.com/v3/index.html Retrieves a list of spam filter rules configured for the account. ```APIDOC ## List Spam Filter Rules ### Description Retrieves a list of spam filter rules on the account. ### Method GET ### Endpoint /v3/spam_filter/rules ### Parameters #### Query Parameters - **ending_before** (string) - Optional - Example: ending_before=sfr_wOWDeo4wP15a - **filter_by_number_id** (string) - Optional - Example: filter_by_number_id=num_oaVDNd4MPRGp - **limit** (integer) - Optional - Default: 30. Range: 1 to 100. - **starting_after** (string) - Optional - Example: starting_after=sfr_JVBDQdWEkmOw ### Responses #### Success Response (200) OK ##### Response Schema: { "data": [ { "action": "string", "spam_filter_rule_id": "string", "threshold": "integer", "number": { "number_id": "string", "number_type": "string", "phone_number": { "raw": "string", "e164": "string", "international_format": "string", "local_format": "string", "country_iso": "string", "cnam": "string", "region": "string" }, "status": "string", "created": "string" } } ], "has_more": "boolean" } #### Error Responses - **400** Bad Request - **401** Unauthorized - **403** Forbidden ``` -------------------------------- ### POST /auth/login Source: https://api.telzio.com/v3/index.html Authenticates a user and returns the session token along with comprehensive user profile and account information. ```APIDOC ## POST /auth/login ### Description Authenticates a user and retrieves the device ID, claims token, and user-specific metadata including groups, queue status, and account details. ### Method POST ### Endpoint /auth/login ### Parameters #### Request Body - **username** (string) - Required - The user's username - **password** (string) - Required - The user's password ### Request Example { "username": "pgriffin", "password": "yourpassword" } ### Response #### Success Response (200) - **device_id** (string) - Unique identifier for the authenticated device - **claims_token** (string) - JWT token for session authorization - **user** (object) - User profile details including status, email, and extension - **assigned_groups** (array) - List of groups the user belongs to #### Response Example { "device_id": "dv_zdVPyZaGkgvx", "claims_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...", "user": { "user_id": "usr_6Jl81JoVPrbV", "status": "active", "username": "pgriffin", "email": "pgriffin@pawtucketpatriotale.com" } } ``` -------------------------------- ### List Recordings (GET /v3/recordings) Source: https://api.telzio.com/v3/index.html Retrieves a list of all recordings accessible to the user. Supports filtering by 'new' or 'listened' status, pagination using 'ending_before' and 'starting_after', limiting results, and filtering by tags. Requires a Bearer Token for authorization. ```http GET /v3/recordings?filter_by=new&limit=50&tags=tag_example HTTP/1.1 Host: api.telzio.com Authorization: Bearer YOUR_ACCESS_TOKEN ``` -------------------------------- ### GET /v3/recordings Source: https://api.telzio.com/v3/index.html Retrieves a list of call recordings accessible to the authenticated user. ```APIDOC ## GET /v3/recordings ### Description Lists all call recordings that the user has access to, with options for filtering and pagination. ### Method GET ### Endpoint https://api.telzio.com/v3/recordings ### Parameters #### Query Parameters - **ending_before** (string) - Optional - Cursor for pagination. - **filter_by** (Array) - Optional - Filter by status: "new" or "listened". - **limit** (integer) - Optional - Number of items to return (1-100, default 30). - **starting_after** (string) - Optional - Cursor for pagination. - **tags** (string) - Optional - Filter by specific tag ID. ### Response #### Success Response (200) - **data** (Array) - List of Recording objects. - **has_more** (boolean) - Indicates if there are more pages available. #### Response Example { "data": [], "has_more": false } ``` -------------------------------- ### Example JSON Response for Recordings Source: https://api.telzio.com/v3/index.html This JSON structure represents a successful response when retrieving recording data. It includes details about the recording, associated comments, and user information. ```json { "data": [ { "type": "string", "timeline_event_id": "tev_jxEPmV2Nvk9W", "comment": { "comment_id": "com_JEbPBnlrPYrV", "text": "This customer would like some assistance with his account.", "created": "2019-03-05T19:30:22Z", "created_by": { "user_id": "usr_6Jl81JoVPrbV", "status": "active", "username": "pgriffin", "first_name": "Peter", "last_name": "Griffin", "email": "pgriffin@pawtucketpatriotale.com", "extension": "420", "has_avatar": true, "groups": [ { "user_group_id": "usg_wQX8MNRbPVd9", "group_name": "Sales Department", "extension": "850" } ], "availability": { "username": "pgriffin", "status": "offline" }, "queue_agents": [ { "user": { }, "status": "offline", "enabled": true, "grace_time": 0, "gracing_time_left": 0, "queue": { "queue_id": "que_QypkdVw3z8nY", "name": "string", "agents": [ { } ], "calls": [ { "call": null, "status": null, "event_timestamps": { }, "event_durations": { }, "connected_agent": null } ], "summary": { "agents_total": 0, "agents_idle": 0, "agents_busy": 0, "agents_gracing": 0, "agents_offline": 0, "calls_waiting": 0, "calls_connected": 0, "longest_hold_time": 0, "average_hold_time": 0 } } } ] } } } ] } ``` -------------------------------- ### POST /v3/auth Source: https://api.telzio.com/v3/index.html Request a JWT claims token and basic provisioning data for authentication. ```APIDOC ## POST /v3/auth ### Description Request a JWT claims token and basic provisioning data. ### Method POST ### Endpoint https://api.telzio.com/v3/auth ### Parameters #### Request Body - **client_details** (object) - Required - Client details for the request. - **client_platform** (string) - Required - The platform of the client (e.g., 'mobile', 'desktop', 'browser', 'custom'). - **password** (string) - Required - The user's password. Case sensitive. Max length 128 characters. - **username** (string) - Required - The user's username. Not case sensitive. Max length 64 characters. - **release_sipi** (boolean) - Required - When set to true, any SIPIS registration for the user is released. - **mfa_code** (string) - Optional - The MFA code for the user's login session. Required if multi-factor authentication is enabled. ### Request Example ```json { "client_details": {}, "client_platform": "mobile", "password": "user_password", "username": "user@example.com", "release_sipi": false, "mfa_code": "123456" } ``` ### Response #### Success Response (200) - **account** (object) - Required - Account details. - **account_groups** (Array of objects) - Required - A list of groups on the account. - **account_tags** (Array of objects) - Required - A list of tags on the Telzio Account. - **assigned_groups** (Array of objects) - Required - A list of groups the user is a member of. - **assigned_number** (object) - Required - Assigned number details. - **available_numbers** (Array of objects) - Required - A list of numbers on the Telzio Account that this user is allowed to make calls from. - **device_id** (string) - Required - A unique ID representing the device. - **user** (object) - Required - User details. - **user_type** (string) - Required - The type of user access (e.g., 'user', 'administrator', 'account_owner'). - **claims_token** (string or null) - The JWT claims token to be used for future requests. - **legal_policies** (Array of objects or null) - Contains a list of policies the user must consent to. - **resource_configurations** (Array of objects or null) - CustomerIO configuration details. #### Response Example ```json { "account": {}, "account_groups": [], "account_tags": [], "assigned_groups": [], "assigned_number": {}, "available_numbers": [], "device_id": "unique-device-id", "user": {}, "user_type": "user", "claims_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...", "legal_policies": null, "resource_configurations": null } ``` #### Error Responses - **400** Bad Request - **401** Unauthorized - **403** Forbidden ``` -------------------------------- ### GET /v3/hold_music Source: https://api.telzio.com/v3/index.html Retrieves a list of all hold music songs available on the account. ```APIDOC ## GET /v3/hold_music ### Description Get a list of all hold music songs on the account. ### Method GET ### Endpoint https://api.telzio.com/v3/hold_music ### Parameters #### Query Parameters - **options** (object) - Optional - HoldMusicListRequest parameters ### Response #### Success Response (200) - **data** (array) - List of HoldMusic objects - **has_more** (boolean) - Indicates if more results are available #### Response Example { "data": [ { "hold_music_id": "moh_MxJD3BdakNro", "title": "The Trashmen - Surfin Bird" } ], "has_more": true } ```