SmartApps

Create an app owned by an account with the provided details. If the accountId query param is not provided, the app will be created under the default account of the user making the request.

post/smartapps

Request

Query parameters

accountIdstring uuid

Create the app with the owner being the provided account rather than the default account associated with the user making the request. Note that the user must have appropriate permissions to create apps for the specified account.

Headers

Authorizationstring string required

OAuth token

Request body

appNamestring ^[a-z0-9.-_]{1,250}$ required

A globally unique, developer-defined identifier for an app. It is alpha-numeric, may contain dashes, underscores, periods, and must be less then 250 characters long.

displayNamestring required

A default display name for an app.

descriptionstring required

A default description for an app.

singleInstanceboolean

Inform the installation systems that a particular app can only be installed once within a user's account.

appType'API_ONLY' required

Denotes the type of app. Only API_ONLY is supported.

principalType'LOCATION'

Denotes the principal type to be used with the app. Only the LOCATION principal type is supported.

classificationsAppClassification[] required

An App maybe associated to many classifications. A classification drives how the integration is presented to the user in the SmartThings mobile clients. These classifications include:

  • AUTOMATION - Denotes an integration that should display under the "Automation" tab in mobile clients.
  • SERVICE - Denotes an integration that is classified as a "Service".
  • DEVICE - Denotes an integration that should display under the "Device" tab in mobile clients.
  • CONNECTED_SERVICE - Denotes an integration that should display under the "Connected Services" menu in mobile clients.
  • HIDDEN - Denotes an integration that should not display in mobile clients
  • LABS - Denotes an ingration that should display under the "Labs" menu in the modile clients.

Example request

{
  "iconImage": {
    "url": "https://smart-home-monitor.com/image"
  },
  "oauth": {
    "clientName": "My SmartThings Integration",
    "scope": [
      "r:installedapps",
      "w:installedapps",
      "x:installedapps"
    ],
    "redirectUris": [
      "https://myapp.com/oauth/callback",
      "https://myapp.com/oauthin/callback"
    ],
    "corsDomains": [
      "https://myapp.com"
    ]
  }
}

Response

An app model.

oauthClientIdstring uuid

The OAuth Client ID.

oauthClientSecretstring uuid

The OAuth Client Secret.

Example response

{
  "app": {
    "appName": "security-home-monitor",
    "appId": "c71b0a5b-7dab-41fe-b75f-7cf30246468e",
    "appType": "API_ONLY",
    "displayName": "Security Home Monitor",
    "description": "An integration that leverages all security devices in your home - cameras, motion sensors, etc to provide\nyou with peace of mind and #security.\n",
    "owner": {
      "ownerType": "ACCOUNT",
      "ownerId": "3f178632-79ed-4358-94de-280dbd7c206c"
    },
    "apiOnly": {
      "targetUrl": "https://securityhome.com/smartthings",
      "privacyPolicyUrl": "https://securityhome.com/privacy"
    },
    "createdDate": "2017-05-19T12:39:37Z",
    "lastUpdatedDate": "2017-05-19T12:39:37Z"
  },
  "oauthClientId": "7cd4d474-7b36-4e03-bbdb-4cd4ae45a2be",
  "oauthClientSecret": "9b3fd445-42d6-441b-b386-99ea51e13cb0"
}

Changes