Back to home/API Reference
REST API · v1

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.

Base URL: https://api.senasset.com/v1Stable

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

StatusCodeDescription
401unauthorizedMissing or invalid API key
403forbiddenAPI key lacks required permissions
429rate_limitedToo many requests, slow down
500server_errorInternal 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.

GET/v1/assetsList all assets

Returns a paginated list of all assets in your organization. Use query parameters to filter results.

Query Parameters

ParameterTypeDescription
statusstringFilter by status: available, assigned, maintenance, retired
location_idstringFilter assets by location UUID
assignee_idstringFilter assets assigned to a specific user
categorystringFilter by asset category slug
limitintegerResults per page (default: 50, max: 200)
cursorstringPagination 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..."
  }
}
POST/v1/assetsCreate an asset
curl -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"
    }
  }'
PATCH/v1/assets/:idUpdate an asset
curl -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.

GET/v1/usersList all users
curl -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 }
}
POST/v1/usersInvite a user
curl -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"
  }'
GET/v1/users/:id/assetsGet user's assets
curl -X GET https://api.senasset.com/v1/users/usr_3fg8h9j2k4l5m/assets \
  -H "Authorization: Bearer sk_live_xxxxxxxxxxxxxxxxxxxxxxxx"

# Returns all assets currently assigned to this user

Webhooks

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 added
asset.updatedAsset fields were modified
asset.assignedAsset was assigned to a user
asset.checked_inAsset was returned / checked in
asset.retiredAsset was marked as retired
user.invitedA new user was invited
maintenance.dueScheduled maintenance is due
warranty.expiringWarranty expires within 30 days

Register 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');