Skip to main content
GET
https://api-dev.weir.ai/
/
admin
/
licenses
curl -X GET 'https://api.weir.ai/admin/licenses' \
  -H 'Authorization: Bearer YOUR_ADMIN_ACCESS_TOKEN'
{
  "data": {
    "licenses": [
      {
        "licenseId": "lic_123456789",
        "talentId": "talent_123456789",
        "talentName": "John Athlete",
        "organizationId": "org_123456789",
        "organizationName": "Acme Agency",
        "name": "Social Media Campaign",
        "type": "social_media",
        "status": "active",
        "createdAt": "2024-01-15T10:30:00Z"
      }
    ],
    "total": 1
  },
  "message": "Licenses retrieved successfully",
  "status": "success"
}

Get All Licenses

Retrieve a list of all NIL licenses across all organizations (admin only).
curl -X GET 'https://api.weir.ai/admin/licenses' \
  -H 'Authorization: Bearer YOUR_ADMIN_ACCESS_TOKEN'
{
  "data": {
    "licenses": [
      {
        "licenseId": "lic_123456789",
        "talentId": "talent_123456789",
        "talentName": "John Athlete",
        "organizationId": "org_123456789",
        "organizationName": "Acme Agency",
        "name": "Social Media Campaign",
        "type": "social_media",
        "status": "active",
        "createdAt": "2024-01-15T10:30:00Z"
      }
    ],
    "total": 1
  },
  "message": "Licenses retrieved successfully",
  "status": "success"
}

Usage Examples

const getAllLicenses = async (accessToken) => {
  const response = await fetch('https://api.weir.ai/admin/licenses', {
    headers: { 'Authorization': `Bearer ${accessToken}` }
  });
  if (!response.ok) throw new Error(`HTTP error! status: ${response.status}`);
  return await response.json();
};