GET/v1/users

List all users

Retrieve a paginated list of all users in your organisation

Requires PEOPLE:READ; EDIT also grants READ. Session cookies are accepted only when no bearer credential is supplied.

Security: Bearer Auth

Provide your bearer token in the Authorization header when making requests to protected resources.

Example: Authorization: Bearer 123

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
search:stringoptional
Search term to filter results.

Responses

StatusMeaningDescription
200OKReturns a list of users in the organisation. May also return a canonical failure envelope with success: false at HTTP200.
400Bad RequestInvalid request
401UnauthorizedUnauthenticated
403ForbiddenInsufficient permissions
500Internal Server ErrorInternal Server Error

Response Schema

success:boolean
false
result:null
errors:object[]
messages:[any]

Request

GET
/v1/users
curl --request GET \
  --url https://api.onlineornot.com/v1/users \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer {access-token}' \
  --header 'X-OnlineOrNot-Organisation: string'

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; EDIT also grants READ. Session cookies are accepted only when no bearer credential is supplied.

Security: Bearer Auth

Provide your bearer token in the Authorization header when making requests to protected resources.

Example: Authorization: Bearer 123

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

StatusMeaningDescription
200OKReturns the ID of the removed user
400Bad RequestBad Request - Invalid user ID or cannot remove yourself
401UnauthorizedUnauthenticated
403ForbiddenForbidden - Insufficient permissions
404Not FoundNot Found - User not in organisation
500Internal Server ErrorInternal 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}' \
  --header 'X-OnlineOrNot-Organisation: string'

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; EDIT also grants READ. Session cookies are accepted only when no bearer credential is supplied.

Security: Bearer Auth

Provide your bearer token in the Authorization header when making requests to protected resources.

Example: Authorization: Bearer 123

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
search:stringoptional
Search term to filter results.

Responses

StatusMeaningDescription
200OKReturns a list of pending invitations. May also return a canonical failure envelope with success: false at HTTP200.
400Bad RequestInvalid request
401UnauthorizedUnauthenticated
403ForbiddenInsufficient permissions
500Internal Server ErrorInternal Server Error

Response Schema

success:boolean
false
result:null
errors:object[]
messages:[any]

Request

GET
/v1/invitations
curl --request GET \
  --url https://api.onlineornot.com/v1/invitations \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer {access-token}' \
  --header 'X-OnlineOrNot-Organisation: string'

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; EDIT also grants READ. Session cookies are accepted only when no bearer credential is supplied.

Security: Bearer Auth

Provide your bearer token in the Authorization header when making requests to protected resources.

Example: Authorization: Bearer 123

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

StatusMeaningDescription
201CreatedReturns the created invitation
400Bad RequestBad Request - Invalid email or user already invited/exists
401UnauthorizedUnauthenticated
403ForbiddenForbidden - Plan limit reached
500Internal Server ErrorInternal Server Error

Response Schema

result:object
success:boolean
Whether the API call was successful
errors:object[]
messages:object[]

Request

POST
/v1/invitations
curl --request POST \
  --url https://api.onlineornot.com/v1/invitations \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer {access-token}' \
  --header 'Content-Type: application/json' \
  --header 'X-OnlineOrNot-Organisation: string' \
  --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": []
}

Was this page helpful?