Getting Started
Base URL
All API requests are made to:your-snipe-it-instance.com with your actual Snipe-IT domain.
Authentication
The Snipe-IT API uses Bearer token authentication. You need to include your API token in theAuthorization header of every request.
Generating an API Token
- Log into your Snipe-IT instance
- Navigate to your user profile (top right corner)
- Go to API Keys tab
- Click Create New Token
- Give your token a descriptive name
- Copy the generated token immediately (it won’t be shown again)
Making API Requests
Include your API token in theAuthorization header:
API Rate Limiting
By default, the Snipe-IT API is rate-limited to prevent abuse. The default limit is configured in your.env file:
.env
429 Too Many Requests response.
Common API Endpoints
Assets (Hardware)
| Endpoint | Method | Description |
|---|---|---|
/api/v1/hardware | GET | List all assets |
/api/v1/hardware | POST | Create a new asset |
/api/v1/hardware/{id} | GET | Get a specific asset |
/api/v1/hardware/{asset} | PATCH/PUT | Update an asset |
/api/v1/hardware/{id} | DELETE | Delete an asset |
/api/v1/hardware/{id}/checkout | POST | Check out an asset |
/api/v1/hardware/{id}/checkin | POST | Check in an asset |
/api/v1/hardware/bytag/{tag} | GET | Get asset by asset tag |
/api/v1/hardware/byserial/{serial} | GET | Get asset by serial number |
/api/v1/hardware/{asset}/audit | POST | Audit an asset |
Users
| Endpoint | Method | Description |
|---|---|---|
/api/v1/users | GET | List all users |
/api/v1/users | POST | Create a new user |
/api/v1/users/{id} | GET | Get a specific user |
/api/v1/users/{user} | PATCH/PUT | Update a user |
/api/v1/users/{id} | DELETE | Delete a user |
/api/v1/users/{user}/assets | GET | Get assets assigned to user |
/api/v1/users/{user}/accessories | GET | Get accessories assigned to user |
/api/v1/users/{user}/licenses | GET | Get licenses assigned to user |
Accessories
| Endpoint | Method | Description |
|---|---|---|
/api/v1/accessories | GET | List all accessories |
/api/v1/accessories | POST | Create an accessory |
/api/v1/accessories/{id} | GET | Get a specific accessory |
/api/v1/accessories/{accessory} | PATCH/PUT | Update an accessory |
/api/v1/accessories/{accessory}/checkout | POST | Check out an accessory |
/api/v1/accessories/{accessory}/checkin | POST | Check in an accessory |
Components
| Endpoint | Method | Description |
|---|---|---|
/api/v1/components | GET | List all components |
/api/v1/components | POST | Create a component |
/api/v1/components/{id} | GET | Get a specific component |
/api/v1/components/{id}/checkout | POST | Check out a component |
/api/v1/components/{id}/checkin | POST | Check in a component |
Other Resources
The API also supports:- Categories (
/api/v1/categories) - Companies (
/api/v1/companies) - Departments (
/api/v1/departments) - Consumables (
/api/v1/consumables) - Licenses (
/api/v1/licenses) - Locations (
/api/v1/locations) - Manufacturers (
/api/v1/manufacturers) - Models (
/api/v1/models) - Status Labels (
/api/v1/statuslabels) - Suppliers (
/api/v1/suppliers)
Response Format
All API responses are returned in JSON format.Success Response
Error Response
200- Success201- Created400- Bad Request401- Unauthorized (invalid token)403- Forbidden (insufficient permissions)404- Not Found422- Validation Error429- Too Many Requests (rate limited)500- Server Error
Pagination
List endpoints support pagination using the following parameters:limit- Number of results per page (default: 50, max: determined byMAX_RESULTSsetting)offset- Number of results to skip
Filtering and Searching
Many endpoints support filtering and searching:search- Search across multiple fieldssort- Column to sort byorder- Sort order (ascordesc)
Personal Access Tokens
Users can manage their own API tokens programmatically:Best Practices
Use specific permissions
Use specific permissions
Create dedicated API users with only the permissions needed for your integration. Don’t use admin tokens unless absolutely necessary.
Handle rate limits gracefully
Handle rate limits gracefully
Implement exponential backoff when you receive 429 responses. Respect the rate limits to ensure system stability.
Validate responses
Validate responses
Always check HTTP status codes and validate response data before processing. Handle errors appropriately.
Use filtering to reduce data transfer
Use filtering to reduce data transfer
When possible, use search and filter parameters to retrieve only the data you need instead of fetching all records.
Keep tokens secure
Keep tokens secure
Store API tokens in environment variables or secure credential stores. Never hardcode them in your application code.
Next Steps
Full API Reference
Complete API documentation with all endpoints and parameters
LDAP Integration
Sync users from Active Directory or LDAP
SAML SSO
Configure single sign-on with SAML providers
Webhooks
Set up notifications for Slack, Teams, and more
