NAV
shell ruby

Introduction

The SimpleMDM API exists as a RESTful JSON implementation. It is designed to work over authenticated, HTTPS secured channels. This reference describes the extent of the API functionality available to you.

Since the API is based upon the HTTP protocol, you can directly interact with it using any HTTP client library. We also offer a ruby client library to jumpstart your integration efforts should you be using that particular language.

Authentication

# To authenticate with curl, use the "-u" flag with each request. Be sure to include a trailing ":"

curl https://a.simplemdm.com/api/v1/account \
  -u {API_KEY}:
SimpleMDM.api_key = "{API_KEY}"

You authenticate with the SimpleMDM API by providing your secret API key with each request. The API uses HTTP Basic Authentication to receive your API key. It will look for your API key in the username field. The password field should be left blank.

You can retrieve your API key by signing into your SimpleMDM account, visiting “Settings” and then selecting the “API” tab.

Errors

Example response body

{
    "errors": [
        {
            "title": "object not found"
        }
    ]
}

When the API encounters an error with your request, it will respond with an HTTP status code and a JSON-formatted body with additional details.

Account

Show

curl https://a.simplemdm.com/api/v1/account \
  -u {API_KEY}:

{
  "data": {
      "type": "account",
      "attributes": {
          "name": "SimpleMDM",
          "apple_store_country_code": "US"
      }
  }
}
account = SimpleMDM::Account.instance
 =>
{
  "name" => "SimpleMDM"
}
puts SimpleMDM::Account.instance.name
 => "SimpleMDM"

Retrieve information about your account.

HTTP Request

GET https://a.simplemdm.com/api/v1/account

Update

curl https://a.simplemdm.com/api/v1/account \
  -F _method=PATCH \
  -d apple_store_country_code=AU \
  -u {API_KEY}:

{
  "data": {
      "type": "account",
      "attributes": {
          "name": "SimpleMDM",
          "apple_store_country_code": "AU"
      }
  }
}
Argument Description
name The name of the account.
apple_store_country_code The app store country that SimpleMDM uses for the account.

HTTP Request

PATCH https://a.simplemdm.com/api/v1/account

Apps

An app represents an app in your app catalog. You can manage your app catalog via the API and use app groups to install apps to your devices.

List all

apps = SimpleMDM::App.all
 =>

[
    [0] {
                       "id" => 34,
                     "name" => "Afterlight",
                 "app_type" => "app store",
          "itunes_store_id" => 573116090,
        "bundle_identifier" => "com.simonfilip.AfterGlow"
    },
    [1] {
                       "id" => 63,
                     "name" => "Surf Report",
                 "app_type" => "enterprise",
        "bundle_identifier" => "com.portlandsurfclub.ent.surfreport2.2",
                  "version" => "2.2"
    },
    [2] {
                       "id" => 67,
                     "name" => "Scanner Pro",
                 "app_type" => "custom b2b",
          "itunes_store_id" => 44827291
    }
]
curl https://a.simplemdm.com/api/v1/apps \
  -u {API_KEY}:

{
  "data": [
    {
      "type": "app",
      "id": 34,
      "attributes": {
        "name": "Afterlight",
        "bundle_identifier": "com.simonfilip.AfterGlow",
        "app_type": "app store",
        "itunes_store_id": 573116090
      }
    },
    {
      "type": "app",
      "id": 63,
      "attributes": {
        "name": "Surf Report",
        "bundle_identifier": "com.portlandsurfclub.ent.surfreport2.2",
        "app_type": "enterprise",
        "version": "2.2"
      }
    },
    {
      "type": "app",
      "id": 67,
      "attributes": {
        "name": "Scanner Pro",
        "app_type": "custom b2b",
        "itunes_store_id": 44827291
      }
    }
  ]
}

HTTP Request

GET https://a.simplemdm.com/api/v1/apps

Retrieve one

curl https://a.simplemdm.com/api/v1/apps/34 \
  -u {API_KEY}:

{
  "data": {
    "type": "app",
    "id": 34,
    "attributes": {
      "name": "Afterlight",
      "bundle_identifier": "com.simonfilip.AfterGlow",
      "app_type": "app store",
      "itunes_store_id": 573116090
    }
  }
}
app = SimpleMDM::App.find(34)
 =>
{
                   "id" => 34,
                 "name" => "Afterlight",
             "app_type" => "app store",
      "itunes_store_id" => 573116090,
    "bundle_identifier" => "com.simonfilip.AfterGlow"
}

HTTP Request

GET https://a.simplemdm.com/api/v1/apps/{APP_ID}

Create

curl https://a.simplemdm.com/api/v1/apps \
  -F binary@SurfReport.ipa \
  -u {API_KEY}:

{
  "data": {
    "type": "app",
    "id": 63,
    "attributes": {
      "name": "Surf Report",
      "app_type": "enterprise",
      "version": "2.2",
      "bundle_identifier": "com.portlandsurfclub.ent.surfreport2.2"
    }
  }
}
data = File.open('surfreport2.2.ipa')

app = SimpleMDM::App.new binary: data

app.save
 =>
{
                   "id" => 63,
                 "name" => "Surf Report",
             "app_type" => "enterprise",
    "bundle_identifier" => "com.portlandsurfclub.ent.surfreport2.2",
              "version" => "2.2"
}

You can use this method to add an App Store app, upload an enterprise iOS app, or upload macOS package to your app catalog.

HTTP Request

POST https://a.simplemdm.com/api/v1/apps

One and only one of of app_store_id, bundle_id, or binary must be specified. Name can optionally be specified if binary is specified.

Argument Description
app_store_id The Apple App Store ID of the app to be added. Example: 1090161858.
bundle_id The bundle identifier of the Apple App Store app to be added. Example: com.myCompany.MyApp1
binary The binary file with an ipa or pkg extension. File should be provided as multipart/form-data.
name The name that SimpleMDM will use to reference this app. If left blank, SimpleMDM will automatically set this to the app name specified by the binary.

Update

curl https://a.simplemdm.com/api/v1/apps/63 \
  -F binary@SurfReportUpdated.ipa \
  -F _method=PATCH \
  -u {API_KEY}:

{
  "data": {
    "type": "app",
    "id": 63,
    "attributes": {
      "name": "Surf Report (Updated)",
      "app_type": "enterprise",
      "version": "2.3",
      "bundle_identifier": "com.portlandsurfclub.ent.surfreport2.3"
    }
  }
}
data = File.open('surfreport2.2.ipa')

app = SimpleMDM::App.find(63)

app.binary = data

