GET/v1/users
List all users
Retrieve a paginated list of all users in your organisation
Requires PEOPLE:READ.
Header parameters
X-OnlineOrNot-Organisation:stringoptional
Public organization ID to select from an OAuth grant. Required for grants authorizing multiple organizations. Omit for single-organization grants and API tokens.
Query parameters
page:integeroptional
Page number of paginated results, starting at 1.
Default: 1
per_page:integeroptional
Number of items per page. Defaults to 20. Continue requesting subsequent pages until the accumulated item count reaches result_info.total_count or a page is empty.
Default: 20
Responses
| Status | Meaning | Description |
|---|---|---|
| 200 | OK | Returns a list of users in the organisation. May also return a canonical failure envelope with success: false at HTTP200. |
| 400 | Bad Request | Invalid request |
| 401 | Unauthorized | Unauthenticated |
| 403 | Forbidden | Insufficient permissions |
| 500 | Internal Server Error | Internal Server Error |
Response Schema
success:boolean
false
result:null
errors:object[]
messages:[any]
Request
GET
/v1/userscurl --request GET \
--url https://api.onlineornot.com/v1/users \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {access-token}'
Response
{
"result": [
{
"id": "abc123",
"first_name": "Jane",
"last_name": "Doe",
"email": "jane@example.com",
"image": "https://example.com/avatar.jpg",
"role": "STANDARD"
}
],
"result_info": {
"page": 1,
"per_page": 20,
"count": 1,
"total_count": 1
},
"success": true,
"errors": [],
"messages": []
}
DELETE/v1/users/{user_id}
Remove a user from the organisation
Remove a team member from your organisation
Requires PEOPLE:EDIT.
Header parameters
X-OnlineOrNot-Organisation:stringoptional
Public organization ID to select from an OAuth grant. Required for grants authorizing multiple organizations. Omit for single-organization grants and API tokens.
Path parameters
user_id:string
The unique identifier of the user
Responses
| Status | Meaning | Description |
|---|---|---|
| 200 | OK | Returns the ID of the removed user |
| 400 | Bad Request | Bad Request - Invalid user ID or cannot remove yourself |
| 401 | Unauthorized | Unauthenticated |
| 403 | Forbidden | Forbidden - Insufficient permissions |
| 404 | Not Found | Not Found - User not in organisation |
| 500 | Internal Server Error | Internal Server Error |
Response Schema
result:object
success:boolean
Whether the API call was successful
errors:object[]
messages:object[]
Request
DELETE
/v1/users/{user_id}curl --request DELETE \
--url https://api.onlineornot.com/v1/users/abc123def \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {access-token}'
Response
{
"result": {
"id": "abc123"
},
"success": true,
"errors": [],
"messages": []
}
GET/v1/invitations
List all invitations
Retrieve a paginated list of all pending invitations in your organisation
Requires PEOPLE:READ.
Header parameters
X-OnlineOrNot-Organisation:stringoptional
Public organization ID to select from an OAuth grant. Required for grants authorizing multiple organizations. Omit for single-organization grants and API tokens.
Query parameters
page:integeroptional
Page number of paginated results, starting at 1.
Default: 1
per_page:integeroptional
Number of items per page. Defaults to 20. Continue requesting subsequent pages until the accumulated item count reaches result_info.total_count or a page is empty.
Default: 20
Responses
| Status | Meaning | Description |
|---|---|---|
| 200 | OK | Returns a list of pending invitations. May also return a canonical failure envelope with success: false at HTTP200. |
| 400 | Bad Request | Invalid request |
| 401 | Unauthorized | Unauthenticated |
| 403 | Forbidden | Insufficient permissions |
| 500 | Internal Server Error | Internal Server Error |
Response Schema
success:boolean
false
result:null
errors:object[]
messages:[any]
Request
GET
/v1/invitationscurl --request GET \
--url https://api.onlineornot.com/v1/invitations \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {access-token}'
Response
{
"result": [
{
"id": "inv123",
"email": "newuser@example.com",
"role": "STANDARD",
"created_at": "2024-01-15T10:30:00Z"
}
],
"result_info": {
"page": 1,
"per_page": 20,
"count": 1,
"total_count": 1
},
"success": true,
"errors": [],
"messages": []
}
POST/v1/invitations
Create an invitation
Send an invitation email to add a new team member to your organisation
Requires PEOPLE:EDIT.
Header parameters
X-OnlineOrNot-Organisation:stringoptional
Public organization ID to select from an OAuth grant. Required for grants authorizing multiple organizations. Omit for single-organization grants and API tokens.
Body parameters
email:string(email)
The email address to send the invitation to
role:stringoptional
The role to assign to the invited user
Accepted values: "ADMIN" | "STANDARD"
Default: "STANDARD"
Responses
| Status | Meaning | Description |
|---|---|---|
| 201 | Created | Returns the created invitation |
| 400 | Bad Request | Bad Request - Invalid email or user already invited/exists |
| 401 | Unauthorized | Unauthenticated |
| 403 | Forbidden | Forbidden - Plan limit reached |
| 500 | Internal Server Error | Internal Server Error |
Response Schema
result:object
success:boolean
Whether the API call was successful
errors:object[]
messages:object[]
Request
POST
/v1/invitationscurl --request POST \
--url https://api.onlineornot.com/v1/invitations \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {access-token}' \
--header 'Content-Type: application/json' \
--data '{"email":"newuser@example.com","role":"STANDARD"}'
Response
{
"result": {
"id": "inv123",
"email": "newuser@example.com",
"role": "STANDARD",
"created_at": "2024-01-15T10:30:00Z"
},
"success": true,
"errors": [],
"messages": []
}