Skip to main content

Lockally

lockally

The lockally control plane lets integrators and direct customers manage everything except actual mail data flow (which uses standard JMAP / IMAP / SMTP-submission against the data plane endpoints).

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

  • API version: 0.1.0
  • Package version: 0.3.1
  • Generator version: 7.23.0
  • Build package: org.openapitools.codegen.languages.PythonClientCodegen

Requirements.

Python 3.10+

Installation & Usage

pip install

If the python package is hosted on a repository, you can install directly using:

pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git

(you may need to run pip with root permission: sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git)

Then import the package:

import lockally

Setuptools

Install via Setuptools.

python setup.py install --user

(or sudo python setup.py install to install the package for all users)

Then import the package:

import lockally

Tests

Execute pytest to run the tests.

Getting Started

Please follow the installation procedure and then run the following:

import lockally
from lockally.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://api.lockally.com
# See configuration.py for a list of all supported configuration parameters.
configuration = lockally.Configuration(
    host = "https://api.lockally.com"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure Bearer authorization (lk_live_<prefix>_<secret>): bearerAuth
configuration = lockally.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)


# Enter a context with an instance of the API client
with lockally.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = lockally.AddOnsApi(api_client)
    name = 'name_example' # str | Add-on key

    try:
        # Activate an add-on
        api_response = api_instance.activate_add_on(name)
        print("The response of AddOnsApi->activate_add_on:\n")
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling AddOnsApi->activate_add_on: %s\n" % e)

Documentation for API Endpoints

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

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

Author

support@lockally.com

Metadata

Release files for lockally 0.3.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for lockally 0.3.1
File Size Uploaded
lockally-0.3.1.tar.gz 219.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for lockally 0.3.1
File Interpreter ABI Platform
lockally-0.3.1-py3-none-any.whl Python 3 none any Details

Total release size: 769.4 kB

Release files / lockally-0.3.1.tar.gz

Download URL lockally-0.3.1.tar.gz
Size 219.4 kB
Tags Source
SHA-256 checksum
How to use checksums
0c6c9e793d7cd5bc015791f3f5f9a7a36e5defbb2099caf2e6555371116969fa
BLAKE2b-256 checksum
How to use checksums
3f90393edd5c93ac4c3967d0794dd8be5213e32163d8b16e93e1197aaa98f2e8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 15, 2026.

Transparency log

Release files / lockally-0.3.1-py3-none-any.whl

Download URL lockally-0.3.1-py3-none-any.whl
Size 550.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1f714ef637df9385f45451ce12a4e12371b32e024b65ab40d08599182fd83653
BLAKE2b-256 checksum
How to use checksums
b4c863d72b151881246c01f6326ec5ca6b45fa2442323df20ae7462c77378d14
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 15, 2026.

Transparency log

Release history Release notifications | RSS feed

0.3.2

2 release files

This release

0.3.1 This release

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page