> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.lumenia.net/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.lumenia.net/_mcp/server.

# Create organization tool

POST https://app.lumenia.net/api/v1/organizations/{orgId}/tools
Content-Type: application/json

Create a tool in an organization.

Reference: https://docs.lumenia.net/api-reference/tools/create-organization-tool

## Authentication

- `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer <API_KEY>`, where `API_KEY` is your API key.

## Request

### Path parameters

- `orgId` (string, required) — Organization that will own the tool.

### Headers

- `X-Account-Id` (string, required) — Account that owns the organization.

### Body (application/json)

This endpoint expects an object.

- `name` (string, required) — Tool name. 1-64 characters of letters, digits, underscores or hyphens (no spaces). This is the name the assistant uses to call the tool.
- `method` (enum, required) — The HTTP method the tool uses.
  - Allowed values: `GET`, `POST`, `PUT`, `PATCH`, `DELETE`
- `url` (string, required) — The HTTP endpoint the tool calls.
- `description` (string, optional) — Human-readable description of what the tool does.
- `headers` (V1OrganizationsOrgIdToolsPostRequestBodyContentApplicationJsonSchemaHeaders, optional) — HTTP headers to send with the request, JSON-Schema-shaped: a type plus properties keyed by header name, each header being a type and value. Header values are masked when the tool is read back.
- `requestSchema` (V1OrganizationsOrgIdToolsPostRequestBodyContentApplicationJsonSchemaRequestSchema, optional) — JSON Schema of the request payload the tool sends.
- `responseSchema` (V1OrganizationsOrgIdToolsPostRequestBodyContentApplicationJsonSchemaResponseSchema, optional) — JSON Schema of the fields to extract from the tool JSON response.
- `aliases` (list of V1OrganizationsOrgIdToolsPostRequestBodyContentApplicationJsonSchemaAliasesItems, optional) — Named values created from the tool response. Each value is a Liquid template; the response body is available as $ (for example, $.data.id).

## Response

### 201

The created tool.

- `tool` (V1OrganizationsOrgIdToolsPostResponsesContentApplicationJsonSchemaTool, required) — The newly created tool.

## Errors

### 400 Bad Request Error

Invalid tool payload (e.g. missing name/url, bad method, malformed JSON)

- `any`

### 403 Forbidden Error

The API key is missing or invalid, or the X-Account-Id does not belong to the partner.

- `message` (string, optional)

### 404 Not Found Error

No organization with this id belongs to the account (also returned when the id is not a valid uuid).

- `any`

### 500 Internal Server Error

Internal Server Error

- `any`

## Types

### V1OrganizationsOrgIdToolsPostRequestBodyContentApplicationJsonSchemaHeaders

HTTP headers to send with the request, JSON-Schema-shaped: a type plus properties keyed by header name, each header being a type and value. Header values are masked when the tool is read back.

### V1OrganizationsOrgIdToolsPostRequestBodyContentApplicationJsonSchemaRequestSchema

JSON Schema of the request payload the tool sends.

### V1OrganizationsOrgIdToolsPostRequestBodyContentApplicationJsonSchemaResponseSchema

JSON Schema of the fields to extract from the tool JSON response.

### V1OrganizationsOrgIdToolsPostRequestBodyContentApplicationJsonSchemaAliasesItems

- `key` (string, optional) — The new variable name, referenced later in the assistant.
- `value` (string, optional) — A Liquid template evaluated over the tool response.

### V1OrganizationsOrgIdToolsPostResponsesContentApplicationJsonSchemaTool

The newly created tool.

- `id` (string, optional) — The sole identifier for the tool.
- `name` (string, optional) — The tool name the assistant calls it by.
- `description` (string, optional, nullable) — Human-readable description of what the tool does.
- `method` (string, optional) — HTTP method the tool uses to call its endpoint.
- `url` (string, optional) — The endpoint the tool calls.
- `headers` (V1OrganizationsOrgIdToolsPostResponsesContentApplicationJsonSchemaToolHeaders, optional) — HTTP headers sent with the request. Values are masked by default (shown as ••••••); reveal specific ones with the unmask query parameter on GET.
- `requestSchema` (V1OrganizationsOrgIdToolsPostResponsesContentApplicationJsonSchemaToolRequestSchema, optional, nullable) — JSON Schema of the payload the tool sends.
- `responseSchema` (V1OrganizationsOrgIdToolsPostResponsesContentApplicationJsonSchemaToolResponseSchema, optional, nullable) — JSON Schema of the fields to extract from the tool response.
- `aliases` (list of V1OrganizationsOrgIdToolsPostResponsesContentApplicationJsonSchemaToolAliasesItems, optional) — Variable bindings evaluated over the parsed JSON response, where the response body is the $ root (e.g. $.data.id). Each entry maps a variable key to a Liquid template.
- `createdAt` (string, optional) — ISO 8601 timestamp of when the tool was created.
- `updatedAt` (string, optional) — ISO 8601 timestamp of when the tool was last updated.

