agent_push_kit (EXPERIMENTAL)

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 Dart package is automatically generated by the OpenAPI Generator project:

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

Requirements

Installation & Usage

pub.dev

To use the package from pub.dev, please include the following in pubspec.yaml

dependencies:
  agent_push_kit: 0.1.0

Github

If this Dart package is published to Github, please include the following in pubspec.yaml

dependencies:
  agent_push_kit:
    git:
      url: https://github.com/JustinBStrong/agent-push-kit-dart.git
      #ref: main

Local development

To use the package from your local drive, please include the following in pubspec.yaml

dependencies:
  agent_push_kit:
    path: /path/to/agent_push_kit

Getting Started

Please follow the installation procedure and then run the following:

import 'package:agent_push_kit/agent_push_kit.dart';


final api = AgentPushKit().getAccountApi();

try {
    final response = await api.deleteCurrentAccount();
    print(response);
} on DioException catch (e) {
    print("Exception when calling AccountApi->deleteCurrentAccount: $e\n");
}

Documentation for API Endpoints

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

Class Method HTTP request Description
AccountApi deleteCurrentAccount DELETE /me Delete the current user and customer accounts they own
AccountApi getCurrentAccount GET /me Get the current user and customer accounts
AgentTokensApi callMcp POST /mcp Connect through stateless MCP Streamable HTTP
AgentTokensApi createAgentToken POST /agent-tokens Create a named non-expiring agent token
AgentTokensApi listAgentTokens GET /agent-tokens List agent access tokens without their secrets
AgentTokensApi revokeAgentToken DELETE /agent-tokens/{tokenId} Revoke one of the current user's agent tokens
AuthenticationApi completePasswordReset POST /auth/password-reset/complete Choose a new password and log in
AuthenticationApi loginWithApple POST /auth/apple Log in or attach an account using a Sign in with Apple identity token
AuthenticationApi loginWithGoogle POST /auth/google Log in or attach an account using a verified Google ID token
AuthenticationApi loginWithPassword POST /auth/login Log in with email and password
AuthenticationApi register POST /auth/register Create a user and first customer account
AuthenticationApi requestPasswordReset POST /auth/password-reset/request Email a single-use password reset token
CustomerAccountsApi addOrganizationMember POST /organizations/{organizationId}/members Add an already-registered user to a customer account
CustomerAccountsApi createOrganization POST /organizations Create another Agent Push Kit customer account
CustomerAccountsApi listOrganizationMembers GET /organizations/{organizationId}/members List members of a customer account
CustomerAccountsApi listOrganizations GET /organizations List customer accounts available to the current user
CustomerAccountsApi regenerateOrganizationApiKey POST /organizations/{organizationId}/api-key/regenerate Rotate the application event-ingestion key
DevicesApi getWebPushConfiguration GET /web-push/configuration Get browser push availability and its public VAPID key
DevicesApi registerDevice POST /devices Register or refresh an APNs device
DevicesApi registerWebPushSubscription POST /web-push/subscriptions Register or refresh a browser push subscription
DevicesApi removeDevice DELETE /devices/{installationId} Disable push delivery to one installation
DevicesApi removeWebPushSubscription DELETE /web-push/subscriptions/{subscriptionId} Disable a browser push subscription
EventsApi getEvent GET /organizations/{organizationId}/events/{eventId} Get one event including metadata
EventsApi listEvents GET /organizations/{organizationId}/events List a paginated inbox
EventsApi listNotificationTypes GET /organizations/{organizationId}/types List distinct notification types
EventsApi listServices GET /organizations/{organizationId}/services List services discovered from ingested events
EventsApi searchEvents POST /organizations/{organizationId}/events/search Search events with a validated Boolean filter tree
EventsApi sendEvent POST /events Send an event using an application ingestion key
EventsApi sendEventAsUser POST /organizations/{organizationId}/events Send an event as an authenticated user or agent
HealthApi getHealth GET /health Check Agent Push Kit API health
PreferencesApi listPreferences GET /organizations/{organizationId}/preferences List service defaults and exact-type overrides
PreferencesApi removeTypePreference DELETE /services/{serviceId}/types/{type}/preference Remove an exact-type override so it inherits the service default
PreferencesApi setServicePreference PUT /services/{serviceId}/preference Enable or disable pushes for a service by default
PreferencesApi setTypePreference 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: HTTP Bearer Token authentication (Agent Push Kit JWT or apt_ token)

AgentToken

  • Type: HTTP Bearer Token authentication (apt_)

OrganizationApiKey

  • Type: HTTP Bearer Token authentication (apk_)

Author

Libraries

agent_push_kit