Skip to main content

API Key Management

Use dwellir keys to create, list, update, and delete API keys for your Dwellir account.

List all keys#

dwellir keys list

With JSON output:

dwellir keys list --json
{
"ok": true,
"data": [
{
"api_key": "d8d3c1c5-c22e-40f3-8407-50fa0e01eef9",
"name": "production",
"enabled": true,
"created_at": "2025-10-14T14:07:24.592946",
"updated_at": "2025-10-14T14:07:24.592946"
}
],
"meta": {
"command": "keys.list",
"timestamp": "2026-02-26T12:00:00Z"
}
}

The daily_quota and monthly_quota fields appear only when a quota has been set on the key. Keys without quotas omit these fields (shown as "Unlimited" in human output).

Create a key#

dwellir keys create --name my-key

Optionally set quotas at creation time:

dwellir keys create --name ci-key --daily-quota 100000 --monthly-quota 3000000
FlagDescription
--nameA descriptive name for the key (required)
--daily-quotaMaximum requests per day (0 = unlimited)
--monthly-quotaMaximum requests per month (0 = unlimited)

Update a key#

Change the name or quotas of an existing key:

dwellir keys update <key-id> --name new-name --daily-quota 50000

Only the flags you pass are updated. For example, to change just the daily quota:

dwellir keys update <key-id> --daily-quota 200000

Enable and disable a key#

Temporarily disable a key without deleting it:

dwellir keys disable <key-id>

Re-enable it later:

dwellir keys enable <key-id>

A disabled key returns 403 errors for any API requests made with it.

Delete a key#

Permanently remove an API key:

dwellir keys delete <key-id>
warning

Deletion is permanent. Any application using this key will immediately lose access. Disable the key first if you want to test the impact.

Scripting example#

Create a key, extract the ID, and use it in a CI pipeline:

# Create a key and capture the API key value
API_KEY=$(dwellir keys create --name "ci-$(date +%Y%m%d)" --daily-quota 50000 --json \
| jq -r '.data.api_key')

echo "Created key: $API_KEY"

# ... use the key ...

# Clean up
dwellir keys delete "$API_KEY"

Next steps#