Instance Organization Actions  
https:// api.losant.com/instances/INSTANCE_ID /orgs/ORG_ID
Below are the various requests that can be performed against the
Instance Organization resource, as well as the expected
parameters and the potential responses.
Deletes an organization
DELETE https:// api.losant.com/instances/INSTANCE_ID /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.Instance, all.User, instanceOrg.*, or instanceOrg.delete.
Path Component Description Example INSTANCE_ID ID associated with the instance 575ec8687ae143cd83dc4a97 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/instances/INSTANCE_ID/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 instance or organization was not found 
Returns device counts by day for the time range specified for this organization
GET https:// api.losant.com/instances/INSTANCE_ID /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.Instance, all.Instance.read, all.User, all.User.read, instanceOrg.*, or instanceOrg.deviceCounts.
Path Component Description Example INSTANCE_ID ID associated with the instance 575ec8687ae143cd83dc4a97 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) 0 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/instances/INSTANCE_ID/orgs/ORG_ID/deviceCounts  
Code Type Description 400 Error Error if malformed request 404 Error Error if instance or organization was not found 
Retrieves information on an organization
GET https:// api.losant.com/instances/INSTANCE_ID /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.Instance, all.Instance.read, all.User, all.User.read, instanceOrg.*, or instanceOrg.get.
Path Component Description Example INSTANCE_ID ID associated with the instance 575ec8687ae143cd83dc4a97 ORG_ID ID associated with the organization 575ed6e87ae143cd83dc4aa8 
Name Required Description Default Example summaryInclude 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/instances/INSTANCE_ID/orgs/ORG_ID  
Code Type Description 400 Error Error if malformed request 404 Error Error if instance or organization was not found 
Returns notebook execution usage by day for the time range specified for this organization
GET https:// api.losant.com/instances/INSTANCE_ID /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.Instance, all.Instance.read, all.User, all.User.read, instanceOrg.*, or instanceOrg.notebookMinuteCounts.
Path Component Description Example INSTANCE_ID ID associated with the instance 575ec8687ae143cd83dc4a97 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/instances/INSTANCE_ID/orgs/ORG_ID/notebookMinuteCounts  
Code Type Description 400 Error Error if malformed request 404 Error Error if instance or organization was not found 
Updates information about an organization
PATCH https:// api.losant.com/instances/INSTANCE_ID /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.Instance, all.User, instanceOrg.*, or instanceOrg.patch.
Path Component Description Example INSTANCE_ID ID associated with the instance 575ec8687ae143cd83dc4a97 ORG_ID ID associated with the organization 575ed6e87ae143cd83dc4aa8 
Name Required Description Default Example summaryInclude 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 Instance Owned Organization Patch  schema. For example, the following would be a
valid body for this request:
{    "name" :   "My Org" ,    "limits" :   {      "member" :   500    } ,    "auditLogEnabled" :   true }  
curl   -H   'Content-Type: application/json'   \      -H   'Accept: application/json'   \      -H   'Authorization: Bearer YOUR_API_ACCESS_TOKEN'   \      -X  PATCH  \      -d   '{"name":"My Org","limits":{"member":500},"auditLogEnabled":true}'   \     https://api.losant.com/instances/INSTANCE_ID/orgs/ORG_ID  
Code Type Description 400 Error Error if malformed request 404 Error Error if instance or organization was not found 
Returns payload counts for the time range specified for all applications this organization owns
GET https:// api.losant.com/instances/INSTANCE_ID /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.Instance, all.Instance.read, all.User, all.User.read, instanceOrg.*, or instanceOrg.payloadCounts.
Path Component Description Example INSTANCE_ID ID associated with the instance 575ec8687ae143cd83dc4a97 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/instances/INSTANCE_ID/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 instance or 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/instances/INSTANCE_ID /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.Instance, all.Instance.read, all.User, all.User.read, instanceOrg.*, or instanceOrg.payloadCountsBreakdown.
Path Component Description Example INSTANCE_ID ID associated with the instance 575ec8687ae143cd83dc4a97 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/instances/INSTANCE_ID/orgs/ORG_ID/payloadCountsBreakdown  
Code Type Description 400 Error Error if malformed request 404 Error Error if instance or 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 body of an Organization owned by an instance
(root) {}  5 keys$schema: "http://json-schema.org/draft-07/schema#" type: "object" properties: {}  25 keyscreationDate: {}  2 keyslastUpdated: {}  2 keysname: {}  3 keysid: {}  2 keysorgId: {}  2 keysinstanceId: {}  2 keysdescription: {}  2 keysiconColor: {}  2 keyslimits: {}  3 keyssummary: {}  2 keyswhitelistedEmailDomains: {}  2 keysauditLogEnabled: {}  1 keydisabledAt: {}  1 keyisReadOnly: {}  1 keytags: {}  3 keysreferralId: {}  2 keysmfaMode: {}  2 keysbanner: {}  3 keysplanId: {}  2 keyscustomerId: {}  2 keyssubscriptionId: {}  2 keysbillingEmail: {}  3 keyssubscriptionStatus: {}  2 keyscurrentPeriodStart: {}  2 keyscurrentPeriodEnd: {}  2 keysadditionalProperties: false required: []  1 item 
(root) {}  19 keyscreationDate: "2022-10-26T19:27:42.736Z" lastUpdated: "2024-10-24T17:04:32.009Z" name: "My Org" id: "60106426dc03c6aad06540bb" orgId: "60106426dc03c6aad06540bb" instanceId: "60106426dc03c6aad06560ba" description: "My Org Description" iconColor: "#057180" limits: {}  34 keyssummary: {}  28 keyswhitelistedEmailDomains: []  0 itemsauditLogEnabled: false disabledAt: false isReadOnly: false tags: []  1 itemmfaMode: "notRequired" banner: {}  2 keyscurrentPeriodStart: "2023-01-01T00:00:00.000Z" currentPeriodEnd: "2023-01-31T11:59:59.999Z"  
Schema for the body of an Organization modification request within an instance
(root) {}  4 keys$schema: "http://json-schema.org/draft-07/schema#" type: "object" properties: {}  12 keysname: {}  3 keysdescription: {}  2 keysiconColor: {}  2 keyslimits: {}  3 keyswhitelistedEmailDomains: {}  2 keysauditLogEnabled: {}  1 keydisabledAt: {}  1 keyisReadOnly: {}  1 keytags: {}  3 keysreferralId: {}  2 keysmfaMode: {}  2 keysbanner: {}  3 keysadditionalProperties: false  
(root) {}  3 keysname: "My Org" limits: {}  1 keyauditLogEnabled: true  
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 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 reporting a successful operation
(root) {}  3 keys$schema: "http://json-schema.org/draft-07/schema#" type: "object" properties: {}  1 key