Authentication
The DevAPI uses Bearer tokens to authenticate requests. You can manage your API keys in the Developer Dashboard.
Authorization Header
All API requests must include the
Authorization: Bearer <YOUR_API_KEY>
header. Requests over HTTP will be rejected.
Example Request
curl https://api.devapi.com/v1/auth/me \
-H "Authorization: Bearer sk_test_a1b2c3d4e5f6g7h8"
Pagination
List endpoints (like retrieving users or projects) return multiple items. We utilize cursor-based pagination to fetch data rapidly.
Query Parameters
Response Format
{
"data": [ /* items */ ],
"has_more": true,
"next_cursor": "obj_12345"
}
Errors
DevAPI uses conventional HTTP response codes to indicate the success or failure of an API request.
{
"error": {
"type": "invalid_request_error",
"code": "missing_parameter",
"message": "The parameter 'email' is required."
}
}
Users API
The Users API allows you to manage the accounts of people using your application.
/v1/users
Retrieve a paginated list of users.
{
"data": [
{
"id": "usr_123",
"email": "john@devapi.com"
}
]
}
/v1/users
Create a new user. Required params:
email,
password.
Projects API
Manage projects, workspaces, and team access within DevAPI.
/v1/projects
{
"name": "New API Integration",
"description": "Main project for frontend team"
}
Payments API
Process transactions and manage charges safely.
/v1/payments/charge
{
"amount": 5000,
"currency": "usd",
"source": "tok_visa"
}
Events API
Retrieve a log of all activities that happened inside your API environment.
/v1/events
[
{
"id": "evt_987",
"type": "user.created",
"created_at": 1617235200
}
]
Webhooks Endpoint
Configure URLs where DevAPI will send HTTP POST requests when events happen.
/v1/webhooks
{
"url": "https://your-domain.com/webhook",
"enabled_events": ["payment.succeeded", "user.deleted"]
}