> ## Documentation Index
> Fetch the complete documentation index at: https://docs.b3os.org/llms.txt
> Use this file to discover all available pages before exploring further.

# GET /v1/actions/{type}

Get an action definition by type

` GET /v1/actions/{type} `

Get an action definition by type

## Parameters

### ` type ` (path, required)

Action type

- ` value `: type ` string `

## Responses

### ` 200 ` — OK

Content type: ` application/json `

- ` value `: type ` object `

  - ` code `: type ` integer `

    - example: ` 0 `

  - ` data `: type ` object `

    - ` category `: type ` string ` — Action category (e.g., "Blockchain", "Social")

    - ` connector `: type ` object ` — nil means no connector required

      - ` accountType `: type ` string ` — Required wallet account type (e.g., "polymarket_deposit_wallet")

      - ` type `: type ` string ` — Required connector type (e.g., "slack")

      - ` walletSupport `: type ` array ` — Wallet account types this action supports (e.g., ["eoa"]). Nil = all types allowed.

        - ` array item `: type ` string `

    - ` connectorOutput `: type ` object ` — Auto-save result as connector

      - ` fieldMapping `: type ` object ` — resultField → connectorDataField

      - ` nameTemplate `: type ` string ` — Display name with {{field}} interpolation (uses result field names, i.e. left side of FieldMapping)

      - ` type `: type ` string ` — Connector type (e.g., "railgun")

    - ` createdBy `: type ` string `

    - ` description `: type ` string `

    - ` directExecutable `: type ` boolean ` — Caddie one-shot direct execution eligibility (B3-4431)

    - ` documentationUrl `: type ` string `

    - ` exampleInput `: type ` unknown ` — Example input for documentation

    - ` exampleOutput `: type ` unknown `

    - ` fundsMovement `: type ` array ` — Opaque pass-through from b3os-actions

      - ` array item `: type ` integer `

    - ` gasChainField `: type ` string ` — Payload field whose value is the gas-paying chain ID (dynamic; consulted when GasChainID is 0). E.g. "srcChainId" for cross-chain actions where the user signs and pays gas on the source chain.

    - ` gasChainId `: type ` integer ` — Chain ID where gas is needed (static)

    - ` logoUrl `: type ` string `

    - ` name `: type ` string `

    - ` operationType `: type ` string ` — "read" or "write", declared by the action; empty means undeclared

    - ` payloadSchema `: type ` object ` — Separate schema for wait-for-trigger config

    - ` platform `: type ` string ` — Platform grouping for integrations page (e.g., "solana")

    - ` requiredTokens `: type ` array ` — Opaque pass-through from b3os-actions

      - ` array item `: type ` integer `

    - ` requiresGas `: type ` boolean ` — Whether action requires gas (blockchain transaction fees)

    - ` resultSchema `: type ` object ` — Separate schema for wait-for-trigger config

    - ` simulationNeedsFork `: type ` boolean ` — Simulate needs a stateful fork; see the proxy's mintSimulationFork

    - ` tags `: type ` array ` — Tags for filtering

      - ` array item `: type ` string `

    - ` test `: type ` object ` — nil means testable (default)

      - ` disabledReason `: type ` string `

      - ` enabled `: type ` boolean `

    - ` type `: type ` string `

    - ` weight `: type ` integer ` — Search ranking weight (nil = default 50)

  - ` message `: type ` string `

    - example: ` "successfully" `

  - ` requestId `: type ` string `

    - example: ` "abc-123" `

### ` 404 ` — Not Found

Content type: ` application/json `

- ` value `: type ` object `

  - ` code `: type ` integer `

  - ` details `: type ` array `

    - ` array item `: type ` unknown `

  - ` message `: type ` string `

  - ` requestId `: type ` string `

## Request examples

### cURL

```curl
curl -X GET 'https://api.example.com/v1/actions/string' \
  -H 'Authorization: Bearer YOUR_API_TOKEN'
```

### JavaScript

```javascript
const response = await fetch('https://api.example.com/v1/actions/string', {
  method: 'GET',
  headers: {
      "Authorization": "Bearer YOUR_API_TOKEN"
  }
});

const data = await response.json();
console.log(data);
```

### Python

```python
import requests

headers = {
    'Authorization': 'Bearer YOUR_API_TOKEN'
}

response = requests.get('https://api.example.com/v1/actions/string', headers=headers)
print(response.json())
```

### Go

```go
package main

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

func main() {
	req, _ := http.NewRequest("GET", "https://api.example.com/v1/actions/string", nil)
	req.Header.Set("Authorization", "Bearer YOUR_API_TOKEN")

	resp, _ := http.DefaultClient.Do(req)
	defer resp.Body.Close()
	result, _ := io.ReadAll(resp.Body)
	fmt.Println(string(result))
}
```