instance

Embed
Preview of the card
<a href="https://lucida.15-204-158-166.sslip.io/docs/ref-instance"><img src="https://lucida.15-204-158-166.sslip.io/docs/_api/public/orgs/af34862a-c837-4478-8335-0505efe40459/spaces/da916cd3-c0fc-4b63-b971-b3c13623daf3/pages/a5113dbc-1798-4619-b95d-c8c973d8c498/social-card.svg?v=3e7ae33eec8b" alt="instance" width="600" height="315"></a>
GEThttps://lucida.15-204-158-166.sslip.io/v1/instance/admins

Code samples

cURL
curl -X GET "https://lucida.15-204-158-166.sslip.io/v1/instance/admins"
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200
Example
[
  {
    "email": "string",
    "name": "string",
    "user_id": "string"
  }
]
Schema
emailstringrequired
namestringrequired
user_idstringrequired
404
POSThttps://lucida.15-204-158-166.sslip.io/v1/instance/admins

Request body

application/json
emailstringrequired
Email of an existing user.
{
  "email": "string"
}

Code samples

cURL
curl -X POST "https://lucida.15-204-158-166.sslip.io/v1/instance/admins" \
  -H "Content-Type: application/json" \
  -d '{"email":"string"}'
TypeScript
Python
Go
PHP
Ruby
Java

Responses

204
400 No user with that email
404
DELETEhttps://lucida.15-204-158-166.sslip.io/v1/instance/admins/{user_id}

Parameters

user_idstringpathrequired

Code samples

cURL
curl -X DELETE "https://lucida.15-204-158-166.sslip.io/v1/instance/admins/{user_id}"
TypeScript
Python
Go
PHP
Ruby
Java

Responses

204
400 Cannot remove yourself
404
GEThttps://lucida.15-204-158-166.sslip.io/v1/instance/audit

Parameters

limitintegerquery
cursorstringquery

Code samples

cURL
curl -X GET "https://lucida.15-204-158-166.sslip.io/v1/instance/audit"
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200 Page of InstanceAuditEntry, newest first
404
GEThttps://lucida.15-204-158-166.sslip.io/v1/instance/email/smtp

The relay in use (environment, saved in the app, or none).

Code samples

cURL
curl -X GET "https://lucida.15-204-158-166.sslip.io/v1/instance/email/smtp"
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200
Example
{
  "addr": "string",
  "from": "string",
  "password_set": true,
  "source": "string",
  "tls": "string",
  "username": "string"
}
Schema
addrstring
fromstring
password_setbooleanrequired
sourcestringrequired
env (fixed by LC_SMTP_*, read-only), app (saved here) or none (mail is only logged).
tlsstring
starttls | implicit | none.
usernamestring
404
PUThttps://lucida.15-204-158-166.sslip.io/v1/instance/email/smtp

Save the relay. The password is sealed before it is stored and the relay is live at once on this replica (others follow within a minute).

Request body

application/json
addrstringrequired
host:port.
fromstringrequired
passwordstring
New password; omit to keep the saved one while the username is unchanged.
tlsstring
usernamestring
{
  "addr": "string",
  "from": "string",
  "password": "string",
  "tls": "string",
  "username": "string"
}

Code samples

cURL
curl -X PUT "https://lucida.15-204-158-166.sslip.io/v1/instance/email/smtp" \
  -H "Content-Type: application/json" \
  -d '{"addr":"string","from":"string","password":"string","tls":"string","username":"string"}'
TypeScript
Python
Go
PHP
Ruby
Java

Responses

400
404
409
DELETEhttps://lucida.15-204-158-166.sslip.io/v1/instance/email/smtp

Forget the saved relay; mail goes back to being logged only.

Code samples

cURL
curl -X DELETE "https://lucida.15-204-158-166.sslip.io/v1/instance/email/smtp"
TypeScript
Python
Go
PHP
Ruby
Java

