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

# Conventions

This page covers the rules that apply across the whole API: the endpoint, request shape, pagination, ordering, and search.

## Endpoint

One endpoint serves every query and mutation:

```
https://api.interlynk.io/lynkapi
```

Always use `POST`. Authenticate with a bearer token. See [Authentication](/api/getting-started/authentication.md).

## Request shape

For queries and mutations, send a JSON body with `Content-Type: application/json`:

```json
{
  "query": "query { organization { name } }",
  "variables": {},
  "operationName": null
}
```

| Key             | Required | Purpose                                                     |
| --------------- | -------- | ----------------------------------------------------------- |
| `query`         | Yes      | The GraphQL operation string.                               |
| `variables`     | No       | Values referenced by the operation.                         |
| `operationName` | No       | Required only when `query` defines more than one operation. |

File uploads are the exception. They use `multipart/form-data`. See [Upload an SBOM](/api/managing-sboms/upload-sbom.md).

## Identifiers

Objects are identified by UUID. Two scalar types appear in the schema:

* `Uuid` is used for most arguments, for example `projectId` and `sbomId`.
* `ID` is used by some inputs, for example `projectGroupId` on upload.

Pass the same UUID string for either. The distinction is a schema detail.

## Pagination

List fields use cursor-based pagination. They return 25 items by default.

Request `totalCount` and `pageInfo` alongside `nodes`:

```graphql
projectGroups(first: 25, after: "MjU") {
  totalCount
  pageInfo { startCursor endCursor hasNextPage hasPreviousPage }
  nodes { id name }
}
```

| Arguments         | Direction                                               |
| ----------------- | ------------------------------------------------------- |
| `first` + `after` | Forward. `first` is the page size, `after` is a cursor. |
| `last` + `before` | Backward.                                               |

To page forward: request a page, read `pageInfo.endCursor`, pass it as `after` on the next request, and stop when `hasNextPage` is `false`.

`totalCount` is the size of the whole result set, not the current page.

## Ordering

Many list fields accept an `orderBy` argument with a `field` and a `direction`:

```graphql
projectGroups(orderBy: { field: PROJECT_GROUPS_UPDATED_AT, direction: DESC }) {
  nodes { id name }
}
```

`direction` is `ASC` or `DESC`. The valid `field` values depend on the list being queried.

## Search

Many list fields accept a `search` argument. It matches partially and is case-insensitive. The fields it searches depend on the list. For example, `projectGroups(search: "payments")` matches product names.

Because search is partial, always confirm the `name` in the response is the exact object you wanted.

## Introspection

The production endpoint does **not** support GraphQL introspection. Use this documentation as the schema reference. See [Operations](/api/reference/operations.md) for the list of supported queries and mutations.