app.save
 =>
{
                   "id" => 63,
                 "name" => "Surf Report (Updated)",
             "app_type" => "enterprise",
    "bundle_identifier" => "com.portlandsurfclub.ent.surfreport2.3",
              "version" => "2.3"
}

You can use this method to update the binary of an existing app.

HTTP Request

PATCH https://a.simplemdm.com/api/v1/apps/{APP_ID}

Argument Description
binary The enterprise app binary. File should be provided as multipart/form-data. This is currently only available for ipa binaries.
name The name that SimpleMDM will use to reference this app. If left blank, SimpleMDM will automatically set this to the app name specified by the binary.

Delete

curl https://a.simplemdm.com/api/v1/apps/63 \
  -u {API_KEY}: \
  -X DELETE

HTTP/1.1 204 No Content
app = SimpleMDM::App.find(63)
app.delete
 => true

HTTP Request

DELETE https://a.simplemdm.com/api/v1/apps/{APP_ID}

App Groups

An app group is an object that pairs apps with device groups for the purpose of pushing apps to devices.

List all

curl https://a.simplemdm.com/api/v1/app_groups \
  -u {API_KEY}:

{
  "data": [
    {
      "type": "app_group",
      "id": 26,
      "attributes": {
        "name": "SimpleMDM",
        "auto_deploy": true
      },
      "relationships": {
        "apps": {
          "data": [
            {
              "type": "app",
              "id": 49
            }
          ]
        },
        "device_groups": {
          "data": [
            {
              "type": "device_group",
              "id": 37
            }
          ]
        },
        "devices": {
          "data": [
            {
              "type": "device",
              "id": 56
            }
          ]
        }
      }
    },
    {
      "type": "app_group",
      "id": 38,
      "attributes": {
        "name": "Productivity Apps",
        "auto_deploy": false
      },
      "relationships": {
        "apps": {
          "data": [
            {
              "type": "app",
              "id": 63
            },
            {
              "type": "app",
              "id": 67
            }
          ]
        },
        "device_groups": {
          "data": [
            {
              "type": "device_group",
              "id": 37
            },
            {
              "type": "device_group",
              "id": 38
            }
          ]
        },
        "devices": {
          "data": [
            {
              "type": "device",
              "id": 54
            }
          ]
        }
      }
    },

    ...

  ]
}
app_groups = SimpleMDM::AppGroup.all
 =>
[
  [1] {
                    "id" => 26,
                  "name" => "SimpleMDM",
           "auto_deploy" => true,
      "device_group_ids" => [
          [0] 37
      ],
               "app_ids" => [
          [0] 49
      ],
      "device_ids"       => [
      ]
  },
  [2] {
                    "id" => 38,
                  "name" => "Productivity Apps",
           "auto_deploy" => false,
      "device_group_ids" => [
          [0] 37,
          [1] 38
      ],
               "app_ids" => [
          [0] 63,
          [1] 67
      ],
      "device_ids"       => [
      ]
  }
]

HTTP Request

GET https://a.simplemdm.com/api/v1/app_groups

Retrieve one

curl https://a.simplemdm.com/api/v1/app_groups/26 \
  -u {API_KEY}:

{
  "data": {
    "type": "app_group",
    "id": 26,
    "attributes": {
      "name": "SimpleMDM",
      "auto_deploy": true
    },
    "relationships": {
      "apps": {
        "data": [
          {
            "type": "app",
            "id": 49
          },
          {
            "type": "app",
            "id": 67
          }
        ]
      },
      "device_groups": {
        "data": [
          {
            "type": "device_group",
            "id": 37
          },
          {
            "type": "device_group",
            "id": 38
          }
        ]
      },
      "devices": {
        "data": [
          {
            "type": "device",
            "id": 54
          }
        ]
      }
    }
  }
}
app_group = SimpleMDM::AppGroup.find(26)
 =>
{
                  "id" => 26,
                "name" => "SimpleMDM",
         "auto_deploy" => true,
    "device_group_ids" => [
        [0] 37,
        [1] 38
    ],
          "device_ids" => [],
             "app_ids" => [
        [0] 49,
        [1] 67
    ]
}

HTTP Request

GET https://a.simplemdm.com/api/v1/app_groups/{APP_GROUP_ID}

Create

curl https://a.simplemdm.com/api/v1/app_groups \
  -d name="Communication Apps"
  -u {API_KEY}: \
  -X POST

{
  "data": {
    "type": "app_group",
    "id": 43,
    "attributes": {
      "name": "Communication Apps",
      "auto_deploy": true
    },
    "relationships": {
      "apps": {
        "data": []
      },
      "device_groups": {
        "data": []
      },
      "devices": {
        "data": []
      }
    }
  }
}
app_group = SimpleMDM::AppGroup.new name: "Communication Apps"

app_group.save
 =>
{
                  "id" => 43,
                "name" => "Communication Apps",
         "auto_deploy" => true,
    "device_group_ids" => [],
          "device_ids" => [],
             "app_ids" => []
}

HTTP Request

POST https://a.simplemdm.com/api/v1/app_groups

Argument Description
name The name of the app group.
auto_deploy Optional. Whether the apps should be automatically pushed to devices when they join any of the related device groups. Defaults to true.

Update

curl https://a.simplemdm.com/api/v1/app_groups/43 \
  -d auto_deploy=false
  -u {API_KEY}: \
  --request PATCH

HTTP/1.1 204 No Content
app_group = SimpleMDM::AppGroup.find(43)

app_group.auto_deploy = false

app_group.save
 =>
{
                  "id" => 43,
                "name" => "Communication Apps",
         "auto_deploy" => false,
    "device_group_ids" => [],
          "device_ids" => [],
             "app_ids" => []
}

HTTP Request

PATCH https://a.simplemdm.com/api/v1/app_groups/{APP_GROUP_ID}

Argument Description
name The name of the app group.
auto_deploy Optional. Whether the apps should be automatically pushed to devices when they join any of the related device groups. Defaults to true.

Delete

curl https://a.simplemdm.com/api/v1/app_groups/{APP_GROUP_ID} \
  -u {API_KEY}: \
  -X DELETE

HTTP/1.1 204 No Content
app_group = SimpleMDM::AppGroup.find(43)

app_group.destroy
 => true

HTTP Request

DELETE https://a.simplemdm.com/api/v1/app_groups/{APP_GROUP_ID}

Assign app

curl https://a.simplemdm.com/api/v1/app_groups/43/apps/21 \
  -u {API_KEY}: \
  -X POST

HTTP/1.1 204 No Content
app_group = SimpleMDM::AppGroup.find(43)
app       = SimpleMDM::App.find(21)

