Digileaper Twin API:s

1. General

The Twin APIs enable integration between Digileaper Twin and other customer applications. The supported APIs are listed in the "APIs" sheet, and new APIs will be added continuously based on customer needs.

API development is prioritized according to customer requirements. If you need a specific module or collection of modules to be published as an API, please notify Digileaper.

As part of a broader development initiative, all application elements will be published as APIs.

2. Navigation and Documentation

To access the available APIs:

1.        Click the APIs tab at the top-right corner, next to the Home tab.

2.      A list of available APIs will appear.

Each API has its own documentation page. For additional information, consult your Administrator or Digileaper.

3. Client, Secret, and Tokens

Authentication

API access is protected by tokens, which are generated using a Client ID and Client Secret specific to each API user. Contact your administrator to obtain these credentials.

Important:

·         The Client ID and Client Secret are sensitive account credentials. Store them securely and ensure a high level of protection when handling them.

Tokens

Tokens are unique authentication credentials that verify the identity of a service accessing an API. They function as a digital key, enabling secure interaction with the API and access to authorized resources.

Security and Usage:

·         Treat tokens as sensitive data and store them securely (e.g., in environment variables or secure vaults).

·         Tokens expire after 1 hour to limit their validity.

·         After expiration, a new token must be generated. For continuous integrations, automated token refresh must be implemented.

4. Examples

For working with API:s, please check (and try) following examples if needed, in this service with API trial capabilities. Basic logic explained here is the same as in your selected integration service or Enterprise Service Bus.

4.1. Generate the Token

  1. In the API list, locate the Token Service API under the Name column — or simply search for it using the search bar.

  2. Click on Token Service API to open its details.

  3. Under the Operations section, select POST – Generate OAuth2 Bearer Token.

  4. The right panel will display operation details.

  5. Click Try this operation. A new panel will slide in from the right.

  6. Go to the Headers tab click on +Add Header

  7. Add a new entry with Key (left box): "Content-Type" and Value (right box): "application/json".

  8. Go to the Body tab and select Raw.

  9. Paste the following JSON and replace it with your actual credentials
    (keep these values strictly confidential):

{"client_id": "<your-client-id>","secret": "<your-secret>" }
  1. Scroll down and click Send.

  2. In the response section, at the bottom, you will find:

"Bearer <token>"

Copy this token (keep it confidential).

Close the panel using the X button at the top right.

4.2. Using the Bearer Token in Other API Calls

  1. Go to any other API and choose the operation you want to execute.

  2. Click Try this operation.

  3. Select + Add Header.

  4. In the header fields:

    • Key: Authorization

    • Value: Paste the Bearer Token you copied earlier.

    • Key: username

    • Value: please enter your Digileaper application email (username)

4.3. Sending Data in Save/Update Operations

For all Save and Update operations:

  1. Go to the Body tab.

  2. Select Raw.

  3. Enter your request payload in JSON format, for example:

[{"firstName": "John","lastName": "Doe","jobTitle": "Software Engineer","contactType": "External","email": "john.doe@example.com","phone": "+919876543210","organisationName": "Digileaper","unitName": "IT","location": "Chennai","employementStatus": "active","note": "marketing agent","startDate": "01-01-2025","endDate": "01-01-2026","deleted": false},{"firstName": "David","lastName": "Doe","jobTitle": "Software Engineer","contactType": "Internal","email": "david.doe@example.com","phone": "+919876543210","organisationName": "Techaffinity","unitName": "IT","location": "Chennai","employementStatus": "active","note": "very important contact","startDate": "01-01-2025","endDate": "01-01-2026","deleted": false} ]

4.4. For List Operations

  • No request body is required.