Aller au contenu principal

InboxCare v1 Public API (1.0)

Download OpenAPI specification:Download

Contact Golem.ai tech support: [email protected] URL: https://golem.ai/

Introduction

The Inboxcare REST API provides a convenient way to categorize your documents.

  1. The symbolic AI NLU from Golem.ai
  2. The post categorization engine from Golem.ai

These components need a specific configuration to fulfill your business context and requirements. Usually, the configuration is done by Golem.ai.

Once configured, your InboxCare is ready and uniquely identified with an environment ID (envId). You can find it in the url of your environment : /project/projectId/environment/envId/dashboard

Authentication

The Inboxcare API is secured by a set of API Keys.

All API requests must be made over HTTPS and must be authenticated with the API Keys.

Depending on your setup & agreement with Golem.ai:

  • you are managed by Golem.ai: you have been provided with a set of API keys by Golem.ai.

  • you have been granted an access to the Golem.ai console: you can directly manage your API keys in Management >> Access keys. From there u can click on the button "New Access Key" and give it a name. Now you will be given your Secret_token, keep it safe, this is the only time you will be able to see it. After u close this window you can now see the "Id" of your key, this is your APP_ID

Getting started

Analyzing your data flow is a 3-steps process:

  1. upload your email
  2. webhook notification
  3. retrieve the results

1. Uploading

You will need to upload your email or document with the /v4/console/api/environment/{envId}/inboxCare/analyse endpoint.

2. Webhook - push

You can also be notified by InboxCare once a categorisation is done. If configured, InboxCare will POST an HTTP request to a pre-defined URL. To configure it, go to Management >> Webhooks and click on "Create a webhook". When there you will need to insert a few informations :

  • The url of your webhook

  • The type of webhook - (sucess/error) If you want to be notified on success or on error

  • The format of webhook - (inboxcare_v2/inboxcare_light) Use light if you want a more lighter version of response, else use v2

  • An Autorization header if you want your new endpoint to be protected with one (optional)

3. Retrieving the result of your analysis

Once the categorization is done, you can get the formatted result with the /v4/console/api/inboxCare/analysis/{analysisId} endpoint.

API upgrades policy

The following elements should be treated as indicative rather than a comprehensive list of every possible change.

Backwards-compatible changes

Golem.ai considers the following changes to be backwards-compatible:

  • Adding new API resources or methods
  • Adding new optional request parameters
  • Adding new field to existing API responses
  • Changing the fields order in API responses
  • Adding a value to an enum

Backwards-incompatible breaking changes

Golem.ai considers the following changes to be backwards-incompatible:

  • Removing or renaming a service, resource, field, method or enum value
  • Changing the type of a field
  • Changing the URL format

Analysis

Analyse files by batch

Send files to be categorized by batch.

Authorizations:
(APP_IDSecret_token)
path Parameters
envId
required
string

Environment ID

query Parameters
appId
required
string

App ID

Request Body schema: application/json
file[]
string <binary>
name
string

Responses

Request samples

Content type
application/json
{
  • "file[]": "string",
  • "name": "string"
}

Response samples

Content type
application/json
{
  • "batchId": "63e0ec1ad1268"
}

Analyse file

Send an email or document to be categorised.

Authorizations:
(APP_IDSecret_token)
path Parameters
envId
required
string

Environment ID

query Parameters
appId
required
string

App ID

Request Body schema: multipart/form-data

"file" represent an an EML, MSG or PDF file

file
required
string <binary>
inbox
string

Specify the inbox were the file comes from. This will allow an inboxes discriminating filter in your Dashboard

metadata
object

Correct syntax is metadata[key]=value

attachments[]
string <binary>

Responses

Callbacks

Request samples

Content type
multipart/form-data
{
  "file": null
}

Response samples

Content type
application/json
{
  • "jobId": "a1d5a6b3c7f2d3b9a7e17dac0ebc2727"
}

Callback payload samples

Callback
Content type
application/json
{
  • "id": "string",
  • "categories": [
    ],
  • "attachmentCategories": [
    ],
  • "categorization": {
    },
  • "message": {
    },
  • "automatedReply": "string",
  • "draftReply": "string",
  • "extractParams": { },
  • "metadata": { },
  • "filename": "string",
  • "createdAt": "string",
  • "attachments": [
    ]
}

Analyse form

Send splitted fields from an email

Authorizations:
(APP_IDSecret_token)
path Parameters
envId
required
string

Environment ID

query Parameters
appId
required
string

App ID

Request Body schema:
subject
required
string
body
required
string
from
string
to
string
attachments
Array of any
metadata
Array of objects

Correct syntax is metadata[key]=value

cc
string

Responses

Callbacks

Request samples

Content type
{
  "subject": "My subject",
  "body": "My body",
  "from": "[email protected]",
  "to": "[email protected]",
  "attachments": [
    "file1",
    "file2"
  ],
  "metadata": [
    {
      "ticketId": "23"
    }
  ]
}

Response samples

Content type
application/json
{
  • "jobId": "a1d5a6b3c7f2d3b9a7e17dac0ebc2727"
}

Callback payload samples

Callback
Content type
application/json
{
  • "id": "string",
  • "categories": [
    ],
  • "attachmentCategories": [
    ],
  • "categorization": {
    },
  • "message": {
    },
  • "automatedReply": "string",
  • "draftReply": "string",
  • "extractParams": { },
  • "metadata": { },
  • "filename": "string",
  • "createdAt": "string",
  • "attachments": [
    ]
}

Retrieve an analysis

Retrieve the result of a specific categorisation

Authorizations:
(APP_IDSecret_token)
path Parameters
analysisId
required
string

Analysis' Id

query Parameters
appId
required
string

App ID

Responses

Response samples

Content type
application/json
{
  • "id": "5a35e2c8bae983074c67d4692a53123f",
  • "filename": "Mail.eml",
  • "environmentId": 4,
  • "state": "IC - Processed",
  • "inboxCareResult": {
    },
  • "automatedReplyResult": null,
  • "draftReplyResult": null,
  • "queuedDate": "2022-02-22T10:36:43+00:00",
  • "lastModificationDate": "2022-02-22T10:36:46+00:00",
  • "metadata": [ ],
  • "postProcessingLog": "",
  • "categoriesBeforePostProcessing": [
    ],
  • "messageCategories": [
    ],
  • "attachmentsCategories": [ ]
}