app_group.add_app(app)
 =>
{
                  "id" => 43,
                "name" => "Communication Apps",
         "auto_deploy" => false,
    "device_group_ids" => [],
          "device_ids" => [],
             "app_ids" => [21]
}

HTTP Request

POST https://a.simplemdm.com/api/v1/app_groups/{APP_GROUP_ID}/apps/{APP_ID}

Unassign app

curl https://a.simplemdm.com/api/v1/app_groups/43/apps/21 \
  -u {API_KEY}: \
  -X DELETE

HTTP/1.1 204 No Content
app_group = SimpleMDM::AppGroup.find(43)
app       = SimpleMDM::App.find(21)

app_group.remove_app(app)
 =>
{
                  "id" => 43,
                "name" => "Communication Apps",
         "auto_deploy" => false,
    "device_group_ids" => [],
          "device_ids" => [],
             "app_ids" => []
}

HTTP Request

DELETE https://a.simplemdm.com/api/v1/app_groups/{APP_GROUP_ID}/apps/{APP_ID}

Assign device group

curl https://a.simplemdm.com/api/v1/app_groups/43/device_groups/87 \
  -u {API_KEY}: \
  -X POST

HTTP/1.1 204 No Content
app_group    = SimpleMDM::AppGroup.find(43)
device_group = SimpleMDM::DeviceGroup.find(87)

app_group.add_device_group(device_group)
 =>
{
                  "id" => 43,
                "name" => "Communication Apps",
         "auto_deploy" => false,
    "device_group_ids" => [87],
          "device_ids" => [],
             "app_ids" => []
}

HTTP Request

POST https://a.simplemdm.com/api/v1/app_groups/{APP_GROUP_ID}/device_groups/{DEVICE_GROUP_ID}

Unassign device group

curl https://a.simplemdm.com/api/v1/app_groups/43/device_groups/87 \
  -u {API_KEY}: \
  -X DELETE

HTTP/1.1 204 No Content
app_group    = SimpleMDM::AppGroup.find(43)
device_group = SimpleMDM::DeviceGroup.find(87)

app_group.remove_device_group(device_group)
 =>
{
                  "id" => 43,
                "name" => "Communication Apps",
         "auto_deploy" => false,
    "device_group_ids" => [],
          "device_ids" => [],
             "app_ids" => []
}

HTTP Request

DELETE https://a.simplemdm.com/api/v1/app_groups/{APP_GROUP_ID}/device_groups/{DEVICE_GROUP_ID}

Assign device

curl https://a.simplemdm.com/api/v1/app_groups/43/devices/87 \
  -u {API_KEY}: \
  -X POST

HTTP/1.1 204 No Content
app_group = SimpleMDM::AppGroup.find(43)
device    = SimpleMDM::Device.find(87)

app_group.add_device(device)
 =>
{
                  "id" => 43,
                "name" => "Communication Apps",
         "auto_deploy" => false,
    "device_group_ids" => [],
          "device_ids" => [87],
             "app_ids" => []
}

HTTP Request

POST https://a.simplemdm.com/api/v1/app_groups/{APP_GROUP_ID}/devices/{DEVICE_ID}

Unassign device

curl https://a.simplemdm.com/api/v1/app_groups/43/device/87 \
  -u {API_KEY}: \
  -X DELETE

HTTP/1.1 204 No Content
app_group = SimpleMDM::AppGroup.find(43)
device    = SimpleMDM::Device.find(87)

app_group.remove_device(device)
 =>
{
                  "id" => 43,
                "name" => "Communication Apps",
         "auto_deploy" => false,
    "device_group_ids" => [],
          "device_ids" => [],
             "app_ids" => []
}

HTTP Request

DELETE https://a.simplemdm.com/api/v1/app_groups/{APP_GROUP_ID}/devices/{DEVICE_ID}

Push apps

Installs associated apps to associated devices.

curl https://a.simplemdm.com/api/v1/app_groups/43/push_apps \
  -u {API_KEY}: \
  -X POST

HTTP/1.1 202 Accepted
app_group = SimpleMDM::AppGroup.find(43)
app_group.push_apps
 => true

HTTP Request

POST https://a.simplemdm.com/api/v1/app_groups/{APP_GROUP_ID}/push_apps

Update apps

Updates associated apps on associated devices.

curl https://a.simplemdm.com/api/v1/app_groups/43/update_apps \
  -u {API_KEY}: \
  -X POST

HTTP/1.1 202 Accepted

HTTP Request

POST https://a.simplemdm.com/api/v1/app_groups/{APP_GROUP_ID}/update_apps

Custom Attributes

List all

curl https://a.simplemdm.com/api/v1/custom_attributes \
  -u {API_KEY}:

{
    "data": [
        {
            "type": "custom_attribute",
            "id": "email_address",
            "attributes": {
                "name": "email_address"
            }
        },
        {
            "type": "custom_attribute",
            "id": "full_name",
            "attributes": {
                "name": "full_name"
            }
        }
    ]
}

Show all custom attributes active in the account.

HTTP Request

GET https://a.simplemdm.com/api/v1/custom_attributes

Create

Define a new custom attribute for the account.

Argument Description
name Required. The name of the custom attribute. This name will be used when referencing the custom attribute throughout the app. Alphanumeric characters and underscores only. Case insensitive.

HTTP Request

POST https://a.simplemdm.com/api/v1/custom_attributes

Delete

Remove a custom attribute from the account. This will also remove all custom attribute values related to the custom attribute.

HTTP Request

DELETE https://a.simplemdm.com/api/v1/custom_attributes/{CUSTOM_ATTRIBUTE_ID}

Get values for device

Show all custom attribute values assigned to a device.

HTTP Request

GET https://a.simplemdm.com/api/v1/devices/{DEVICE_ID}/custom_attribute_values

Set value for device

Set the value of a custom attribute for a device.

Argument Description
value Required. The value to be assigned for the provided device and custom attribute.

HTTP Request

PUT https://a.simplemdm.com/api/v1/devices/{DEVICE_ID}/custom_attribute_values/{CUSTOM_ATTRIBUTE_ID}

Custom Configuration Profiles

List all

curl https://a.simplemdm.com/api/v1/custom_configuration_profiles \
  -u {API_KEY}:

{
    "data": [
        {
            "type": "custom_configuration_profile",
            "id": 293814,
            "attributes": {
                "name": "Munki Configuration"
            },
            "relationships": {
                "device_groups": {
                    "data": [
                        {
                            "type": "device group",
                            "id": 732444
                        }
                    ]
                }
            }
        }
    ]
}

HTTP Request

GET https://a.simplemdm.com/api/v1/custom_configuration_profiles

Create

Argument Description
name Required. A name for the profile.
mobileconfig Required. The mobileconfig file. Send as multipart/form-data.

