Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Get an API key
Free tier, no form to fill in. Signing in shares your email address with us — we
store it to create your key and to recognise you if you sign in with another
provider. By signing up you are subscribing to the APIs.io and API Evangelist
newsletters — you can unsubscribe from any issue. See our
Privacy Policy and Terms.
openapi: 3.2.0
info:
title: lockally control plane Add Ons API
version: 0.1.0
summary: REST API for managing tenants, domains, mailboxes, and outbound mail
description: '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__`,
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`.'
contact:
name: lockally support
email: support@lockally.com
license:
name: AGPL-3.0-only OR LicenseRef-LOC-Commercial
identifier: AGPL-3.0-only
servers:
- url: https://api.lockally.com
description: Production
- url: http://127.0.0.1:8081
description: Local development / spike
security:
- bearerAuth: []
tags:
- name: add-ons
description: Paid add-on features (activation, cancellation)
paths:
/v1/add-ons:
get:
tags:
- add-ons
summary: List add-ons
operationId: listAddOns
x-required-scope: tenant:read
responses:
'200':
description: Available add-ons and their activation state.
content:
application/json:
schema:
type: object
required:
- add_ons
properties:
add_ons:
type: array
items:
$ref: '#/components/schemas/AddOn'
'401':
$ref: '#/components/responses/ProblemUnauthorized'
'403':
$ref: '#/components/responses/ProblemForbidden'
/v1/add-ons/{name}:
parameters:
- name: name
in: path
required: true
schema:
type: string
description: Add-on key
get:
tags:
- add-ons
summary: Get add-on status
operationId: getAddOnStatus
x-required-scope: tenant:read
responses:
'200':
description: Add-on eligibility and activation state.
content:
application/json:
schema:
type: object
required:
- name
- eligible
- active
properties:
name:
type: string
eligible:
type: boolean
active:
type: boolean
'401':
$ref: '#/components/responses/ProblemUnauthorized'
'403':
$ref: '#/components/responses/ProblemForbidden'
'404':
$ref: '#/components/responses/ProblemNotFound'
/v1/add-ons/{name}/activate:
parameters:
- name: name
in: path
required: true
schema:
type: string
description: Add-on key
post:
tags:
- add-ons
summary: Activate an add-on
operationId: activateAddOn
x-required-scope: tenant:admin
responses:
'200':
description: Add-on activated.
content:
application/json:
schema:
type: object
required:
- id
- add_on
- status
- message
properties:
id:
type: string
format: uuid
add_on:
type: string
status:
type: string
message:
type: string
'401':
$ref: '#/components/responses/ProblemUnauthorized'
'403':
$ref: '#/components/responses/ProblemForbidden'
'404':
$ref: '#/components/responses/ProblemNotFound'
/v1/add-ons/{name}/cancel:
parameters:
- name: name
in: path
required: true
schema:
type: string
description: Add-on key
post:
tags:
- add-ons
summary: Cancel an add-on
operationId: cancelAddOn
x-required-scope: tenant:admin
responses:
'204':
description: No content
'401':
$ref: '#/components/responses/ProblemUnauthorized'
'403':
$ref: '#/components/responses/ProblemForbidden'
'404':
$ref: '#/components/responses/ProblemNotFound'
components:
responses:
ProblemForbidden:
description: API key lacks the required scope.
content:
application/problem+json:
schema:
$ref: '#/components/schemas/Problem'
ProblemUnauthorized:
description: Missing, malformed, or invalid API key.
content:
application/problem+json:
schema:
$ref: '#/components/schemas/Problem'
ProblemNotFound:
description: Resource not found under the calling tenant.
content:
application/problem+json:
schema:
$ref: '#/components/schemas/Problem'
schemas:
AddOn:
type: object
required:
- name
- display_name
- description
- price_naira
- pricing_model
- active
properties:
name:
type: string
display_name:
type: string
description:
type: string
price_naira:
type: integer
pricing_model:
type: string
active:
type: boolean
Problem:
description: RFC 9457 problem-details document.
type: object
required:
- type
- status
- title
properties:
type:
type: string
format: uri
default: about:blank
status:
type: integer
title:
type: string
detail:
type: string
instance:
type: string
format: uri
securitySchemes:
bearerAuth:
type: http
scheme: bearer
bearerFormat: lk_live_<prefix>_<secret>
description: API key, format `lk_live_<8-char-prefix>_<32-char-secret>`.
oauth2:
type: oauth2
description: 'OAuth 2.1 (authorization code + PKCE). The access token is sent as the
`Authorization: Bearer` credential, exactly like an API key, so any SDK
that accepts a bearer token works with OAuth. Discovery:
`/.well-known/oauth-authorization-server`.
'
flows:
authorizationCode:
authorizationUrl: https://api.lockally.com/oauth/authorize
tokenUrl: https://api.lockally.com/oauth/token
scopes:
inboxes:read: Read agent-accessible mailboxes and threads
inboxes:write: Send and act on agent-accessible mailboxes