# Requests

## Invocation

Data transformation must output:

```jq
{
    "lam.headers:": { ... },
    "lam.queryParams": { ... },
    "lam.body": { ... }
}
```

| Key         | Description                                                              | Type              |
| ----------- | ------------------------------------------------------------------------ | ----------------- |
| headers     | The workflow ID to invoke after the current pending request is resolved. | Object (optional) |
| queryParams | The payload to pass the workflow we're invoking.                         | Object (optional) |
| body        | The result we're resolving the pending request with                      | Object (optional) |

## Functionality

The `headers`, `queryParams`, and `body` keywords can be used to dynamically assign request metadata for our **destination** request as part of our flow execution. We can use these specific keywords to make GET requests with dynamic query parameters or headers that depend on data we've retrieved and have in our [Global Workflow Object](/building-an-integration/advanced/workflows/global-workflow-object.md).

## Examples

### Making dynamic requests

In order to dynamically assign headers and query params to requests we're making on our **destination** API description, we output specific keywords:

```jq
.step_1.data.user |
map(
if .totalSpent > 20 then
{
    "lam.headers:": {
        "x-api-key": 12345
    },
    "lam.queryParams": {
        "email": .email
    },
    "lam.body": .
}
else
    empty
end
)
```

### Specifying the body

In the case we specify any of the `headers` or `queryParams` keys, Laminar **will not** send any body unless **explicitly specified** by the `body` key.&#x20;


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.laminar.run/building-an-integration/keywords/requests.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
