Apps

Registering an app

App registration is a one-time process, and once it’s registered, the app information can be used to register the pushTokens as devices (under contacts), and use the contact mri value to send the push notifications to the app.

Almost all the fields are mandatory. So make sure you provide the information.

High-level request elements

name

String

Specifies the name of the application.

Required. Alphanumeric. Maximum length: 32

Sample: My Awesome Application

description

String

The description of the application for display within Whispir and developers.whispir.com.

Not required. Alphanumeric. No maximum length. Default: ‘’

Sample: App for sending messages to My Awesome App

bundleId

String

The bundle ID of your application.

Required. Alphanumeric. No maximum length. Default: ‘’

Sample: com.pushie.whispir

options.apiKey

string

A unique username tied to this app for usage monitoring purposes.

Not required. Alphanumeric. Generated if not provided

Sample: dfsdfsfds09fds-asdf9dsf-asdf9dfsa

options.clientSecret

string

The password tied to the apiKey and used by this app for usage monitoring purposes.

Not Required. Alphanumeric. Maximum length 64 chars. Can use ‘.’ as a special character.

Sample: dfsdfsfds09fds.lkrt

options.deviceLimit

Numeric

The number of devices that can be registered under a single contact per app.

Not required. Numeric. Default: 3

Sample: 3

options.workspaces

String

The comma separated list of workspace IDs that will make this application usable/visible for messages sent from those workspaces.

Not required. Alphanumeric. No maximum length. Default: ‘’

options.contactDescriptionField

String

The field on the contact profile that should be used to distinguish between contacts with the same name within the user list (mobile applications only).

For example, if you call the /app/users endpoint and receive 3 people named ‘John Smith’, how does a user differentiate between them?

The contactDescriptionField provides a secondary mechanism to display a ‘Role’, ‘JobTitle’ or ‘BusinessUnit’ to help distinguish between similar contacts.

Not required. Alphanumeric. No maximum length. Default: ‘’

Note: It should reference a Whispir Contact Profile Field.

Sample: jobTitle

apns.certificate

String

The APNS Push Notifications certificate that has been downloaded from the iOS developer console.

Single line. Alphanumeric. No maximum length. Default: ‘’

Sample: —–BEGIN CERTIFICATE—–\nMIIGSjCCBTKgAwIBAgIICdjQ9d41eiYwDQYJKoZIhvcNAQELBQAwgZYxCzAJ…..\n—–END CERTIFICATE—–

Important: Ensure that the value is provided in a single line only with the use of ‘\n’ to specify the line breaks just after the BEGIN CERTIFICATE—- and before the —–END CERTIFICATE. If you have .p12, then use any of the valid converter tools to extract the certificate and private key correctly. An incorrect value will lead to failure of app creation.

apns.privateKey

String

The APNS Push Notifications private key from the certificate chain that was downloaded from the iOS developer console.

Single line. Alphanumeric. No maximum length. Default: ‘’

Sample: —–BEGIN PRIVATE KEY—–\nMIIGSjCCBTKgAwIBAgIICdjQ9d41eiYwDQYJKoZIhvcNAQELBQAwgZYxCzAJ…..\n—–END PRIVATE KEY—–

Important: Ensure that the value is provided in a single line only with the use of ‘\n’ to specify the line breaks just after the BEGIN PRIVATE KEY—- and before the —–END PRIVATE KEY. An incorrect value will lead to failure of app creation.

apnsSandbox.certificate

String

The APNS Push Notifications Sandbox certificate that was downloaded from the iOS developer console.

Single line. Alphanumeric. No maximum length. Default: ‘’

Sample: —–BEGIN CERTIFICATE—–\nMIIGSjCCBTKgAwIBAgIICdjQ9d41eiYwDQYJKoZIhvcNAQELBQAwgZYxCzAJ…..\n—–END CERTIFICATE—–

Important: Ensure that the value is provided in a single line only with the use of ‘\n’ to specify the line breaks just after the BEGIN CERTIFICATE—- and before the —–END CERTIFICATE. If you have .p12, then use any of the valid converter tools to extract the certificate, and private key correctly. An incorrect value will lead to failure of app creation.

apnsSandbox.privateKey

String

The APNS Push Notifications Sandbox private key from the certificate chain that was downloaded from the iOS developer console.

Single line. Alphanumeric. No maximum length. Default: ‘’

Sample: —–BEGIN PRIVATE KEY—–\nMIIGSjCCBTKgAwIBAgIICdjQ9d41eiYwDQYJKoZIhvcNAQELBQAwgZYxCzAJ…..\n—–END PRIVATE KEY—–

Important: Ensure that the value is provided in a single line only with the use of ‘\n’ to specify the line breaks just after the BEGIN PRIVATE KEY—- and before the —–END PRIVATE KEY. An incorrect value will lead to failure of app creation.

gcm.gcmProjectId

String

The Project ID from the Google Cloud Messaging Console.

Alphanumeric. No maximum length. Default: ‘’

Sample: My-Sample-Project

gcm.gcmSenderNumber

String

The Sender ID from the Google Cloud Messaging Console.

Numeric. No maximum length. Default: ‘’

Sample: 1000202045211

gcm.gcmApiKey

String

The GCM API key from the Google Cloud Messaging Console.

AlphaNumeric. No maximum length. Default: ‘’

Sample: fcde7ecfdefc6defcfde7faacbd637ca

defaultWorkspaceEnabled

String

Whether or not ‘My Company’ should be supported within this application.

Not required. Boolean. Default: false

Sample: true

managedBySystem

String

Whether or not this application has been automatically created by Whispir (vs created by a user).

Not editable by a user. Generated field.

Sample: N/A

registrationTypes

String

The array of registration types that are supported by this particular application:

  • SELF
  • INVITE

SELF: Used for apps where Whispir is given the push token readily by you. This is the common scenario for almost all apps.

INVITE: Used for apps where Whispir’s Mobile SDK is used, and it captures the push token on app installation, and passes to Whispir for registration of the device.


Do not try to register an APNS, APNS Sandbox or GCM app under a single app. Create separate apps to avoid failed push notifications.

  • JSON
  • XML

{{codeStart}}

POST https://api.<region>.whispir.com/apps?apikey=<your_api_key>

Authorization: Basic am9obi5zbWl0aDpteXBhc3N3b3Jk

x-api-key: your_api_key

Content-Type: application/vnd.whispir.app-v1+json

{

"name": "string",

"description": "string",

"bundleId": "string"

"options": {

"apikey": "string",

"clientSecret": "string",

"deviceLimit": 0,

"workspaces": "string",

"contactDescriptionField": "string"

},

"apns": {

"certificate": "string",

"privateKey": "string"

},

"apnsSandbox": {

"certificate": "string",

"privateKey": "string"

},

"gcm": {

"gcmProjectId": "string",

"gcmSenderNumber": "string",

"gcmApiKey": "string"

},

"defaultWorkspaceEnabled": true,

"managedBySystem" : true,

"registrationTypes": [

"SELF"

]

}

{{codeEnd}}

 

The successful response will be a 201 response with the details of the app created and its associated unique appID. Also, for security reasons, Whispir will NOT show the APNS certificate information at any time post app creation. The API response will only show the certificateDate so that one can use that to update the certificate upon expiry.