Document Categories

Rest API

REST API allows you to programatically transfer information over the internet using a predefined schema. Usermost offers endpoints with specific requirements which perform actions and/or return data. Using this API, you can track your users and their actions.

API endpoint

Access to all the resources available via API is over HTTPS.

Please use the following host to access all resources available via API.

https://api.usermost.com/

Response format

The data must be sent in JSON format.

Date format

All timestamps are returned in the format illustrated below.

yyyy-MM-ddTHH:mm:ssZ
Example: 2013-01-26T07:31+0000

Response container

Each API response will be wrapped in a main container called response. It will have three properties: status, data and message. Status will be either success or error depending upon the server response. messagewill explain the reason of this corresponding status. data will contain the data for the requested resource.

{
     "response": {
          "data": {
               …
          },
          "message": "success",
          "status": "success"
     }
}

User authentication

Usermost API follows Bearer Authentication Scheme for API access.

Each account manager of your Usermost account will have a different API key. Access restrictions for an API key is driven by the access privileges of that account manager. You have to pass this API key in header, as illustrated below.

cURL:

curl -X POST <HOST>/v1/accounts/<YOUR_USERMOST_LICENSE_CODE>/users \
    –header 'Authorization: Bearer <YOUR_API_KEY>' \
    –header 'Content-Type: application/json' \
    –data '{
		"userId": "SinaHamidi",
		"firstName": "Sina",
		"lastName": "Hamidi"
    }'

Errors:

Errors are returned using standard HTTP error code syntax. The response body is always in JSON.

Errors by status code:

CodeDescription
400Invalid resource / parameters
401Invalid auth / access
404Invalid URL

459 reads

Table of Contents

Let’s schedule your personalized demo