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

# Contributors

> Contributors are the people and integrations an authored action is attributed to — borrowers, delegated borrowers, and your integration itself.

A **contributor** is the actor an authored action is attributed to — the "who did this" recorded on documents and other authored records. Contributors are distinct from [organization users](/guides/getting-started/organization-users), who are your staff (loan officers, processors, admins) working loans inside your organization. A borrower interacting through [Pylon Elements](/elements/setup/authentication) is represented by a contributor too — the same concept, seen from the borrower's side.

## Kinds of contributor

| Kind                | What it represents                                     | Notes                                                                                                                                   |
| ------------------- | ------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------- |
| Borrower (Elements) | A borrower acting through your app via Pylon Elements. | Created with `createContributor` and paired with an authorization lease. See [Handling authentication](/elements/setup/authentication). |
| Delegated borrower  | A borrower an integration acts on behalf of.           | Attribution only — carries the `borrowerId` it acts for, never signs in, and is created automatically the first time it's referenced.   |
| Integration         | Your machine credential itself.                        | The default attribution for any write a machine token makes when no other contributor is specified.                                     |

## Attribution for machine tokens

A machine credential has no user of its own, so by default its writes are attributed to your **integration** contributor. To attribute a write to a specific person, send the `x-pylon-on-behalf-of` header with a contributor id (`cont_…`) or a borrower id (`borr_…`). This is attribution, not authorization — see [Acting on behalf of a user](/guides/getting-started/authentication/overview#acting-on-behalf-of-a-user) for the full rules. Today it governs the uploader on [document uploads](/guides/getting-started/documents#attributing-an-upload).

## Where contributors appear

Contributors surface on the records they authored. For example, each document exposes the contributor that uploaded it via `uploadedBy`:

```graphql theme={null}
query GetDocumentUploader($loanId: ID!) {
  loan(id: $loanId) {
    documents {
      id
      name
      uploadedBy {
        id
        displayName
      }
    }
  }
}
```

`uploadedBy` is an `AnyContributor`, so you can request the concrete fields of a delegated-borrower contributor (such as the `borrowerId` it acts for) with an inline fragment:

```graphql theme={null}
uploadedBy {
  id
  displayName
  ... on DelegatedBorrowerContributor {
    borrowerId
  }
}
```

## Managing contributors via the API

<Note>
  The contributor management queries and mutations below are **experimental** and require the `use:experimental-api` scope; their shape may change. `createLease` is generally available and does not require that scope. Mutations live under the `contributor` mutation namespace (as shown in the [Elements handshake](/elements/setup/authentication)).
</Note>

| Operation                                               | Type     | Scope                  | Description                                                                    |
| ------------------------------------------------------- | -------- | ---------------------- | ------------------------------------------------------------------------------ |
| `contributor`                                           | Query    | `use:experimental-api` | Fetch a single contributor by ID.                                              |
| `contributors`                                          | Query    | `use:experimental-api` | List contributors in your organization; filter by email.                       |
| `contributorRoles`                                      | Query    | `use:experimental-api` | List the contributor roles available to your organization.                     |
| `createContributor`                                     | Mutation | `use:experimental-api` | Create a contributor from contact info and a role.                             |
| `updateContributor`                                     | Mutation | `use:experimental-api` | Update a contributor's details.                                                |
| `enableContributor` / `disableContributor`              | Mutation | `use:experimental-api` | Enable or disable a contributor.                                               |
| `attachContributorToDeal` / `detachContributorFromDeal` | Mutation | `use:experimental-api` | Attach a contributor to, or detach it from, a deal.                            |
| `createLease`                                           | Mutation | —                      | Create a short-lived authorization lease for a contributor (used by Elements). |

All operations are scoped to your own customer. Browse the full contributor schema in the [API reference](/playground/api-reference), and see [Handling authentication](/elements/setup/authentication) for the `createContributor` + `createLease` handshake Elements uses.

<Note>
  **Contributors vs organization users.** Organization users are your staff working loans (loan officers, processors, admins) and sign in to the Command Center. Contributors are who an action is *attributed to* — including borrowers and your integration — and are not organization logins. See [Managing organization users](/guides/getting-started/organization-users).
</Note>