### V1OrganizationsOrgIdToolsPostResponsesContentApplicationJsonSchemaToolHeaders

HTTP headers sent with the request. Values are masked by default (shown as ••••••); reveal specific ones with the unmask query parameter on GET.

### V1OrganizationsOrgIdToolsPostResponsesContentApplicationJsonSchemaToolRequestSchema

JSON Schema of the payload the tool sends.

### V1OrganizationsOrgIdToolsPostResponsesContentApplicationJsonSchemaToolResponseSchema

JSON Schema of the fields to extract from the tool response.

### V1OrganizationsOrgIdToolsPostResponsesContentApplicationJsonSchemaToolAliasesItems

- `key` (string, optional) — The variable name the bound value is exposed as.
- `value` (string, optional) — Liquid template evaluated over the response body.

## Examples

**Request**

```json
{
  "name": "ask_lumenone",
  "method": "POST",
  "url": "https://app.lumenia.tech/api/v1/vapi/ask_lumenone",
  "description": "Query the knowledge base",
  "headers": {
    "properties": {
      "Authorization": {
        "type": "string",
        "value": "Bearer SECRET"
      }
    },
    "type": "object"
  },
  "requestSchema": {
    "properties": {
      "query": {
        "description": "The caller question",
        "type": "string"
      }
    },
    "required": [
      "query"
    ],
    "type": "object"
  },
  "responseSchema": {
    "properties": {
      "answer": {
        "description": "Answer to read back to the caller",
        "type": "string"
      }
    },
    "required": [
      "answer"
    ],
    "type": "object"
  },
  "aliases": [
    {
      "key": "kb_answer",
      "value": "{{ $.answer }}"
    }
  ]
}
```

**Response**

```json
{
  "tool": {
    "id": "b2c3d4e5-6f70-4a1b-8c2d-3e4f5a6b7c8d",
    "name": "ask_lumenone",
    "description": "Query the knowledge base",
    "method": "POST",
    "url": "https://app.lumenia.tech/api/v1/vapi/ask_lumenone",
    "headers": {
      "properties": {
        "Authorization": {
          "type": "string",
          "value": "••••••"
        }
      },
      "type": "object"
    },
    "requestSchema": {
      "properties": {
        "query": {
          "description": "The caller question",
          "type": "string"
        }
      },
      "required": [
        "query"
      ],
      "type": "object"
    },
    "responseSchema": {
      "properties": {
        "answer": {
          "description": "Answer to read back to the caller",
          "type": "string"
        }
      },
      "required": [
        "answer"
      ],
      "type": "object"
    },
    "aliases": [
      {
        "key": "kb_answer",
        "value": "{{ $.answer }}"
      }
    ],
    "createdAt": "2026-06-15T05:24:00.000Z",
    "updatedAt": "2026-06-15T05:24:00.000Z"
  }
}
```

**SDK Code**