Responses

204
404
409
POSThttps://lucida.15-204-158-166.sslip.io/v1/instance/email/test

Send a test message through the configured SMTP relay (`LC_SMTP_*`). 502 with the relay's error when it fails; with no relay configured the message is only logged.

Request body

application/json
tostringrequired
{
  "to": "string"
}

Code samples

cURL
curl -X POST "https://lucida.15-204-158-166.sslip.io/v1/instance/email/test" \
  -H "Content-Type: application/json" \
  -d '{"to":"string"}'
TypeScript
Python
Go
PHP
Ruby
Java

Responses

204
400
404
502
GEThttps://lucida.15-204-158-166.sslip.io/v1/instance/me

Whether the caller is an instance admin (the web app shows the Instance page on it).

Code samples

cURL
curl -X GET "https://lucida.15-204-158-166.sslip.io/v1/instance/me"
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200
Example
{
  "instance_admin": true
}
Schema
instance_adminbooleanrequired
GEThttps://lucida.15-204-158-166.sslip.io/v1/instance/secrets/rewrap

How many stored secrets are still sealed under a non-current master key id, per table.

Code samples

cURL
curl -X GET "https://lucida.15-204-158-166.sslip.io/v1/instance/secrets/rewrap"
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200
Example
[
  {
    "failed": 0,
    "remaining": 0,
    "rewrapped": 0,
    "target": "string"
  }
]
Schema
failedintegerrequired
Could not be opened (unknown kid, wrong aad); left untouched.
remainingintegerrequired
Still sealed under another key id after this call.
rewrappedintegerrequired
Re-sealed under the current key in this call.
targetstringrequired
404
POSThttps://lucida.15-204-158-166.sslip.io/v1/instance/secrets/rewrap

Re-seal stored secrets under the current master key (up to 5000 per call; call again while `remaining` is above zero). `failed` rows could not be opened and are left unchanged.

Code samples

cURL
curl -X POST "https://lucida.15-204-158-166.sslip.io/v1/instance/secrets/rewrap"
TypeScript
Python
Go
PHP
Ruby
Java

Responses

404
GEThttps://lucida.15-204-158-166.sslip.io/v1/instance/settings

Code samples

cURL
curl -X GET "https://lucida.15-204-158-166.sslip.io/v1/instance/settings"
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200
Example
{
  "limits": {
    "max_orgs_per_user": 0
  },
  "signup": {
    "domains": [
      "string"
    ],
    "mode": "string"
  }
}
Schema
limitsobject
Show child parameters
max_orgs_per_userinteger
Most orgs one user may own (signup creates the first); none = unlimited.
signupobject
Who may create an account with POST /v1/auth/signup.
Show child parameters
domainsstring[]
Allowed email domains for domains mode, e.g. example.com.
modestring
open (default), domains (only emails at domains) or invite_only (signup closed; people join through org invitations).
404
PUThttps://lucida.15-204-158-166.sslip.io/v1/instance/settings

Request body

application/json
limitsobject
Show child parameters
max_orgs_per_userinteger
Most orgs one user may own (signup creates the first); none = unlimited.
signupobject
Who may create an account with POST /v1/auth/signup.
Show child parameters
domainsstring[]
Allowed email domains for domains mode, e.g. example.com.
modestring
open (default), domains (only emails at domains) or invite_only (signup closed; people join through org invitations).
{
  "limits": {
    "max_orgs_per_user": 0
  },
  "signup": {
    "domains": [
      "string"
    ],
    "mode": "string"
  }
}

Code samples

cURL
curl -X PUT "https://lucida.15-204-158-166.sslip.io/v1/instance/settings" \
  -H "Content-Type: application/json" \
  -d '{"limits":{"max_orgs_per_user":0},"signup":{"domains":["string"],"mode":"string"}}'
TypeScript
Python
Go
PHP
Ruby
Java

Responses

400
404
Updated