LogoLogo
  • Introduction
  • Features
  • Getting Started
    • Cortex User Guide
      • Organizations
      • Log in
      • Generate an API key
      • Make your first API request
      • Configure the org settings
      • Set up a data model
        • Create custom objects
        • Add custom properties
      • One-to-many relationships
      • Read and write data
      • Making a Request
      • Handling responses
      • Authentication
      • Two-factor authentication
      • Set third-party cookies
      • Connections
      • Upload files
      • Cortex iOS
      • Get started with Swift
      • Cortex service accounts
      • Cortex developer tools
      • Automated Account Notifications
  • Cortex API
    • Overview
    • Objects
      • Objects Overview
      • Organization
      • Account
      • Connections
      • Notifications
      • Stats
      • Logs
      • Export
      • Events
      • Room
    • Object Definition
      • Object Properties
        • Any
        • Binary
        • Boolean
        • Date
        • Document
        • File
        • Geometry
        • List
        • Number
        • ObjectId
        • Reference
        • String
    • Object Types
    • Access Control
    • Querying
      • Query Operators
      • Property Selection
      • Property Access
    • Aggregating
      • Aggregation Operators
    • Scripting
      • Script Types
      • Script Limits
      • ObjectId
      • CortexObject
        • Accounts
        • Views
      • Cursors
      • Operations
      • Script Modules
        • API Module
        • Base64 Module
        • Cache Module
        • Connections Module
        • Console Module
        • Consts Module
        • Counters Module
        • Crypto Module
        • HTTP Module
        • Logger Module
        • Notifications Module
        • Request Module
        • Response Module
        • SAML Module
        • Schemas Modules
        • Script Module
        • Session Module
        • Util.id Module
        • Util.ip Module
        • Util.paths Module
        • XML Module
        • Developer
        • Config
        • Renderer
        • SFTP
        • FTP
        • DB
          • Cursors
          • Driver
      • Static Methods
        • Accounts
        • Views
        • Cursors
      • Audit
      • Environments
      • HTTP Driver
      • Notifications
        • Firebase Cloud Messaging (FCM)
        • Tencent Push Notification Service Configuration
      • Televisit
      • Transforms
      • Localization
      • Available Javascript Libraries
    • Decorators
      • Runtime
        • Acl
        • As
        • Log
        • Profile
      • Static
        • Env
        • Job
        • Object
        • On
        • Policy
        • Route
        • Transform
        • Trigger
    • Expressions
      • Primer
      • Pipelines
      • Operators
      • Accumulators
      • Variables
      • Conditionals
      • Transforms
      • Triggers
      • On
      • Events
    • Faults
      • Fault Reference
  • Releases
    • Cortex Release Notes
      • Cortex API 2.28.3 (R3.4.6)
      • Cortex API 2.28.1 (R3.4.3)
      • Cortex API 2.27.2 (R3.4.1)
      • Cortex API 2.27.1 (R3.3.5)
      • SQL DB Connector 1.3.4 (R3.3.3)
      • Cortex API 2.26.2 (R3.3.1)
      • Cortex API 2.26.1 (R3.2.2)
      • Cortex API 2.26.0 (R3.2.1)
      • SQL DB Connector 1.3.3
      • Cortex API 2.25.0 (R3.1.1)
      • SQL DB Connector 1.3.2 (R3.1.0)
      • Cortex API 2.24.2 (R3.0.2)
      • SQL DB Connector 1.3.1 (R3.0.0)
      • Cortex API 2.24.1 (R2.3.3)
      • Cortex API 2.24.0 (R2.3.2)
      • SQL DB Connector 1.3.0 (R2.3.0)
      • Cortex API 2.23.0 (R2.2.4)
      • SQL DB Connector 1.2.0 (R2.2.0)
      • Cortex API 2.22.2 (R2.1.2)
      • Cortex API 2.22.1 and SQL DB Connector 1.1.1 (R2.0.1)
      • Cortex API 2.22.0
      • Cortex API 2.21.3
      • Cortex API 2.21.2
      • Cortex Web 4.16.0
      • Cortex Web 4.15.1
      • Cortex API 2.20.1
      • Cortex Web 4.14.0
      • Cortex Renderer 1.3.3
      • Cortex API 2.19.4
      • Cortex API 2.19.3 and Cortex Web 4.13.1
      • Cortex Renderer 1.3.2
      • Cortex API 2.19.1
      • Cortex API 2.18.0
      • Cortex API 2.17.6
      • Cortex API 2.17.5
      • Cortex API 2.17.4
      • Cortex API 2.17.3
      • Cortex API 2.17.2
      • Cortex API 2.17.1
      • Cortex API 2.16.0
      • Cortex API 2.15.9
      • Cortex API 2.15.8-1
      • Cortex 2.15.8
      • Cortex API 2.18.1
      • Cortex API 2.16.1
      • Cortex Renderer 1.3.1
      • Cortex Renderer 1.3.0
      • Cortex Renderer 1.2.2
      • Cortex Renderer 1.2.1
      • Cortex Renderer 1.2.0
    • Third-Party License Attribution

