# call

URL: /business/nouns/integration/call · Id: `verb:Integration.call` · Call: `await $.Integration.call({ … })` (SDK) or the `do` tool at `https://api.sb/mcp`. Inputs says what to pass, Outputs what returns, When it waits who approves.

> Call sends one request to an upstream through an Integration, with its token filled in server-side, for endpoints no Mapping covers.

Call sends one request to an upstream through an [Integration](/business/nouns/integration), with its token filled in server-side, for endpoints no [Mapping](/business/nouns/mapping) covers.

## Inputs
| Input | Type | Required | Description |
| --- | --- | --- | --- |
| `integration` | [Integration](/business/nouns/integration) | Yes | The Integration to call through. |
| `method` | `string` | Yes | The HTTP method; `GET` runs at once. |
| `path` | `string` | Yes | The upstream path, inside the Integration’s grants. |
| `body` | `json` | No | The request body. |

## Outputs
| Output | Type | Required | Description |
| --- | --- | --- | --- |
| `status` | `integer` | Yes | The upstream’s status code. |
| `body` | `json` | No | The upstream’s response body. |
| `integration` | [Integration](/business/nouns/integration) | Yes | The Integration the request went through. |

## Effects
- Emits [`Integration.called`](/business/events/Integration.called).
- Performed by the [Integration Engineer](/agents/engineering/integration-engineer).
- One-way (customer): it waits out its delay window, and runs in the `send` and `do` modes.
- Fills the token server-side; no Worker reads it.
- Runs a `GET` at once and waits the delay window for any other method until a Mapping classes the endpoint two-way.
- Refuses a path outside the Integration’s grants before it leaves the platform.
- `try` runs the upstream’s own validation and changes nothing.

## Refuses when
| Check | Error | Fix | Then call |
| --- | --- | --- | --- |
| The key is valid, but its scopes do not allow this operation. | [`forbidden`](/code/api/errors/forbidden) | Use a key whose scopes cover the operation, or ask an owner of the namespace to grant them. | [Integration.call](/business/nouns/integration/call) |
| A path outside the Integration’s grants before it leaves the platform | [`refused`](/code/api/errors/refused) | Clear what the check names, then call it again. | [Integration.call](/business/nouns/integration/call) |

## When it waits
| Gate | Default |
| --- | --- |
| Decision class | Medium: one-way, bounded (customer) |
| [Delay window](/systems/trust-and-governance/controls/one-way-windows) | 1 business hour, in which a watcher can pause, redirect or cancel it; then it runs. |
| Limit | The call [Limit](/business/nouns/limit) of the [Permission](/business/nouns/permission) it runs under. |
| Over the Limit | It waits `pending` for an [Approval](/business/nouns/approval) from the [Founder](/agents/founding/founder). Approved, it runs; refused, it ends `refused` with [`limit-exceeded`](/code/api/errors/limit-exceeded); unanswered by its deadline, it ends `canceled`. |

## Example

**Ask**

```text
Call the latest integration.
```

**API**

```bash
curl -X POST https://api.sb/petpantry.shop/integrations/integration_1/call \
  -H "Authorization: Bearer $STARTUP_BUILDER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"method":"GET","path":"/"}'
```

```json
{
  "api": "https://api.sb/petpantry.shop",
  "status": 1,
  "body": {},
  "integration": {
    "$id": "https://api.sb/petpantry.shop/integrations/integration_1",
    "$type": "Integration",
    "acquired": "owned",
    "scope": "studio",
    "mode": "mirror",
    "state": "connecting"
  },
  "action": {
    "$id": "https://api.sb/petpantry.shop/actions/action_1",
    "operation": "Integration.call",
    "status": "done"
  },
  "links": {
    "self": "https://api.sb/petpantry.shop/actions/action_1"
  }
}
```

**SDK**

```ts
import { $ } from 'startup-builder'

const { status, body, integration } = await $.Integration.call({ integration: 'integration_1', method: 'GET', path: '/' })
```

**CLI**

```bash
npx startup-builder do Integration.call --json '{"integration":"integration_1","method":"GET","path":"/"}'
```

**MCP**

```json
{
  "name": "do",
  "arguments": {
    "code": "return await $.Integration.call({ integration: 'integration_1', method: 'GET', path: '/' })"
  }
}
```