# Restricted Scope

Entities that are `Restrictable` will have a restricted scope defined. This scope is applied on every base query our endpoints provide.

When requesting data from the intratool API all queries to `Restrictable` models will be restricted to the current user.

There are "administration routes" where [EntityPermissions](/api-reference/entity-permissions.md) are ignored so privileged Users can access the requested content without having the `EntityPermission`.

## Relation

Models provided by the intratool API that are `Restrictable` will always have a relation key `entityPermissions` that gives information about permissions attached to the content.

See [Query Manipulation](/introduction/query-manipulation.md) to learn how to retrieve this information by requesting our endpoints.

## Adding permissions

When creating or updating content by requesting the intratool API you can always add the fieldkey `entity_permissions` if the model the endpoint grants access to is `Restrictable`.

The `entity_permissions` value is expected to be an array with one or more permission definitions. The following structure is expected:

```json
[
  {
    "key": "view",
    "target_entity": "user",
    "target_entity_id": 25
  },
  {
    "key": "view",
    "target_entity": "user",
    "target_entity_id": 26
  }
]
```


---

# 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.api.intratool.de/introduction/entity-permissions/restricted-scope.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.
