https:// api.losant.com/orgs/ORG_ID
Below are the various requests that can be performed against the
Organization resource, as well as the expected
parameters and the potential responses.
Deletes an organization
DELETE https:// api.losant.com/orgs/ORG_ID
A valid API access token is required to access this endpoint. The token must
include at least one of the following scopes:
all.Organization, all.User, org.*, or org.delete.
Path Component Description Example ORG_ID ID associated with the organization 575ed6e87ae143cd83dc4aa8 
Name Required Description Default Authorization Y The token for authenticating the request, prepended with Bearer 
curl   -H   'Content-Type: application/json'   \      -H   'Accept: application/json'   \      -H   'Authorization: Bearer YOUR_API_ACCESS_TOKEN'   \      -X  DELETE  \     https://api.losant.com/orgs/ORG_ID  
Code Type Description 200 Success If organization was successfully deleted 
Code Type Description 400 Error Error if malformed request 404 Error Error if organization was not found 
Returns device counts by day for the time range specified for this organization
GET https:// api.losant.com/orgs/ORG_ID /deviceCounts
A valid API access token is required to access this endpoint. The token must
include at least one of the following scopes:
all.Organization, all.Organization.read, all.User, all.User.read, org.*, or org.deviceCounts.
Path Component Description Example ORG_ID ID associated with the organization 575ed6e87ae143cd83dc4aa8 
Name Required Description Default Example start N Start of range for device count query (ms since epoch) start=0end N End of range for device count query (ms since epoch) end=1465790400000
Name Required Description Default Authorization Y The token for authenticating the request, prepended with Bearer 
curl   -H   'Content-Type: application/json'   \      -H   'Accept: application/json'   \      -H   'Authorization: Bearer YOUR_API_ACCESS_TOKEN'   \      -X  GET  \     https://api.losant.com/orgs/ORG_ID/deviceCounts  
Code Type Description 400 Error Error if malformed request 404 Error Error if organization was not found 
Retrieves information on an organization
GET https:// api.losant.com/orgs/ORG_ID
A valid API access token is required to access this endpoint. The token must
include at least one of the following scopes:
all.Organization, all.Organization.read, all.User, all.User.read, org.*, or org.get.
Path Component Description Example ORG_ID ID associated with the organization 575ed6e87ae143cd83dc4aa8 
Name Required Description Default Example summaryExclude N Comma-separated list of summary fields to exclude from org summary summaryExclude=payloadCountsummaryInclude N Comma-separated list of summary fields to include in org summary summaryInclude=payloadCount
Name Required Description Default Authorization Y The token for authenticating the request, prepended with Bearer 
curl   -H   'Content-Type: application/json'   \      -H   'Accept: application/json'   \      -H   'Authorization: Bearer YOUR_API_ACCESS_TOKEN'   \      -X  GET  \     https://api.losant.com/orgs/ORG_ID  
Code Type Description 400 Error Error if malformed request 404 Error Error if organization not found 
Invites a person to an organization
POST https:// api.losant.com/orgs/ORG_ID /invites
A valid API access token is required to access this endpoint. The token must
include at least one of the following scopes:
all.Organization, all.User, org.*, or org.inviteMember.
Path Component Description Example ORG_ID ID associated with the organization 575ed6e87ae143cd83dc4aa8 
Name Required Description Default Authorization Y The token for authenticating the request, prepended with Bearer 
Request Body  
The body of the request should be serialized JSON that validates against
the Organization Invitation Post  schema. For example, the following would be a
valid body for this request:
{    "email" :   "invitedUser@example.com" ,    "role" :   "edit" }  
curl   -H   'Content-Type: application/json'   \      -H   'Accept: application/json'   \      -H   'Authorization: Bearer YOUR_API_ACCESS_TOKEN'   \      -X  POST  \      -d   '{"email":"invitedUser@example.com","role":"edit"}'   \     https://api.losant.com/orgs/ORG_ID/invites  
Code Type Description 400 Error Error if malformed request 404 Error Error if organization not found 
Modifies a current org member's role
PATCH https:// api.losant.com/orgs/ORG_ID /member
A valid API access token is required to access this endpoint. The token must
include at least one of the following scopes:
all.Organization, all.User, org.*, or org.modifyMember.
Path Component Description Example ORG_ID ID associated with the organization 575ed6e87ae143cd83dc4aa8 
Name Required Description Default Example summaryExclude N Comma-separated list of summary fields to exclude from org summary summaryExclude=payloadCountsummaryInclude N Comma-separated list of summary fields to include in org summary summaryInclude=payloadCount
Name Required Description Default Authorization Y The token for authenticating the request, prepended with Bearer 
Request Body  
The body of the request should be serialized JSON that validates against
the Organization Member Patch  schema. For example, the following would be a
valid body for this request:
{    "userId" :   "575ef90f7ae143cd83dc4aad" ,    "role" :   "view" }  
curl   -H   'Content-Type: application/json'   \      -H   'Accept: application/json'   \      -H   'Authorization: Bearer YOUR_API_ACCESS_TOKEN'   \      -X  PATCH  \      -d   '{"userId":"575ef90f7ae143cd83dc4aad","role":"view"}'   \     https://api.losant.com/orgs/ORG_ID/member  
Code Type Description 200 Organization Updated organization information 
Code Type Description 400 Error Error if malformed request 404 Error Error if organization not found 
Returns notebook execution usage by day for the time range specified for this organization
GET https:// api.losant.com/orgs/ORG_ID /notebookMinuteCounts
A valid API access token is required to access this endpoint. The token must
include at least one of the following scopes:
all.Organization, all.Organization.read, all.User, all.User.read, org.*, or org.notebookMinuteCounts.
Path Component Description Example ORG_ID ID associated with the organization 575ed6e87ae143cd83dc4aa8 
Name Required Description Default Example start N Start of range for notebook execution query (ms since epoch) start=0end N End of range for notebook execution query (ms since epoch) end=1465790400000
Name Required Description Default Authorization Y The token for authenticating the request, prepended with Bearer 
curl   -H   'Content-Type: application/json'   \      -H   'Accept: application/json'   \      -H   'Authorization: Bearer YOUR_API_ACCESS_TOKEN'   \      -X  GET  \     https://api.losant.com/orgs/ORG_ID/notebookMinuteCounts  
Code Type Description 400 Error Error if malformed request 404 Error Error if organization was not found 
Updates information about an organization
PATCH https:// api.losant.com/orgs/ORG_ID
A valid API access token is required to access this endpoint. The token must
include at least one of the following scopes:
all.Organization, all.User, org.*, or org.patch.
Path Component Description Example ORG_ID ID associated with the organization 575ed6e87ae143cd83dc4aa8 
Name Required Description Default Example summaryExclude N Comma-separated list of summary fields to exclude from org summary summaryExclude=payloadCountsummaryInclude N Comma-separated list of summary fields to include in org summary summaryInclude=payloadCount
Name Required Description Default Authorization Y The token for authenticating the request, prepended with Bearer 
Request Body  
The body of the request should be serialized JSON that validates against
the Organization Patch  schema. For example, the following would be a
valid body for this request:
{    "name" :   "My Updated Organization" ,    "description" :   "Description of my updated organization" }  
curl   -H   'Content-Type: application/json'   \      -H   'Accept: application/json'   \      -H   'Authorization: Bearer YOUR_API_ACCESS_TOKEN'   \      -X  PATCH  \      -d   '{"name":"My Updated Organization","description":"Description of my updated organization"}'   \     https://api.losant.com/orgs/ORG_ID  
Code Type Description 200 Organization Updated organization information 
Code Type Description 400 Error Error if malformed request 404 Error Error if organization was not found 
Returns payload counts for the time range specified for all applications this organization owns
GET https:// api.losant.com/orgs/ORG_ID /payloadCounts
A valid API access token is required to access this endpoint. The token must
include at least one of the following scopes:
all.Organization, all.Organization.read, all.User, all.User.read, org.*, or org.payloadCounts.
Path Component Description Example ORG_ID ID associated with the organization 575ed6e87ae143cd83dc4aa8 
Name Required Description Default Example start N Start of range for payload count query (ms since epoch) start=0end N End of range for payload count query (ms since epoch) end=1465790400000asBytes N If the resulting stats should be returned as bytes false asBytes=true
Name Required Description Default Authorization Y The token for authenticating the request, prepended with Bearer 
curl   -H   'Content-Type: application/json'   \      -H   'Accept: application/json'   \      -H   'Authorization: Bearer YOUR_API_ACCESS_TOKEN'   \      -X  GET  \     https://api.losant.com/orgs/ORG_ID/payloadCounts  
Code Type Description 200 Payload Stats Payload counts, by type and source 
Code Type Description 400 Error Error if malformed request 404 Error Error if organization was not found 
Returns payload counts per resolution in the time range specified for all application this organization owns
GET https:// api.losant.com/orgs/ORG_ID /payloadCountsBreakdown
A valid API access token is required to access this endpoint. The token must
include at least one of the following scopes:
all.Organization, all.Organization.read, all.User, all.User.read, org.*, or org.payloadCountsBreakdown.
Path Component Description Example ORG_ID ID associated with the organization 575ed6e87ae143cd83dc4aa8 
Name Required Description Default Example start N Start of range for payload count query (ms since epoch) start=0end N End of range for payload count query (ms since epoch) end=1465790400000resolution N Resolution in milliseconds. Accepted values are: 86400000, 3600000 86400000 resolution=86400000asBytes N If the resulting stats should be returned as bytes false asBytes=trueincludeNonBillable N If non-billable payloads should be included in the result false includeNonBillable=true
Name Required Description Default Authorization Y The token for authenticating the request, prepended with Bearer 
curl   -H   'Content-Type: application/json'   \      -H   'Accept: application/json'   \      -H   'Authorization: Bearer YOUR_API_ACCESS_TOKEN'   \      -X  GET  \     https://api.losant.com/orgs/ORG_ID/payloadCountsBreakdown  
Code Type Description 400 Error Error if malformed request 404 Error Error if organization was not found 
Gets the current pending invites
GET https:// api.losant.com/orgs/ORG_ID /invites
A valid API access token is required to access this endpoint. The token must
include at least one of the following scopes:
all.Organization, all.Organization.read, all.User, all.User.read, org.*, or org.pendingInvites.
Path Component Description Example ORG_ID ID associated with the organization 575ed6e87ae143cd83dc4aa8 
Name Required Description Default Authorization Y The token for authenticating the request, prepended with Bearer 
curl   -H   'Content-Type: application/json'   \      -H   'Accept: application/json'   \      -H   'Authorization: Bearer YOUR_API_ACCESS_TOKEN'   \      -X  GET  \     https://api.losant.com/orgs/ORG_ID/invites  
Code Type Description 400 Error Error if malformed request 404 Error Error if organization not found 
Removes a member from the org
DELETE https:// api.losant.com/orgs/ORG_ID /member
A valid API access token is required to access this endpoint. The token must
include at least one of the following scopes:
all.Organization, all.User, org.*, or org.removeMember.
Path Component Description Example ORG_ID ID associated with the organization 575ed6e87ae143cd83dc4aa8 
Name Required Description Default Example userId Y Id of user to remove userId=575ed70c7ae143cd83dc4aa9summaryExclude N Comma-separated list of summary fields to exclude from org summary summaryExclude=payloadCountsummaryInclude N Comma-separated list of summary fields to include in org summary summaryInclude=payloadCount
Name Required Description Default Authorization Y The token for authenticating the request, prepended with Bearer 
curl   -H   'Content-Type: application/json'   \      -H   'Accept: application/json'   \      -H   'Authorization: Bearer YOUR_API_ACCESS_TOKEN'   \      -X  DELETE  \     https://api.losant.com/orgs/ORG_ID/member?userId = 575ed70c7ae143cd83dc4aa9  
Code Type Description 200 Organization Updated organization information 
Code Type Description 400 Error Error if malformed request 404 Error Error if organization not found 
Revokes an existing invite
DELETE https:// api.losant.com/orgs/ORG_ID /invites
A valid API access token is required to access this endpoint. The token must
include at least one of the following scopes:
all.Organization, all.User, org.*, or org.revokeInvite.
Path Component Description Example ORG_ID ID associated with the organization 575ed6e87ae143cd83dc4aa8 
Name Required Description Default Example inviteId Y Id of invite to revoke inviteId=575ed71e7ae143cd83dc4aaa
Name Required Description Default Authorization Y The token for authenticating the request, prepended with Bearer 
curl   -H   'Content-Type: application/json'   \      -H   'Accept: application/json'   \      -H   'Authorization: Bearer YOUR_API_ACCESS_TOKEN'   \      -X  DELETE  \     https://api.losant.com/orgs/ORG_ID/invites?inviteId = 575ed71e7ae143cd83dc4aaa  
Code Type Description 400 Error Error if malformed request 404 Error Error if organization not found 
Moves resources to a new owner
PATCH https:// api.losant.com/orgs/ORG_ID /transferResources
A valid API access token is required to access this endpoint. The token must
include at least one of the following scopes:
all.Organization, all.User, org.*, or org.transferResources.
Path Component Description Example ORG_ID ID associated with the organization 575ed6e87ae143cd83dc4aa8 
Name Required Description Default Authorization Y The token for authenticating the request, prepended with Bearer 
Request Body  
The body of the request should be serialized JSON that validates against
the Resource Transfer  schema. For example, the following would be a
valid body for this request:
{    "destinationId" :   "575ed6e87ae143cd83dc4aa8" ,    "destinationType" :   "organization" ,    "applicationIds" :   [      "575ec8687ae143cd83dc4a97"    ] }  
curl   -H   'Content-Type: application/json'   \      -H   'Accept: application/json'   \      -H   'Authorization: Bearer YOUR_API_ACCESS_TOKEN'   \      -X  PATCH  \      -d   '{"destinationId":"575ed6e87ae143cd83dc4aa8","destinationType":"organization","applicationIds":["575ec8687ae143cd83dc4a97"]}'   \     https://api.losant.com/orgs/ORG_ID/transferResources  
Code Type Description 200 Success If resource transfer was successful 
Code Type Description 400 Error Error if malformed request 404 Error Error if organization was not found 
Schema for the result of a device counts request
(root) {}  3 keys$schema: "http://json-schema.org/draft-07/schema#" type: "object" properties: {}  3 keysstart: {}  2 keysend: {}  2 keyscounts: {}  2 keys 
(root) {}  3 keysstart: "1999-05-20T05:00:00.000Z" end: "1999-06-20T04:59:59.999Z" counts: []  1 item 
Schema for errors returned by the API
(root) {}  3 keys$schema: "http://json-schema.org/draft-07/schema#" type: "object" properties: {}  2 keystype: {}  1 keymessage: {}  1 key 
(root) {}  2 keystype: "NotFound" message: "Application was not found"  
Schema for the result of a notebook minute counts request
(root) {}  3 keys$schema: "http://json-schema.org/draft-07/schema#" type: "object" properties: {}  3 keysstart: {}  2 keysend: {}  2 keyscounts: {}  2 keys 
(root) {}  3 keysstart: "1999-05-20T05:00:00.000Z" end: "1999-06-20T04:59:59.999Z" counts: []  1 item 
Schema for a single Organization
(root) {}  3 keys$schema: "http://json-schema.org/draft-07/schema#" type: "object" properties: {}  21 keysid: {}  2 keysorgId: {}  2 keyscreationDate: {}  2 keyslastUpdated: {}  2 keysname: {}  3 keysdescription: {}  2 keysmembers: {}  2 keyslimits: {}  3 keyssummary: {}  2 keysplanId: {}  2 keysbillingEmail: {}  3 keyssubscriptionStatus: {}  2 keyscurrentPeriodStart: {}  2 keyscurrentPeriodEnd: {}  2 keysisEnterprise: {}  1 keyiconColor: {}  2 keyswhitelistedEmailDomains: {}  2 keysdisabledAt: {}  1 keyisReadOnly: {}  1 keymfaMode: {}  2 keysbanner: {}  3 keys 
(root) {}  8 keysid: "575ed6e87ae143cd83dc4aa8" orgId: "575ed6e87ae143cd83dc4aa8" creationDate: "2016-06-13T04:00:00.000Z" lastUpdated: "2016-06-13T04:00:00.000Z" name: "My Organization" description: "My organization description" members: []  2 itemssummary: {}  7 keys 
Organization Invitation Post  
Schema for the body of a request to send an invitation
Organization Invitation Post Schema  
(root) {}  5 keys$schema: "http://json-schema.org/draft-07/schema#" type: "object" properties: {}  5 keysemail: {}  3 keysrole: {}  2 keysapplicationRoles: {}  3 keysdashboardRoles: {}  3 keysdisallowTransfer: {}  1 keyadditionalProperties: false required: []  2 items 
Organization Invitation Post Example  
(root) {}  2 keysemail: "invitedUser@example.com" role: "edit"  
Schema for an array of pending invitations to an Organization
(root) {}  3 keys$schema: "http://json-schema.org/draft-07/schema#" type: "array" items: {}  2 keys 
 
