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

# Execute agent capability

POST https://app.kuudo.com/api/auth/capability/execute
Content-Type: application/json

Execute an approved capability using a fresh agent-signed JWT. read_account takes no arguments; read_organization requires the organization_id returned by read_account. A different organization ID returns 404. The connection remains bound to the approving user and selected organization. These capabilities grant no deployment, billing, or credential-management access. See the [AI-agents guide](/guides/ai-agents). Agent Auth JWTs are not API-key exchange tokens.

Reference: https://docs.kuudo.com/api-reference/agent-auth/execute-agent-capability

## Request

### Body (application/json)

This endpoint expects an object.

- `capability` (string, required)
- `arguments` (map from string to any, optional)

## Response

### 200

Protocol response.

- `data` (AgentExecutionResultData, required)

## Errors

### 400 Bad Request Error

Invalid protocol request.

- `error` (string, optional)
- `message` (string, optional)
- `code` (string, optional)

### 401 Unauthorized Error

Missing or invalid protocol JWT.

- `error` (string, optional)
- `message` (string, optional)
- `code` (string, optional)

### 403 Forbidden Error

Capability or connection is not authorized.

- `error` (string, optional)
- `message` (string, optional)
- `code` (string, optional)

### 404 Not Found Error

Agent, capability, or approved organization was not found.

- `error` (string, optional)
- `message` (string, optional)
- `code` (string, optional)

### 429 Too Many Requests Error

Rate limited.

- `error` (string, optional)
- `message` (string, optional)
- `code` (string, optional)

### 503 Service Unavailable Error

Service temporarily unavailable.

- `error` (string, optional)
- `message` (string, optional)
- `code` (string, optional)

## Types

### AgentExecutionResultData

- AgentAccount: AgentAccount
- AgentOrganization: AgentOrganization

### AgentAccount

- `account_id` (string, required)
- `name` (string, required)
- `email` (string, required)
- `organization_id` (string, required)

### AgentOrganization

- `organization_id` (string, required)
- `name` (string, required)
- `slug` (string, required)

## Examples

### readAccount

**Request**

```json
{
  "capability": "read_account"
}
```

**Response**

```json
{
  "data": {
    "account_id": "user_example",
    "email": "you@example.com",
    "name": "Example User",
    "organization_id": "org_example"
  }
}
```

**SDK Code**

```python readAccount
import requests

url = "https://app.kuudo.com/api/auth/capability/execute"

payload = { "capability": "read_account" }
headers = {"Content-Type": "application/json"}

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

print(response.json())
```

```javascript readAccount
const url = 'https://app.kuudo.com/api/auth/capability/execute';
const options = {
  method: 'POST',
  headers: {'Content-Type': 'application/json'},
  body: '{"capability":"read_account"}'
};

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

```go readAccount
package main

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

func main() {

	url := "https://app.kuudo.com/api/auth/capability/execute"

	payload := strings.NewReader("{\n  \"capability\": \"read_account\"\n}")

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

	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 readAccount
require 'uri'
require 'net/http'

url = URI("https://app.kuudo.com/api/auth/capability/execute")

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

request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n  \"capability\": \"read_account\"\n}"

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

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

HttpResponse<String> response = Unirest.post("https://app.kuudo.com/api/auth/capability/execute")
  .header("Content-Type", "application/json")
  .body("{\n  \"capability\": \"read_account\"\n}")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://app.kuudo.com/api/auth/capability/execute', [
  'body' => '{
  "capability": "read_account"
}',
  'headers' => [
    'Content-Type' => 'application/json',
  ],
]);

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

```csharp readAccount
using RestSharp;

var client = new RestClient("https://app.kuudo.com/api/auth/capability/execute");
var request = new RestRequest(Method.POST);
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"capability\": \"read_account\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift readAccount
import Foundation

let headers = ["Content-Type": "application/json"]
let parameters = ["capability": "read_account"] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "https://app.kuudo.com/api/auth/capability/execute")! 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()
```

### readOrganization

**Request**

```json
{
  "capability": "read_organization",
  "arguments": {
    "organization_id": "org_example"
  }
}
```

**Response**

```json
{
  "data": {
    "name": "Example organization",
    "organization_id": "org_example",
    "slug": "example"
  }
}
```

**SDK Code**

```python readOrganization
import requests

url = "https://app.kuudo.com/api/auth/capability/execute"

payload = {
    "capability": "read_organization",
    "arguments": { "organization_id": "org_example" }
}
headers = {"Content-Type": "application/json"}

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

print(response.json())
```

```javascript readOrganization
const url = 'https://app.kuudo.com/api/auth/capability/execute';
const options = {
  method: 'POST',
  headers: {'Content-Type': 'application/json'},
  body: '{"capability":"read_organization","arguments":{"organization_id":"org_example"}}'
};

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

```go readOrganization
package main

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

func main() {

	url := "https://app.kuudo.com/api/auth/capability/execute"

	payload := strings.NewReader("{\n  \"capability\": \"read_organization\",\n  \"arguments\": {\n    \"organization_id\": \"org_example\"\n  }\n}")

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

	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 readOrganization
require 'uri'
require 'net/http'

url = URI("https://app.kuudo.com/api/auth/capability/execute")

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

request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n  \"capability\": \"read_organization\",\n  \"arguments\": {\n    \"organization_id\": \"org_example\"\n  }\n}"

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

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

HttpResponse<String> response = Unirest.post("https://app.kuudo.com/api/auth/capability/execute")
  .header("Content-Type", "application/json")
  .body("{\n  \"capability\": \"read_organization\",\n  \"arguments\": {\n    \"organization_id\": \"org_example\"\n  }\n}")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://app.kuudo.com/api/auth/capability/execute', [
  'body' => '{
  "capability": "read_organization",
  "arguments": {
    "organization_id": "org_example"
  }
}',
  'headers' => [
    'Content-Type' => 'application/json',
  ],
]);

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

```csharp readOrganization
using RestSharp;

var client = new RestClient("https://app.kuudo.com/api/auth/capability/execute");
var request = new RestRequest(Method.POST);
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"capability\": \"read_organization\",\n  \"arguments\": {\n    \"organization_id\": \"org_example\"\n  }\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift readOrganization
import Foundation

let headers = ["Content-Type": "application/json"]
let parameters = [
  "capability": "read_organization",
  "arguments": ["organization_id": "org_example"]
] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "https://app.kuudo.com/api/auth/capability/execute")! 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()
```