© 2025 Medable, Inc. All rights reserved.

On this page
  • Organization Object Data Model
  • Example Organization Object
  • Read (Public)
  • Read (Full)
  • Update
  • Update

Was this helpful?

  1. Cortex API
  2. Objects

Organization

Represents the Organization itself

All Organization properties requiring Public access are exposed through GET to the public.

Organization Object Data Model

name

data type

description

id

String

The org identifier

access

Number

The current caller’s context access level.

apps

Document

The Org’s configured applications.

code

String

The Org’s code, used to access the api, uniquely identifies the org.

configuration

String

Org configuration settings.

connections

Reference

Connections associated with the Org.

created

Date

The date the context was created

deployment

Document

Org deployment settings

favicon

File

Organization Icon

locale

String

The Org’s default locale setting.

logo

File

The Org logo.

maintenance

Boolean

True if Org is in maintenance mode.

maintenanceMessage

String

The message to show during maintenance mode.

name

String

The Org label.

object

String

The context’s object name.

posts

Reference

A list of posts made in the context of the org.

registration

Document

Org registration settings.

roles

Document

Org’s configured roles

schemasETag

String

Org schemas ETag

security

Document

Org security settings

shared

Boolean

True if there are any active or pending connections for this context.

state

String

The Org state.

support

Document

Support options.

tz

String

Default timezone for the org. This helps determine UTC offset when working in scripts when a user tz is not available. The timezone must by a unique identifier for an IANA assigned zone, e.g. "US/Pacific"

updated

Date

The date the latest update was made to a context’s properties

updater

Reference

The account id of the context updater

website

String

The Org website, available for use as a variable in email templates (org.website).

Example Organization Object

{
    "_id": "5516ee1b34d8d934281699e3",
    "access": 1,
    "code": "example",
    "favicon": {
        "ETag": "31074002db56d2d6fc8fee5b05caee1c",
        "creator": "5516ee2634d8d93428169c0e",
        "location": 4,
        "mime": "image/x-icon",
        "name": "content",
        "path": "/orgs/5516ee1b34d8d934281699e3/favicon/content",
        "size": 15086,
        "state": 2
    },
    "locale": "en_US",
    "logo": {
        "ETag": "594b69d035ac27c2e69ef053082eb6a3",
        "creator": "5516ee2634d8d93428169c0e",
        "facets": [
            {
                "ETag": "5046104d05edf82e2a2c0d72118ca15b",
                "creator": "5516ee2634d8d93428169c0e",
                "height": 241,
                "location": 4,
                "mime": "image/jpeg",
                "name": "thumbnail",
                "path": "/orgs/5516ee1b34d8d934281699e3/logo/thumbnail",
                "size": 16495,
                "state": 2,
                "width": 300
            }
        ],
        "height": 500,
        "location": 4,
        "mime": "image/jpeg",
        "name": "content",
        "path": "/orgs/5516ee1b34d8d934281699e3/logo/content",
        "size": 52586,
        "state": 2,
        "width": 622
    },
    "name": "Example",
    "object": "org",
    "schemasETag": "b7fa703927702d09ada85150f475d88c"
}

Read (Public)

GET https://api.dev.medable.com/{your_org_name}/v2

