cURL
curl --request GET \
--url 'https://api.widgetic.com/v1/organizations/123e4567-e89b-12d3-a456-426614174000/api-keys/123e4567-e89b-12d3-a456-426614174000/logs?limit=500' \
--header "Authorization: Bearer $WIDGETIC_API_KEY"import { OrganizationsApi } from '@widgetic/api-sdk-ts';
const organizationsApi = new OrganizationsApi(process.env.WIDGETIC_API_KEY!);
const result = await organizationsApi.getOrganizationApiKeyUsageLogs({
orgId: '123e4567-e89b-12d3-a456-426614174000',
keyId: '123e4567-e89b-12d3-a456-426614174000',
limit: 500,
});
console.log(result);import os
import api_sdk_py
configuration = api_sdk_py.Configuration(access_token=os.environ["WIDGETIC_API_KEY"])
with api_sdk_py.ApiClient(configuration) as api_client:
organizations_api = api_sdk_py.OrganizationsApi(api_client)
result = organizations_api.get_organization_api_key_usage_logs(
org_id="123e4567-e89b-12d3-a456-426614174000",
key_id="123e4567-e89b-12d3-a456-426614174000",
limit=500,
)
print(result)package main
import (
"context"
"fmt"
"os"
widgetic "github.com/widgetic/api-sdk-go"
)
func main() {
ctx := context.WithValue(context.Background(), widgetic.ContextAccessToken, os.Getenv("WIDGETIC_API_KEY"))
client := widgetic.NewAPIClient(widgetic.NewConfiguration())
result, _, err := client.OrganizationsAPI.GetOrganizationApiKeyUsageLogs(ctx, "123e4567-e89b-12d3-a456-426614174000", "123e4567-e89b-12d3-a456-426614174000").
Limit(500).
Execute()
if err != nil {
fmt.Fprintln(os.Stderr, err)
os.Exit(1)
}
fmt.Println(result)
}import com.widgetic.api.ApiClient;
import com.widgetic.api.ApiException;
import com.widgetic.api.Configuration;
import com.widgetic.api.api.OrganizationsApi;
import java.util.UUID;
public class Example {
public static void main(String[] args) throws ApiException {
ApiClient client = Configuration.getDefaultApiClient();
client.setBearerToken(System.getenv("WIDGETIC_API_KEY"));
OrganizationsApi organizationsApi = new OrganizationsApi(client);
var result = organizationsApi.getOrganizationApiKeyUsageLogs(
UUID.fromString("123e4567-e89b-12d3-a456-426614174000"),
"123e4567-e89b-12d3-a456-426614174000",
500
);
System.out.println(result);
}
}using System;
using Widgetic.ApiSdk.Cs.Api;
using Widgetic.ApiSdk.Cs.Client;
var configuration = new Configuration
{
AccessToken = Environment.GetEnvironmentVariable("WIDGETIC_API_KEY")!,
};
var organizationsApi = new OrganizationsApi(configuration);
var result = organizationsApi.GetOrganizationApiKeyUsageLogs(
orgId: Guid.Parse("123e4567-e89b-12d3-a456-426614174000"),
keyId: "123e4567-e89b-12d3-a456-426614174000",
limit: 500
);
Console.WriteLine(result);require 'api-sdk-rb'
ApiSdkRb.configure do |config|
config.access_token = ENV['WIDGETIC_API_KEY']
end
organizations_api = ApiSdkRb::OrganizationsApi.new
result = organizations_api.get_organization_api_key_usage_logs(
'123e4567-e89b-12d3-a456-426614174000',
'123e4567-e89b-12d3-a456-426614174000',
limit: 500
)
puts result<?php
require_once __DIR__ . '/vendor/autoload.php';
use WidgeticApi\Api\OrganizationsApi;
use WidgeticApi\Configuration;
$config = Configuration::getDefaultConfiguration()->setAccessToken(getenv('WIDGETIC_API_KEY'));
$organizationsApi = new OrganizationsApi(new GuzzleHttp\Client(), $config);
$result = $organizationsApi->getOrganizationApiKeyUsageLogs(
org_id: '123e4567-e89b-12d3-a456-426614174000',
key_id: '123e4567-e89b-12d3-a456-426614174000',
limit: 500,
);
print_r($result);{
"success": true,
"data": {
"logs": [
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"keyId": "Example keyId",
"timestamp": "2026-01-15T09:30:00.000Z",
"path": "/internal-widgetic",
"method": "POST",
"status": 200,
"kind": "Success",
"details": {}
}
]
},
"meta": {
"page": 1,
"size": 20,
"total": 135,
"limit": 20,
"offset": 0,
"hasNextPage": true,
"hasPreviousPage": false,
"nextCursor": "<string>",
"warnings": [
"<string>"
]
}
}{
"success": false,
"message": "<string>",
"error": {
"code": "RESOURCE_NOT_FOUND",
"message": "Composition not found",
"timestamp": "2026-10-15T10:00:00.000Z",
"param": "name",
"docUrl": "<string>",
"suggestedAction": "<string>",
"retryAfter": 60,
"details": {},
"correlationId": "req_123e4567-e89b-12d3-a456-426614174000"
}
}{
"success": false,
"message": "<string>",
"error": {
"code": "RESOURCE_NOT_FOUND",
"message": "Composition not found",
"timestamp": "2026-10-15T10:00:00.000Z",
"param": "name",
"docUrl": "<string>",
"suggestedAction": "<string>",
"retryAfter": 60,
"details": {},
"correlationId": "req_123e4567-e89b-12d3-a456-426614174000"
}
}{
"success": false,
"message": "<string>",
"error": {
"code": "RESOURCE_NOT_FOUND",
"message": "Composition not found",
"timestamp": "2026-10-15T10:00:00.000Z",
"param": "name",
"docUrl": "<string>",
"suggestedAction": "<string>",
"retryAfter": 60,
"details": {},
"correlationId": "req_123e4567-e89b-12d3-a456-426614174000"
}
}API keys
Get API key usage logs
Retrieves usage logs for a specific organization API key with detailed information about each API call. Use it to see whether a key is still in use before deleting it, or to see what a key that should not be in use has been doing
GET
/
organizations
/
{orgId}
/
api-keys
/
{keyId}
/
logs
cURL
curl --request GET \
--url 'https://api.widgetic.com/v1/organizations/123e4567-e89b-12d3-a456-426614174000/api-keys/123e4567-e89b-12d3-a456-426614174000/logs?limit=500' \
--header "Authorization: Bearer $WIDGETIC_API_KEY"import { OrganizationsApi } from '@widgetic/api-sdk-ts';
const organizationsApi = new OrganizationsApi(process.env.WIDGETIC_API_KEY!);
const result = await organizationsApi.getOrganizationApiKeyUsageLogs({
orgId: '123e4567-e89b-12d3-a456-426614174000',
keyId: '123e4567-e89b-12d3-a456-426614174000',
limit: 500,
});
console.log(result);import os
import api_sdk_py
configuration = api_sdk_py.Configuration(access_token=os.environ["WIDGETIC_API_KEY"])
with api_sdk_py.ApiClient(configuration) as api_client:
organizations_api = api_sdk_py.OrganizationsApi(api_client)
result = organizations_api.get_organization_api_key_usage_logs(
org_id="123e4567-e89b-12d3-a456-426614174000",
key_id="123e4567-e89b-12d3-a456-426614174000",
limit=500,
)
print(result)package main
import (
"context"
"fmt"
"os"
widgetic "github.com/widgetic/api-sdk-go"
)
func main() {
ctx := context.WithValue(context.Background(), widgetic.ContextAccessToken, os.Getenv("WIDGETIC_API_KEY"))
client := widgetic.NewAPIClient(widgetic.NewConfiguration())
result, _, err := client.OrganizationsAPI.GetOrganizationApiKeyUsageLogs(ctx, "123e4567-e89b-12d3-a456-426614174000", "123e4567-e89b-12d3-a456-426614174000").
Limit(500).
Execute()
if err != nil {
fmt.Fprintln(os.Stderr, err)
os.Exit(1)
}
fmt.Println(result)
}import com.widgetic.api.ApiClient;
import com.widgetic.api.ApiException;
import com.widgetic.api.Configuration;
import com.widgetic.api.api.OrganizationsApi;
import java.util.UUID;
public class Example {
public static void main(String[] args) throws ApiException {
ApiClient client = Configuration.getDefaultApiClient();
client.setBearerToken(System.getenv("WIDGETIC_API_KEY"));
OrganizationsApi organizationsApi = new OrganizationsApi(client);
var result = organizationsApi.getOrganizationApiKeyUsageLogs(
UUID.fromString("123e4567-e89b-12d3-a456-426614174000"),
"123e4567-e89b-12d3-a456-426614174000",
500
);
System.out.println(result);
}
}using System;
using Widgetic.ApiSdk.Cs.Api;
using Widgetic.ApiSdk.Cs.Client;
var configuration = new Configuration
{
AccessToken = Environment.GetEnvironmentVariable("WIDGETIC_API_KEY")!,
};
var organizationsApi = new OrganizationsApi(configuration);
var result = organizationsApi.GetOrganizationApiKeyUsageLogs(
orgId: Guid.Parse("123e4567-e89b-12d3-a456-426614174000"),
keyId: "123e4567-e89b-12d3-a456-426614174000",
limit: 500
);
Console.WriteLine(result);require 'api-sdk-rb'
ApiSdkRb.configure do |config|
config.access_token = ENV['WIDGETIC_API_KEY']
end
organizations_api = ApiSdkRb::OrganizationsApi.new
result = organizations_api.get_organization_api_key_usage_logs(
'123e4567-e89b-12d3-a456-426614174000',
'123e4567-e89b-12d3-a456-426614174000',
limit: 500
)
puts result<?php
require_once __DIR__ . '/vendor/autoload.php';
use WidgeticApi\Api\OrganizationsApi;
use WidgeticApi\Configuration;
$config = Configuration::getDefaultConfiguration()->setAccessToken(getenv('WIDGETIC_API_KEY'));
$organizationsApi = new OrganizationsApi(new GuzzleHttp\Client(), $config);
$result = $organizationsApi->getOrganizationApiKeyUsageLogs(
org_id: '123e4567-e89b-12d3-a456-426614174000',
key_id: '123e4567-e89b-12d3-a456-426614174000',
limit: 500,
);
print_r($result);{
"success": true,
"data": {
"logs": [
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"keyId": "Example keyId",
"timestamp": "2026-01-15T09:30:00.000Z",
"path": "/internal-widgetic",
"method": "POST",
"status": 200,
"kind": "Success",
"details": {}
}
]
},
"meta": {
"page": 1,
"size": 20,
"total": 135,
"limit": 20,
"offset": 0,
"hasNextPage": true,
"hasPreviousPage": false,
"nextCursor": "<string>",
"warnings": [
"<string>"
]
}
}{
"success": false,
"message": "<string>",
"error": {
"code": "RESOURCE_NOT_FOUND",
"message": "Composition not found",
"timestamp": "2026-10-15T10:00:00.000Z",
"param": "name",
"docUrl": "<string>",
"suggestedAction": "<string>",
"retryAfter": 60,
"details": {},
"correlationId": "req_123e4567-e89b-12d3-a456-426614174000"
}
}{
"success": false,
"message": "<string>",
"error": {
"code": "RESOURCE_NOT_FOUND",
"message": "Composition not found",
"timestamp": "2026-10-15T10:00:00.000Z",
"param": "name",
"docUrl": "<string>",
"suggestedAction": "<string>",
"retryAfter": 60,
"details": {},
"correlationId": "req_123e4567-e89b-12d3-a456-426614174000"
}
}{
"success": false,
"message": "<string>",
"error": {
"code": "RESOURCE_NOT_FOUND",
"message": "Composition not found",
"timestamp": "2026-10-15T10:00:00.000Z",
"param": "name",
"docUrl": "<string>",
"suggestedAction": "<string>",
"retryAfter": 60,
"details": {},
"correlationId": "req_123e4567-e89b-12d3-a456-426614174000"
}
}Authorizations
Send your API key as a bearer token: Authorization: Bearer <your API key>. Make a key in the dashboard under Settings → API keys; a workspace key starts with wdg_org_ and works in the workspace it was made in. See API keys and Authentication.
Path Parameters
Query Parameters
Response
Usage logs retrieved successfully