### Install Novu Gem Source: https://github.com/novuhq/novu-ruby/blob/main/README.md Install the Novu client library using RubyGems or add it to your Gemfile. ```ruby gem install novu ``` ```ruby gem 'novu' ``` -------------------------------- ### Get Environments Source: https://github.com/novuhq/novu-ruby/blob/main/README.md Retrieves a list of all available environments. ```APIDOC ## GET /v1/environments ### Description Retrieves a list of all available environments. ### Method GET ### Endpoint /v1/environments ### Request Example ```ruby client.environments() ``` ``` -------------------------------- ### Get All Organizations Source: https://github.com/novuhq/novu-ruby/blob/main/README.md Retrieves a list of all organizations. ```ruby client.organizations() ``` -------------------------------- ### Get All Notifications Source: https://github.com/novuhq/novu-ruby/blob/main/README.md Retrieve all notifications using the initialized client. ```ruby client.notifications ``` -------------------------------- ### Get All Feeds Source: https://github.com/novuhq/novu-ruby/blob/main/README.md Retrieve a list of all available feeds. ```ruby client.feeds() ``` -------------------------------- ### Get Tenant Source: https://github.com/novuhq/novu-ruby/blob/main/README.md Retrieves a specific tenant by its unique identifier. ```APIDOC ## Get Tenant ### Description Retrieves a specific tenant by its unique identifier. ### Method GET (inferred from get operation) ### Endpoint /tenants/{identifier} (inferred) ### Parameters #### Path Parameters - **identifier** (string) - Required - The unique identifier of the tenant to retrieve. ``` -------------------------------- ### Get Current Environment Source: https://github.com/novuhq/novu-ruby/blob/main/README.md Retrieve information about the currently active environment. ```ruby client.current_environment() ``` -------------------------------- ### Get All Organizations Source: https://github.com/novuhq/novu-ruby/blob/main/README.md Retrieves a list of all organizations. ```APIDOC ## Get All Organizations ### Description Retrieves a list of all organizations. ### Method GET (Implied) ### Endpoint /organizations ### Response #### Success Response (200) - **data** (array) - A list of organization objects. ``` -------------------------------- ### Get Topic Source: https://github.com/novuhq/novu-ruby/blob/main/README.md Retrieves a specific topic by its key. ```APIDOC ## Get Topic ### Description Retrieves a specific topic by its key. ### Method GET (inferred from get operation) ### Endpoint /topics/{topic_key} (inferred) ### Parameters #### Path Parameters - **topic_key** (string) - Required - The key of the topic to retrieve. ``` -------------------------------- ### Get Tenants Source: https://github.com/novuhq/novu-ruby/blob/main/README.md Retrieves a list of tenants, with optional pagination parameters. ```APIDOC ## Get Tenants ### Description Retrieves a list of tenants, with optional pagination parameters. ### Method GET (inferred from get operation) ### Endpoint /tenants (inferred) ### Parameters #### Query Parameters - **page** (integer) - Optional - The page number for pagination. - **limit** (integer) - Optional - The number of tenants to return per page. ### Request Example ```json { "page": 1, "limit": 10 } ``` ``` -------------------------------- ### Get Current Environment Source: https://github.com/novuhq/novu-ruby/blob/main/README.md Retrieves information about the current environment. ```APIDOC ## GET /v1/environments/current ### Description Retrieves information about the current environment. ### Method GET ### Endpoint /v1/environments/current ### Request Example ```ruby client.current_environment() ``` ``` -------------------------------- ### Validate MX Record Setup for Inbound Parse Source: https://github.com/novuhq/novu-ruby/blob/main/README.md Validates the MX record setup for the inbound parse functionality. Ensure your MX records are correctly configured before using this. ```ruby client.validate_mx_record_setup_for_inbound_parse() ``` -------------------------------- ### Validate MX Record Setup for Inbound Parse Source: https://github.com/novuhq/novu-ruby/blob/main/README.md Validates the MX record setup for the inbound parse functionality. ```APIDOC ## Validate MX Record Setup for Inbound Parse ### Description Validates the MX record setup for the inbound parse functionality. ### Method `validate_mx_record_setup_for_inbound_parse()` ### Request Example ```ruby client.validate_mx_record_setup_for_inbound_parse() ``` ``` -------------------------------- ### Get Integrations Source: https://github.com/novuhq/novu-ruby/blob/main/README.md Retrieves a list of all configured integrations. This is useful for auditing or displaying integration status. ```ruby client.integrations() ``` -------------------------------- ### Get Specific Tenant by Identifier Source: https://github.com/novuhq/novu-ruby/blob/main/README.md Retrieve details for a single tenant using its unique identifier. ```ruby client.tenant('') ``` -------------------------------- ### Get Specific Topic by Key Source: https://github.com/novuhq/novu-ruby/blob/main/README.md Retrieve details for a single topic using its unique key. ```ruby client.topic('') ``` -------------------------------- ### Get Feeds Source: https://github.com/novuhq/novu-ruby/blob/main/README.md Retrieves a list of all available feeds. ```APIDOC ## GET /v1/feeds ### Description Retrieves a list of all available feeds. ### Method GET ### Endpoint /v1/feeds ### Request Example ```ruby client.feeds() ``` ``` -------------------------------- ### Get Current Organization Source: https://github.com/novuhq/novu-ruby/blob/main/README.md Retrieves details of the currently active organization. ```ruby client.current_organization() ``` -------------------------------- ### Get API Keys Source: https://github.com/novuhq/novu-ruby/blob/main/README.md Retrieves a list of API keys associated with the account. ```APIDOC ## GET /v1/api-keys ### Description Retrieves a list of API keys associated with the account. ### Method GET ### Endpoint /v1/api-keys ### Request Example ```ruby client.api_keys() ``` ``` -------------------------------- ### Get API Keys Source: https://github.com/novuhq/novu-ruby/blob/main/README.md Retrieve the API keys associated with the current account. ```ruby client.api_keys() ``` -------------------------------- ### Get Subscribers Source: https://github.com/novuhq/novu-ruby/blob/main/README.md Retrieves a list of subscribers with optional pagination and filtering. ```APIDOC ## Get Subscribers ### Description Retrieves a list of subscribers with optional pagination and filtering. ### Method `subscribers(query = {})` ### Parameters #### Query Parameters - **page** (Integer) - Optional - The page number for pagination. - **limit** (Integer) - Optional - The number of subscribers to return per page. ### Request Example ```ruby client.subscribers({ 'page' => 1, 'limit' => 15, }) ``` ``` -------------------------------- ### Get Tenants with Pagination Source: https://github.com/novuhq/novu-ruby/blob/main/README.md Retrieve a list of tenants, with optional pagination parameters for controlling the number of results per page and the page number. ```ruby client.tenants({ 'page' => 1, # optional 'limit' => 10, # optional }) ``` -------------------------------- ### Get Notification Source: https://github.com/novuhq/novu-ruby/blob/main/README.md Retrieves a specific notification by its ID. ```APIDOC ## Get Notification ### Description Retrieves a specific notification by its ID. ### Method GET (Implied) ### Endpoint /notifications/{notificationId} ### Parameters #### Path Parameters - **notification_id** (string) - Required - The ID of the notification to retrieve. ### Request Example ```ruby client.notification('') ``` ### Response #### Success Response (200) - **data** (object) - The requested notification object. ``` -------------------------------- ### Get Changes Source: https://github.com/novuhq/novu-ruby/blob/main/README.md Retrieves a list of changes with optional pagination and filtering. ```APIDOC ## GET /v1/changes ### Description Retrieves a list of changes with optional pagination and filtering. ### Method GET ### Endpoint /v1/changes ### Parameters #### Query Parameters - **page** (integer) - Optional - The page number for pagination. - **limit** (integer) - Optional - The number of changes to return per page. - **promoted** (string) - Optional - Filter changes by promotion status. ### Request Example ```ruby client.changes({ 'page' => 1, 'limit' => 10, 'promoted' => 'hello' }) ``` ``` -------------------------------- ### Get Subscriber Preferences Source: https://github.com/novuhq/novu-ruby/blob/main/README.md Retrieves the preferences for a specific subscriber. ```APIDOC ## Get Subscriber Preferences ### Description Retrieves the preferences for a specific subscriber. ### Method `subscriber_preferences(subscriber_id)` ### Parameters #### Path Parameters - **subscriber_id** (String) - Required - The ID of the subscriber. ### Request Example ```ruby client.subscriber_preferences('') ``` ``` -------------------------------- ### Count Changes Source: https://github.com/novuhq/novu-ruby/blob/main/README.md Get the total count of changes. ```ruby client.count_changes() ``` -------------------------------- ### Get Current Organization Source: https://github.com/novuhq/novu-ruby/blob/main/README.md Retrieves details of the currently active organization. ```APIDOC ## Get Current Organization ### Description Retrieves details of the currently active organization. ### Method GET (Implied) ### Endpoint /organizations/current ### Response #### Success Response (200) - **data** (object) - The current organization object. ``` -------------------------------- ### Get Blueprint by ID Source: https://github.com/novuhq/novu-ruby/blob/main/README.md Retrieve a specific blueprint using its template ID. ```ruby client.get_blueprint('') ``` -------------------------------- ### Get Workflow Overrides Source: https://github.com/novuhq/novu-ruby/blob/main/README.md Retrieves a list of workflow overrides with optional pagination. ```APIDOC ## Get Workflow Overrides ### Description Retrieves a list of workflow overrides with optional pagination. ### Method GET (inferred from get operation) ### Endpoint /workflow-overrides (inferred) ### Parameters #### Query Parameters - **limit** (integer) - Optional - The maximum number of overrides to return. - **page** (integer) - Optional - The page number for pagination. ``` -------------------------------- ### Get Layout Source: https://github.com/novuhq/novu-ruby/blob/main/README.md Retrieves a specific notification layout by its ID. Use this to view or edit an existing layout. ```ruby client.layout('') ``` -------------------------------- ### Get Notification Statistics Source: https://github.com/novuhq/novu-ruby/blob/main/README.md Retrieves overall statistics for notifications. ```ruby client.notifications_stats() ``` -------------------------------- ### Filter and Retrieve Topics Source: https://github.com/novuhq/novu-ruby/blob/main/README.md Get a list of topics, with optional parameters to filter by name and paginate results. ```ruby client.topics({ 'name' => 'name', # optional 'page' => 1, # optional 'pageSize' => 10, # optional }) ``` -------------------------------- ### Get Workflow Overrides with Pagination Source: https://github.com/novuhq/novu-ruby/blob/main/README.md Retrieve a list of workflow overrides, with optional pagination parameters. ```ruby client.get_workflow_overrides( limit: 1, page: 1 ) ``` -------------------------------- ### Get Active Integrations Source: https://github.com/novuhq/novu-ruby/blob/main/README.md Retrieves a list of only the active integrations. Use this to quickly find enabled communication channels. ```ruby client.active_integrations() ``` -------------------------------- ### Get Single Notification Source: https://github.com/novuhq/novu-ruby/blob/main/README.md Retrieves a specific notification by its ID. ```ruby client.notification('') ``` -------------------------------- ### Get V1 Blueprints Source: https://github.com/novuhq/novu-ruby/blob/main/README.md Retrieves a specific blueprint by its template ID. ```APIDOC ## GET /v1/blueprints/{templateId} ### Description Retrieves a specific blueprint by its template ID. ### Method GET ### Endpoint /v1/blueprints/{templateId} ### Parameters #### Path Parameters - **template_id** (string) - Required - The ID of the blueprint template to retrieve. ### Request Example ```ruby client.get_blueprint('') ``` ``` -------------------------------- ### Get Notification Templates Source: https://github.com/novuhq/novu-ruby/blob/main/README.md Retrieves a list of notification templates. Supports pagination with 'page' and 'limit' parameters. ```ruby client.notification_templates({ 'page' => 4, # optional 'limit' => 10, # optional }) ``` -------------------------------- ### Get Notification Template Source: https://github.com/novuhq/novu-ruby/blob/main/README.md Retrieves a specific notification template by its ID. ```APIDOC ## Get Notification Template ### Description Retrieves a specific notification template by its ID. ### Method GET (Implied) ### Endpoint /notification-templates/{templateId} ### Parameters #### Path Parameters - **template_id** (string) - Required - The ID of the notification template to retrieve. ### Request Example ```ruby client.notification_template('') ``` ### Response #### Success Response (200) - **data** (object) - The requested notification template object. ``` -------------------------------- ### Get Single Notification Template Source: https://github.com/novuhq/novu-ruby/blob/main/README.md Retrieves a specific notification template by its ID. ```ruby client.notification_template('') ``` -------------------------------- ### Get Subscribers Source: https://github.com/novuhq/novu-ruby/blob/main/README.md Retrieves a list of subscribers with optional pagination and filtering. Use this to fetch multiple subscriber records. ```ruby client.subscribers({ 'page' => 1, # optional 'limit' => 15, # optional }) ``` -------------------------------- ### Get Subscriber Preferences Source: https://github.com/novuhq/novu-ruby/blob/main/README.md Retrieves the notification preferences for a specific subscriber. Use this to check current settings. ```ruby client.subscriber_preferences('') ``` -------------------------------- ### Create Tenant with Novu Ruby SDK Source: https://github.com/novuhq/novu-ruby/blob/main/README.md Use this to create a new tenant in Novu. Provide a unique identifier, name, and optional data. ```ruby client.create_tenant({ 'identifier' => '', 'name' => '', 'data' => { 'company' => 'a company', 'date-registered' => '2023-0-15' } }) ``` -------------------------------- ### Get Tenant Workflow Override by IDs Source: https://github.com/novuhq/novu-ruby/blob/main/README.md Retrieve a specific workflow override for a given tenant and workflow, identified by their respective IDs. ```ruby client.get_tenant_workflow_override("", "") ``` -------------------------------- ### Get Notification Template Blueprint Source: https://github.com/novuhq/novu-ruby/blob/main/README.md Retrieves the blueprint for a specific notification template using its ID. ```ruby client.notification_template_blueprint('') ``` -------------------------------- ### Get Notification Template Blueprint Source: https://github.com/novuhq/novu-ruby/blob/main/README.md Retrieves the blueprint for a specific notification template by its ID. ```APIDOC ## Get Notification Template Blueprint ### Description Retrieves the blueprint for a specific notification template by its ID. ### Method GET (Implied) ### Endpoint /notification-templates/{templateId}/blueprint ### Parameters #### Path Parameters - **template_id** (string) - Required - The ID of the notification template. ### Request Example ```ruby client.notification_template_blueprint('') ``` ### Response #### Success Response (200) - **data** (object) - The blueprint object for the notification template. ``` -------------------------------- ### List All Environments Source: https://github.com/novuhq/novu-ruby/blob/main/README.md Retrieve a list of all available environments. ```ruby client.environments() ``` -------------------------------- ### Get Unseen Notification Count Source: https://github.com/novuhq/novu-ruby/blob/main/README.md Gets the count of unseen in-app notifications for a subscriber's feed. ```APIDOC ## Get Unseen Notification Count ### Description Gets the count of unseen in-app notifications for a subscriber's feed. ### Method `subscriber_unseen_notification_count(subscriber_id, query = {})` ### Parameters #### Path Parameters - **subscriber_id** (String) - Required - The ID of the subscriber. #### Query Parameters - **limit** (Integer) - Optional - The limit for the count. - **seen** (Boolean) - Optional - Filter by seen status (typically false for unseen). ### Request Example ```ruby client.subscriber_unseen_notification_count('', { 'limit' => 15, 'seen' => false, }) ``` ``` -------------------------------- ### Get Execution Details Source: https://github.com/novuhq/novu-ruby/blob/main/README.md Retrieve detailed information about event executions, filterable by notification ID and subscriber ID. ```ruby client.execution_details({ 'notificationId' => '8fxxx-xxx-ef9xxxxce66', 'subscriberId' => '7789' }) ``` -------------------------------- ### Get Execution Details Source: https://github.com/novuhq/novu-ruby/blob/main/README.md Retrieves the execution details for a notification, optionally filtered by subscriber. ```APIDOC ## GET /v1/execution-details ### Description Retrieves the execution details for a notification, optionally filtered by subscriber. ### Method GET ### Endpoint /v1/execution-details ### Parameters #### Query Parameters - **notificationId** (string) - Required - The ID of the notification. - **subscriberId** (string) - Optional - The ID of the subscriber. ### Request Example ```ruby client.execution_details({ 'notificationId' => '8fxxx-xxx-ef9xxxxce66', 'subscriberId' => '7789' }) ``` ``` -------------------------------- ### Get Current Organization Members Source: https://github.com/novuhq/novu-ruby/blob/main/README.md Retrieves a list of all members belonging to the current organization. ```ruby client.current_organization_members() ``` -------------------------------- ### Get Notification Templates Source: https://github.com/novuhq/novu-ruby/blob/main/README.md Retrieves a list of notification templates. Supports pagination with optional page and limit parameters. ```APIDOC ## Get Notification Templates ### Description Retrieves a list of notification templates. Supports pagination with optional page and limit parameters. ### Method GET (Implied) ### Endpoint /notification-templates ### Parameters #### Query Parameters - **page** (integer) - Optional - The page number for pagination. - **limit** (integer) - Optional - The number of templates to return per page. ### Request Example ```ruby client.notification_templates({ 'page' => 4, # optional 'limit' => 10, # optional }) ``` ### Response #### Success Response (200) - **data** (array) - A list of notification template objects. - **page** (integer) - The current page number. - **limit** (integer) - The number of templates per page. - **totalCount** (integer) - The total number of notification templates available. ``` -------------------------------- ### Create Environment Source: https://github.com/novuhq/novu-ruby/blob/main/README.md Creates a new environment with the provided details. ```APIDOC ## POST /v1/environments ### Description Creates a new environment with the provided details. ### Method POST ### Endpoint /v1/environments ### Parameters #### Request Body - **name** (string) - Required - The name of the environment. - **parentId** (string) - Optional - The ID of the parent environment. ### Request Example ```ruby payload = { 'name' => 'Staging', 'parentId' => '7789' # optional } client.create_environment(payload) ``` ``` -------------------------------- ### Get Current Organization Members Source: https://github.com/novuhq/novu-ruby/blob/main/README.md Retrieves a list of all members belonging to the current organization. ```APIDOC ## Get Current Organization Members ### Description Retrieves a list of all members belonging to the current organization. ### Method GET (Implied) ### Endpoint /organizations/members ### Response #### Success Response (200) - **data** (array) - A list of member objects belonging to the current organization. ``` -------------------------------- ### Tenant Create Source: https://github.com/novuhq/novu-ruby/blob/main/README.md Creates a new tenant with the provided details. Requires a unique identifier, name, and optional data. ```APIDOC ## Tenant Create ### Description Creates a new tenant with the provided details. Requires a unique identifier, name, and optional data. ### Method POST (inferred from create operation) ### Endpoint /tenants (inferred) ### Parameters #### Request Body - **identifier** (string) - Required - A unique identifier for the tenant. - **name** (string) - Required - The name of the tenant. - **data** (object) - Optional - Additional data associated with the tenant. - **company** (string) - Optional - The company name. - **date-registered** (string) - Optional - The date the tenant was registered. ### Request Example ```json { "identifier": "", "name": "", "data": { "company": "a company", "date-registered": "2023-0-15" } } ``` ``` -------------------------------- ### Get Tenant Workflow Override Source: https://github.com/novuhq/novu-ruby/blob/main/README.md Retrieves a specific tenant's workflow override by workflow ID and tenant ID. ```APIDOC ## Get Tenant Workflow Override ### Description Retrieves a specific tenant's workflow override by workflow ID and tenant ID. ### Method GET (inferred from get operation) ### Endpoint /workflow-overrides/{workflow_id}/{tenant_id} (inferred) ### Parameters #### Path Parameters - **workflow_id** (string) - Required - The ID of the workflow. - **tenant_id** (string) - Required - The ID of the tenant. ``` -------------------------------- ### Create New Environment Source: https://github.com/novuhq/novu-ruby/blob/main/README.md Create a new environment with a specified name and an optional parent ID. ```ruby payload = { 'name' => 'Staging', 'parentId' => '7789' # optional } client.create_environment(payload) ``` -------------------------------- ### Get Notification Groups Source: https://github.com/novuhq/novu-ruby/blob/main/README.md Retrieves a list of all existing notification groups. Use this to manage or view your notification group structure. ```ruby client.notification_groups() ``` -------------------------------- ### Initialize Novu Client Source: https://github.com/novuhq/novu-ruby/blob/main/README.md Initialize the Novu client with your API access token to begin interacting with the Novu API. ```ruby require 'novu' client = Novu::Client.new(access_token: 'YOUR_NOVU_API_TOKEN') ``` -------------------------------- ### Get Webhook Support Status for Provider Source: https://github.com/novuhq/novu-ruby/blob/main/README.md Checks if a specific provider supports webhook functionality. Requires the provider's ID. ```ruby client.webhook_provider_status('') ``` -------------------------------- ### Get Subscriber Source: https://github.com/novuhq/novu-ruby/blob/main/README.md Retrieves a specific subscriber by their ID. ```APIDOC ## Get Subscriber ### Description Retrieves a specific subscriber by their ID. ### Method `subscriber(subscriber_id)` ### Parameters #### Path Parameters - **subscriber_id** (String) - Required - The ID of the subscriber to retrieve. ### Request Example ```ruby client.subscriber('') ``` ``` -------------------------------- ### Initialize Novu Client with Custom Backend URL Source: https://github.com/novuhq/novu-ruby/blob/main/README.md Use this snippet to initialize the Novu client with a custom backend URL, such as for accessing the EU API. Ensure you replace the placeholder with your actual API key. ```ruby client = Novu::Client.new( access_token: '', backend_url: 'https://eu.api.novu.co/v1' ) ``` -------------------------------- ### Create Integration Source: https://github.com/novuhq/novu-ruby/blob/main/README.md Creates a new integration with the specified provider, channel, and credentials. Ensure all required credential fields are provided. ```ruby body = { 'providerId' => '', 'channel' => '', 'credentials' => { # insert all the fields }, 'active' => true, 'check' => true } client.create_integration(body) ``` -------------------------------- ### Initialize Novu Client with Retry Configuration Source: https://github.com/novuhq/novu-ruby/blob/main/README.md Initialize the Novu client with retry mechanisms enabled. Configure exponential backoff strategy with maximum retries, initial delay, and maximum delay. ```ruby client = Novu::Client.new( access_token: '', idempotency_key: '', enable_retry: true, # it is disabled by default, retry_config: { max_retries: 3, initial_delay: 4, max_delay: 60 } ) ``` -------------------------------- ### Get Workflow Override by Override ID Source: https://github.com/novuhq/novu-ruby/blob/main/README.md Retrieve a specific workflow override using its unique override ID. ```ruby client.get_workflow_override_by_id("") ``` -------------------------------- ### Get Notifications Source: https://github.com/novuhq/novu-ruby/blob/main/README.md Retrieves a list of notifications. Supports filtering by channels, templates, emails, and a search string. Optional parameters include pagination ('page') and transaction ID. ```ruby body = { 'channels' => [''], 'templates' => [''], 'emails' => [''], 'search' => '' 'page' => 2 , # optional 'transactionId' =>'sw900999as', # optional } client.notifications(body) ``` -------------------------------- ### Initialize Novu Client with Idempotency Key Source: https://github.com/novuhq/novu-ruby/blob/main/README.md Configure the Novu client to support idempotent requests by providing an idempotency key during initialization. This prevents accidental duplicate operations on retries. ```ruby client = Novu::Client.new( access_token: '', idempotency_key: '' ) ``` -------------------------------- ### Create Organization Source: https://github.com/novuhq/novu-ruby/blob/main/README.md Creates a new organization with a specified logo and name. ```ruby client.create_organization({ 'logo' => '', 'name' => '', }) ``` -------------------------------- ### Get Channel Limit Source: https://github.com/novuhq/novu-ruby/blob/main/README.md Retrieves the rate limit or usage limit for a specific channel type. Useful for managing API usage. ```ruby client.channel_limit('') ``` -------------------------------- ### Get Notifications Source: https://github.com/novuhq/novu-ruby/blob/main/README.md Retrieves a list of notifications. Supports filtering by channels, templates, emails, and a search string, with optional pagination and transaction ID. ```APIDOC ## Get Notifications ### Description Retrieves a list of notifications. Supports filtering by channels, templates, emails, and a search string, with optional pagination and transaction ID. ### Method GET (Implied) ### Endpoint /notifications ### Parameters #### Query Parameters - **channels** (array of strings) - Required - The notification channels to filter by. - **templates** (array of strings) - Required - The notification template IDs to filter by. - **emails** (array of strings) - Required - The email addresses to filter by. - **search** (string) - Required - A search string to filter notifications. - **page** (integer) - Optional - The page number for pagination. - **transactionId** (string) - Optional - The transaction ID for filtering. ### Request Example ```ruby body = { 'channels' => [''], 'templates' => [''], 'emails' => [''], 'search' => '' 'page' => 2 , # optional 'transactionId' =>'sw900999as', # optional } client.notifications(body) ``` ### Response #### Success Response (200) - **data** (array) - A list of notification objects. - **page** (integer) - The current page number. - **limit** (integer) - The number of notifications per page. - **totalCount** (integer) - The total number of notifications. ``` -------------------------------- ### Get Subscriber by ID Source: https://github.com/novuhq/novu-ruby/blob/main/README.md Retrieves a specific subscriber's details using their unique ID. This is useful for fetching individual subscriber information. ```ruby client.subscriber('') ``` -------------------------------- ### Create Topic Source: https://github.com/novuhq/novu-ruby/blob/main/README.md Creates a new topic with a specified key and name. ```APIDOC ## Create Topic ### Description Creates a new topic with a specified key and name. ### Method POST (inferred from creation operation) ### Endpoint /topics (inferred) ### Parameters #### Request Body - **key** (string) - Required - The unique key for the topic. - **name** (string) - Required - The name of the topic. ``` -------------------------------- ### Get Messages Source: https://github.com/novuhq/novu-ruby/blob/main/README.md Retrieves a list of messages with optional filtering by channel, subscriber ID, transaction ID, page, and limit. Useful for tracking notification history. ```ruby payload = { 'channel' => 'slack', # optional 'subscriberId' => '7789', # optional 'transactionId' =>'sw900999as', # optional 'page' => 4, # optional 'limit' => 10, # optional } client.messages(payload) ``` -------------------------------- ### Get Notification Statistics Source: https://github.com/novuhq/novu-ruby/blob/main/README.md Retrieves overall statistics for notifications. ```APIDOC ## Get Notification Statistics ### Description Retrieves overall statistics for notifications. ### Method GET (Implied) ### Endpoint /notifications/stats ### Response #### Success Response (200) - **data** (object) - An object containing notification statistics. ``` -------------------------------- ### Create Topic with Key and Name Source: https://github.com/novuhq/novu-ruby/blob/main/README.md Create a new topic in Novu. Topics are used to categorize notifications. Requires a unique key and a display name. ```ruby client.create_topic({ 'key' => 'key', 'name' => 'name' }) ``` -------------------------------- ### List Changes with Query Parameters Source: https://github.com/novuhq/novu-ruby/blob/main/README.md Fetch a list of changes, optionally filtering by page, limit, or promotion status. ```ruby client.changes({ 'page' => 1, # optional 'limit' => 10, # optional 'promoted' => 'hello' }) ``` -------------------------------- ### Create Subscriber Source: https://github.com/novuhq/novu-ruby/blob/main/README.md Creates a new subscriber with essential details like ID and email. Ensure all required fields are provided. ```ruby payload = { 'subscriberId' => '7789', 'email' => '', # optional 'firstName' => '', # optional 'lastName' => '', # optional 'phone' => '', # optional 'avatar' => '' # optional } client.create_subscriber(payload) ``` -------------------------------- ### Create Bulk Subscribers Source: https://github.com/novuhq/novu-ruby/blob/main/README.md Adds multiple subscribers in a single request. This is efficient for onboarding large numbers of users. ```ruby payload = { 'subscribers' => [ { 'name' => 'subscriber-1', 'email' => 'user1@example.com', 'firstName' => 'test1', 'lastName' => 'test1', 'phone' => '08122442244', 'subscriberId' => 'subscriber-test-1221' }, { 'name' => 'subscriber2', 'email' => 'user2@example.com', 'firstName' => 'test2', 'lastName' => 'test2', 'phone' => '0814422334', 'subscriberId' => 'subscriber-test-9090' } ] } client.bulk_create_subscribers(payload) ``` -------------------------------- ### Create Workflow Overrides Source: https://github.com/novuhq/novu-ruby/blob/main/README.md Create new workflow overrides for a specific tenant and workflow. This allows customization of notification delivery for certain workflows. ```ruby client.create_workflow_overrides( tenantId: "", workflowId: "", active: true # or false ) ``` -------------------------------- ### Create Feed Source: https://github.com/novuhq/novu-ruby/blob/main/README.md Create a new feed with a specified name. ```ruby client.create_feed({ 'name' => 'New feed' }) ``` -------------------------------- ### Group Blueprints by Category Source: https://github.com/novuhq/novu-ruby/blob/main/README.md Organize blueprints by their respective categories. ```ruby client.group_blueprints_by_category() ``` -------------------------------- ### Create Layout Source: https://github.com/novuhq/novu-ruby/blob/main/README.md Creates a new notification layout with a name, content, and optional variables and default status. The content uses Handlebars templating. ```ruby payload = { 'name' => 'New layout', 'content' => '{{{body}}}', 'variables' => [''], # optional 'description' => 'This is a description for the new layout', # optional 'isDefault' => true # optional } client.create_layout(payload) ``` -------------------------------- ### Get Workflow Override By ID Source: https://github.com/novuhq/novu-ruby/blob/main/README.md Retrieves a workflow override by its unique override ID. ```APIDOC ## Get Workflow Override By ID ### Description Retrieves a workflow override by its unique override ID. ### Method GET (inferred from get operation) ### Endpoint /workflow-overrides/{override_id} (inferred) ### Parameters #### Path Parameters - **override_id** (string) - Required - The ID of the workflow override. ``` -------------------------------- ### Create Organization Source: https://github.com/novuhq/novu-ruby/blob/main/README.md Creates a new organization with a specified logo and name. ```APIDOC ## Create Organization ### Description Creates a new organization with a specified logo and name. ### Method POST (Implied) ### Endpoint /organizations ### Parameters #### Request Body - **logo** (string) - Required - The URL of the organization's logo. - **name** (string) - Required - The name of the organization. ### Request Example ```ruby client.create_organization({ 'logo' => '', 'name' => '', }) ``` ### Response #### Success Response (200) - **data** (object) - The created organization object. ``` -------------------------------- ### Get Subscriber Notification Feed Source: https://github.com/novuhq/novu-ruby/blob/main/README.md Retrieves the in-app notification feed for a specific subscriber. ```APIDOC ## Get In-App Notification Feed for a Subscriber ### Description Retrieves the in-app notification feed for a specific subscriber. ### Method `subscriber_notification_feed(subscriber_id, query = {})` ### Parameters #### Path Parameters - **subscriber_id** (String) - Required - The ID of the subscriber. #### Query Parameters - **page** (Integer) - Optional - The page number for pagination. - **limit** (Integer) - Optional - The number of notifications to return per page. - **read** (Boolean) - Optional - Filter by read status. - **seen** (Boolean) - Optional - Filter by seen status. ### Request Example ```ruby client.subscriber_notification_feed('', { 'page' => 3, 'limit' => 15, 'read' => true, 'seen' => true, }) ``` ``` -------------------------------- ### Create Notification Template Source: https://github.com/novuhq/novu-ruby/blob/main/README.md Creates a new notification template with specified details. Optional fields include tags, description, steps, active status, draft status, critical status, preference settings, and blueprint ID. ```APIDOC ## Create Notification Template ### Description Creates a new notification template with specified details. Optional fields include tags, description, steps, active status, draft status, critical status, preference settings, and blueprint ID. ### Method POST (Implied) ### Endpoint /notification-templates ### Parameters #### Request Body - **name** (string) - Required - The name of the notification template. - **notificationGroupId** (string) - Required - The ID of the notification group. - **tags** (array of strings) - Optional - Tags associated with the template. - **description** (string) - Optional - A description for the template. - **steps** (array) - Optional - Configuration for the steps within the template. - **active** (boolean) - Optional - Whether the template is active. - **draft** (boolean) - Optional - Whether the template is in draft mode. - **critical** (boolean) - Optional - Whether the template is critical. - **preferenceSettings** (object) - Optional - Settings for user preferences. - **blueprintId** (string) - Optional - The ID of the blueprint associated with the template. ### Request Example ```ruby body = { 'name' => '', 'notificationGroupId' => 'notificationGroupId', 'tags' => ['tags'], # optional 'description' => 'description', # optional 'steps' => [ # optional # insert all fields here ], 'active' => true, # optional 'draft' => true, # optional 'critical' => true, # optional 'preferenceSettings' => { # optional # insert all fields here }, 'blueprintId' => 'blueprintId' # optional } client.create_notification_template(body) ``` ### Response #### Success Response (200) - **data** (object) - The created notification template object. ``` -------------------------------- ### Layouts Source: https://github.com/novuhq/novu-ruby/blob/main/README.md Manages notification layouts within the Novu platform. ```APIDOC ## Create Layout ### Description Creates a new notification layout. ### Method `create_layout(body)` ### Parameters #### Request Body - **name** (string) - Required - The name of the layout. - **content** (string) - Required - The content of the layout (e.g., HTML template). - **variables** (array) - Optional - A list of variables used in the layout. - **description** (string) - Optional - A description for the layout. - **isDefault** (boolean) - Optional - Whether this layout should be the default. ### Request Example ```ruby payload = { 'name' => 'New layout', 'content' => '{{{body}}}', 'variables' => [''], # optional 'description' => 'This is a description for the new layout', # optional 'isDefault' => true # optional } client.create_layout(payload) ``` ``` ```APIDOC ## Filter Layouts ### Description Retrieves a list of layouts, with optional filtering and pagination. ### Method `layouts(query = {})` ### Parameters #### Query Parameters - **page** (integer) - Optional - The page number for pagination. - **pageSize** (integer) - Optional - The number of items per page. - **sortBy** (string) - Optional - The field to sort by (e.g., 'createdAt'). - **orderBy** (integer) - Optional - The order of sorting (1 for ascending, -1 for descending). ### Request Example ```ruby client.layouts({ 'page' => 1, # optional 'pageSize' => 10, # optional 'sortBy' => 'createdAt', # optional 'orderBy' => 1 # optional }) ``` ``` ```APIDOC ## Get Layout ### Description Retrieves a specific layout by its ID. ### Method `layout(layout_id)` ### Parameters #### Path Parameters - **layout_id** (string) - Required - The ID of the layout to retrieve. ### Request Example ```ruby client.layout('') ``` ``` ```APIDOC ## Delete Layout ### Description Deletes a layout by its ID. ### Method `delete_layout(layout_id)` ### Parameters #### Path Parameters - **layout_id** (string) - Required - The ID of the layout to delete. ### Request Example ```ruby client.delete_layout('') ``` ``` ```APIDOC ## Update Layout ### Description Updates an existing layout. ### Method `update_layout(layout_id, body)` ### Parameters #### Path Parameters - **layout_id** (string) - Required - The ID of the layout to update. #### Request Body - **name** (string) - Optional - The new name for the layout. - **content** (string) - Optional - The new content for the layout. - **description** (string) - Optional - The new description for the layout. - **isDefault** (boolean) - Optional - Whether this layout should be the default. - **variables** (array) - Optional - A list of variables used in the layout. ### Request Example ```ruby payload = { 'name' => 'Update layout', # optional 'content' => '{{{body}}}', # optional 'description' => 'This is a description for the new layout', # optional 'isDefault' => true # optional 'variables' => [''], # optional } client.update_layout('', payload) ``` ``` ```APIDOC ## Set Default Layout ### Description Sets a specific layout as the default layout. ### Method `make_default_layout(layout_id)` ### Parameters #### Path Parameters - **layout_id** (string) - Required - The ID of the layout to set as default. ### Request Example ```ruby client.make_default_layout('') ``` ``` -------------------------------- ### Create Workflow Overrides Source: https://github.com/novuhq/novu-ruby/blob/main/README.md Creates workflow overrides for a given tenant and workflow. ```APIDOC ## Create Workflow Overrides ### Description Creates workflow overrides for a given tenant and workflow. ### Method POST (inferred from create operation) ### Endpoint /workflow-overrides (inferred) ### Parameters #### Request Body - **tenantId** (string) - Required - The ID of the tenant. - **workflowId** (string) - Required - The ID of the workflow. - **active** (boolean) - Required - Whether the override is active. ``` -------------------------------- ### Create Subscriber Source: https://github.com/novuhq/novu-ruby/blob/main/README.md Creates a new subscriber in the Novu system. ```APIDOC ## Create Subscriber ### Description Creates a new subscriber in the Novu system. ### Method `create_subscriber(body)` ### Parameters #### Request Body - **subscriberId** (String) - Required - The unique identifier for the subscriber. - **email** (String) - Optional - The email address of the subscriber. - **firstName** (String) - Optional - The first name of the subscriber. - **lastName** (String) - Optional - The last name of the subscriber. - **phone** (String) - Optional - The phone number of the subscriber. - **avatar** (String) - Optional - The URL of the subscriber's avatar. ### Request Example ```ruby payload = { 'subscriberId' => '7789', 'email' => '', 'firstName' => '', 'lastName' => '', 'phone' => '', 'avatar' => '' } client.create_subscriber(payload) ``` ``` -------------------------------- ### Apply Bulk Changes Source: https://github.com/novuhq/novu-ruby/blob/main/README.md Apply multiple changes simultaneously by providing a list of change IDs. ```ruby client.apply_bulk_changes({ 'changeIds' => [''] }) ``` -------------------------------- ### Create Notification Template Blueprint Source: https://github.com/novuhq/novu-ruby/blob/main/README.md Creates a new blueprint for a notification template using its ID. ```ruby client.create_notification_template_blueprint('') ``` -------------------------------- ### Set Default Layout Source: https://github.com/novuhq/novu-ruby/blob/main/README.md Sets a specific layout as the default layout for notifications. This layout will be used unless overridden. ```ruby client.make_default_layout('') ``` -------------------------------- ### Create Notification Template Source: https://github.com/novuhq/novu-ruby/blob/main/README.md Creates a new notification template. Requires a name and notification group ID. Optional fields include tags, description, steps, active status, draft status, critical status, preference settings, and blueprint ID. ```ruby body = { 'name' => '', 'notificationGroupId' => 'notificationGroupId', 'tags' => ['tags'], # optional 'description' => 'description', # optional 'steps' => [ # optional # insert all fields here ], 'active' => true, # optional 'draft' => true, # optional 'critical' => true, # optional 'preferenceSettings' => { # optional # insert all fields here }, 'blueprintId' => 'blueprintId' # optional } client.create_notification_template(body) ``` -------------------------------- ### Handle Chat OAuth Source: https://github.com/novuhq/novu-ruby/blob/main/README.md Handles the OAuth process specifically for chat integrations. Requires environment, hash, and integration identifier. ```ruby query = { 'environmentId' => '', 'hmacHash' => '', 'integrationIdentifier' => '' } client.chat_oauth('', '', query) ``` -------------------------------- ### Get Notification Graph Statistics Source: https://github.com/novuhq/novu-ruby/blob/main/README.md Retrieves graph statistics for notifications. Supports filtering by the number of days. ```ruby client.notifications_graph_stats({ 'days' => 5 # optional }) ``` -------------------------------- ### Create Bulk Subscribers Source: https://github.com/novuhq/novu-ruby/blob/main/README.md Creates multiple subscribers in a single request. ```APIDOC ## Create Bulk Subscribers ### Description Creates multiple subscribers in a single request. ### Method `bulk_create_subscribers(body)` ### Parameters #### Request Body - **subscribers** (Array) - Required - An array of subscriber objects to create. - Each object should contain: - **name** (String) - Required - The name of the subscriber. - **email** (String) - Optional - The email address of the subscriber. - **firstName** (String) - Optional - The first name of the subscriber. - **lastName** (String) - Optional - The last name of the subscriber. - **phone** (String) - Optional - The phone number of the subscriber. - **subscriberId** (String) - Required - The unique identifier for the subscriber. ### Request Example ```ruby payload = { 'subscribers' => [ { 'name' => 'subscriber-1', 'email' => 'user1@example.com', 'firstName' => 'test1', 'lastName' => 'test1', 'phone' => '08122442244', 'subscriberId' => 'subscriber-test-1221' }, { 'name' => 'subscriber2', 'email' => 'user2@example.com', 'firstName' => 'test2', 'lastName' => 'test2', 'phone' => '0814422334', 'subscriberId' => 'subscriber-test-9090' } ] } client.bulk_create_subscribers(payload) ``` ``` -------------------------------- ### Get In-App Status Source: https://github.com/novuhq/novu-ruby/blob/main/README.md Checks the status of the in-app notification channel. This helps in diagnosing delivery issues. ```ruby client.in_app_status() ```