HTTP Request

POST https://a.simplemdm.com/api/v1/custom_configuration_profiles/

Delete

HTTP Request

DELETE https://a.simplemdm.com/api/v1/custom_configuration_profiles/{PROFILE_ID}

Assign to device group

This action will cause the profile to push to all devices in the assigned device group.

HTTP Request

POST https://a.simplemdm.com/api/v1/custom_configuration_profiles/{PROFILE_ID}/device_groups/{DEVICE_GROUP_ID}

Unassign from device group

This action will cause the profile to be removed from all devices in the assigned device group.

HTTP Request

DELETE https://a.simplemdm.com/api/v1/custom_configuration_profiles/{PROFILE_ID}/device_groups/{DEVICE_GROUP_ID}

Devices

List all

curl https://a.simplemdm.com/api/v1/devices \
  -u {API_KEY}:

{
  "data": [
    {
      "type": "device",
      "id": 121,
      "attributes": {
        "name": "Mike's iPhone",
        "last_seen_at": "2015-10-01T18:38:47.277-07:00",
        "status": "enrolled",
        "device_name": "Mike's iPhone",
        "os_version": "9.0.2",
        "build_version": "13A452",
        "model_name": "iPhone 6",
        "model": "NG4W2LL",
        "product_name": "iPhone7,2",
        "unique_identifier": "4A08359C-1D3A-5D3E-939E-FFA6A561321D",
        "serial_number": "DNFJE9DNG5MG",
        "imei": "35 445506 652132 5",
        "meid": "35404596608032",
        "device_capacity": 55.62955093383789,
        "available_device_capacity": 15.19466781616211,
        "battery_level": "93%",
        "modem_firmware_version": "4.02.00",
        "iccid": "8914 8110 0002 8094 4264",
        "bluetooth_mac": "f0:db:e2:df:e9:11",
        "wifi_mac": "f0:db:e2:df:e9:2f",
        "current_carrier_network": "Verizon",
        "sim_carrier_network": "Verizon",
        "subscriber_carrier_network": "Verizon",
        "carrier_settings_version": "21.1",
        "phone_number": "5035551234",
        "voice_roaming_enabled": true,
        "data_roaming_enabled": false,
        "is_roaming": false,
        "subscriber_mcc": "311",
        "simmnc": "480",
        "current_mcc": "311",
        "current_mnc": "480",
        "hardware_encryption_caps": 3,
        "passcode_present": true,
        "passcode_compliant": true,
        "passcode_compliant_with_profiles": true,
        "subscriber_mnc": "480",
        "simmcc": "311",
        "is_supervised": false,
        "is_device_locator_service_enabled": true,
        "is_do_not_disturb_in_effect": false,
        "personal_hotspot_enabled": true,
        "itunes_store_account_is_active": true,
        "cellular_technology": 3,
        "last_cloud_backup_date": "2015-10-01T15:09:12.000-07:00",
        "is_activation_lock_enabled": true,
        "is_cloud_backup_enabled": true,
        "location_latitude": "75.13421212355",
        "location_longitude": "-14.313565422",
        "location_accuracy": "60",
        "location_updated_at": "2015-10-01T15:09:12.000-07:00"
      },
      "relationships": {
        "device_group": {
          "data": {
            "type": "device_group",
            "id": 37
          }
        }
      }
    },

    ...

  ]
}
devices = SimpleMDM::Device.all
 =>
[
    [0] {
                                       "id" => 121,
                                     "name" => "Mikes's iPhone",
                             "last_seen_at" => "2015-10-01T18:38:47.277-07:00",
                                   "status" => "enrolled",
                              "device_name" => "Mikes's iPhone",
                               "os_version" => "9.0.2",
                            "build_version" => "13A452",
                               "model_name" => "iPhone 6",
                                    "model" => "NG4W2LL",
                             "product_name" => "iPhone7,2",
                            "serial_number" => "DNRNQFJDG5MG",
                                     "imei" => "35 445006 654332 5",
                                     "meid" => "35445012308032",
                          "device_capacity" => 55.62955093383789,
                "available_device_capacity" => 15.19466781616211,
                            "battery_level" => "93%",
                   "modem_firmware_version" => "4.02.00",
                                    "iccid" => "8914 8124 0002 8044 4266",
                            "bluetooth_mac" => "f0:db:e2:df:e9:11",
                                 "wifi_mac" => "f0:db:e2:df:e9:2f",
                  "current_carrier_network" => "Verizon",
                      "sim_carrier_network" => "Verizon",
               "subscriber_carrier_network" => "Verizon",
                 "carrier_settings_version" => "21.1",
                             "phone_number" => "5035551212",
                    "voice_roaming_enabled" => true,
                     "data_roaming_enabled" => false,
                               "is_roaming" => false,
                           "subscriber_mcc" => "311",
                                   "simmnc" => "480",
                              "current_mcc" => "311",
                              "current_mnc" => "480",
                 "hardware_encryption_caps" => 3,
                         "passcode_present" => true,
                       "passcode_compliant" => true,
         "passcode_compliant_with_profiles" => true,
                           "subscriber_mnc" => "480",
                                   "simmcc" => "311",
                            "is_supervised" => false,
        "is_device_locator_service_enabled" => true,
              "is_do_not_disturb_in_effect" => false,
                 "personal_hotspot_enabled" => true,
           "itunes_store_account_is_active" => true,
                      "cellular_technology" => 3,
                   "last_cloud_backup_date" => "2015-10-01T15:09:12.000-07:00",
               "is_activation_lock_enabled" => true,
                  "is_cloud_backup_enabled" => true,
                        "location_latitude" => nil,
                       "location_longitude" => nil,
                        "location_accuracy" => nil,
                      "location_updated_at" => nil,
                          "device_group_id" => 37
    },

    ...

]

HTTP Request

GET https://a.simplemdm.com/api/v1/devices

Retrieve one

curl https://a.simplemdm.com/api/v1/devices/121 \
  -u {API_KEY}:

{
  "data": {
    "type": "device",
    "id": 121,
    "attributes": {
      "name": "Mike's iPhone",
      "last_seen_at": "2015-10-01T18:38:47.277-07:00",
      "status": "enrolled",
      "device_name": "Mike's iPhone",
      "os_version": "9.0.2",
      "build_version": "13A452",
      "model_name": "iPhone 6",
      "model": "NG4W2LL",
      "product_name": "iPhone7,2",
      "serial_number": "DNFJE9DNG5MG",
      "imei": "35 445506 652132 5",
      "meid": "35404596608032",
      "device_capacity": 55.62955093383789,
      "available_device_capacity": 15.19466781616211,
      "battery_level": "93%",
      "modem_firmware_version": "4.02.00",
      "iccid": "8914 8110 0002 8094 4264",
      "bluetooth_mac": "f0:db:e2:df:e9:11",
      "wifi_mac": "f0:db:e2:df:e9:2f",
      "current_carrier_network": "Verizon",
      "sim_carrier_network": "Verizon",
      "subscriber_carrier_network": "Verizon",
      "carrier_settings_version": "21.1",
      "phone_number": "5035551234",
      "voice_roaming_enabled": true,
      "data_roaming_enabled": false,
      "is_roaming": false,
      "subscriber_mcc": "311",
      "simmnc": "480",
      "current_mcc": "311",
      "current_mnc": "480",
      "hardware_encryption_caps": 3,
      "passcode_present": true,
      "passcode_compliant": true,
      "passcode_compliant_with_profiles": true,
      "subscriber_mnc": "480",
      "simmcc": "311",
      "is_supervised": false,
      "is_device_locator_service_enabled": true,
      "is_do_not_disturb_in_effect": false,
      "personal_hotspot_enabled": true,
      "itunes_store_account_is_active": true,
      "cellular_technology": 3,
      "last_cloud_backup_date": "2015-10-01T15:09:12.000-07:00",
      "is_activation_lock_enabled": true,
      "is_cloud_backup_enabled": true,
      "location_latitude": "75.13421212355",
      "location_longitude": "-14.313565422",
      "location_accuracy": "60",
      "location_updated_at": "2015-10-01T15:09:12.000-07:00"
    },
    "relationships": {
      "device_group": {
        "data": {
          "type": "device_group",
          "id": 37
        }
      }
    }
  }
}
device = SimpleMDM::Device.find(121)
 =>
{
                                   "id" => 121,
                                 "name" => "Mikes's iPhone",
                         "last_seen_at" => "2015-10-01T18:38:47.277-07:00",
                               "status" => "enrolled",
                          "device_name" => "Mikes's iPhone",
                           "os_version" => "9.0.2",
                        "build_version" => "13A452",
                           "model_name" => "iPhone 6",
                                "model" => "NG4W2LL",
                         "product_name" => "iPhone7,2",
                        "serial_number" => "DNRNQFJDG5MG",
                                 "imei" => "35 445006 654332 5",
                                 "meid" => "35445012308032",
                      "device_capacity" => 55.62955093383789,
            "available_device_capacity" => 15.19466781616211,
                        "battery_level" => "93%",
               "modem_firmware_version" => "4.02.00",
                                "iccid" => "8914 8124 0002 8044 4266",
                        "bluetooth_mac" => "f0:db:e2:df:e9:11",
                             "wifi_mac" => "f0:db:e2:df:e9:2f",
              "current_carrier_network" => "Verizon",
                  "sim_carrier_network" => "Verizon",
           "subscriber_carrier_network" => "Verizon",
             "carrier_settings_version" => "21.1",
                         "phone_number" => "5035551212",
                "voice_roaming_enabled" => true,
                 "data_roaming_enabled" => false,
                           "is_roaming" => false,
                       "subscriber_mcc" => "311",
                               "simmnc" => "480",
                          "current_mcc" => "311",
                          "current_mnc" => "480",
             "hardware_encryption_caps" => 3,
                     "passcode_present" => true,
                   "passcode_compliant" => true,
     "passcode_compliant_with_profiles" => true,
                       "subscriber_mnc" => "480",
                               "simmcc" => "311",
                        "is_supervised" => false,
    "is_device_locator_service_enabled" => true,
          "is_do_not_disturb_in_effect" => false,
             "personal_hotspot_enabled" => true,
       "itunes_store_account_is_active" => true,
                  "cellular_technology" => 3,
               "last_cloud_backup_date" => "2015-10-01T15:09:12.000-07:00",
           "is_activation_lock_enabled" => true,
              "is_cloud_backup_enabled" => true,
                    "location_latitude" => nil,
                   "location_longitude" => nil,
                    "location_accuracy" => nil,
                  "location_updated_at" => nil,
                      "device_group_id" => 37
}

HTTP Request

GET https://a.simplemdm.com/api/v1/devices/{DEVICE_ID}

Create

curl https://a.simplemdm.com/api/v1/devices/ \
  -d name="Sara's iPad" \
  -d group_id="41" \
  -u {API_KEY}:

{
    "data" => {
                 "type" => "device",
                   "id" => 980190963,
           "attributes" => {
                                         "name" => "Sara's iPad",
                                 "last_seen_at" => nil,
                                       "status" => "awaiting enrollment",
                               "enrollment_url" => "https://a.simplemdm.com/e/?c=63154796",
                                  "device_name" => nil,
                                   "os_version" => nil,
                                "build_version" => nil,
                                   "model_name" => "Unknown",
                                        "model" => nil,
                                 "product_name" => nil,
                            "unique_identifier" => nil,
                                "serial_number" => nil,
                                         "imei" => nil,
                                         "meid" => nil,
                              "device_capacity" => nil,
                    "available_device_capacity" => nil,
                                "battery_level" => nil,
                       "modem_firmware_version" => nil,
                                        "iccid" => nil,
                                "bluetooth_mac" => nil,
                                     "wifi_mac" => nil,
                      "current_carrier_network" => nil,
                          "sim_carrier_network" => nil,
                   "subscriber_carrier_network" => nil,
                     "carrier_settings_version" => nil,
                                 "phone_number" => nil,
                        "voice_roaming_enabled" => nil,
                         "data_roaming_enabled" => nil,
                                   "is_roaming" => nil,
                               "subscriber_mcc" => nil,
                                       "simmnc" => nil,
                                  "current_mcc" => nil,
                                  "current_mnc" => nil,
                     "hardware_encryption_caps" => nil,
                             "passcode_present" => nil,
                           "passcode_compliant" => nil,
             "passcode_compliant_with_profiles" => nil,
                                "is_supervised" => nil,
            "is_device_locator_service_enabled" => nil,
                  "is_do_not_disturb_in_effect" => nil,
                     "personal_hotspot_enabled" => nil,
               "itunes_store_account_is_active" => nil,
                          "cellular_technology" => nil,
                       "last_cloud_backup_date" => nil,
                   "is_activation_lock_enabled" => nil,
                      "is_cloud_backup_enabled" => nil,
                            "location_latitude" => nil,
                           "location_longitude" => nil,
                            "location_accuracy" => nil,
                          "location_updated_at" => nil
        },
        "relationships" => {
            "device_group" => {
                "data" => {
                    "type" => "device_group",
                      "id" => 41
                }
            }
        }
    }
}
device = SimpleMDM::Device.new(name: "Sara's iPad", group_id: 72)

