Skip to main content
GET
/
ai-agents
/
agent-builder
/
api-tools
/
{slug}
Get API Tool
curl --request GET \
  --url https://{appid}.api-{region}.cometchat.io/v3/ai-agents/agent-builder/api-tools/{slug} \
  --header 'apikey: <api-key>'
{
  "_id": "myapp_my-api-tool",
  "appId": "my-app-id",
  "slug": "my-api-tool",
  "name": "My API Tool",
  "description": "Calls an external API",
  "icon": "https://example.com/icon.png",
  "endpoint": "https://api.example.com/search",
  "method": "GET",
  "enableBasicAuth": false,
  "headers": "{\"Content-Type\":\"application/json\"}",
  "bodyTemplate": "{\"query\":\"{{query}}\"}",
  "allowAdditionalProperties": false,
  "parameters": [
    {
      "key": "query",
      "type": "string",
      "description": "The search query",
      "required": true
    }
  ],
  "tool": {
    "name": "my-api-tool",
    "description": "Calls an external API",
    "parameters": {
      "type": "object",
      "properties": {},
      "required": []
    }
  },
  "createdAt": 1700000000000,
  "updatedAt": 1700000000000
}

Authorizations

apikey
string
header
required

API Key with fullAccess scope(i.e. Rest API Key from the Dashboard).

Path Parameters

slug
string
required

Response

API tool details

_id
string
Example:

"myapp_my-api-tool"

appId
string
Example:

"my-app-id"

slug
string
Example:

"my-api-tool"

name
string
Example:

"My API Tool"

description
string
Example:

"Calls an external API"

icon
string
Example:

"https://example.com/icon.png"

endpoint
string
Example:

"https://api.example.com/search"

method
string
Example:

"GET"

enableBasicAuth
boolean
Example:

false

headers
string | null
Example:

"{\"Content-Type\":\"application/json\"}"

bodyTemplate
string | null
Example:

"{\"query\":\"{{query}}\"}"

allowAdditionalProperties
boolean
Example:

false

parameters
object[]
tool
object
createdAt
number
Example:

1700000000000

updatedAt
number
Example:

1700000000000