```python Tools_createOrganizationTool_example
import requests

url = "https://app.lumenia.net/api/v1/organizations/orgId/tools"

payload = {
    "name": "ask_lumenone",
    "method": "POST",
    "url": "https://app.lumenia.tech/api/v1/vapi/ask_lumenone",
    "description": "Query the knowledge base",
    "headers": {
        "properties": { "Authorization": {
                "type": "string",
                "value": "Bearer SECRET"
            } },
        "type": "object"
    },
    "requestSchema": {
        "properties": { "query": {
                "description": "The caller question",
                "type": "string"
            } },
        "required": ["query"],
        "type": "object"
    },
    "responseSchema": {
        "properties": { "answer": {
                "description": "Answer to read back to the caller",
                "type": "string"
            } },
        "required": ["answer"],
        "type": "object"
    },
    "aliases": [
        {
            "key": "kb_answer",
            "value": "{{ $.answer }}"
        }
    ]
}
headers = {
    "X-Account-Id": "X-Account-Id",
    "Authorization": "Bearer <API_KEY>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript Tools_createOrganizationTool_example
const url = 'https://app.lumenia.net/api/v1/organizations/orgId/tools';
const options = {
  method: 'POST',
  headers: {
    'X-Account-Id': 'X-Account-Id',
    Authorization: 'Bearer <API_KEY>',
    'Content-Type': 'application/json'
  },
  body: '{"name":"ask_lumenone","method":"POST","url":"https://app.lumenia.tech/api/v1/vapi/ask_lumenone","description":"Query the knowledge base","headers":{"properties":{"Authorization":{"type":"string","value":"Bearer SECRET"}},"type":"object"},"requestSchema":{"properties":{"query":{"description":"The caller question","type":"string"}},"required":["query"],"type":"object"},"responseSchema":{"properties":{"answer":{"description":"Answer to read back to the caller","type":"string"}},"required":["answer"],"type":"object"},"aliases":[{"key":"kb_answer","value":"{{ $.answer }}"}]}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Tools_createOrganizationTool_example
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://app.lumenia.net/api/v1/organizations/orgId/tools"

	payload := strings.NewReader("{\n  \"name\": \"ask_lumenone\",\n  \"method\": \"POST\",\n  \"url\": \"https://app.lumenia.tech/api/v1/vapi/ask_lumenone\",\n  \"description\": \"Query the knowledge base\",\n  \"headers\": {\n    \"properties\": {\n      \"Authorization\": {\n        \"type\": \"string\",\n        \"value\": \"Bearer SECRET\"\n      }\n    },\n    \"type\": \"object\"\n  },\n  \"requestSchema\": {\n    \"properties\": {\n      \"query\": {\n        \"description\": \"The caller question\",\n        \"type\": \"string\"\n      }\n    },\n    \"required\": [\n      \"query\"\n    ],\n    \"type\": \"object\"\n  },\n  \"responseSchema\": {\n    \"properties\": {\n      \"answer\": {\n        \"description\": \"Answer to read back to the caller\",\n        \"type\": \"string\"\n      }\n    },\n    \"required\": [\n      \"answer\"\n    ],\n    \"type\": \"object\"\n  },\n  \"aliases\": [\n    {\n      \"key\": \"kb_answer\",\n      \"value\": \"{{ $.answer }}\"\n    }\n  ]\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("X-Account-Id", "X-Account-Id")
	req.Header.Add("Authorization", "Bearer <API_KEY>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Tools_createOrganizationTool_example
require 'uri'
require 'net/http'

url = URI("https://app.lumenia.net/api/v1/organizations/orgId/tools")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["X-Account-Id"] = 'X-Account-Id'
request["Authorization"] = 'Bearer <API_KEY>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"name\": \"ask_lumenone\",\n  \"method\": \"POST\",\n  \"url\": \"https://app.lumenia.tech/api/v1/vapi/ask_lumenone\",\n  \"description\": \"Query the knowledge base\",\n  \"headers\": {\n    \"properties\": {\n      \"Authorization\": {\n        \"type\": \"string\",\n        \"value\": \"Bearer SECRET\"\n      }\n    },\n    \"type\": \"object\"\n  },\n  \"requestSchema\": {\n    \"properties\": {\n      \"query\": {\n        \"description\": \"The caller question\",\n        \"type\": \"string\"\n      }\n    },\n    \"required\": [\n      \"query\"\n    ],\n    \"type\": \"object\"\n  },\n  \"responseSchema\": {\n    \"properties\": {\n      \"answer\": {\n        \"description\": \"Answer to read back to the caller\",\n        \"type\": \"string\"\n      }\n    },\n    \"required\": [\n      \"answer\"\n    ],\n    \"type\": \"object\"\n  },\n  \"aliases\": [\n    {\n      \"key\": \"kb_answer\",\n      \"value\": \"{{ $.answer }}\"\n    }\n  ]\n}"

response = http.request(request)
puts response.read_body
```

```java Tools_createOrganizationTool_example
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://app.lumenia.net/api/v1/organizations/orgId/tools")
  .header("X-Account-Id", "X-Account-Id")
  .header("Authorization", "Bearer <API_KEY>")
  .header("Content-Type", "application/json")
  .body("{\n  \"name\": \"ask_lumenone\",\n  \"method\": \"POST\",\n  \"url\": \"https://app.lumenia.tech/api/v1/vapi/ask_lumenone\",\n  \"description\": \"Query the knowledge base\",\n  \"headers\": {\n    \"properties\": {\n      \"Authorization\": {\n        \"type\": \"string\",\n        \"value\": \"Bearer SECRET\"\n      }\n    },\n    \"type\": \"object\"\n  },\n  \"requestSchema\": {\n    \"properties\": {\n      \"query\": {\n        \"description\": \"The caller question\",\n        \"type\": \"string\"\n      }\n    },\n    \"required\": [\n      \"query\"\n    ],\n    \"type\": \"object\"\n  },\n  \"responseSchema\": {\n    \"properties\": {\n      \"answer\": {\n        \"description\": \"Answer to read back to the caller\",\n        \"type\": \"string\"\n      }\n    },\n    \"required\": [\n      \"answer\"\n    ],\n    \"type\": \"object\"\n  },\n  \"aliases\": [\n    {\n      \"key\": \"kb_answer\",\n      \"value\": \"{{ $.answer }}\"\n    }\n  ]\n}")
  .asString();
```

