Request Format
All requests to the API should be made over HTTPS and include the appropriate headers and authentication. Here's an example of a basic request:
bash
curl -X GET "https://browserize.com/api/browsers" \
-H "Authorization: Bearer sk-brz-yourapikeyhere" \
-H "Content-Type: application/json"
HTTP Methods
The API supports the following HTTP methods:
Method | Description | Example |
---|---|---|
GET | Retrieve resources | GET /browsers |
POST | Create new resources | POST /browsers |
PUT | Update existing resources | PUT /browsers/{id} |
DELETE | Remove resources | DELETE /browsers/{id} |
Headers
Required and optional headers for API requests:
Header | Required | Description |
---|---|---|
Authorization | Yes | Your API key in the format "Bearer sk-brz-..." |
Content-Type | Yes* | application/json for requests with a body |
Accept | No | Specify response format (defaults to application/json) |
Query Parameters
Many endpoints support query parameters for filtering, sorting, and pagination:
http
GET /browsers?status=active&sort=created_at&order=desc&limit=10
Common query parameters include:
limit
- Number of items per page (default: 10, max: 100)offset
- Number of items to skipsort
- Field to sort byorder
- Sort order (asc or desc)
Pagination
List endpoints return paginated results. The response includes pagination metadata:
json
{
"data": [...],
"pagination": {
"total": 100,
"limit": 10,
"offset": 0,
"has_more": true
}
}
Use the limit
and offset
parameters to navigate through pages. The has_more
field indicates if there are more items available.