Skip to content

About

Official Lockally SDK for Ruby (RubyGems: lockally)

Resources

Contributing

Stars

1 star

Watchers

0 watching

Forks

Repository files navigation

Lockally

Lockally SDK for Ruby

Lockally - the Ruby gem for the Lockally API

Official Lockally SDK for Ruby: send email and manage mailboxes, domains and webhooks through the Lockally API.

Website | API reference | Source

Authentication. All /v1/* endpoints require a Bearer API key in the Authorization header. Keys are formatted lk_live_<8-char-prefix>_<32-char-secret>, or lk_test_<...> for a test key. Create keys in the dashboard, or with POST /v1/api-keys using a key that holds tenant:admin.

The key's plan is checked on every request, so a key stops working if the account moves to a plan without API access, and works again if it moves back.

Errors. Failures return RFC 9457 application/problem+json documents.

Scopes. Each endpoint requires a specific scope on the presented key. Insufficient scope returns 403 with the required scope name in detail.

This SDK is automatically generated by the OpenAPI Generator project:

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

Installation

Build a gem

To build the Ruby code into a gem:

gem build lockally.gemspec

Then either install the gem locally:

gem install ./lockally-0.6.0.gem

(for development, run gem install --dev ./lockally-0.6.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 'lockally', '~> 0.6.0'

Install from Git

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

gem 'lockally', :git => 'https://github.com/LockallyInc/lockally-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 'lockally'

# Setup authorization
Lockally.configure do |config|
  # Configure Bearer authorization (lk_live_<prefix>_<secret>): bearerAuth
  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' } 
  # Configure faraday connection
  config.configure_faraday_connection { |connection| 'YOUR CONNECTION CONFIG PROC' }
end

api_instance = Lockally::AddOnsApi.new
name = 'name_example' # String | Add-on key

begin
  #Activate an add-on
  result = api_instance.activate_add_on(name)
  p result
rescue Lockally::ApiError => e
  puts "Exception when calling AddOnsApi->activate_add_on: #{e}"
end

Documentation for API Endpoints

All URIs are relative to https://api.lockally.com

Class Method HTTP request Description
Lockally::AddOnsApi activate_add_on POST /v1/add-ons/{name}/activate Activate an add-on
Lockally::AddOnsApi cancel_add_on POST /v1/add-ons/{name}/cancel Cancel an add-on
Lockally::AddOnsApi get_add_on_status GET /v1/add-ons/{name} Get add-on status
Lockally::AddOnsApi list_add_ons GET /v1/add-ons List add-ons
Lockally::AdminApi admin_login POST /v1/admin/login Tenant-admin email+password login
Lockally::AdminApi admin_logout POST /v1/admin/logout Invalidate the current admin session
Lockally::AdminApi get_current_admin GET /v1/admin/me Get the current admin + tenant
Lockally::AdminsApi delete_admin DELETE /v1/admins/{id} Delete an admin
Lockally::AdminsApi invite_admin POST /v1/admins Invite a new admin
Lockally::AdminsApi list_admins GET /v1/admins List tenant admins
Lockally::AdminsApi update_admin PATCH /v1/admins/{id} Update an admin
Lockally::AgentsApi download_thread_attachment GET /v1/threads/{threadID}/messages/{messageID}/attachments/{idx} Download an attachment
Lockally::AgentsApi get_thread GET /v1/threads/{threadID} Get a whole conversation
Lockally::AgentsApi get_thread_message GET /v1/threads/{threadID}/messages/{messageID} Get one message with body
Lockally::AgentsApi grant_api_key_mailbox POST /v1/api-keys/{keyID}/mailboxes Grant a mailbox to a key
Lockally::AgentsApi list_api_key_mailboxes GET /v1/api-keys/{keyID}/mailboxes List a key's mailbox grants
Lockally::AgentsApi list_inboxes GET /v1/inboxes List granted inboxes
Lockally::AgentsApi list_threads GET /v1/inboxes/{mailbox}/threads List conversation threads
Lockally::AgentsApi lookup_contact GET /v1/contacts/lookup Who is this sender?
Lockally::AgentsApi mark_thread_message_read POST /v1/threads/{threadID}/messages/{messageID}/read Mark read/unread
Lockally::AgentsApi reply_to_thread POST /v1/threads/{threadID}/reply Reply in-thread (agent stream)
Lockally::AgentsApi revoke_api_key_mailbox DELETE /v1/api-keys/{keyID}/mailboxes/{mailboxID} Revoke a mailbox grant
Lockally::AgentsApi start_conversation POST /v1/inboxes/{mailbox}/messages Start a new conversation (agent stream)
Lockally::AgentsApi whoami GET /v1/auth/whoami Introspect the calling credentials
Lockally::AiApi classify_thread POST /v1/threads/{threadID}/classify LLM-classify a thread
Lockally::AiApi create_ai_units_checkout POST /v1/billing/ai-units/checkout Buy prepaid AI units
Lockally::AiApi get_ai_config GET /v1/ai-config Read the tenant's AI configuration
Lockally::AiApi update_ai_config PUT /v1/ai-config Configure the AI tier
Lockally::AliasesApi create_alias POST /v1/aliases Create an alias
Lockally::AliasesApi delete_alias DELETE /v1/aliases/{address} Delete an alias
Lockally::AliasesApi list_aliases GET /v1/aliases List aliases
Lockally::ApiKeysApi create_api_key POST /v1/api-keys Create an API key
Lockally::ApiKeysApi list_api_keys GET /v1/api-keys List API keys
Lockally::ApiKeysApi revoke_api_key DELETE /v1/api-keys/{id} Revoke an API key
Lockally::ApiKeysApi rotate_api_key POST /v1/api-keys/{id}/rotate Rotate an API key
Lockally::ApiKeysApi update_api_key PATCH /v1/api-keys/{id} Update an API key
Lockally::BillingApi create_billing_checkout POST /v1/billing/checkout Create a plan checkout session
Lockally::BillingApi create_units_checkout POST /v1/billing/units/checkout Create a send-units checkout session
Lockally::BillingApi get_billing GET /v1/billing Get billing status
Lockally::CalendarsApi add_calendar_member POST /v1/calendars/{id}/members Add a member to a calendar
Lockally::CalendarsApi create_calendar POST /v1/calendars Create a calendar
Lockally::CalendarsApi create_calendar_event POST /v1/calendars/{id}/events Create an event in a calendar
Lockally::CalendarsApi create_calendar_integration POST /v1/calendar-integrations Create a calendar integration
Lockally::CalendarsApi delete_calendar DELETE /v1/calendars/{id} Delete a calendar
Lockally::CalendarsApi delete_calendar_event DELETE /v1/calendars/{id}/events/{eventId} Delete a calendar event
Lockally::CalendarsApi delete_calendar_integration DELETE /v1/calendar-integrations/{id} Delete a calendar integration
Lockally::CalendarsApi get_calendar GET /v1/calendars/{id} Get a calendar
Lockally::CalendarsApi get_calendar_overview GET /v1/calendar-overview Administrative overview of the organization's calendar system
Lockally::CalendarsApi get_calendar_policies GET /v1/calendar-policies Get calendar policies
Lockally::CalendarsApi get_calendar_security GET /v1/calendar-security Get calendar security overview
Lockally::CalendarsApi list_calendar_events GET /v1/calendars/{id}/events List events in a calendar
Lockally::CalendarsApi list_calendar_integrations GET /v1/calendar-integrations List calendar integrations
Lockally::CalendarsApi list_calendar_members GET /v1/calendars/{id}/members List calendar members
Lockally::CalendarsApi list_calendars GET /v1/calendars List calendars
Lockally::CalendarsApi remove_calendar_member DELETE /v1/calendars/{id}/members/{memberId} Remove a member from a calendar
Lockally::CalendarsApi sync_calendar_integration POST /v1/calendar-integrations/{id}/sync Trigger sync for a calendar integration
Lockally::CalendarsApi update_calendar PATCH /v1/calendars/{id} Update a calendar
Lockally::CalendarsApi update_calendar_event PATCH /v1/calendars/{id}/events/{eventId} Update a calendar event
Lockally::CalendarsApi update_calendar_integration PATCH /v1/calendar-integrations/{id} Update a calendar integration
Lockally::CalendarsApi update_calendar_member PATCH /v1/calendars/{id}/members/{memberId} Update a calendar member's role
Lockally::CalendarsApi update_calendar_policies PATCH /v1/calendar-policies Update calendar policies
Lockally::ContactListsApi add_contact_list_member POST /v1/contact-lists/{id}/members Add a member to a contact list
Lockally::ContactListsApi create_contact_list POST /v1/contact-lists Create a contact list
Lockally::ContactListsApi delete_contact_list DELETE /v1/contact-lists/{id} Delete a contact list
Lockally::ContactListsApi get_contact_list GET /v1/contact-lists/{id} Get a contact list with members
Lockally::ContactListsApi list_contact_lists GET /v1/contact-lists List contact lists
Lockally::ContactListsApi remove_contact_list_member DELETE /v1/contact-lists/{id}/members/{contactId} Remove a member from a contact list
Lockally::ContactListsApi update_contact_list PATCH /v1/contact-lists/{id} Update a contact list
Lockally::ContactsApi bulk_upsert_external_contacts PUT /v1/contacts/external/{system} Create or update up to 500 contacts by their ids in another system
Lockally::ContactsApi create_contact POST /v1/contacts Create a contact
Lockally::ContactsApi delete_contact DELETE /v1/contacts/{id} Delete a contact
Lockally::ContactsApi delete_external_contact DELETE /v1/contacts/external/{system}/{external_id} Delete a contact by its id in another system
Lockally::ContactsApi get_contact GET /v1/contacts/{id} Get a contact
Lockally::ContactsApi get_contact_lists GET /v1/contacts/{id}/lists Get lists a contact belongs to
Lockally::ContactsApi get_external_contact GET /v1/contacts/external/{system}/{external_id} Get a contact by its id in another system
Lockally::ContactsApi list_contacts GET /v1/contacts List contacts
Lockally::ContactsApi update_contact PATCH /v1/contacts/{id} Update a contact
Lockally::ContactsApi upsert_external_contact PUT /v1/contacts/external/{system}/{external_id} Create or update a contact by its id in another system
Lockally::DashboardApi get_audit_summary GET /v1/audit-summary Audit summary for the dashboard
Lockally::DashboardApi get_domains_status GET /v1/domains/status Domain health status for the dashboard
Lockally::DashboardApi get_integrations_summary GET /v1/integrations-summary Integrations summary for the dashboard
Lockally::DashboardApi get_security GET /v1/security Security overview for the dashboard
Lockally::DashboardApi get_storage GET /v1/storage Storage usage for the dashboard
Lockally::DashboardApi get_tenant_health GET /v1/health Full tenant health report
Lockally::DashboardApi get_user_insights GET /v1/user-insights User insights for the dashboard
Lockally::DirectoryApi get_directory_activity GET /v1/directory-activity Get recent directory activity
Lockally::DirectoryApi get_directory_permissions GET /v1/directory-permissions Get directory permission settings
Lockally::DirectoryApi get_directory_stats GET /v1/directory-stats Get directory statistics
Lockally::DirectoryApi get_gal_settings GET /v1/gal-settings Get Global Address List settings
Lockally::DirectoryApi rebuild_gal_index POST /v1/gal-settings/rebuild-index Rebuild the GAL search index
Lockally::DirectoryApi sync_gal POST /v1/gal-settings/sync Sync GAL with external directory sources
Lockally::DirectoryApi update_directory_permissions PATCH /v1/directory-permissions Update directory permission settings
Lockally::DirectoryApi update_gal_settings PATCH /v1/gal-settings Update GAL settings
Lockally::DistributionListsApi create_distribution_list POST /v1/distribution-lists Create a distribution list
Lockally::DistributionListsApi delete_distribution_list DELETE /v1/distribution-lists/{address} Delete a distribution list
Lockally::DistributionListsApi get_distribution_list GET /v1/distribution-lists/{address} Get a distribution list
Lockally::DistributionListsApi list_distribution_lists GET /v1/distribution-lists List distribution lists
Lockally::DistributionListsApi replace_distribution_list_members PUT /v1/distribution-lists/{address}/members Replace distribution list members
Lockally::DomainsApi create_domain POST /v1/domains Register a domain
Lockally::DomainsApi delete_domain DELETE /v1/domains/{domain} Delete a domain
Lockally::DomainsApi disable_return_path DELETE /v1/domains/{domain}/return-path Turn off the custom Return-Path
Lockally::DomainsApi enable_return_path POST /v1/domains/{domain}/return-path Turn on the custom Return-Path
Lockally::DomainsApi get_domain GET /v1/domains/{domain} Get a domain
Lockally::DomainsApi get_return_path GET /v1/domains/{domain}/return-path Get the custom Return-Path
Lockally::DomainsApi list_domains GET /v1/domains List domains
Lockally::DomainsApi verify_domain POST /v1/domains/{domain}/verify Force-poll DNS verification
Lockally::DomainsApi verify_return_path POST /v1/domains/{domain}/return-path/verify Check the custom Return-Path records
Lockally::DraftsApi approve_draft POST /v1/drafts/{draftID}/approve Approve a pending draft (human)
Lockally::DraftsApi cancel_draft POST /v1/drafts/{draftID}/cancel Withdraw a pending draft
Lockally::DraftsApi create_conversation_draft POST /v1/inboxes/{mailbox}/drafts Propose a new conversation as a draft
Lockally::DraftsApi create_reply_draft POST /v1/threads/{threadID}/drafts Propose a reply as a draft
Lockally::DraftsApi get_draft GET /v1/drafts/{draftID} Get a draft
Lockally::DraftsApi list_drafts GET /v1/drafts List drafts
Lockally::DraftsApi reject_draft POST /v1/drafts/{draftID}/reject Reject a pending draft (human)
Lockally::EncryptionApi batch_lookup_public_keys GET /v1/encryption/keys/lookup Batch-lookup public keys by email
Lockally::EncryptionApi create_encryption_key POST /v1/encryption/keys Upload an encryption key pair
Lockally::EncryptionApi create_encryption_recovery POST /v1/encryption/recovery Store an encryption recovery blob
Lockally::EncryptionApi get_encryption_key GET /v1/encryption/keys/{email} Get encryption key for a mailbox
Lockally::EncryptionApi get_encryption_status GET /v1/encryption/status End-to-end encryption status for the workspace
Lockally::EncryptionApi rotate_encryption_key POST /v1/encryption/keys/rotate Re-seal an encryption key under a new password
Lockally::HealthApi health_check GET /healthz Liveness check
Lockally::IpPoolsApi create_dedicated_ip_request POST /v1/dedicated-ip-requests Request a dedicated IP
Lockally::IpPoolsApi get_ip_assignment GET /v1/ip-assignment Get current IP assignment
Lockally::IpPoolsApi list_dedicated_ip_requests GET /v1/dedicated-ip-requests List dedicated IP requests
Lockally::MailboxesApi add_shared_member POST /v1/mailboxes/{email}/members Add a shared mailbox member
Lockally::MailboxesApi create_mailbox POST /v1/mailboxes Create a mailbox
Lockally::MailboxesApi delete_mailbox DELETE /v1/mailboxes/{email} Soft-delete a mailbox
Lockally::MailboxesApi download_mailbox_export GET /v1/mailboxes/{email}/export/download Download a previously-issued mailbox export
Lockally::MailboxesApi export_mailbox POST /v1/mailboxes/{email}/export Request a mailbox export
Lockally::MailboxesApi get_mailbox GET /v1/mailboxes/{email} Get a mailbox
Lockally::MailboxesApi list_mailboxes GET /v1/mailboxes List mailboxes
Lockally::MailboxesApi list_shared_members GET /v1/mailboxes/{email}/members List shared mailbox members
Lockally::MailboxesApi remove_shared_member DELETE /v1/mailboxes/{email}/members/{memberEmail} Remove a shared mailbox member
Lockally::MailboxesApi update_mailbox PATCH /v1/mailboxes/{email} Update a mailbox
Lockally::MigrationsApi cancel_migration POST /v1/migrations/{id}/cancel Cancel a running migration
Lockally::MigrationsApi check_migration_dns GET /v1/migrations/{id}/dns-check Check DNS readiness for cutover
Lockally::MigrationsApi create_migration POST /v1/migrations Create a migration
Lockally::MigrationsApi create_migration_credential POST /v1/migrations/credentials Store a migration credential
Lockally::MigrationsApi delete_migration DELETE /v1/migrations/{id} Delete a migration
Lockally::MigrationsApi delete_migration_credential DELETE /v1/migrations/credentials/{id} Delete a migration credential
Lockally::MigrationsApi delta_sync_migration POST /v1/migrations/{id}/delta-sync Run a delta sync
Lockally::MigrationsApi discover_migration POST /v1/migrations/{id}/discover Discover source mailboxes
Lockally::MigrationsApi final_sync_migration POST /v1/migrations/{id}/final-sync Run the final sync before cutover
Lockally::MigrationsApi get_migration GET /v1/migrations/{id} Get a migration
Lockally::MigrationsApi get_migration_progress GET /v1/migrations/{id}/progress Get migration progress
Lockally::MigrationsApi list_migration_credentials GET /v1/migrations/credentials List migration credentials
Lockally::MigrationsApi list_migration_events GET /v1/migrations/{id}/events List migration events
Lockally::MigrationsApi list_migration_mailboxes GET /v1/migrations/{id}/mailboxes List migration mailboxes
Lockally::MigrationsApi list_migrations GET /v1/migrations List migrations
Lockally::MigrationsApi map_migration POST /v1/migrations/{id}/map Map source to destination mailboxes
Lockally::MigrationsApi retry_migration POST /v1/migrations/{id}/retry Retry a failed or cancelled migration
Lockally::MigrationsApi start_migration POST /v1/migrations/{id}/start Start the migration
Lockally::MigrationsApi update_migration PATCH /v1/migrations/{id} Update a migration
Lockally::MigrationsApi update_migration_mailbox PATCH /v1/migrations/{id}/mailboxes/{mbxId} Update a migration mailbox
Lockally::MigrationsApi validate_migration POST /v1/migrations/{id}/validate Validate migrated data
Lockally::ResourcesApi create_resource POST /v1/resources Create a resource
Lockally::ResourcesApi delete_resource DELETE /v1/resources/{id} Delete a resource
Lockally::ResourcesApi get_resource GET /v1/resources/{id} Get a resource
Lockally::ResourcesApi list_resources GET /v1/resources List resources
Lockally::ResourcesApi update_resource PATCH /v1/resources/{id} Update a resource
Lockally::SendApi cancel_message DELETE /v1/messages/{id} Cancel a scheduled send
Lockally::SendApi get_message GET /v1/messages/{id} Get message status
Lockally::SendApi get_message_stats GET /v1/messages/stats Aggregate delivery stats
Lockally::SendApi list_messages GET /v1/messages List outbound messages
Lockally::SendApi send_email POST /v1/send Send an email
Lockally::SendApi send_email_batch POST /v1/send/batch Send a batch of emails
Lockally::SignupApi signup POST /v1/signup Sign up a new tenant
Lockally::SuppressionsApi create_suppression POST /v1/suppressions Add a suppression
Lockally::SuppressionsApi delete_suppression DELETE /v1/suppressions/{email} Remove a suppression
Lockally::SuppressionsApi get_suppression GET /v1/suppressions/{email} Check whether an address is suppressed
Lockally::SuppressionsApi list_suppressions GET /v1/suppressions List suppressed recipients
Lockally::TemplatesApi create_template POST /v1/templates Create a template
Lockally::TemplatesApi delete_template DELETE /v1/templates/{id} Delete a template
Lockally::TemplatesApi get_template GET /v1/templates/{id} Get a template
Lockally::TemplatesApi list_templates GET /v1/templates List templates
Lockally::TemplatesApi update_template PUT /v1/templates/{id} Update a template
Lockally::TenantApi get_tenant GET /v1/tenant Get the calling tenant
Lockally::TenantApi get_tracking_policy GET /v1/tracking Get the engagement tracking policy
Lockally::TenantApi get_usage GET /v1/usage Usage snapshot
Lockally::TenantApi update_tracking_policy PUT /v1/tracking Update the engagement tracking policy
Lockally::TestApi simulate_inbound_email POST /v1/test/inbound Simulate an inbound email (test keys only)
Lockally::UsersApi create_user POST /v1/users Create a user
Lockally::UsersApi delete_user DELETE /v1/users/{id} Deprovision a user
Lockally::UsersApi get_user GET /v1/users/{id} Get a user
Lockally::UsersApi list_users GET /v1/users List users
Lockally::UsersApi update_user PATCH /v1/users/{id} Update a user
Lockally::WebhooksApi create_webhook POST /v1/webhooks Create a webhook
Lockally::WebhooksApi delete_webhook DELETE /v1/webhooks/{id} Delete a webhook
Lockally::WebhooksApi list_webhooks GET /v1/webhooks List webhooks
Lockally::WebhooksApi update_webhook PATCH /v1/webhooks/{id} Update a webhook

Documentation for Models

Documentation for Authorization

Authentication schemes defined for the API:

bearerAuth

  • Type: Bearer authentication (lk_live__)

oauth2

  • Type: OAuth
  • Flow: accessCode
  • Authorization URL: https://api.lockally.com/oauth/authorize
  • Scopes:
    • inboxes:read: Read agent-accessible mailboxes and threads
    • inboxes:write: Send and act on agent-accessible mailboxes

About

Official Lockally SDK for Ruby (RubyGems: lockally)

Resources

Contributing

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages