> ## Documentation Index
> Fetch the complete documentation index at: https://docs.usefini.com/llms.txt
> Use this file to discover all available pages before exploring further.
# Get Business Rule fields context
> Get the fields and resources available to Business Rule trees.
Returns the workspace resources and built-in runtime context that can be referenced by a Business Rule tree.
## Headers
<ParamField header="Authorization" type="string" required>
Bearer token containing your Fini workspace API key. Format: `Bearer fini_...` The key needs `read` scope.
</ParamField>
## Response
<ResponseField name="userAttributes" type="FieldResource[]">
Workspace user attributes with their input and output schemas.
</ResponseField>
<RequestExample>
~~~bash cURL theme={null}
curl --request GET \
--url 'https://api-prod.usefini.com/v2/business-rules/fields-context/public' \
--header 'Authorization: Bearer fini_your_api_key'
~~~
~~~javascript Node.js theme={null}
const response = await fetch('https://api-prod.usefini.com/v2/business-rules/fields-context/public', {
method: 'GET',
headers: {
Authorization: 'Bearer fini_your_api_key'
}
});
const data = await response.json();
~~~
~~~python Python theme={null}
import requests
response = requests.get(
"https://api-prod.usefini.com/v2/business-rules/fields-context/public",
headers={"Authorization": "Bearer fini_your_api_key"},
)
data = response.json()
~~~
</RequestExample>
<ResponseExample>
~~~json 200 OK theme={null}
{
"userAttributes": [
{
"id": "attr_01",
"name": "Plan",
"inputSchema": [
{
"name": "email",
"dataType": "string",
"required": true
}
],
"outputSchema": [
{
"name": "plan",
"type": "string"
}
]
}
],
"actions": [
{
"id": "tool_01",
"name": "Create Zendesk ticket",
"inputSchema": [
{
"name": "Conversation URL",
"dataType": "string",
"path": "conversationUrl",
"required": true
}
],
"outputSchema": [
{
"name": "ticketUrl",
"dataType": "string",
"path": "ticket.url"
}
]
}
],
"defaultActions": [
{
"id": "default_tool_01",
"name": "Send escalation message",
"inputSchema": [
{
"name": "message",
"dataType": "string",
"required": true
}
],
"outputSchema": [
{
"name": "sent",
"dataType": "boolean",
"path": "sent"
}
]
}
],
"tagGroups": [
{
"id": "tag_group_01",
"name": "Conversation Status",
"tags": [
{
"id": "tag_01",
"name": "Escalated to Human Agent"
}
]
}
],
"widgetForms": [
{
"id": "form_01",
"name": "Escalation form",
"fields": [
{
"id": "field_01",
"name": "Order ID",
"dataType": "string"
}
]
}
],
"contextFields": [
{
"name": "Interaction History Transcript",
"path": "interactionHistoryTranscript",
"dataType": "string"
}
],
"operatorTypes": [
{
"value": "equals",
"label": "Equals"
}
],
"quantifierTypes": [
{
"value": "any",
"label": "Any"
}
],
"sources": [
"widget"
]
}
~~~
</ResponseExample>
<ResponseField name="actions" type="FieldResource[]">
Workspace actions available to Tool nodes.
</ResponseField>
<ResponseField name="defaultActions" type="FieldResource[]">
Fini-provided actions available to Tool nodes.
</ResponseField>
<ResponseField name="tagGroups" type="TagGroup[]">
Input tag groups and their tags.
</ResponseField>
<ResponseField name="widgetForms" type="WidgetForm[]">
Widget forms and their typed fields.
</ResponseField>
<ResponseField name="contextFields" type="ContextField[]">
Built-in escalation and integration fields available to Business Rules.
</ResponseField>
<ResponseField name="operatorTypes" type="Operator[]">
Condition operators as `{ value, label }` objects.
</ResponseField>
<ResponseField name="quantifierTypes" type="Quantifier[]">
Array quantifiers as `{ value, label }` objects.
</ResponseField>
<ResponseField name="sources" type="string[]">
Interaction sources available in the workspace.
</ResponseField>
## Errors
<AccordionGroup>
<Accordion title="401 Unauthorized" icon="lock">
The API key is missing, malformed, revoked, or invalid.
</Accordion>
<Accordion title="403 Forbidden" icon="shield-halved">
The API key does not include the `read` scope required for this route.
</Accordion>
</AccordionGroup>
## Related topics
- [Overview](/en/api-reference/business-rules.md)
- [Get Business Rule test fields](/en/api-reference/get-business-rule-test-fields.md)
- [Get intent-rule fields context](/en/api-reference/get-intent-rule-fields-context.md)
This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.
Business Rules

