Quick start

Integrating Bodyguard Bamboo API into your app or website can begin as soon as you create an account, and requires 2 steps:

  1. Obtain your API key and Channel UID so Bodyguard can authenticate your API requests
  2. Make a test API request to confirm everything is up and running

Step 1: Obtain your API key and Channel UID

As explained in the Core concepts section:

  • Your account is represented as a Company
  • You can create one or more projects
  • Each project is associated to one or more channels
  • Each channel is linked to an API key

From the Dashboard, you can find the API key and Channel UID in the Manage section.

Step 2: Make a test API request

To check that your integration is working correctly, make a test API request using your API Key to create an analysis request.

You must replace $YOUR_API_KEY by your own API key.
You must replace $YOUR_CHANNEL_UID by your own Channel UID.

Using REST

curl --location --request POST 'bamboo.bodyguard.ai/api/analyze' \
--header 'X-Api-Key: $YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data-raw '{
"channelUuid": "$YOUR_CHANNEL_UID",
"contents": [
{
"text": "Einstein is an asshole"
}
]
}'

Bodyguard returns an Analysis object in response of your API request.

{
"data": [
{
"text": "Einstein is an asshole",
"reference": "bodyguard/fc9dec31-695d-47cc-b919-68dd711bd607",
"type": "HATEFUL",
"severity": "VERY_HIGH",
"recommendedAction": "REMOVE",
"meta": {
"directedAt": "SINGLE_PERSON",
"classifications": [
"INSULT"
]
},
"language": "en",
"analyzedAt": "2021-01-14T14:19:41.873Z"
}
]
}

Using GraphQL

Coming soon !

note

Try it !

You also have direct access to our Postman collection

Run in Postman