```php Tools_createOrganizationTool_example
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://app.lumenia.net/api/v1/organizations/orgId/tools', [
  'body' => '{
  "name": "ask_lumenone",
  "method": "POST",
  "url": "https://app.lumenia.tech/api/v1/vapi/ask_lumenone",
  "description": "Query the knowledge base",
  "headers": {
    "properties": {
      "Authorization": {
        "type": "string",
        "value": "Bearer SECRET"
      }
    },
    "type": "object"
  },
  "requestSchema": {
    "properties": {
      "query": {
        "description": "The caller question",
        "type": "string"
      }
    },
    "required": [
      "query"
    ],
    "type": "object"
  },
  "responseSchema": {
    "properties": {
      "answer": {
        "description": "Answer to read back to the caller",
        "type": "string"
      }
    },
    "required": [
      "answer"
    ],
    "type": "object"
  },
  "aliases": [
    {
      "key": "kb_answer",
      "value": "{{ $.answer }}"
    }
  ]
}',
  'headers' => [
    'Authorization' => 'Bearer <API_KEY>',
    'Content-Type' => 'application/json',
    'X-Account-Id' => 'X-Account-Id',
  ],
]);

echo $response->getBody();
```

```csharp Tools_createOrganizationTool_example
using RestSharp;

var client = new RestClient("https://app.lumenia.net/api/v1/organizations/orgId/tools");
var request = new RestRequest(Method.POST);
request.AddHeader("X-Account-Id", "X-Account-Id");
request.AddHeader("Authorization", "Bearer <API_KEY>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"name\": \"ask_lumenone\",\n  \"method\": \"POST\",\n  \"url\": \"https://app.lumenia.tech/api/v1/vapi/ask_lumenone\",\n  \"description\": \"Query the knowledge base\",\n  \"headers\": {\n    \"properties\": {\n      \"Authorization\": {\n        \"type\": \"string\",\n        \"value\": \"Bearer SECRET\"\n      }\n    },\n    \"type\": \"object\"\n  },\n  \"requestSchema\": {\n    \"properties\": {\n      \"query\": {\n        \"description\": \"The caller question\",\n        \"type\": \"string\"\n      }\n    },\n    \"required\": [\n      \"query\"\n    ],\n    \"type\": \"object\"\n  },\n  \"responseSchema\": {\n    \"properties\": {\n      \"answer\": {\n        \"description\": \"Answer to read back to the caller\",\n        \"type\": \"string\"\n      }\n    },\n    \"required\": [\n      \"answer\"\n    ],\n    \"type\": \"object\"\n  },\n  \"aliases\": [\n    {\n      \"key\": \"kb_answer\",\n      \"value\": \"{{ $.answer }}\"\n    }\n  ]\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Tools_createOrganizationTool_example
import Foundation

let headers = [
  "X-Account-Id": "X-Account-Id",
  "Authorization": "Bearer <API_KEY>",
  "Content-Type": "application/json"
]
let parameters = [
  "name": "ask_lumenone",
  "method": "POST",
  "url": "https://app.lumenia.tech/api/v1/vapi/ask_lumenone",
  "description": "Query the knowledge base",
  "headers": [
    "properties": ["Authorization": [
        "type": "string",
        "value": "Bearer SECRET"
      ]],
    "type": "object"
  ],
  "requestSchema": [
    "properties": ["query": [
        "description": "The caller question",
        "type": "string"
      ]],
    "required": ["query"],
    "type": "object"
  ],
  "responseSchema": [
    "properties": ["answer": [
        "description": "Answer to read back to the caller",
        "type": "string"
      ]],
    "required": ["answer"],
    "type": "object"
  ],
  "aliases": [
    [
      "key": "kb_answer",
      "value": "{{ $.answer }}"
    ]
  ]
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://app.lumenia.net/api/v1/organizations/orgId/tools")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```