> ## Documentation Index
> Fetch the complete documentation index at: https://docs.stateset.com/llms.txt
> Use this file to discover all available pages before exploring further.

# List this org's macros.

> **Required scope:** read

**Required scope:** `read`

### Query parameters

<ParamField query="limit" type="integer">
  Page size
</ParamField>

<ParamField query="offset" type="integer">
  Page offset
</ParamField>

<ParamField query="status" type="string">
  candidate | approved | archived
</ParamField>

<ParamField query="rule_name" type="string">
  Only macros bound to this policy rule
</ParamField>

### Response

`ListMacrosResponse`

<ResponseField name="limit" type="integer" required />

<ResponseField name="macros" type="Macro[]" required>
  <Expandable title="Macro">
    <ResponseField name="auto_send" type="boolean" required />

    <ResponseField name="body" type="string" required />

    <ResponseField name="channel" type="string" />

    <ResponseField name="created_at" type="string" required />

    <ResponseField name="id" type="string" required />

    <ResponseField name="name" type="string" required>
      Upsert key within an org, matching the rules convention.
    </ResponseField>

    <ResponseField name="org_id" type="string" required />

    <ResponseField name="rule_name" type="string">
      The policy rule whose citation selects this macro.
    </ResponseField>

    <ResponseField name="slots" type="string[]" required>
      Merge fields parsed from `body` at write time.
    </ResponseField>

    <ResponseField name="source" type="string" />

    <ResponseField name="status" type="MacroStatus" required />

    <ResponseField name="tags" type="string[]" />

    <ResponseField name="title" type="string" />

    <ResponseField name="tool" type="object">
      <Expandable title="tool">
        <ResponseField name="arguments" type="object" />

        <ResponseField name="name" type="string" required />
      </Expandable>
    </ResponseField>

    <ResponseField name="updated_at" type="string" required />
  </Expandable>
</ResponseField>

<ResponseField name="offset" type="integer" required />

<ResponseField name="total" type="integer" required />

### Status codes

| Code  | Meaning                                            |
| ----- | -------------------------------------------------- |
| `200` | Macros for this organization                       |
| `401` | Unauthorized — missing or invalid credentials      |
| `403` | Forbidden — the key/token lacks the required scope |
| `429` | Rate limited — see Retry-After / X-RateLimit-Reset |

<RequestExample>
  ```bash cURL theme={null}
  curl --request GET \
    --url 'https://api.nsr.stateset.com/api/v1/macros' \
    --header 'X-API-Key: YOUR_API_KEY'
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "limit": 1,
    "macros": [
      {
        "auto_send": true,
        "body": "string",
        "channel": "string",
        "created_at": "string",
        "id": "string",
        "name": "string",
        "org_id": "string",
        "rule_name": "string",
        "slots": [],
        "source": "string",
        "status": "candidate",
        "tags": [],
        "title": "string",
        "tool": {
          "arguments": null,
          "name": null
        },
        "updated_at": "string"
      }
    ],
    "offset": 1,
    "total": 1
  }
  ```
</ResponseExample>
