curl -X POST https://api.getagentdrive.com/v0/drives/claim \
-H "Authorization: Bearer agd_your_dashboard_key" \
-H "Content-Type: application/json" \
-d '{"token": "clm_abc123..."}'
{
"data": {
"id": "d7f3e-abc-123",
"user_id": "u1234...",
"name": "research-q1",
"slug": "alice/research-q1",
"file_count": 5,
"total_size": 24576,
"expires_at": null,
"created_at": "2026-03-22T10:30:00Z",
"updated_at": "2026-03-22T11:00:00Z"
}
}
Drives
Claim Drive
Claim an unclaimed drive and attach it to your account.
POST
/
v0
/
drives
/
claim
curl -X POST https://api.getagentdrive.com/v0/drives/claim \
-H "Authorization: Bearer agd_your_dashboard_key" \
-H "Content-Type: application/json" \
-d '{"token": "clm_abc123..."}'
{
"data": {
"id": "d7f3e-abc-123",
"user_id": "u1234...",
"name": "research-q1",
"slug": "alice/research-q1",
"file_count": 5,
"total_size": 24576,
"expires_at": null,
"created_at": "2026-03-22T10:30:00Z",
"updated_at": "2026-03-22T11:00:00Z"
}
}
When an agent provisions a drive, the response includes a
claim_url. The human visits that URL, logs in, and the drive attaches to their account. This endpoint handles the API side of that flow.
Request Body
curl -X POST https://api.getagentdrive.com/v0/drives/claim \
-H "Authorization: Bearer agd_your_dashboard_key" \
-H "Content-Type: application/json" \
-d '{"token": "clm_abc123..."}'
{
"data": {
"id": "d7f3e-abc-123",
"user_id": "u1234...",
"name": "research-q1",
"slug": "alice/research-q1",
"file_count": 5,
"total_size": 24576,
"expires_at": null,
"created_at": "2026-03-22T10:30:00Z",
"updated_at": "2026-03-22T11:00:00Z"
}
}
Notes
- Requires authentication (dashboard session key)
- Claim tokens are one-time use
- Expired tokens return
410 Gone - After claiming, the drive’s
expires_atis cleared and a slug is activated