Path Parameters

Name
Type
Description

your_org_name

string

{org_name}

{
    "_id": "5516ee1b34d8d934281699e3",
    "access": 1,
    "code": "example",
    "favicon": {
        "ETag": "31074002db56d2d6fc8fee5b05caee1c",
        "creator": "5516ee2634d8d93428169c0e",
        "location": 4,
        "mime": "image/x-icon",
        "name": "content",
        "path": "/orgs/5516ee1b34d8d934281699e3/favicon/content",
        "size": 15086,
        "state": 2
    },
    "locale": "en_US",
    "logo": {
        "ETag": "594b69d035ac27c2e69ef053082eb6a3",
        "creator": "5516ee2634d8d93428169c0e",
        "facets": [
            {
                "ETag": "5046104d05edf82e2a2c0d72118ca15b",
                "creator": "5516ee2634d8d93428169c0e",
                "height": 241,
                "location": 4,
                "mime": "image/jpeg",
                "name": "thumbnail",
                "path": "/orgs/5516ee1b34d8d934281699e3/logo/thumbnail",
                "size": 16495,
                "state": 2,
                "width": 300
            }
        ],
        "height": 500,
        "location": 4,
        "mime": "image/jpeg",
        "name": "content",
        "path": "/orgs/5516ee1b34d8d934281699e3/logo/content",
        "size": 52586,
        "state": 2,
        "width": 622
    },
    "name": "Example",
    "object": "org",
    "schemasETag": "b7fa703927702d09ada85150f475d88c"
}
{}
$.ajax({
    url: "https://api.dev.medable.com/example/v2/",
    method: "GET",
    dataType : "json",
    xhrFields: {
        withCredentials: true
    },
    headers: {
        "Medable-Client-Key": "GsAqlhnIMzrDeD8V2MBQWq"
    }
}).done(function(data) {
    // ...
});
[[MDAPIClient sharedClient] getOrgInfoWithCallback:^(MDOrg *org, MDFault *fault)
 {
    // Handle fault or process results
 }];
APIClient.sharedInstance().getPublicOrgInfo(new ObjectFaultCallback<JsonObject>()
{
    @Override
    public void call(JsonObject object, Fault fault)
    {
        // Public org's info in Json format
    }
});

--

Read (Full)

GET https://api.dev.medable.com/{your_org_name}/v2/orgs/org_id

Path Parameters

Name
Type
Description

your_org_name

string

{org_name}

org_id

string

{org_id}

{
    "_id": "5516ee1b34d8d934281699e3",
    "access": 1,
    "code": "example",
    "favicon": {
        "ETag": "31074002db56d2d6fc8fee5b05caee1c",
        "creator": "5516ee2634d8d93428169c0e",
        "location": 4,
        "mime": "image/x-icon",
        "name": "content",
        "path": "/orgs/5516ee1b34d8d934281699e3/favicon/content",
        "size": 15086,
        "state": 2
    },
    "locale": "en_US",
    "logo": {
        "ETag": "594b69d035ac27c2e69ef053082eb6a3",
        "creator": "5516ee2634d8d93428169c0e",
        "facets": [
            {
                "ETag": "5046104d05edf82e2a2c0d72118ca15b",
                "creator": "5516ee2634d8d93428169c0e",
                "height": 241,
                "location": 4,
                "mime": "image/jpeg",
                "name": "thumbnail",
                "path": "/orgs/5516ee1b34d8d934281699e3/logo/thumbnail",
                "size": 16495,
                "state": 2,
                "width": 300
            }
        ],
        "height": 500,
        "location": 4,
        "mime": "image/jpeg",
        "name": "content",
        "path": "/orgs/5516ee1b34d8d934281699e3/logo/content",
        "size": 52586,
        "state": 2,
        "width": 622
    },
    "name": "Example",
    "object": "org",
    "schemasETag": "b7fa703927702d09ada85150f475d88c"
}
{}
$.ajax({
    url: "https://api.dev.medable.com/example/v2/orgs/5516ee1b34d8d934281699e3",
    method: "GET",
    dataType : "json",
    xhrFields: {
        withCredentials: true
    },
    headers: {
        "Medable-Client-Key": "GsAqlhnIMzrDeD8V2MBQWq"
    }
}).done(function(data) {
    // ...
});
[[MDAPIClient sharedClient]
 orgWithId:self.Id
 parameters:parameters
 callback:^(MDOrg* updatedOrg, MDFault *fault)
 {
   if ( [updatedOrg isKindOfClass:[wSelf class]] && fault == nil )
   {
     [wSelf updateWithInstance:updatedOrg];
   }

   if ( callback )
   {
     callback(updatedOrg, fault);
   }
 }];
