API Reference
AvatarShot provides REST endpoints for Second Life integrations, including account login flows, feed publishing, and marketplace automation.
Base URL
https://avatarshot.com/api/sl
Authentication
All authenticated requests require an API key header:
X-Api-Key: YOUR_API_KEY
Account Endpoints
POST /sl/login
Request a login OTP code for an avatar.
{
"avatar_name": "Slender Huntsman",
"avatar_key": "uuid-here"
}
Response:
{
"success": true,
"code": "123456",
"message": "Use this code on avatarshot.com/verify to login",
"expires_in": 600
}
POST /sl/register
Quick register a new user from in-world.
POST /sl/status
Check if a user is registered and their plan status.
GET /sl/plans
Get available subscription plans with L$ prices.
POST /sl/payment
Process an L$ payment for a subscription upgrade.
Feed Endpoints
POST /sl/feed
Post to the feed from in-world. Supports image URL, texture UUID, or base64.
{
"avatar_name": "Slender Huntsman",
"caption": "My new look!",
"image_url": "https://example.com/photo.jpg",
"tags": "fashion, secondlife",
"location": "Backdrop City"
}
POST /sl/feed/limit
Check remaining daily post limit for a user.
Marketplace Endpoints
POST /sl/marketplace/purchase
Register an in-world purchase (called by vendor script).
{
"product_id": 123,
"buyer_name": "Customer Name",
"buyer_uuid": "buyer-uuid-here",
"amount": 500,
"transaction_id": "unique-id"
}
Response:
{
"success": true,
"message": "Purchase confirmed! Delivering...",
"order_number": "AS-XXXXXXXX",
"deliver_uuid": "product-inventory-uuid",
"deliver_to": "buyer-uuid"
}
POST /sl/marketplace/product-info
Get product info for vendor display.
{ "product_id": 123 }
POST /sl/marketplace/pending-deliveries
Get queued deliveries (for delivery bot).
POST /sl/marketplace/confirm-delivery
Confirm a delivery was sent or failed.
{
"delivery_id": 456,
"status": "sent"
}
ANS Endpoint
POST /sl/ans/{store_key}
Receives SL Marketplace purchase notifications. This URL is configured in your SL Marketplace merchant settings. See ANS Integration Guide.
Error Responses
Endpoints return JSON payloads with a success field and descriptive message values:
{
"success": false,
"message": "Error description here"
}
Rate Limits
- Login/Register: 5 requests per minute
- Feed posts: Based on user plan (Free: 10/day, Pro: unlimited)
- Marketplace: 60 requests per minute
For production integrations, implement retries with exponential backoff and log all failed calls with request identifiers.