> ## 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.

# POST /v1/agent-cards/{cardId}/request

Ask to read a card. What comes back depends on the organization's mode: a one-time handle (`status: approved`) when a human has already allowed the card, or an approval link for a human to open (`status: pending_approval`). Never card details.

` POST /v1/agent-cards/{cardId}/request `

Ask to read a card. What comes back depends on the organization's mode: a one-time
handle (`status: approved`) when a human has already allowed the card, or an approval
link for a human to open (`status: pending_approval`). Never card details.

## Parameters

### ` cardId ` (path, required)

Card ID

- ` value `: type ` string `

### ` X-Run-ID ` (header, optional)

Workflow run recorded on the disclosure for audit

- ` value `: type ` string `

## Request body (required)

Content type: ` application/json `

Request details

- ` value `: type ` unknown `

  - ` oneOf alternative 1 `: type ` object `

  - ` oneOf alternative 2 `: type ` object `

    - Required fields: ` connectorId `

    - ` connectorId `: type ` string ` — ConnectorID names the Airwallex account holding the card. Required: a request that cannot name the account produces a grant nobody can redeem. At most 255 characters, the width of the column that stores it.

      - maxLength: ` 255 `

    - ` purpose `: type ` string ` — Purpose is the headline an approver reads before allowing a card to be read, and the only field shown on that decision — bounded so an agent cannot fill the surface it is judged on.

      - maxLength: ` 64 `

## Responses

### ` 200 ` — OK

Content type: ` application/json `

- ` value `: type ` object `

  - ` code `: type ` integer `

    - example: ` 200 `

  - ` data `: type ` object `

    - ` approvalUrl `: type ` string `

    - ` cardId `: type ` string `

    - ` expiresAt `: type ` string `

    - ` handle `: type ` string `

    - ` requestId `: type ` string `

    - ` status `: type ` string `

  - ` message `: type ` string `

    - example: ` "success" `

  - ` requestId `: type ` string `

    - example: ` "abc-123" `

### ` 400 ` — Bad Request

Content type: ` application/json `

- ` value `: type ` object `

  - ` code `: type ` integer `

  - ` details `: type ` array `

    - ` array item `: type ` unknown `

  - ` message `: type ` string `

  - ` requestId `: type ` string `

### ` 403 ` — Forbidden

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 POST 'https://api.example.com/v1/agent-cards/string/request' \
  -H 'Authorization: Bearer YOUR_API_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{}'
```

### JavaScript

```javascript
const response = await fetch('https://api.example.com/v1/agent-cards/string/request', {
  method: 'POST',
  headers: {
      "Authorization": "Bearer YOUR_API_TOKEN",
      "Content-Type": "application/json"
  },
  body: JSON.stringify({})
});

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

### Python

```python
import requests

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

response = requests.post('https://api.example.com/v1/agent-cards/string/request', headers=headers, json={})
print(response.json())
```

### Go

```go
package main

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

func main() {
	body := strings.NewReader(`{}`)
	req, _ := http.NewRequest("POST", "https://api.example.com/v1/agent-cards/string/request", body)
	req.Header.Set("Authorization", "Bearer YOUR_API_TOKEN")
	req.Header.Set("Content-Type", "application/json")

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