device.save
 =>
{
                                 "name" => "Sara's iPad",
                             "group_id" => 72,
                                   "id" => 193,
                         "last_seen_at" => nil,
                               "status" => "awaiting enrollment",
                       "enrollment_url" => "https://a.simplemdm.com/e/?c=85573724",
                          "device_name" => nil,
                           "os_version" => nil,
                        "build_version" => nil,
                           "model_name" => "Unknown",
                                "model" => nil,
                         "product_name" => nil,
                    "unique_identifier" => nil,
                        "serial_number" => nil,
                                 "imei" => nil,
                                 "meid" => nil,
                      "device_capacity" => nil,
            "available_device_capacity" => nil,
                        "battery_level" => nil,
               "modem_firmware_version" => nil,
                                "iccid" => nil,
                        "bluetooth_mac" => nil,
                             "wifi_mac" => nil,
              "current_carrier_network" => nil,
                  "sim_carrier_network" => nil,
           "subscriber_carrier_network" => nil,
             "carrier_settings_version" => nil,
                         "phone_number" => nil,
                "voice_roaming_enabled" => nil,
                 "data_roaming_enabled" => nil,
                           "is_roaming" => nil,
                       "subscriber_mcc" => nil,
                               "simmnc" => nil,
                          "current_mcc" => nil,
                          "current_mnc" => nil,
             "hardware_encryption_caps" => nil,
                     "passcode_present" => nil,
                   "passcode_compliant" => nil,
     "passcode_compliant_with_profiles" => nil,
                        "is_supervised" => nil,
    "is_device_locator_service_enabled" => nil,
          "is_do_not_disturb_in_effect" => nil,
             "personal_hotspot_enabled" => nil,
       "itunes_store_account_is_active" => nil,
                  "cellular_technology" => nil,
               "last_cloud_backup_date" => nil,
           "is_activation_lock_enabled" => nil,
              "is_cloud_backup_enabled" => nil,
                    "location_latitude" => nil,
                   "location_longitude" => nil,
                    "location_accuracy" => nil,
                  "location_updated_at" => nil
}

Creates a new device object in SimpleMDM. The response body includes an enrollment URL that can be used once to enroll a physical device.

HTTP Request

POST https://a.simplemdm.com/api/v1/devices

Argument Description
name The name the device will show within SimpleMDM.
group_id The device group to assign the device to initially.

Update

curl https://a.simplemdm.com/api/v1/devices/121 \
  -d name="Ashley's iPad" \
  -u {API_KEY}:

{
  "data": {
    "type": "device",
    "id": 121,
    "attributes": {
      "name": "Ashley's iPad",
      "last_seen_at": "2015-10-01T18:38:47.277-07:00",
      "status": "enrolled",
      "device_name": "iPhone",
      "os_version": "9.3.2",
      "build_version": "13A452",
      "model_name": "iPhone 6",
      "model": "NG4W2LL",
      "product_name": "iPhone7,2",
      "serial_number": "DNFJE9DNG5MG",
      "imei": "35 445506 652132 5",
      "meid": "35404596608032",
      "device_capacity": 55.62955093383789,
      "available_device_capacity": 15.19466781616211,
      "battery_level": "93%",
      "modem_firmware_version": "4.02.00",
      "iccid": "8914 8110 0002 8094 4264",
      "bluetooth_mac": "f0:db:e2:df:e9:11",
      "wifi_mac": "f0:db:e2:df:e9:2f",
      "current_carrier_network": "Verizon",
      "sim_carrier_network": "Verizon",
      "subscriber_carrier_network": "Verizon",
      "carrier_settings_version": "21.1",
      "phone_number": "5035551234",
      "voice_roaming_enabled": true,
      "data_roaming_enabled": false,
      "is_roaming": false,
      "subscriber_mcc": "311",
      "simmnc": "480",
      "current_mcc": "311",
      "current_mnc": "480",
      "hardware_encryption_caps": 3,
      "passcode_present": true,
      "passcode_compliant": true,
      "passcode_compliant_with_profiles": true,
      "subscriber_mnc": "480",
      "simmcc": "311",
      "is_supervised": false,
      "is_device_locator_service_enabled": true,
      "is_do_not_disturb_in_effect": false,
      "personal_hotspot_enabled": true,
      "itunes_store_account_is_active": true,
      "cellular_technology": 3,
      "last_cloud_backup_date": "2015-10-01T15:09:12.000-07:00",
      "is_activation_lock_enabled": true,
      "is_cloud_backup_enabled": true,
      "location_latitude": "75.13421212355",
      "location_longitude": "-14.313565422",
      "location_accuracy": "60",
      "location_updated_at": "2015-10-01T15:09:12.000-07:00"
    },
    "relationships": {
      "device_group": {
        "data": {
          "type": "device_group",
          "id": 37
        }
      }
    }
  }
}

Update the name of a device within SimpleMDM

HTTP Request

PATCH https://a.simplemdm.com/api/v1/devices/{DEVICE_ID}

Argument Description
name The name of the device within SimpleMDM.

List installed apps

curl https://a.simplemdm.com/api/v1/devices/121/installed_apps \
  -u {API_KEY}:

{
  "data": [
    {
      "type": "installed_app",
      "id": 578,
      "attributes": {
        "name": "1Password",
        "identifier": "com.agilebits.onepassword-ios",
        "version": "601004",
        "short_version": "6.0.1",
        "bundle_size": 93097984,
        "dynamic_size": 1056768,
        "managed": true,
        "discovered_at": "2015-10-01T18:02:13.611-07:00"
      }
    },
    {
      "type": "installed_app",
      "id": 618,
      "attributes": {
        "name": "Airbnb",
        "identifier": "com.airbnb.app",
        "version": "485",
        "short_version": "15.39",
        "bundle_size": 120823808,
        "dynamic_size": 27934720,
        "managed": false,
        "discovered_at": "2015-10-01T18:02:13.858-07:00"
      }
    },
    {
      "type": "installed_app",
      "id": 587,
      "attributes": {
        "name": "Bandsintown",
        "identifier": "com.bandsintown.bit",
        "version": "160",
        "short_version": "4.13.1",
        "bundle_size": 24756224,
        "dynamic_size": 18677760,
        "managed": false,
        "discovered_at": "2015-10-01T18:02:13.659-07:00"
      }
    },

    ...

  ]
}
installed_apps = SimpleMDM::Device.find(121).installed_apps

