# Config API conventions

> The rules every Config API resource follows: authentication, identifiers, list filters, reads by name or version, ETags, update semantics, statuses and the error contract.

**Category:** Environment

## Summary

What is the same across every Config API resource, so a resource guide only has to describe its own fields.

## Content

Every IndyKite configuration object, from a project down to an audit signing configuration, is managed through the **Config API** with the same handful of rules. The resource guides describe the fields of each object; this guide states, once, what they all share: how to authenticate, how lists, reads, creates, updates and deletes behave, how statuses work, and what every error looks like.

# What is the Config API?

The Config API is the REST interface for creating and managing configuration. It is served per region under `/configs/v1`:

- **EU**: `https://eu.api.indykite.com/configs/v1`
- **US**: `https://us.api.indykite.com/configs/v1`

Reference: [Config REST API](https://openapi.indykite.com/api-documentation-config). Terraform calls the same API; the [Terraform guide](/guides/guide-terraform) maps its resources to these objects.

### How do I authenticate?

Every call carries a **Service Account** token: `Authorization: Bearer <token>`. It is the only credential the Config API accepts; a request without a `Bearer` token in `Authorization`, including one that sends an Application Agent credential only in `X-IK-ClientKey`, is refused with `401` and `Missing or malformed ServiceAccount credential token in Authorization header`; a Bearer token that is invalid, expired or revoked, or an Application Agent JWT sent as Bearer, with `Invalid ServiceAccount JWT in Authorization header`. What the account may do depends on its role: `all_editor` creates, updates and deletes, `all_viewer` reads and lists, and a write by a viewer gets `403`. How to obtain the token, and what to do when the platform answers `503` or `500` instead of judging it, is in the [Credentials guide](/guides/guide-credentials).

### Which headers and formats apply everywhere?

- **Bodies are JSON.** `POST` and `PUT` require `Content-Type: application/json`; anything else is refused with `415`.
- **Responses are JSON.** The request's `Accept` header must allow `application/json` (or `*/*`); a request without an `Accept` header, or with one that excludes JSON, is refused with `406`. Most HTTP clients send an acceptable default; curl does.
- **Identifiers are GIDs**, strings with the `gid:` prefix: `id`, `organization_id`, `project_id`, `created_by`, `updated_by`. A GID encodes its type, so a project GID where an organization GID is expected is refused with `422` and `invalid field organization_id: identifier is not of ORGANIZATION`.
- **Timestamps are RFC 3339 in UTC**, `2026-10-12T14:02:11Z`, without fractional seconds in responses. Where you send one, such as a credential's `expire_time`, any RFC 3339 offset is accepted.

# Which resources does it manage?

Every object has a parent that scopes it, named by the query parameter of its list and the field of its create request:

| Path under /configs/v1 | Parent | Operations |
| --- | --- | --- |
| `/organizations/current` | none | Read only: the organization of the calling Service Account |
| `/projects` | `organization_id` | List, create, read, update, delete |
| `/service-accounts` | `organization_id` | List, create, read, update, delete |
| `/service-account-credentials` | `organization_id` on list, `service_account_id` on create | List, create, read, delete. No update. |
| `/applications` | `project_id` | List, create, read, update, delete |
| `/application-agents` | `project_id` on list, `application_id` on create | List, create, read, update, delete |
| `/application-agent-credentials` | `project_id` on list, `application_agent_id` on create | List, create, read, delete. No update. |
| `/token-introspects` | `project_id` | List, create, read, update, delete |
| `/authorization-policies` | `project_id` | List, create, read, update, delete |
| `/knowledge-queries` | `project_id` | List, create, read, update, delete |
| `/external-data-resolvers` | `project_id` | List, create, read, update, delete |
| `/trust-score-profiles` | `project_id` | List, create, read, update, delete |
| `/event-sinks` | `project_id` | List, create, read, update, delete |
| `/entity-matching-pipelines` | `project_id` | List, create, read, update, delete |
| `/mcp-servers` | `project_id` | List, create, read, update, delete |
| `/audit-signings` | `project_id` | List, create, read, update, delete |

The two credential resources differ from the rest in three ways: they have no `name` or `description`, they cannot be updated (issue a new one and delete the old), and their create response carries the credentials file, the only time the private key is returned. The [Credentials guide](/guides/guide-credentials) covers them.

# How do lists work?

`GET /configs/v1/<resource>?project_id=<gid>` (or `organization_id` for the three organization-level resources). The parent parameter is required. Two optional parameters apply to every list, and one to policies only:

| Parameter | Effect |
| --- | --- |
| `search=<text>` | Keeps only the objects whose name, display name or description contains the text. |
| `full_fetch=true` | Returns every field of each object. Without it the list is metadata only: each item keeps its identifiers, names, timestamps, status and tags, but the heavy configuration fields come back empty, for example `policy` on an authorization policy, `query` on a Knowledge Query, `node_classification` on a Trust Score profile, or the provider details of an audit signing configuration. Read the object by `id` for the same result on one object. |
| `type=kbac` or `type=ciq` | `/authorization-policies` only: keeps the policies of one kind. |

The response is `{"data": [ … ]}`, each item in the shape of the read response below. There is no paging: a list returns every match in the parent. Lists carry no ETag.

# How do reads work?

`GET /configs/v1/<resource>/{id}` returns the object and an `etag` response header. Three things apply to all of them:

- **By GID or by name.** `{id}` accepts the object's `name` as well as its GID. A name is unique only within its parent, so a project-scoped object read by name needs `?project_id=<gid>`; without it the call fails with `422` and `project_id is required when querying by name`. (The older `location` parameter is deprecated and still accepted, but not together with `project_id`.) Projects and Service Accounts read by name are looked up in the calling account's organization, with no extra parameter. Credentials are read by GID only.
- **By version.** Every update creates a new version. `?version=<n>` (an integer from 1) returns that version; without it the latest is returned. Credentials and the organization have no versions.
- **Secrets are write-only.** A password, a connection string, a provider credential: whatever you sent as a secret comes back as an empty string, or only as its key name, and a validation error about it masks the value as `********`. Keep your own copy.

Every read response starts with the same fields, followed by the object's own:

| Field | Meaning |
| --- | --- |
| `id` | The object's GID. |
| `name` | Its URL-friendly identifier, unique within the parent and immutable. |
| `display_name` | Human-readable name; equals `name` when never set. |
| `description` | Optional text. |
| `organization_id`, `project_id` | Where it lives. `project_id` is absent for an object created directly under the organization, such as a Service Account, and on a project itself. |
| `create_time`, `created_by`, `update_time`, `updated_by` | When and by which Service Account (its GID) the object was created and last changed. |

# How do creates work?

`POST /configs/v1/<resource>` with the parent field, the common fields and the object's own. The common fields follow one rule set:

| Field | Rule |
| --- | --- |
| `name` (required) | 2 to 63 characters of lowercase letters, digits and hyphens, starting with a letter and ending with a letter or digit. Unique within the parent, and immutable once created. Anything else is refused with `422` and `invalid field name: is not valid name, value must start with [a-z] followed by [-a-z0-9] and ends with [a-z0-9]`; a name already taken in the parent with `409`. |
| `display_name` | Optional, 2 to 254 characters. |
| `description` | Optional, 2 to 65000 characters. |
| Parent field | `project_id`, `organization_id`, `application_id`, `application_agent_id` or `service_account_id`, as in the resource table; a GID of the right type. |

Success is `201 Created` with an `etag` header and a body of five fields: `id`, `create_time`, `created_by`, `update_time`, `updated_by`. The object itself is not echoed; read it if you need it. A create is validated in full before anything is stored, so a `422` lists every problem in the body at once.

# How do updates work?

`PUT /configs/v1/<resource>/{id}`, by GID. There is no `PATCH`: the object's own configuration fields are sent in full and replace the stored ones, with the required ones of each resource listed in its guide. The common fields and the header behave the same everywhere:

- **`display_name` and `description`**: left out or `null`, the stored value is unchanged; an empty string removes it; otherwise the same length limits as on create. A body that changes nothing is refused with `422` and `nothing to change`.
- **`If-Match`**: optional, carrying the `etag` value from the last read, create or update of the object. If the object changed since, the update is refused with `412 Precondition Failed` and nothing is written; re-read, decide, retry. A value that is not an ETag at all (fewer than 8 or more than 18 characters) is refused with `400`. Send it whenever two writers could touch the same object.
- **Immutable**: `name`, the parent, a Service Account's `role`, and a project's `region`, `replica_region`, `ikg_size` and `ikg_schema_version` are absent from the update bodies. Changing one means creating a new object.

Success is `200` with a new `etag` header and the same five-field body as a create.

# How do deletes work?

`DELETE /configs/v1/<resource>/{id}`, by GID, with the same optional `If-Match` as an update. Success is `200` with `{"id": "<the deleted GID>"}`. A read of the object afterwards is `404`. The API states nothing about what a parent's deletion does to its children, so delete the children you know about first, credentials included.

# What statuses and switches exist?

| Resource | Field | Values |
| --- | --- | --- |
| Authorization policy, Knowledge Query | `status` (required on create and update) | `ACTIVE`: in force. `INACTIVE`: stored and validated, not applied. `DRAFT`: stored without validation, so a policy or query that is not yet valid JSON can be saved and finished later; it must validate before it becomes `ACTIVE`. |
| MCP server | `enabled` (required boolean) | `false` keeps the configuration and refuses connections. |
| Project | `ikg_status` (read-only) | The state of the graph database behind the project: `PENDING` while it is provisioned or connected, `ACTIVE` when usable, `FAILED` with the reason, `PAUSED` when stopped; see the [graph database guide](/guides/guide-graph-database). |
| Entity matching pipeline | `entity_matching_status`, `property_mapping_status` (read-only) | Progress of the pipeline's runs; see the [Entity Matching guide](/guides/guide-entity-matching). |

# What errors should I expect?

Two body shapes cover every error. `{"message": "…"}` alone, or `{"message": "…", "errors": ["…", "…"]}` where `message` is the status text and `errors` carries the reasons. An entry in `errors` is either `missing field <path>` or `invalid field <path>: <rule>`, the path naming the JSON field, with an index or key for an array or map element (`providers[azure2].azure_service_bus.connection_string`).

| Status | When | Body |
| --- | --- | --- |
| `400 Bad Request` | The body is not valid JSON, a field has the wrong JSON type, or `If-Match` is malformed. | `{"message": "Bad Request"}` for a body that is not JSON; `{"message": "Bad Request", "errors": ["invalid field <name>"]}` for a wrong type; `{"message": "Bad Request", "errors": ["invalid If-Match: etag value length must be between 8 and 18 characters"]}` |
| `401 Unauthorized` | No `Bearer` token in `Authorization`; or one that is invalid, expired or revoked, or an Application Agent JWT. | `{"message": "Missing or malformed ServiceAccount credential token in Authorization header"}` or `{"message": "Invalid ServiceAccount JWT in Authorization header"}` |
| `403 Forbidden` | The account's role does not allow the operation, or the object belongs to another organization. | `{"message": "Forbidden", …}` |
| `404 Not Found` | No object with that GID or name, including one already deleted. | `{"message": "Not Found", "errors": ["empty response"]}` |
| `406 Not Acceptable` | The `Accept` header excludes JSON or is missing. | An `error` field: `Accept must be application/json or */*` |
| `409 Conflict` | An object with that `name` already exists in the parent, or a resource-specific uniqueness rule is broken, for example two Token Introspect configurations with the same issuer and audience, or a second Event Sink, MCP Server or Audit Signing configuration in a project that already has one (`audit signing config already exists in project`). | `{"message": "Conflict", "errors": ["…"]}` |
| `412 Precondition Failed` | The `If-Match` value is not the object's current ETag. | `{"message": "Precondition Failed", "errors": ["…precondition failed…"]}` |
| `415 Unsupported Media Type` | A `POST` or `PUT` without `Content-Type: application/json`. | An `error` field: `Content-Type must be application/json` |
| `422 Unprocessable Entity` | Validation failed, at write time, before anything is stored: a missing or malformed field, a GID of the wrong type, a limit exceeded, an invalid URL (`invalid field url: "/some/path" does not meet rule http_url`), a URL the platform could never call (`URL: unsupported URL scheme: must be https` for plain `http`, `URL: destination is not permitted` for a literal private address), a policy that is not valid JSON, a reference to an object that does not exist. A secret that fails validation is never echoed: `invalid field app_agent_token: ******** does not meet rule jwt`. | `{"message": "Unprocessable Entity", "errors": ["missing field …", "invalid field …: …"]}` |
| `500 Internal Server Error` | The platform failed; the request was not applied. | `{"message": "Internal Server Error"}`, or `{"message": "Unable to verify the ServiceAccount credential token"}` when the credential check itself failed for a non-transient reason (do not rotate the credential; see the [Credentials guide](/guides/guide-credentials)) |
| `503 Service Unavailable` | The token could not be verified for a transient reason; retry with backoff, same credential. | `{"message": "Unable to verify the ServiceAccount credential token, retry the request"}` |

A `422` is the only error that reports several problems at once, so fix everything it lists before retrying. Resource-specific messages, such as the audit signing provider rules or the replica region constraint of a project, are in the guide of that resource.

# Next Steps

- **Hierarchy**: [Environment guide](/guides/guide-environment)
- **Tokens**: [Credentials guide](/guides/guide-credentials)
- **As code**: [Terraform guide](/guides/guide-terraform)
- **Walkthroughs**: [Project, application and credentials](/resources/environment-1), [Organization and Service Accounts](/resources/environment-2)
- **Reference**: [Config REST API](https://openapi.indykite.com/api-documentation-config)

---

Source: https://developer.indykite.com/guides/guide-config-api