Skip to main content

Endpoints

GET

List all keys

POST

Create new key

DELETE

Revoke key

List API Keys

GET /v1/dev/keys

Retrieve all your developer API keys
This endpoint requires authentication with an existing API key or user session. The secret key values are not returned (only the prefix is shown).
curl -H "Authorization: Bearer $API_KEY" \
  "https://api.omi.me/v1/dev/keys"

Response Example

[
  {
    "id": "key_123abc",
    "name": "My Analytics Dashboard",
    "key_prefix": "omi_dev_abc123",
    "created_at": "2025-01-15T10:30:00Z",
    "last_used_at": "2025-01-20T14:22:00Z"
  },
  {
    "id": "key_456def",
    "name": "Automation Script",
    "key_prefix": "omi_dev_def456",
    "created_at": "2025-01-18T09:00:00Z",
    "last_used_at": null
  }
]
FieldTypeDescription
idstringUnique key identifier (used for deletion)
namestringDescriptive name you gave the key
key_prefixstringFirst part of the key (for identification)
created_atdatetimeWhen the key was created
last_used_atdatetimeWhen the key was last used (null if never used)

Create API Key

POST /v1/dev/keys

Create a new developer API key

Request Body

ParameterTypeRequiredDescription
namestringYesDescriptive name for the key
curl -X POST "https://api.omi.me/v1/dev/keys" \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name": "My New Integration"}'

Response Example

{
  "id": "key_789ghi",
  "name": "My New Integration",
  "key_prefix": "omi_dev_ghi789",
  "key": "omi_dev_ghi789_full_secret_key_here",
  "created_at": "2025-01-20T15:00:00Z",
  "last_used_at": null
}
The full API key (key field) is only returned once during creation. Store it securely immediately - you won’t be able to see it again!

Revoke API Key

DELETE /v1/dev/keys/{key_id}

Revoke (delete) a specific API key permanently

Path Parameters

ParameterTypeDescription
key_idstringThe ID of the key to revoke
curl -X DELETE "https://api.omi.me/v1/dev/keys/key_789ghi" \
  -H "Authorization: Bearer $API_KEY"

Response

204 No Content
If a key is compromised, revoke it immediately and create a new one.

Best Practices

Use Descriptive Names

Name keys after their purpose (e.g., “Analytics Dashboard”, “Zapier Integration”)

One Key Per Application

Create separate keys for different apps so you can revoke them independently

Monitor Usage

Check last_used_at to identify unused or potentially compromised keys

Rotate Regularly

Periodically create new keys and revoke old ones

Use Case: Key Management Script

import requests

API_KEY = "omi_dev_your_api_key"
headers = {
    "Authorization": f"Bearer {API_KEY}",
    "Content-Type": "application/json"
}

def list_keys():
    """List all API keys"""
    response = requests.get(
        "https://api.omi.me/v1/dev/keys",
        headers=headers
    )
    return response.json()

def create_key(name):
    """Create a new API key"""
    response = requests.post(
        "https://api.omi.me/v1/dev/keys",
        headers=headers,
        json={"name": name}
    )
    return response.json()

def revoke_key(key_id):
    """Revoke an API key"""
    response = requests.delete(
        f"https://api.omi.me/v1/dev/keys/{key_id}",
        headers=headers
    )
    return response.status_code == 204

# List existing keys
print("Current API keys:")
for key in list_keys():
    last_used = key.get("last_used_at", "Never")
    print(f"  - {key['name']} ({key['key_prefix']}...) - Last used: {last_used}")

# Create a new key
print("\nCreating new key...")
new_key = create_key("Test Integration")
print(f"Created: {new_key['name']}")
print(f"Key: {new_key['key']}")  # Store this securely!

# Revoke a key (example)
# if revoke_key("key_123abc"):
#     print("Key revoked successfully")

Managing Keys in the App

You can also manage API keys directly in the Omi app:

Open Omi App

Launch the Omi app on your device

Navigate to Settings

Go to Settings → Developer

Manage Keys

Under “Developer API Keys” you can:
  • View all your keys
  • Create new keys
  • Delete existing keys
Keys created in the app and via the API are the same - you can manage them from either place.