SenAsset API Reference
Integrate SenAsset into your existing workflows. Our REST API gives you full programmatic access to assets, users, locations, and webhooks. All responses are returned as JSON.
Authentication
All API requests must be authenticated using your API key. Include your key in theAuthorizationheader as a Bearer token. API keys can be generated from your account settings.
Keep keys secret
Never expose API keys in client-side code or public repositories.
Rotate regularly
Generate new API keys periodically and revoke old ones from the dashboard.
Scope your keys
Create read-only keys for integrations that only need to pull data.
Rate limiting
Requests are limited to 1,000/minute on Growth plan and 5,000/minute on Enterprise.
Example Request
curl -X GET https://api.senasset.com/v1/assets \
-H "Authorization: Bearer sk_live_xxxxxxxxxxxxxxxxxxxxxxxx" \
-H "Content-Type: application/json"Error Responses
| Status | Code | Description |
|---|---|---|
| 401 | unauthorized | Missing or invalid API key |
| 403 | forbidden | API key lacks required permissions |
| 429 | rate_limited | Too many requests, slow down |
| 500 | server_error | Internal server error, retry with backoff |
Assets API
Create, retrieve, update, and delete assets in your SenAsset account. Assets can be queried by status, location, assignee, category, and custom fields.
/v1/assetsList all assetsReturns a paginated list of all assets in your organization. Use query parameters to filter results.
Query Parameters
| Parameter | Type | Description |
|---|---|---|
| status | string | Filter by status: available, assigned, maintenance, retired |
| location_id | string | Filter assets by location UUID |
| assignee_id | string | Filter assets assigned to a specific user |
| category | string | Filter by asset category slug |
| limit | integer | Results per page (default: 50, max: 200) |
| cursor | string | Pagination cursor from previous response |
Example Request
curl -X GET "https://api.senasset.com/v1/assets?status=assigned&limit=20" \
-H "Authorization: Bearer sk_live_xxxxxxxxxxxxxxxxxxxxxxxx"Response
{
"data": [
{
"id": "ast_01hx4k9bm2f3g7q8r5t6y7u8v",
"tag": "AST-0001",
"name": "MacBook Pro 16\"",
"status": "assigned",
"category": "laptops",
"serial_number": "C02XL0RNJG5H",
"purchase_price": 249900,
"purchase_date": "2024-01-15",
"warranty_expires": "2027-01-15",
"location": {
"id": "loc_9xk2m4p7q1r3s",
"name": "HQ - San Francisco"
},
"assignee": {
"id": "usr_3fg8h9j2k4l5m",
"name": "Jane Smith",
"email": "jane@acme.com"
},
"custom_fields": {
"department": "Engineering",
"cost_center": "CC-4420"
},
"created_at": "2024-01-15T08:30:00Z",
"updated_at": "2025-03-01T14:22:00Z"
}
],
"meta": {
"total": 247,
"limit": 20,
"has_more": true,
"next_cursor": "eyJpZCI6ImFzdF8wMWh4..."
}
}/v1/assetsCreate an assetcurl -X POST https://api.senasset.com/v1/assets \
-H "Authorization: Bearer sk_live_xxxxxxxxxxxxxxxxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{
"name": "Dell XPS 15",
"category": "laptops",
"serial_number": "5CG94812KP",
"purchase_price": 189900,
"purchase_date": "2025-03-01",
"location_id": "loc_9xk2m4p7q1r3s",
"status": "available",
"custom_fields": {
"department": "Marketing"
}
}'/v1/assets/:idUpdate an assetcurl -X PATCH https://api.senasset.com/v1/assets/ast_01hx4k9bm2f3g7q8r5t6y7u8v \
-H "Authorization: Bearer sk_live_xxxxxxxxxxxxxxxxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{"status": "maintenance", "notes": "Sent for screen replacement"}'Users API
Manage users in your organization. Sync your HR system or directory with SenAsset to keep assignees up to date automatically.
/v1/usersList all userscurl -X GET https://api.senasset.com/v1/users \
-H "Authorization: Bearer sk_live_xxxxxxxxxxxxxxxxxxxxxxxx"
# Response
{
"data": [
{
"id": "usr_3fg8h9j2k4l5m",
"name": "Jane Smith",
"email": "jane@acme.com",
"role": "member",
"department": "Engineering",
"asset_count": 3,
"created_at": "2024-02-01T10:00:00Z"
}
],
"meta": { "total": 42, "limit": 50, "has_more": false }
}/v1/usersInvite a usercurl -X POST https://api.senasset.com/v1/users \
-H "Authorization: Bearer sk_live_xxxxxxxxxxxxxxxxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{
"name": "Marcus Thompson",
"email": "marcus@acme.com",
"role": "member",
"department": "Operations"
}'/v1/users/:id/assetsGet user's assetscurl -X GET https://api.senasset.com/v1/users/usr_3fg8h9j2k4l5m/assets \
-H "Authorization: Bearer sk_live_xxxxxxxxxxxxxxxxxxxxxxxx"
# Returns all assets currently assigned to this userWebhooks
Receive real-time notifications when events occur in SenAsset. Configure webhook endpoints from the dashboard or via the API. All payloads are signed with HMAC-SHA256 for verification.
Available Events
asset.createdA new asset was addedasset.updatedAsset fields were modifiedasset.assignedAsset was assigned to a userasset.checked_inAsset was returned / checked inasset.retiredAsset was marked as retireduser.invitedA new user was invitedmaintenance.dueScheduled maintenance is duewarranty.expiringWarranty expires within 30 daysRegister a Webhook
curl -X POST https://api.senasset.com/v1/webhooks \
-H "Authorization: Bearer sk_live_xxxxxxxxxxxxxxxxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{
"url": "https://yourapp.com/webhooks/senasset",
"events": ["asset.assigned", "asset.checked_in", "warranty.expiring"],
"secret": "your_webhook_secret"
}'Webhook Payload Example
{
"id": "evt_9xm2k4p7q1r3s6t8u",
"event": "asset.assigned",
"created_at": "2025-03-19T14:30:00Z",
"data": {
"asset_id": "ast_01hx4k9bm2f3g7q8r5t6y7u8v",
"asset_name": "MacBook Pro 16\"",
"asset_tag": "AST-0001",
"assignee": {
"id": "usr_3fg8h9j2k4l5m",
"name": "Jane Smith",
"email": "jane@acme.com"
},
"assigned_by": {
"id": "usr_9ab1c2d3e4f5g",
"name": "Admin User"
},
"assigned_at": "2025-03-19T14:30:00Z"
}
}Signature Verification
// Node.js example
const crypto = require('crypto');
function verifyWebhook(payload, signature, secret) {
const expected = crypto
.createHmac('sha256', secret)
.update(payload, 'utf8')
.digest('hex');
return crypto.timingSafeEqual(
Buffer.from(signature),
Buffer.from(`sha256=${expected}`)
);
}
// In your webhook handler:
const sig = req.headers['x-senasset-signature'];
const isValid = verifyWebhook(req.rawBody, sig, process.env.WEBHOOK_SECRET);
if (!isValid) return res.status(401).send('Invalid signature');