> For the complete documentation index, see [llms.txt](https://docs.insurgrid.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.insurgrid.com/guides/ownership.md).

# Ownership model (agency vs agent)

Every form in InsurGrid is owned at one of two scopes: **agency** or **agent**. Ownership determines who can manage a form and how its submissions are attributed — get this right before you start creating forms via the API.

## The two scopes

| Scope      | Meaning                                                                                                    | Set at create time                                                 |
| ---------- | ---------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------ |
| **Agency** | Owned by the agency as a whole; shared across all its agents. Used for standard, agency-wide intake forms. | `owner: { "type": "agency", "agency_id": 1201 }`                   |
| **Agent**  | Owned by one specific agent within the agency.                                                             | `owner: { "type": "agent", "agency_id": 1201, "agent_id": 88213 }` |

You set `owner` when you create a form (`POST /v2/forms`), and it doesn't change afterward. Every form also records who created it and who last edited it, regardless of scope.

> **New term — scope:** which entity a resource belongs to. Here, a form is scoped either to an entire agency or to one agent inside it — scope controls both *who can manage it* and *who submissions are attributed to*.

## Who can do what

| Role           | Create / update / publish / archive forms | Share / embed existing forms | Receive submissions |
| -------------- | ----------------------------------------- | ---------------------------- | ------------------- |
| Owner / admin  | Yes (agency-wide)                         | Yes                          | Yes                 |
| Ordinary agent | No                                        | Yes                          | Yes                 |

A write call outside the caller's permission returns `403`; a form outside the caller's visibility (for example, another agency's form) returns `404`. See [Errors & status codes](/guides/errors.md).

## The public fill link is always per-agent

Regardless of a form's ownership scope, its public fill link is generated **per agent** — the `agentSlug` in the embed/share URL determines which agent a submission is attributed to. One agency-owned form can be shared under many different agent slugs, and each submission through it credits the right agent.

```
https://app.insurgrid.com/f/apartment-intake-acme?agentSlug=jane-smith&embed=1
```

Two agents sharing the *same* agency-owned form get *different* URLs (different `agentSlug`), and submissions through each are attributed accordingly — even though it's the same underlying form.

## Why this matters for your integration

* When you list forms with `GET /v2/forms`, filter or group by `owner` if you need to show "my forms" vs. "agency forms" in your UI.
* When you receive a `form-submission` webhook, the `agent` object in the payload tells you which agent the submission is attributed to — see Webhook events & payloads.
* If a write call your app makes returns `403`, don't retry — the token's role doesn't have permission. Check whether the caller should be using an owner/admin token instead.

## Related

* [Form structure & conditional logic](/guides/form-structure-logic.md)
* [The two embeds (builder vs fill form)](/guides/embeds.md)
* [Errors & status codes](/guides/errors.md)
* [Quickstart C — Build forms via the API](/intake-forms/c-build-forms-api.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.insurgrid.com/guides/ownership.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
