agent_push_kit

AgentPushKit - the Ruby gem for the Agent Push Kit API

The complete Agent Push Kit REST API. Application event ingestion uses an organization key beginning with apk_. Authenticated user operations accept either an Agent Push Kit login JWT or an agent access token beginning with apt_.

This SDK is automatically generated by the OpenAPI Generator project:

  • API version: 0.1.0
  • Package version: 0.1.0
  • Generator version: 7.24.0
  • Build package: org.openapitools.codegen.languages.RubyClientCodegen For more information, please visit https://agentpushkit.com

Installation

Build a gem

To build the Ruby code into a gem:

gem build agent_push_kit.gemspec

Then either install the gem locally:

gem install ./agent_push_kit-0.1.0.gem

(for development, run gem install --dev ./agent_push_kit-0.1.0.gem to install the development dependencies)

or publish the gem to a gem hosting service, e.g. RubyGems.

Finally add this to the Gemfile:

gem 'agent_push_kit', '~> 0.1.0'

Install from Git

If the Ruby gem is hosted at a git repository: https://github.com/JustinBStrong/agent-push-kit-ruby, then add the following in the Gemfile:

gem 'agent_push_kit', :git => 'https://github.com/JustinBStrong/agent-push-kit-ruby.git'

Include the Ruby code directly

Include the Ruby code directly using -I as follows:

ruby -Ilib script.rb

Getting Started

Please follow the installation procedure and then run the following code:

# Load the gem
require 'agent_push_kit'

# Setup authorization
AgentPushKit.configure do |config|
  # Configure Bearer authorization (Agent Push Kit JWT or apt_ token): UserOrAgent
  config.access_token = 'YOUR_BEARER_TOKEN'
  # Configure a proc to get access tokens in lieu of the static access_token configuration
  config.access_token_getter = -> { 'YOUR TOKEN GETTER PROC' } 
end

api_instance = AgentPushKit::AccountApi.new

begin
  #Delete the current user and customer accounts they own
  result = api_instance.
  p result
rescue AgentPushKit::ApiError => e
  puts "Exception when calling AccountApi->delete_current_account: #{e}"
end

Documentation for API Endpoints

All URIs are relative to https://api.chatdna.co/agent-push-kit/v1

Class Method HTTP request Description
AgentPushKit::AccountApi delete_current_account DELETE /me Delete the current user and customer accounts they own
AgentPushKit::AccountApi get_current_account GET /me Get the current user and customer accounts
AgentPushKit::AgentTokensApi call_mcp POST /mcp Connect through stateless MCP Streamable HTTP
AgentPushKit::AgentTokensApi create_agent_token POST /agent-tokens Create a named non-expiring agent token
AgentPushKit::AgentTokensApi list_agent_tokens GET /agent-tokens List agent access tokens without their secrets
AgentPushKit::AgentTokensApi revoke_agent_token DELETE /agent-tokens/tokenId Revoke one of the current user's agent tokens
AgentPushKit::AuthenticationApi complete_password_reset POST /auth/password-reset/complete Choose a new password and log in
AgentPushKit::AuthenticationApi login_with_apple POST /auth/apple Log in or attach an account using a Sign in with Apple identity token
AgentPushKit::AuthenticationApi login_with_google POST /auth/google Log in or attach an account using a verified Google ID token
AgentPushKit::AuthenticationApi login_with_password POST /auth/login Log in with email and password
AgentPushKit::AuthenticationApi register POST /auth/register Create a user and first customer account
AgentPushKit::AuthenticationApi request_password_reset POST /auth/password-reset/request Email a single-use password reset token
AgentPushKit::CustomerAccountsApi add_organization_member POST /organizations/organizationId/members Add an already-registered user to a customer account
AgentPushKit::CustomerAccountsApi create_organization POST /organizations Create another Agent Push Kit customer account
AgentPushKit::CustomerAccountsApi list_organization_members GET /organizations/organizationId/members List members of a customer account
AgentPushKit::CustomerAccountsApi list_organizations GET /organizations List customer accounts available to the current user
AgentPushKit::CustomerAccountsApi regenerate_organization_api_key POST /organizations/organizationId/api-key/regenerate Rotate the application event-ingestion key
AgentPushKit::DevicesApi get_web_push_configuration GET /web-push/configuration Get browser push availability and its public VAPID key
AgentPushKit::DevicesApi register_device POST /devices Register or refresh an APNs device
AgentPushKit::DevicesApi register_web_push_subscription POST /web-push/subscriptions Register or refresh a browser push subscription
AgentPushKit::DevicesApi remove_device DELETE /devices/installationId Disable push delivery to one installation
AgentPushKit::DevicesApi remove_web_push_subscription DELETE /web-push/subscriptions/subscriptionId Disable a browser push subscription
AgentPushKit::EventsApi get_event GET /organizations/organizationId/events/eventId Get one event including metadata
AgentPushKit::EventsApi list_events GET /organizations/organizationId/events List a paginated inbox
AgentPushKit::EventsApi list_notification_types GET /organizations/organizationId/types List distinct notification types
AgentPushKit::EventsApi list_services GET /organizations/organizationId/services List services discovered from ingested events
AgentPushKit::EventsApi search_events POST /organizations/organizationId/events/search Search events with a validated Boolean filter tree
AgentPushKit::EventsApi send_event POST /events Send an event using an application ingestion key
AgentPushKit::EventsApi send_event_as_user POST /organizations/organizationId/events Send an event as an authenticated user or agent
AgentPushKit::HealthApi get_health GET /health Check Agent Push Kit API health
AgentPushKit::PreferencesApi list_preferences GET /organizations/organizationId/preferences List service defaults and exact-type overrides
AgentPushKit::PreferencesApi remove_type_preference DELETE /services/serviceId/types/type/preference Remove an exact-type override so it inherits the service default
AgentPushKit::PreferencesApi set_service_preference PUT /services/serviceId/preference Enable or disable pushes for a service by default
AgentPushKit::PreferencesApi set_type_preference PUT /services/serviceId/types/type/preference Override push delivery for one exact notification type

Documentation for Models

Documentation for Authorization

Authentication schemes defined for the API:

UserOrAgent

  • Type: Bearer authentication (Agent Push Kit JWT or apt_ token)

AgentToken

  • Type: Bearer authentication (apt_)

OrganizationApiKey

  • Type: Bearer authentication (apk_)