[
    [ 0] {
                   "id" => 578,
                 "name" => "1Password",
           "identifier" => "com.agilebits.onepassword-ios",
              "version" => "601004",
        "short_version" => "6.0.1",
          "bundle_size" => 93097984,
         "dynamic_size" => 1056768,
              "managed" => true,
        "discovered_at" => "2015-10-01T18:02:13.611-07:00"
    },
    [ 1] {
                   "id" => 618,
                 "name" => "Airbnb",
           "identifier" => "com.airbnb.app",
              "version" => "485",
        "short_version" => "15.39",
          "bundle_size" => 120823808,
         "dynamic_size" => 27934720,
              "managed" => false,
        "discovered_at" => "2015-10-01T18:02:13.858-07:00"
    },
    [ 2] {
                   "id" => 587,
                 "name" => "Bandsintown",
           "identifier" => "com.bandsintown.bit",
              "version" => "160",
        "short_version" => "4.13.1",
          "bundle_size" => 24756224,
         "dynamic_size" => 18677760,
              "managed" => false,
        "discovered_at" => "2015-10-01T18:02:13.659-07:00"
    },

    ...

]

Returns a listing of the apps installed on a device.

HTTP Request

GET https://a.simplemdm.com/api/v1/devices/{DEVICE_ID}/installed_apps

Push assigned apps

device = SimpleMDM::Device.find(121)
device.push_apps
 => true
curl https://a.simplemdm.com/api/v1/devices/121/push_apps \
  -u {API_KEY}: \
  -X POST

HTTP/1.1 202 Accepted

You can use this method to push all assigned apps to a device that are not already installed.

HTTP Request

POST https://a.simplemdm.com/api/v1/devices/{DEVICE_ID}/push_apps

Restart

curl https://a.simplemdm.com/api/v1/devices/121/restart \
  -u {API_KEY}: \
  -X POST

HTTP/1.1 202 Accepted

This command sends a restart command to the device.

HTTP Request

POST https://a.simplemdm.com/api/v1/devices/{DEVICE_ID}/restart

Shutdown

curl https://a.simplemdm.com/api/v1/devices/121/shutdown \
  -u {API_KEY}: \
  -X POST

HTTP/1.1 202 Accepted

This command sends a shutdown command to the device.

HTTP Request

POST https://a.simplemdm.com/api/v1/devices/{DEVICE_ID}/shutdown

Lock

curl https://a.simplemdm.com/api/v1/devices/121/lock \
  -d message="Please call the number provided" \
  -d phone_number="5035551212" \
  -u {API_KEY}: \
  -X POST

HTTP/1.1 202 Accepted
device = SimpleMDM::Device.find(121)
device.lock message:      "Please call the number provided",
            phone_number: "5035551212"
 => true

You can use this method to lock a device and optionally display a message and phone number. The device can be unlocked with the existing passcode of the device.

HTTP Request

POST https://a.simplemdm.com/api/v1/devices/{DEVICE_ID}/lock

Argument Description
message Optional. The message to display on the lock screen.
phone_number Optional. The phone number to display on the lock screen.
pin Optional. OS X devices only. A 6-digit number that the device will require to be unlocked.

Clear passcode

curl https://a.simplemdm.com/api/v1/devices/121/clear_passcode \
  -u {API_KEY}: \
  -X POST

HTTP/1.1 202 Accepted
device = SimpleMDM::Device.find(121)
device.clear_passcode
 => true

You can use this method to unlock and remove the passcode of a device.

HTTP Request

POST https://a.simplemdm.com/api/v1/devices/{DEVICE_ID}/clear_passcode

Wipe

curl https://a.simplemdm.com/api/v1/devices/121/wipe \
  -u {API_KEY}:
  -X POST

HTTP/1.1 202 Accepted
device = SimpleMDM::Device.find(121)
device.wipe
 => true

You can use this method to erase all content and settings stored on a device. The device will be unenrolled from SimpleMDM and returned to a factory default configuration.

HTTP Request

POST https://a.simplemdm.com/api/v1/devices/{DEVICE_ID}/wipe

Delete

Unenroll a device and remove it from the account.

curl https://a.simplemdm.com/api/v1/devices/121 \
  -u {API_KEY}: \
  -X DELETE

HTTP/1.1 204

HTTP Request

DELETE https://a.simplemdm.com/api/v1/devices/{DEVICE_ID}

Refresh

Request a refresh of the device information and app inventory. SimpleMDM will update the inventory information when the device responds to the request.

This command may return an HTTP 429 Too Many Requests if the API deems the frequency of requests to be excessive.

curl https://a.simplemdm.com/api/v1/devices/121/refresh \
  -u {API_KEY}: \
  -X POST

HTTP/1.1 202

HTTP Request

POST https://a.simplemdm.com/api/v1/devices/{DEVICE_ID}/refresh

Device Groups

A device group represents a collection of devices.

List all

device_groups = SimpleMDM::DeviceGroup.all
 =>
[
    [0] {
          "id" => 37,
        "name" => "Default"
    },
    [1] {
          "id" => 38,
        "name" => "Executives"
    }
]
curl https://a.simplemdm.com/api/v1/device_groups \
  -u {API_KEY}:

{
  "data": [
    {
      "type": "device_group",
      "id": 37,
      "attributes": {
        "name": "Remote Employees"
      }
    },
    {
      "type": "device_group",
      "id": 38,
      "attributes": {
        "name": "Executives"
      }
    }
  ]
}

HTTP Request

GET https://a.simplemdm.com/api/v1/device_groups

Retrieve one

device_group = SimpleMDM::DeviceGroup.find(37)
 =>
{
      "id" => 37,
    "name" => "Default"
}
curl https://a.simplemdm.com/api/v1/device_groups/37 \
  -u {API_KEY}:

{
  "data": {
    "type": "device_group",
    "id": 37,
    "attributes": {
      "name": "Remote Employees"
    }
  }
}

HTTP Request

GET https://a.simplemdm.com/api/v1/device_groups/{DEVICE_GROUP_ID}

Assign device

curl https://a.simplemdm.com/api/v1/device_groups/37/devices/121 \
  -u {API_KEY}: \
  -X POST

HTTP/1.1 204 No Content
device_group = SimpleMDM::DeviceGroup.find(37)
device       = SimpleMDM::Device.find(121)

device_group.add_device(device)
 => true

HTTP Request

POST https://a.simplemdm.com/api/v1/device_groups/{DEVICE_GROUP_ID}/devices/{DEVICE_ID}

Enrollment Invitations

Send Invitation

Send an enrollment invitation to an email address or phone number.

Exactly one of the following arguments is required:

Argument Description
group_id The id of the group to enroll the device to.
device_id The id of a device object the enrolled device should be associated with. This is for one-time use. Device status must be unenrolled or awaiting enrollment.