Org org = APIClient.sharedInstance().getCurrentOrg();

// or:

APIClient.sharedInstance().getOrg(
        new ObjectId("orgId here"),
        null,
        new ObjectFaultCallback<Org>()
        {
            @Override
            public void call(Org org, Fault fault)
            {
                // Handle fault or process results
            }
        }
);

Update

PUT https://api.dev.medable.com/{your_org_name}/v2

The Organization settings can only be updated by an Administrator. Because the Org is public, it is possible to add a custom property to allow those with other roles (or no roles) to update it. To demonstrate, the following property has been added to the Organization in the example request to the right, and all Providers given access to push elements onto the c_4providers array.

Path Parameters

Name
Type
Description

your_org_name

string

{org_name}

org_id

string

{org_id}

{
    "hasMore": false,
    "object": "list",
    "data": [-4, -3, -2, -1, 0, 11, 22, 33, 44, 55]
}
{}
$.ajax({
    url: "https://api.dev.medable.com/example/v2/orgs/5516ee1b34d8d934281699e3/c_4providers",
    method: "PUT",
    dataType : "json",
    xhrFields: {
        withCredentials: true
    },
    headers: {
        "Medable-Client-Key": "GsAqlhnIMzrDeD8V2MBQWq"
    },
    data: [
    -5,
    -4,
    -3,
    -2,
    -1,
    0,
    11,
    22,
    33,
    44,
    55
]
}).done(function(data) {
    // ...
});
NSDictionary *body = @{ @"c_providers": @{ @"data": @[ @(-5), @(-4), @(-3), @(-2), @(-1), @(0), @(11), @(22), @(33), @(44), @(55) ] } };

[[MDAPIClient sharedClient]
 updateOrgWithId:[MDObjectId objectIdWithString:@"5516ee1b34d8d934281699e3"]
 body:body
 callback:^(MDOrg * _Nullable editedObject, MDFault * _Nullable fault)
 {

 }];
Body body = new Body();

JsonObject jsonContent = APIClient.sharedInstance().getGsonParser()
        .parse("{ \"c_providers\": { \"data\": [ -5, -4, -3, -2, -1, 0, 11, 22, 33, 44, 55 ] } }")
        .getAsJsonObject();

FastBodyProperty fastProp = new FastBodyProperty(jsonContent);
body.addProperty(fastProp);

APIClient.sharedInstance().updateOrg(
        new ObjectId("5516ee1b34d8d934281699e3"),
        body,
        new ObjectFaultCallback<Org>()
        {
            @Override
            public void call(Org editedOrg, Fault fault)
            {

            }
        }
);

Update

PATCH https://api.dev.medable.com/{your_org_name}/v2

Path Parameters

Name
Type
Description

your_org_name

string

{org_name}

org_id

string

{org_id}

Request Body

Name
Type
Description

op

string

op

path

string

path

value

string

value

{
    "hasMore": false,
    "object": "list",
    "data": [-4, -3, -2, -1, 0, 11, 22, 33, 44, 55]
}
{}
$.ajax({
    url: "https://api.dev.medable.com/example/v2/orgs/586eb9ef64129a5f3631a0ca",
    method: "PATCH",
    dataType : "json",
    xhrFields: {
        withCredentials: true
    },
    headers: {
        "Medable-Client-Key": "GsAqlhnIMzrDeD8V2MBQWq"
    },
    data: {
          "op": "push",
          "path": "/configuration/email/locationBypass",
          "value": "john@medable.com"
    }
}).done(function(data) {
    // ...
});

Last updated 3 years ago

Was this helpful?