Search by

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. Ke

0.3.3 2026-10-16 19:40 UTC

This package is auto-updated.

Last update: 2026-10-16 19:45:01 UTC


README

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.

Installation & Usage

Requirements

PHP 8.1 and later.

Composer

To install the bindings via Composer, add the following to composer.json:

{
  "repositories": [
    {
      "type": "vcs",
      "url": "https://github.com/GIT_USER_ID/GIT_REPO_ID.git"
    }
  ],
  "require": {
    "GIT_USER_ID/GIT_REPO_ID": "*@dev"
  }
}

Then run composer install

Manual Installation

Download the files and include autoload.php:

<?php
require_once('/path/to/Lockally/vendor/autoload.php');

Getting Started

Please follow the installation procedure and then run the following:

<?php
require_once(__DIR__ . '/vendor/autoload.php');



// Configure Bearer (lk_live_<prefix>_<secret>) authorization: bearerAuth
$config = Lockally\SDK\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Lockally\SDK\Api\AddOnsApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$name = 'name_example'; // string | Add-on key

try {
    $result = $apiInstance->activateAddOn($name);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AddOnsApi->activateAddOn: ', $e->getMessage(), PHP_EOL;
}

API Endpoints

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

Class Method HTTP request Description
AddOnsApi activateAddOn POST /v1/add-ons/{name}/activate Activate an add-on
AddOnsApi cancelAddOn POST /v1/add-ons/{name}/cancel Cancel an add-on
AddOnsApi getAddOnStatus GET /v1/add-ons/{name} Get add-on status
AddOnsApi listAddOns GET /v1/add-ons List add-ons
AdminApi adminLogin POST /v1/admin/login Tenant-admin email+password login
AdminApi adminLogout POST /v1/admin/logout Invalidate the current admin session
AdminApi getCurrentAdmin GET /v1/admin/me Get the current admin + tenant
AdminsApi deleteAdmin DELETE /v1/admins/{id} Delete an admin
AdminsApi inviteAdmin POST /v1/admins Invite a new admin
AdminsApi listAdmins GET /v1/admins List tenant admins
AdminsApi updateAdmin PATCH /v1/admins/{id} Update an admin
AgentsApi downloadThreadAttachment GET /v1/threads/{threadID}/messages/{messageID}/attachments/{idx} Download an attachment
AgentsApi getThread GET /v1/threads/{threadID} Get a whole conversation
AgentsApi getThreadMessage GET /v1/threads/{threadID}/messages/{messageID} Get one message with body
AgentsApi grantApiKeyMailbox POST /v1/api-keys/{keyID}/mailboxes Grant a mailbox to a key
AgentsApi listApiKeyMailboxes GET /v1/api-keys/{keyID}/mailboxes List a key's mailbox grants
AgentsApi listInboxes GET /v1/inboxes List granted inboxes
AgentsApi listThreads GET /v1/inboxes/{mailbox}/threads List conversation threads
AgentsApi lookupContact GET /v1/contacts/lookup Who is this sender?
AgentsApi markThreadMessageRead POST /v1/threads/{threadID}/messages/{messageID}/read Mark read/unread
AgentsApi replyToThread POST /v1/threads/{threadID}/reply Reply in-thread (agent stream)
AgentsApi revokeApiKeyMailbox DELETE /v1/api-keys/{keyID}/mailboxes/{mailboxID} Revoke a mailbox grant
AgentsApi startConversation POST /v1/inboxes/{mailbox}/messages Start a new conversation (agent stream)
AgentsApi whoami GET /v1/auth/whoami Introspect the calling credentials
AiApi classifyThread POST /v1/threads/{threadID}/classify LLM-classify a thread
AiApi createAiUnitsCheckout POST /v1/billing/ai-units/checkout Buy prepaid AI units
AiApi getAiConfig GET /v1/ai-config Read the tenant's AI configuration
AiApi updateAiConfig PUT /v1/ai-config Configure the AI tier
AliasesApi createAlias POST /v1/aliases Create an alias
AliasesApi deleteAlias DELETE /v1/aliases/{address} Delete an alias
AliasesApi listAliases GET /v1/aliases List aliases
ApiKeysApi createApiKey POST /v1/api-keys Create an API key
ApiKeysApi listApiKeys GET /v1/api-keys List API keys
ApiKeysApi revokeApiKey DELETE /v1/api-keys/{id} Revoke an API key
BillingApi createBillingCheckout POST /v1/billing/checkout Create a plan checkout session
BillingApi createUnitsCheckout POST /v1/billing/units/checkout Create a send-units checkout session
BillingApi getBilling GET /v1/billing Get billing status
CalendarsApi addCalendarMember POST /v1/calendars/{id}/members Add a member to a calendar
CalendarsApi createCalendar POST /v1/calendars Create a calendar
CalendarsApi createCalendarEvent POST /v1/calendars/{id}/events Create an event in a calendar
CalendarsApi createCalendarIntegration POST /v1/calendar-integrations Create a calendar integration
CalendarsApi deleteCalendar DELETE /v1/calendars/{id} Delete a calendar
CalendarsApi deleteCalendarEvent DELETE /v1/calendars/{id}/events/{eventId} Delete a calendar event
CalendarsApi deleteCalendarIntegration DELETE /v1/calendar-integrations/{id} Delete a calendar integration
CalendarsApi getCalendar GET /v1/calendars/{id} Get a calendar
CalendarsApi getCalendarOverview GET /v1/calendar-overview Administrative overview of the organization's calendar system
CalendarsApi getCalendarPolicies GET /v1/calendar-policies Get calendar policies
CalendarsApi getCalendarSecurity GET /v1/calendar-security Get calendar security overview
CalendarsApi listCalendarEvents GET /v1/calendars/{id}/events List events in a calendar
CalendarsApi listCalendarIntegrations GET /v1/calendar-integrations List calendar integrations
CalendarsApi listCalendarMembers GET /v1/calendars/{id}/members List calendar members
CalendarsApi listCalendars GET /v1/calendars List calendars
CalendarsApi removeCalendarMember DELETE /v1/calendars/{id}/members/{memberId} Remove a member from a calendar
CalendarsApi syncCalendarIntegration POST /v1/calendar-integrations/{id}/sync Trigger sync for a calendar integration
CalendarsApi updateCalendar PATCH /v1/calendars/{id} Update a calendar
CalendarsApi updateCalendarEvent PATCH /v1/calendars/{id}/events/{eventId} Update a calendar event
CalendarsApi updateCalendarIntegration PATCH /v1/calendar-integrations/{id} Update a calendar integration
CalendarsApi updateCalendarMember PATCH /v1/calendars/{id}/members/{memberId} Update a calendar member's role
CalendarsApi updateCalendarPolicies PATCH /v1/calendar-policies Update calendar policies
ContactListsApi addContactListMember POST /v1/contact-lists/{id}/members Add a member to a contact list
ContactListsApi createContactList POST /v1/contact-lists Create a contact list
ContactListsApi deleteContactList DELETE /v1/contact-lists/{id} Delete a contact list
ContactListsApi getContactList GET /v1/contact-lists/{id} Get a contact list with members
ContactListsApi listContactLists GET /v1/contact-lists List contact lists
ContactListsApi removeContactListMember DELETE /v1/contact-lists/{id}/members/{contactId} Remove a member from a contact list
ContactListsApi updateContactList PATCH /v1/contact-lists/{id} Update a contact list
ContactsApi createContact POST /v1/contacts Create a contact
ContactsApi deleteContact DELETE /v1/contacts/{id} Delete a contact
ContactsApi getContact GET /v1/contacts/{id} Get a contact
ContactsApi getContactLists GET /v1/contacts/{id}/lists Get lists a contact belongs to
ContactsApi listContacts GET /v1/contacts List contacts
ContactsApi updateContact PATCH /v1/contacts/{id} Update a contact
DashboardApi getAuditSummary GET /v1/audit-summary Audit summary for the dashboard
DashboardApi getDomainsStatus GET /v1/domains/status Domain health status for the dashboard
DashboardApi getIntegrationsSummary GET /v1/integrations-summary Integrations summary for the dashboard
DashboardApi getSecurity GET /v1/security Security overview for the dashboard
DashboardApi getStorage GET /v1/storage Storage usage for the dashboard
DashboardApi getTenantHealth GET /v1/health Full tenant health report
DashboardApi getUserInsights GET /v1/user-insights User insights for the dashboard
DirectoryApi getDirectoryActivity GET /v1/directory-activity Get recent directory activity
DirectoryApi getDirectoryPermissions GET /v1/directory-permissions Get directory permission settings
DirectoryApi getDirectoryStats GET /v1/directory-stats Get directory statistics
DirectoryApi getGALSettings GET /v1/gal-settings Get Global Address List settings
DirectoryApi rebuildGALIndex POST /v1/gal-settings/rebuild-index Rebuild the GAL search index
DirectoryApi syncGAL POST /v1/gal-settings/sync Sync GAL with external directory sources
DirectoryApi updateDirectoryPermissions PATCH /v1/directory-permissions Update directory permission settings
DirectoryApi updateGALSettings PATCH /v1/gal-settings Update GAL settings
DistributionListsApi createDistributionList POST /v1/distribution-lists Create a distribution list
DistributionListsApi deleteDistributionList DELETE /v1/distribution-lists/{address} Delete a distribution list
DistributionListsApi getDistributionList GET /v1/distribution-lists/{address} Get a distribution list
DistributionListsApi listDistributionLists GET /v1/distribution-lists List distribution lists
DistributionListsApi replaceDistributionListMembers PUT /v1/distribution-lists/{address}/members Replace distribution list members
DomainsApi createDomain POST /v1/domains Register a domain
DomainsApi deleteDomain DELETE /v1/domains/{domain} Delete a domain
DomainsApi disableReturnPath DELETE /v1/domains/{domain}/return-path Turn off the custom Return-Path
DomainsApi enableReturnPath POST /v1/domains/{domain}/return-path Turn on the custom Return-Path
DomainsApi getDomain GET /v1/domains/{domain} Get a domain
DomainsApi getReturnPath GET /v1/domains/{domain}/return-path Get the custom Return-Path
DomainsApi listDomains GET /v1/domains List domains
DomainsApi verifyDomain POST /v1/domains/{domain}/verify Force-poll DNS verification
DomainsApi verifyReturnPath POST /v1/domains/{domain}/return-path/verify Check the custom Return-Path records
DraftsApi approveDraft POST /v1/drafts/{draftID}/approve Approve a pending draft (human)
DraftsApi cancelDraft POST /v1/drafts/{draftID}/cancel Withdraw a pending draft
DraftsApi createConversationDraft POST /v1/inboxes/{mailbox}/drafts Propose a new conversation as a draft
DraftsApi createReplyDraft POST /v1/threads/{threadID}/drafts Propose a reply as a draft
DraftsApi getDraft GET /v1/drafts/{draftID} Get a draft
DraftsApi listDrafts GET /v1/drafts List drafts
DraftsApi rejectDraft POST /v1/drafts/{draftID}/reject Reject a pending draft (human)
EncryptionApi batchLookupPublicKeys GET /v1/encryption/keys/lookup Batch-lookup public keys by email
EncryptionApi createEncryptionKey POST /v1/encryption/keys Upload an encryption key pair
EncryptionApi createEncryptionRecovery POST /v1/encryption/recovery Store an encryption recovery blob
EncryptionApi getEncryptionKey GET /v1/encryption/keys/{email} Get encryption key for a mailbox
EncryptionApi rotateEncryptionKey POST /v1/encryption/keys/rotate Rotate an encryption key
HealthApi healthCheck GET /healthz Liveness check
IpPoolsApi createDedicatedIPRequest POST /v1/dedicated-ip-requests Request a dedicated IP
IpPoolsApi getIPAssignment GET /v1/ip-assignment Get current IP assignment
IpPoolsApi listDedicatedIPRequests GET /v1/dedicated-ip-requests List dedicated IP requests
MailboxesApi addSharedMember POST /v1/mailboxes/{email}/members Add a shared mailbox member
MailboxesApi createMailbox POST /v1/mailboxes Create a mailbox
MailboxesApi deleteMailbox DELETE /v1/mailboxes/{email} Soft-delete a mailbox
MailboxesApi deleteVacationResponder DELETE /v1/mailboxes/{email}/vacation Remove the vacation responder
MailboxesApi downloadMailboxExport GET /v1/mailboxes/{email}/export/download Download a previously-issued mailbox export
MailboxesApi exportMailbox POST /v1/mailboxes/{email}/export Request a mailbox export
MailboxesApi getMailbox GET /v1/mailboxes/{email} Get a mailbox
MailboxesApi getVacationResponder GET /v1/mailboxes/{email}/vacation Get the vacation responder
MailboxesApi listMailboxes GET /v1/mailboxes List mailboxes
MailboxesApi listSharedMembers GET /v1/mailboxes/{email}/members List shared mailbox members
MailboxesApi listVacationResponders GET /v1/vacation List all vacation responders
MailboxesApi removeSharedMember DELETE /v1/mailboxes/{email}/members/{memberEmail} Remove a shared mailbox member
MailboxesApi setVacationResponder PUT /v1/mailboxes/{email}/vacation Set the vacation responder
MailboxesApi updateMailbox PATCH /v1/mailboxes/{email} Update a mailbox
MigrationsApi cancelMigration POST /v1/migrations/{id}/cancel Cancel a running migration
MigrationsApi checkMigrationDNS GET /v1/migrations/{id}/dns-check Check DNS readiness for cutover
MigrationsApi createMigration POST /v1/migrations Create a migration
MigrationsApi createMigrationCredential POST /v1/migrations/credentials Store a migration credential
MigrationsApi deleteMigration DELETE /v1/migrations/{id} Delete a migration
MigrationsApi deleteMigrationCredential DELETE /v1/migrations/credentials/{id} Delete a migration credential
MigrationsApi deltaSyncMigration POST /v1/migrations/{id}/delta-sync Run a delta sync
MigrationsApi discoverMigration POST /v1/migrations/{id}/discover Discover source mailboxes
MigrationsApi finalSyncMigration POST /v1/migrations/{id}/final-sync Run the final sync before cutover
MigrationsApi getMigration GET /v1/migrations/{id} Get a migration
MigrationsApi getMigrationProgress GET /v1/migrations/{id}/progress Get migration progress
MigrationsApi listMigrationCredentials GET /v1/migrations/credentials List migration credentials
MigrationsApi listMigrationEvents GET /v1/migrations/{id}/events List migration events
MigrationsApi listMigrationMailboxes GET /v1/migrations/{id}/mailboxes List migration mailboxes
MigrationsApi listMigrations GET /v1/migrations List migrations
MigrationsApi mapMigration POST /v1/migrations/{id}/map Map source to destination mailboxes
MigrationsApi retryMigration POST /v1/migrations/{id}/retry Retry a failed or cancelled migration
MigrationsApi startMigration POST /v1/migrations/{id}/start Start the migration
MigrationsApi updateMigration PATCH /v1/migrations/{id} Update a migration
MigrationsApi updateMigrationMailbox PATCH /v1/migrations/{id}/mailboxes/{mbxId} Update a migration mailbox
MigrationsApi validateMigration POST /v1/migrations/{id}/validate Validate migrated data
ResourcesApi createResource POST /v1/resources Create a resource
ResourcesApi deleteResource DELETE /v1/resources/{id} Delete a resource
ResourcesApi getResource GET /v1/resources/{id} Get a resource
ResourcesApi listResources GET /v1/resources List resources
ResourcesApi updateResource PATCH /v1/resources/{id} Update a resource
SendApi cancelMessage DELETE /v1/messages/{id} Cancel a scheduled send
SendApi getMessage GET /v1/messages/{id} Get message status
SendApi getMessageStats GET /v1/messages/stats Aggregate delivery stats
SendApi listMessages GET /v1/messages List outbound messages
SendApi sendEmail POST /v1/send Send an email
SendApi sendEmailBatch POST /v1/send/batch Send a batch of emails
SignupApi signup POST /v1/signup Sign up a new tenant
SuppressionsApi createSuppression POST /v1/suppressions Add a suppression
SuppressionsApi deleteSuppression DELETE /v1/suppressions/{email} Remove a suppression
SuppressionsApi getSuppression GET /v1/suppressions/{email} Check whether an address is suppressed
SuppressionsApi listSuppressions GET /v1/suppressions List suppressed recipients
TemplatesApi createTemplate POST /v1/templates Create a template
TemplatesApi deleteTemplate DELETE /v1/templates/{id} Delete a template
TemplatesApi getTemplate GET /v1/templates/{id} Get a template
TemplatesApi listTemplates GET /v1/templates List templates
TemplatesApi updateTemplate PUT /v1/templates/{id} Update a template
TenantApi getTenant GET /v1/tenant Get the calling tenant
TenantApi getUsage GET /v1/usage Usage snapshot
TestApi simulateInboundEmail POST /v1/test/inbound Simulate an inbound email (test keys only)
UsersApi createUser POST /v1/users Create a user
UsersApi deleteUser DELETE /v1/users/{id} Delete a user
UsersApi getUser GET /v1/users/{id} Get a user
UsersApi listUsers GET /v1/users List users
UsersApi updateUser PATCH /v1/users/{id} Update a user
WebhooksApi createWebhook POST /v1/webhooks Create a webhook
WebhooksApi deleteWebhook DELETE /v1/webhooks/{id} Delete a webhook
WebhooksApi listWebhooks GET /v1/webhooks List webhooks
WebhooksApi updateWebhook PATCH /v1/webhooks/{id} Update a webhook

Models

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

Tests

To run the tests, use:

composer install
vendor/bin/phpunit

Author

support@lockally.com

About this package

This PHP package is automatically generated by the OpenAPI Generator project:

  • API version: 0.1.0
    • Package version: 0.3.3
    • Generator version: 7.23.0
  • Build package: org.openapitools.codegen.languages.PhpClientCodegen