Skip to content

Grace Periods API

The Grace Periods API allows platforms to track and manage the 30-day compliance windows when identities are boxed.

List active grace periods for your platform.

GET /v1/lmif/grace-periods
const gracePeriods = await lmif.gracePeriods.list({
status: 'active',
limit: 20
});
ParameterTypeDescription
statusstringactive, paused, resolved, expired
boxIdstringFilter by box ID
expiringWithinintegerDays until expiration (e.g., 7)
limitintegerMax items
offsetintegerItems to skip
{
"data": [
{
"id": "gp_abc123",
"boxId": "box_xyz789",
"violationId": "viol_123456",
"identityName": "Taylor Swift",
"status": "active",
"startedAt": "2024-01-01T00:00:00Z",
"expiresAt": "2024-01-31T00:00:00Z",
"daysRemaining": 15,
"affectedAvatars": 3,
"affectedUsers": 15000
}
],
"meta": {
"total": 5,
"limit": 20,
"offset": 0
}
}

Get details of a specific grace period.

GET /v1/lmif/grace-periods/{id}
const gracePeriod = await lmif.gracePeriods.get('gp_abc123');
{
"data": {
"id": "gp_abc123",
"boxId": "box_xyz789",
"violationId": "viol_123456",
"identityName": "Taylor Swift",
"policy": "MONETIZE",
"status": "active",
"startedAt": "2024-01-01T00:00:00Z",
"expiresAt": "2024-01-31T00:00:00Z",
"daysRemaining": 15,
"notifications": {
"day0": {
"sent": true,
"at": "2024-01-01T00:00:00Z",
"recipients": ["creator@example.com"]
},
"day7": {
"sent": true,
"at": "2024-01-08T00:00:00Z",
"recipients": ["creator@example.com"]
},
"day21": {
"sent": false,
"scheduledAt": "2024-01-22T00:00:00Z"
},
"day28": {
"sent": false,
"scheduledAt": "2024-01-29T00:00:00Z"
}
},
"affectedAvatars": [
{
"avatarId": "avatar_001",
"name": "Taylor AI",
"creatorId": "creator_abc",
"creatorEmail": "john@example.com",
"userCount": 5000,
"status": "active"
},
{
"avatarId": "avatar_002",
"name": "Swift Bot",
"creatorId": "creator_def",
"creatorEmail": "jane@example.com",
"userCount": 10000,
"status": "active"
}
],
"resolutionOptions": [
{
"type": "license",
"available": true,
"pricing": {
"personal": 0,
"creator": 50,
"commercial": 500
}
},
{
"type": "remove",
"available": true
},
{
"type": "modify",
"available": true
}
]
}
}

Mark a grace period as resolved.

POST /v1/lmif/grace-periods/{id}/resolve
await lmif.gracePeriods.resolve('gp_abc123', {
resolution: 'licensed',
licenseId: 'lic_xyz789',
avatarId: 'avatar_001'
});
FieldTypeRequiredDescription
resolutionstringYesResolution type
avatarIdstringYesAvatar being resolved
licenseIdstringNoLicense ID if licensed
notesstringNoAdditional notes
TypeDescription
licensedObtained a license
removedAvatar was removed
modifiedAvatar was modified
parodyMarked as parody
{
"data": {
"id": "gp_abc123",
"status": "resolved",
"resolution": "licensed",
"resolvedAt": "2024-01-16T10:00:00Z",
"remainingAvatars": 2
}
}
┌─────────────────────────────────────────────────────────────┐
│ 30-DAY GRACE PERIOD │
├─────────────────────────────────────────────────────────────┤
│ │
│ Day 0: Grace period starts │
│ ├── Violation created │
│ ├── Avatar creators notified │
│ └── Users notified │
│ │
│ Day 7: First reminder │
│ └── "23 days remaining" │
│ │
│ Day 21: Second reminder │
│ └── "9 days remaining" │
│ │
│ Day 28: Final warning │
│ └── "2 days remaining - take action now" │
│ │
│ Day 30: Enforcement │
│ ├── Unlicensed avatars deactivated │
│ └── Users notified and migrated │
│ │
└─────────────────────────────────────────────────────────────┘
StatusDescription
activeCountdown in progress
pausedPaused due to appeal
resolvedAll avatars complied
expiredTime ran out, enforcement triggered
cancelledBox was removed

Grace periods trigger webhook events:

// Handle grace period webhooks
app.post('/webhooks/lmif', (req, res) => {
const event = req.body;
switch (event.type) {
case 'grace_period.started':
// New grace period - notify affected users
break;
case 'grace_period.reminder':
// Reminder sent (day 7, 21, 28)
// event.data.reminderDay = 7 | 21 | 28
break;
case 'grace_period.ending':
// 2 days left - urgent action needed
break;
case 'grace_period.expired':
// Time's up - deactivate avatars
break;
case 'grace_period.resolved':
// Avatar creator resolved
break;
case 'grace_period.paused':
// Paused due to appeal
break;
case 'grace_period.resumed':
// Appeal denied, countdown resumed
break;
}
res.status(200).send('OK');
});

In sandbox, grace periods are accelerated:

ProductionSandbox
30 days24 hours
Day 7Hour 6
Day 21Hour 18
Day 28Hour 22