# Call your system from workflows and series

Send HTTP requests from workflow steps or series webhook steps and save JSON values back into dimmi.

Workflows use the **Call your system** step to fetch or send data and save response fields for later steps. Series use the **Webhook** step to notify your backend as customers move through a journey.

## Workflow step: Call your system

This step does not add dimmi headers or signatures. To authenticate, select a REST API **Connection** from **Settings → Actions** so dimmi attaches its credentials and default headers (same as [agent actions](/developers/agent-actions-api/)).

| Setting | Rules |
| --- | --- |
| **Connection** | With a connection, enter a relative **Path**. Without one, enter a full `https://` **URL** (sent without credentials). |
| **Method** | `GET`, `POST`, `PUT`, `PATCH`, or `DELETE`. |
| **Headers** | Up to 10 custom headers. Blocks `Authorization`, `Cookie`, `Host`, `Content-Length`, `Proxy-Authorization`, and `X-Api-Key*`. |
| **Body** | JSON up to 8,000 characters (for `POST`, `PUT`, and `PATCH`), sent as `application/json`. |
| **Give up after** | 2, 5, 8 (default), or 10 seconds. |
| **Save from the response** | Map up to 10 JSON paths into variables or customer attributes. |

URLs, headers, and bodies support variables like `{{contact.email}}` or `{{contact.email | fallback: "unknown"}}`. dimmi escapes every value safely for its context so customer text cannot break JSON or inject headers. See [Triggers and steps](/workflows/triggers-and-steps/).

```json title="Body"
{
  "email": "{{contact.email}}",
  "conversation": "{{conversation.number}}"
}
```

### Handling the response

- **`2xx` status:** reads up to 256 KB of JSON and saves mapped paths (like `data.plan` or `items.0.id`) into `{{run.vars.<key>}}` or customer attributes. Missing paths save nothing; objects and arrays save as JSON strings.
- **Any failure:** redirects, non-`2xx` codes, timeouts, or blocked hosts fail the step. Turn on **Take a separate path when the call fails** to branch on errors; otherwise the workflow continues.

dimmi sends workflow requests once with no retries and blocks private, loopback, and link-local addresses.

The run trace logs the HTTP status and one reason code (never the response body): `http_status`, `timeout`, `unreachable`, `host_blocked`, `response_too_large`, `body_invalid`, or `connection_disabled`.

## Series step: Webhook

A series **Webhook** step sends this `POST` payload to your endpoint:

```json
{
  "type": "series.step",
  "series_id": "srs_01jd8y3q8k6m2v9x4t7b5n1c0r",
  "enrollment_id": "sren_01jd8y3q7j5k1n8p2r6t9v3x0z",
  "step_id": "webhook",
  "contacts": [
    { "id": "ctc_01jd8y2r6t9w3z5b8d1f4h7k0m", "email": "ada@example.com", "name": "Ada Lovelace" }
  ],
  "company_id": "cmp_01jd8y1p4s7v0y2a5c8e1g3j6l"
}
```

- **`company_id`:** included when the customer belongs to a company. In account-level series, `contacts` lists every person at that company.
- **`Idempotency-Key` header:** identical across retries for the same enrollment and step so you can deduplicate safely.
- **Authentication:** requests are not signed, so include a secret token in your endpoint URL and verify it on your server.
- **Timeout:** waits up to 10 seconds, ignores the response body, and advances the customer to the next step regardless of HTTP status.

---

Index of all dimmi docs: https://trydimmi.com/llms.txt (full text: https://trydimmi.com/llms-full.txt)
