Docs

API Key Management

Create, list, update, enable, disable, and delete API keys with the Dwellir CLI.

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

List all keys

Bash
dwellir keys list

With JSON output:

Bash
dwellir keys list --json
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

Bash
dwellir keys create --name my-key

Optionally set quotas at creation time:

Bash
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:

Bash
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:

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

Enable and disable a key

Temporarily disable a key without deleting it:

Bash
dwellir keys disable <key-id>

Re-enable it later:

Bash
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:

Bash
dwellir keys delete <key-id>

Scripting example

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

Bash
# 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