Synuma API Documentation

Getting Started

To start using the Synuma’s API platform you will need an API Key created from within the system by a Client Administrator. The API key will have associated features that determine what the API key can or can not do in the system.

Reference all api documentation here: https://api.synuma.com/swagger

How to Authenticate and Connect using an API Key

Add a header with the name "ApiKey" to each request and set its value to the api key that was generated for you.

Example (cURL):
curl 'https://api.synuma.com/api/companies' \
--header 'ApiKey: [MY_API_KEY]'
            

Authentication When Using Swagger

The Swagger UI makes it easy to use an API Key and try any of the API calls in the system. To apply an API Key to all your requests, just paste it in the "api_key" input field at the top of the page:

Authenticating as an Existing User in Synuma

In the event the ApiKey authorization does not work for your specific situation, you can also authenticate as an existing user by following the steps below:

  1. POST a login request with a valid username and password to to /api/authenticate
    Example (cURL):
    curl 'https://api.synuma.com/api/authenticate' \
    -d '{ email: "jim.smith@test.com", password: "jimrocks1"}' \
    --header 'Content-Type: application/json'
                            
  2. Get currentClientId, securityToken.userId and securityToken.token from the response
    Sample authenticate response:
    {
        "data": {
            "securityToken": {
                "userId": 100,
                "token": "TOKEN1",
                "expirationDate": "2021-05-16T17:45:19.1182006-05:00"
            },
            "isAuthenticated": true,
            "currentClientId": "CLIENTID1",
            "fullName": "Jim Smith",
            "email": "jim.smith@test.com",
            "clients": [
                {
                "clientName": "Test Client 1",
                "clientId": "CLIENTID1"
                },
            ],
            "userId": 100
        },
        "message": null,
        "exceptionDetails": null
    }
                            
  3. Add the following headers to each subsequent API call:
    • ClientId: "currentClientId" from the authenticate response
    • UserId: "securityToken.userId" from the authenticate response
    • SecureToken: "securityToken.token" from the authenticate response
    Example (cURL):
    curl 'https://api.synuma.com/api/companies' \
    --header 'UserId: 1' \
    --header 'SecureToken: TOKEN1' \
    --header 'CLIENTID1'
                            

Below is a snapshot of the request once authenticated in Synuma and where you can extract the values.