Passer au contenu principal
POST
/
api
/
tools
Créer un outil
curl --request POST \
  --url https://api.example.com/api/tools

Requête

curl -X POST https://app.orova.ai/api/tools \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Check Order Status",
    "type": "http",
    "description": "Use when the caller asks about their order status",
    "workspaceId": "WORKSPACE_ID",
    "config": {
      "method": "GET",
      "url": "https://api.yourcompany.com/orders/{order_id}",
      "headers": {
        "Authorization": "Bearer YOUR_BACKEND_TOKEN"
      }
    },
    "parameters": [
      {
        "name": "order_id",
        "description": "The customer order number",
        "required": true
      }
    ]
  }'

Paramètres

ChampTypeRequisDescription
namestringOuiNom d’affichage de l’outil
typestringOuiType d’outil : http, integration ou transfer
descriptionstringOuiIndique à l’agent quand utiliser cet outil
workspaceIdstringOuiID de l’espace de travail
templateIdstringNonID du modèle d’intégration (pour les outils d’intégration)
configobjectNonConfiguration HTTP : method, url, headers, body
parametersarrayNonParamètres que l’agent extrait de la conversation

Réponse

{
  "_id": "tool_abc123",
  "name": "Check Order Status",
  "type": "http",
  "description": "Use when the caller asks about their order status",
  "workspaceId": "WORKSPACE_ID",
  "config": {
    "method": "GET",
    "url": "https://api.yourcompany.com/orders/{order_id}"
  },
  "createdAt": "2025-01-01T00:00:00.000Z"
}