Schema for the body of a request to modify an Organization member
(root) {}  5 keys$schema: "http://json-schema.org/draft-07/schema#" type: "object" properties: {}  4 keysuserId: {}  2 keysrole: {}  2 keysapplicationRoles: {}  3 keysdashboardRoles: {}  3 keysadditionalProperties: false required: []  1 item 
(root) {}  2 keysuserId: "575ef90f7ae143cd83dc4aad" role: "view"  
Schema for the body of an Organization modification request
(root) {}  4 keys$schema: "http://json-schema.org/draft-07/schema#" type: "object" properties: {}  7 keysname: {}  3 keysdescription: {}  2 keysplanId: {}  2 keysbillingEmail: {}  3 keyscardToken: {}  2 keysiconColor: {}  2 keysmfaMode: {}  2 keysadditionalProperties: false  
(root) {}  2 keysname: "My Updated Organization" description: "Description of my updated organization"  
Schema for the result of a payload counts breakdown request
(root) {}  3 keys$schema: "http://json-schema.org/draft-07/schema#" type: "object" properties: {}  3 keysstart: {}  2 keysend: {}  2 keyscounts: {}  2 keys 
(root) {}  3 keysstart: "1999-05-20T05:00:00.000Z" end: "1999-06-20T04:59:59.999Z" counts: []  1 item 
Schema for the result of a payload stats request
(root) {}  3 keys$schema: "http://json-schema.org/draft-07/schema#" type: "object" properties: {}  19 keysappFile: {}  2 keysdataTable: {}  2 keysdeviceCreate: {}  2 keysdeviceCommand: {}  2 keysdeviceConnect: {}  2 keysdeviceDisconnect: {}  2 keysdeviceState: {}  2 keysendpoint: {}  2 keysevent: {}  2 keysflowError: {}  2 keysinboundEmail: {}  2 keysintegration: {}  2 keysmqttIn: {}  2 keysmqttOut: {}  2 keysnotebook: {}  2 keysresourceJob: {}  2 keystimer: {}  2 keysvirtualButton: {}  2 keyswebhook: {}  2 keys 
(root) {}  6 keystimer: {}  1 keydeviceState: {}  2 keysmqttOut: {}  1 keywebhook: {}  1 keydeviceConnect: {}  1 keydeviceDisconnect: {}  1 key 
Schema for the body of a resource transfer request
(root) {}  5 keys$schema: "http://json-schema.org/draft-07/schema#" type: "object" properties: {}  5 keysdestinationId: {}  2 keysdestinationType: {}  2 keysapplicationIds: {}  3 keysdashboardIds: {}  3 keysstrict: {}  1 keyadditionalProperties: false required: []  2 items 
(root) {}  3 keysdestinationId: "575ed6e87ae143cd83dc4aa8" destinationType: "organization" applicationIds: []  1 item 
Schema for reporting a successful operation
(root) {}  3 keys$schema: "http://json-schema.org/draft-07/schema#" type: "object" properties: {}  1 key