---
title: "Start a delegated approval connection"
method: POST
path: "/api/tools/start_agent_connection"
tags: ["Agent Approval"]
---

# Start a delegated approval connection

`POST /api/tools/start_agent_connection`

## Request

- Base URL: `https://spoonjoy.app`
- URL: `https://spoonjoy.app/api/tools/start_agent_connection`
- Auth: none required

## Request body

- AgentStartRequest
  - `agentName` string
  - `scopes` string

## Response `200`

Delegated connection started

- AgentStartEnvelope
  - `ok` unknown, required
  - `data` AgentStartData, required
    - `deviceCode` string, required
    - `userCode` string, required
    - `authorizationUrl` string, uri, required
    - `verificationUri` string, uri, required
    - `verificationUriComplete` string, uri, required
    - `expiresAt` string, date-time, required
    - `expiresIn` 600, required
    - `interval` 2, required
    - `message` string, required

## Other responses

- `400`: Tool error
- `429`: Rate limited. This is the generic Spoonjoy rate-limit shape, not a standard OAuth error.

---

[API](https://skmtc.dev/spoonjoy/apis/spoonjoy-api.md) · [All operations](https://skmtc.dev/spoonjoy/apis/spoonjoy-api/llms.txt) · [OpenAPI document](https://skmtc.dev/spoonjoy/apis/spoonjoy-api/revisions/b96eb5d4697d?raw)
