Skip to content

REBOTNIX GENAI API

Welcome to the REBOTNIX GENAI API! You can use our API to access REBOTNIX GENAI API endpoints, which can get information on incoming and outgoing calls in our database. The instance works as a proxy with an front-end loader that handles the auth sessions. It is not recommend that you run this instance with public access without the front-end and proxy.

We have language bindings in Shell! You can view code examples in the dark area to the right.

Login

Login

This endpoint lets a user log into the application.

curl \
  --header "Content-Type: application/json"\
  --request POST\
  --data '{"email":"yourAuthSession", "password":"my_password"}'\
  "http://10.8.0.30:8112/checkLogin"

URL Parameters

Parameter Description
email The email of the user, per default it should be root
pasword The corresponding password.

The above command returns JSON structured like this:

{
  "state": true,
  "email":"yourAuthSession",
  "role":"admin",
  "username":"your_user_name",
  "userrights":[]
}

Settings

Set main number

This endpoint sets the telephone number to be receiving and dialing calls. Basically the default number of your phone station.

curl \
  --header "Content-Type: application/json"\
  --request POST\
  --data '{"auth":"yourAuthSession","number":"+4923198222561", "description":"HQ of REBOTNIX"}'\
  "http://10.8.0.30:8112/setNumber"

URL Parameters

Parameter Description
auth The email of the logged-in user.
number The number you want to set, starting e.g. with +49 .
description A description for the number, e.g. Headquarter of REBOTNIX.

The above command returns JSON structured like this:

{ 
  "state":true,
  "errmsg":"Phone details were changed succesfully."
  }

Get main number

curl \
  --header "Content-Type: application/json"\
  --request POST\
  --data '{"auth":"yourAuthSession"}'\
  "http://10.8.0.30:8112/getNumber"

The above command returns JSON structured like this:

{ 
  "number":"+4923198222561",
  "description":"HQ of REBOTNIX",
  "timestamp":unixtimestamp,
  "typ":"main_number"}

This endpoint retrieves the main number of the application.

URL Parameters

Parameter Description
auth The email of the logged-in user.

Set the AI prompt

curl \
  --header "Content-Type: application/json"\
  --request POST\
  --data '{"auth":"yourAuthSession", "text":"You are a friendly chat bot."}'\
  "http://10.8.0.30:8112/setPrompt"

The above command returns JSON structured like this:

{
  "state":true,
  "errmsg":"Prompt was changed succesfully."
}

This endpoint sets the prompt for the artificial intelligence.

URL Parameters

Parameter Description
auth The email of the logged-in user.
text The text of the prompt.

Get the AI prompt

curl \
  --header "Content-Type: application/json"\
  --request POST\
  --data '{"auth":"yourAuthSession", "text":"You are a friendly chat bot."}'\
  "http://10.8.0.30:8112/getPrompt"

The above command returns JSON structured like this:

{
  "state":true,
  "result":
    {
      "prompt": "You are a friendly chat bot.",
      "timestamp": unixtimestamp, 
      "typ":"prompt"
    }
}

This endpoint gets the prompt for the artificial intelligence.

URL Parameters

Parameter Description
auth The email of the logged-in user.

Create a rule

curl \
  --header "Content-Type: application/json"\
  --request POST\
  --data '{"auth":"yourAuthSession", "text":"Hello Lydia, this is an automatic voice memo.", "description":"memo for Lydia.", "typ":"custom_voicemessage", "interactive":0}'\
  "http://10.8.0.30:8112/createRule"

The above command returns JSON structured like this:

{
  "state":true,
  "errmsg":"Your rule was succesfully created."
}

This endpoint creates a new rule for incoming calls, either a custom global voice message or a custom voice message for a specific number.

URL Parameters

Parameter Description
auth The email of the logged-in user.
typ "global_voicemessage" or "custom_voicemessage".
description A description of the rule.
text The text of the rule - basically the text that will be spoken by the AI voice.
number The specific number of the rule - only necessary in "custom_voicemessage".
interactive 0 or 1. In development. Interactive == 1 will be generating a dialouge with the AI.

Get all rules

curl \
  --header "Content-Type: application/json"\
  --request POST\
  --data '{"auth":"yourAuthSession"}'\
  "http://10.8.0.30:8112/getRules"

The above command returns JSON structured like this:

{
  "state":true,
  "result":
  [
    {
      "ruleid": "id of rule",
      "typ": "custom_voicemessage", 
      "number":"+49...",
      "text":"Hello Lydia, this is an automatic voice memo.",
      "description":"memo for Lydia.",
      "interactive":0
    }
    ...
  ]
}

This endpoint gets a list of all rules.

URL Parameters

Parameter Description
auth The email of the logged-in user.

Get a specific rule

curl \
  --header "Content-Type: application/json"\
  --request POST\
  --data '{"auth":"yourAuthSession", "ruleid":"id of rule"}'\
  "http://10.8.0.30:8112/getRule"

The above command returns JSON structured like this:

{
  "state":true,
  "result":
    {
      "ruleid": "id of rule",
      "typ": "custom_voicemessage", 
      "number":"+49...",
      "text":"Hello Lydia, this is an automatic voice memo.",
      "description":"memo for Lydia.",
      "interactive":0,
      "filepath":"/path/to/generated/wav_file"
    }
}

This endpoint gets a specific rule.

URL Parameters

Parameter Description
auth The email of the logged-in user.
ruleid The id of the rule you want to retrieve.

Update a specific rule

curl \
  --header "Content-Type: application/json"\
  --request POST\
  --data '{"auth":"yourAuthSession", "text":"Hello Lydia, this is an automatic voice memo.", "description":"memo for Lydia.", "typ":"custom_voicemessage", "interactive":0}'\
  "http://10.8.0.30:8112/updateRule"

The above command returns JSON structured like this:

{
  "state":true,
  "errmsg":"Your rule was succesfully created."
}

This endpoint updates an existing rule for incoming calls, either a custom global voice message or a custom voice message for a specific number.

URL Parameters

Parameter Description
auth The email of the logged-in user.
typ "global_voicemessage" or "custom_voicemessage".
description A description of the rule.
text The text of the rule - basically the text that will be spoken by the AI voice.
number The specific number of the rule - only necessary in "custom_voicemessage".
interactive 0 or 1. In development. Interactive == 1 will be generating a dialouge with the AI.

Delete a specific rule

curl \
  --header "Content-Type: application/json"\
  --request POST\
  --data '{"auth":"yourAuthSession", "ruleid":"id of rule"}'\
  "http://10.8.0.30:8112/deleteRule"

The above command returns JSON structured like this:

{
  "state":True,
  "errmsg":"The rule was deleted succesfully."}

This endpoint deletes a specific rule.

URL Parameters

Parameter Description
auth The email of the logged-in user.
ruleid The id of the rule you want to delete.

Play a specific rule

curl \
  --header "Content-Type: application/json"\
  --request POST\
  --data '{"auth":"yourAuthSession", "ruleid":"id of rule"}'\
  "http://10.8.0.30:8112/playRule"

The above command returns a file stream of the generated wav file.

This endpoint plays the generated wav file of a specific rule.

URL Parameters

Parameter Description
auth The email of the logged-in user.
ruleid The id of the rule you want to delete.

Calls

Get all calls

curl \
  --header "Content-Type: application/json"\
  --request POST\
  --data '{"auth":"yourAuthSession"}'\
  "http://10.8.0.30:8112/getCalls"

The above command returns JSON structured like this:

{
  "state":true,
  "result":
  [
    {
      "callid": "id of incoming call",
      "status": "transcribed", 
      "starttime": unixtimestamp,
      "end": unixtimestamp,
      "text":"The transcribed text of the call.",
      "filepath":"/path/to/recorded/wav_file",
      "genai":"The response of the GENAI"
    }
    ...
  ]
}

This endpoint gets a list of all calls.

Delete a specific call

curl \
  --header "Content-Type: application/json"\
  --request POST\
  --data '{"auth":"yourAuthSession", "callid":"id of call"}'\
  "http://10.8.0.30:8112/deleteCall"

The above command returns JSON structured like this:

{
  "state":True,
  "errmsg":"The call was deleted succesfully."}

This endpoint deletes a specific call.

URL Parameters

Parameter Description
auth The email of the logged-in user.
callid The id of the call you want to delete.

Play a specific call

curl \
  --header "Content-Type: application/json"\
  --request POST\
  --data '{"auth":"yourAuthSession", "callid":"id of call"}'\
  "http://10.8.0.30:8112/playCall"

The above command returns a file stream of the recorded wav file.

This endpoint plays the recorded wav file of a specific call.

URL Parameters

Parameter Description
auth The email of the logged-in user.
callid The id of the rule you want to delete.