Additionally, the following arguments are available:

Argument Description
contact Required. An email address or phone number. Prefix international numbers with a +.

HTTP Request

POST https://a.simplemdm.com/api/v1/enrollment_invitations

Installed Apps

Installed apps represent apps that are installed and exist on devices.

List for device

Refer to Device - List installed apps.

Retrieve one

curl https://a.simplemdm.com/api/v1/installed_apps/6632 \
  -u {API_KEY}:

{
    "data": {
        "type": "installed_app",
        "id": 6632,
        "attributes": {
            "name": "Sunset Run",
            "identifier": "com.fuilana.SunsetRun",
            "version": "2.2.1.1",
            "short_version": "2.2.1",
            "bundle_size": 15720448,
            "dynamic_size": 16384,
            "managed": true,
            "discovered_at": "2016-10-12T15:54:16.116-07:00"
        }
    }
}
installed_app = SimpleMDM::InstalledApp.find(6632)
 =>
{
               "id" => 6632,
             "name" => "Sunset Run",
       "identifier" => "com.fuilana.SunsetRun",
          "version" => "2.2.1.1",
    "short_version" => "2.2.1",
      "bundle_size" => 15720448,
     "dynamic_size" => 16384,
          "managed" => true,
    "discovered_at" => "2016-10-12T15:54:16.116-07:00"
}

HTTP Request

GET https://a.simplemdm.com/api/v1/installed_apps/{INSTALLED_APP_ID}

Uninstall installed app

curl https://a.simplemdm.com/api/v1/installed_apps/{INSTALLED_APP_ID} \
  -u {API_KEY}: \
  -X DELETE

HTTP/1.1 202 Accepted
installed_app = SimpleMDM::InstalledApp.find(43)

installed_app.uninstall
 => true

This submits a request to the device to uninstall the specified app. The app must be managed for this request to succeed.

HTTP Request

DELETE https://a.simplemdm.com/api/v1/installed_apps/{INSTALLED_APP_ID}

Managed App Configs

Create, modify, and remove the managed app configuration associated with an app.

Get

Retrieve the managed configs for an app.

curl https://a.simplemdm.com/api/v1/apps/{APP_ID}/managed_configs \
  -u {API_KEY}:

{
    "data": [
        {
            "type": "managed_config",
            "id": 14,
            "attributes": {
                "key": "customer_name",
                "value": "ACME Inc.",
                "value_type": "string"
            }
        },
        {
            "type": "managed_config",
            "id": 32,
            "attributes": {
                "key": "User IDs",
                "value": "1,53,3",
                "value_type": "integer array"
            }
        },
        {
            "type": "managed_config",
            "id": 13,
            "attributes": {
                "key": "Device values",
                "value": "\"$imei\",\"$udid\"",
                "value_type": "string array"
            }
        }
    ]
}

HTTP Request

GET https://a.simplemdm.com/api/v1/apps/{APP_ID}/managed_configs

Create

Argument Description
key Required.
value Valid values are based on the value_type specified. See table below.
value_type The type of the value. See valid options below.

Value Types and Value Formats

Value Type Value Format
boolean 0 or 1
date Timestamp format with timezone. Most standards should parse correctly. Example: 2017-01-01T12:31:15-07:00
float Float value. Example: 0.123
float array Floats separated by commas. Example: 0.123,923.1,42
integer Integer value. Example: 32
integer array Integers separated by commas. Example 1,452,-129
string Example: This is a string
string array Strings in quotes an dseparated by commas. Example: “First string”,“Second string”

Delete

DELETE https://a.simplemdm.com/api/v1/apps/{APP_ID}/managed_configs/{MANAGED_CONFIG_ID}

Push Updates

Push any updates to the managed configurations for an app to all devices. This is not necessary when making managed config changes through the UI. This is necessary after making changes through the API.

POST https://a.simplemdm.com/api/v1/apps/{APP_ID}/managed_configs/push

Push Certificate

Methods related to the Apple Push Notification Certificate utilized by the account.

Show

Show details related to the current push certificate being used.

HTTP Request

GET https://a.simplemdm.com/api/v1/push_certificate

curl https://a.simplemdm.com/api/v1/push_certificate \
  -u {API_KEY}:

{
    "data": {
        "type": "push_certificate",
        "attributes": {
            "apple_id": "devops@example.org",
            "expires_at": "2017-09-21T15:28:34.000+00:00"
        }
    }
}

Update

Upload a new certificate and replace the existing certificate for your account.

HTTP Request

PUT https://a.simplemdm.com/api/v1/push_certificate

Argument Description
file Required. The push certificate as provided by Apple. Send as multipart/form-data.
apple_id Optional. The email address of the apple ID the push certificate was generated with.
curl https://a.simplemdm.com/api/v1/push_certificate/scsr \
  -F file@apns.cert \
  -F apple_id=admin@example.org \
  -u {API_KEY}:

{
    "data": {
        "type": "push_certificate",
        "attributes": {
            "apple_id": "admin@example.org",
            "expires_at": "2020-09-21T15:28:34.000+00:00"
        }
    }
}

Get Signed CSR

Download a signed CSR file. This file is provided to Apple when creating and renewing a push certificate. The API returns a base64 encoded plist for upload to the Apple Push Certificates Portal. The value of the “data” key can be uploaded to Apple as-is.

HTTP Request

GET https://a.simplemdm.com/api/v1/push_certificate/scsr

curl https://a.simplemdm.com/api/v1/push_certificate/scsr \
  -u {API_KEY}:

{
    "data": "VUVRVZ5HSlhkMmRrYlZaNVl6SnNkbUpxTUdsTlV6UjNTV2xDYkdKdFRuWmFS\nMngxV25vd2FWWldVa2RNClZHZHBVSG8wUzFCRFJrVlVNRTVWQ2xkV1FrWkpT\nRUp6WVZoT01FbEdRbFpSYTNoS1VYbEJhVXhUT0haUgpXRUozWWtkVloxRXlP\nWFJaU0ZZd1dsaEpka3d3QmtSa3BwVGxWb2VWWkgKYkRKa01V\nSkVXakJzYjFWclJYWmlhMFpUVGxWNFdWSkdVWGRsYkUxTFdsVTRjbU5FU1RB\nSUlRSM1VWVTFid3BSCmFscDBUVVpz\nUWsxWGFGUlRWMWw2VFcweFlXTlZkRVpVUjFaSlZuazVlVmx0VW5WT01VVTVV\nRkZ2T0V3egpUakJqYld4MVdubzBTMUJET1dzS1lWZE9NRkJuYnpoTU0wSnpZ\nVmhPTUZCbmJ6MEsT\n"
}