This guide walks you through creating an API key and making your first authenticated API call.
Step 1: Create an API Key #
- In the WordPress admin, navigate to DDLS > Developer > API Keys.
- Click Add New.
- Enter a descriptive name (for example, “My First Key”).
- Under Scopes, select the Read Only template. This grants all
:readscopes without write or delete permissions. - Leave Expiry, IP Whitelist, and Rate Limit Override blank for now.
- Click Create API Key.
Important: The full API key (dmsi_key_<40hex>) is displayed exactly once, immediately after creation. Copy it and store it in a secure location (for example, a password manager or environment variable). It cannot be retrieved again after you leave this screen.
Step 2: Test the Public Health Endpoint #
The /health endpoint requires no authentication. Use it to verify the plugin is responding correctly:
curl https://yoursite.com/wp-json/dmsi-api/v1/health
A successful response returns HTTP 200 with a JSON body confirming database connectivity and plugin status.
Step 3: Make an Authenticated Request #
Include your API key in the Authorization header as a Bearer token:
curl https://yoursite.com/wp-json/dmsi-api/v1/licenses \
-H "Authorization: Bearer dmsi_key_<your-40-hex-chars>"
Replace dmsi_key_<your-40-hex-chars> with the key you copied in Step 1.
A successful response returns HTTP 200 with a paginated list of licenses.
Step 4: Explore the API Playground #
The API Playground provides an interactive browser-based interface for testing all endpoints without writing code:
- Public URL:
yoursite.com/api/playground/ - Admin access: Navigate to DDLS > Developer > Playground in the admin dashboard
You can also browse the full interactive API documentation (Swagger UI) at DDLS > Developer > Documentation.
