Skip to content

Give another system access

A partner, a portal or one of your own systems needs to call into Kiln. You will issue it an App client: an identity with a defined list of what it may do.

By the end of this guide you will have a client that authenticates, a list of the endpoints it can call, and a flow run started from outside Kiln.

This takes about twenty minutes.

One screen with four tabs, used in order: Details, Access, Secrets, Connect. Everything after that happens from the calling system.

Open Settings, then App clients, and click New. This screen requires the appClient:manage permission.

1. Name it and pick the environment (Details)

Section titled “1. Name it and pick the environment (Details)”

Three things matter here.

Code is the client’s stable identifier and it is what the integration will send as its client_id. Pick it as you would a database name, because it does not change afterwards.

Name is what people see. Name it after the calling system rather than a team or project, so it is clear later whether it is still needed.

Environment is the environment the client’s tokens are valid for. Set it first: a credential issued for the wrong environment fails in a way that looks like a bad secret.

A client starts with no access. The Access tab has four switches.

Template rendering lets the client turn a template into a document.

Flow access lets the client run a flow, read the state of a run, and release a run that is paused waiting for a decision.

Flow discovery lets the client list your flows and read the shape of one.

Signals lets the client tell Kiln that something happened. This suits a telematics feed or a monitoring system.

For the first three, choose which resources each applies to: all, or a named list. Prefer a named list. If access is too narrow, the error tells you exactly what to add.

Flow discovery is separate from flow access. Permission to run a flow does not let a client list your flows or read their structure, so an integration that should start one known flow cannot see the others.

Signals is either enabled or disabled. It cannot be limited to particular records. A signal only says what the client saw, when, and what it calls it. A flow your tenant has written decides what that means, such as writing a register row and starting its stages. A client with only this permission can do nothing else.

Changes on Details and Access are held until you press Save. Then press Publish.

An unpublished client cannot obtain a token, and changes to an existing client take effect only when published. If a new client is refused with invalid_client, or a grant you just added has no effect, check that the client has been published.

A published client is read only. Press Create Draft to make further changes, as you would with a flow.

Generate the secret and copy it before you leave the screen. It is shown only once. Only a hash of it is stored, so neither you nor Antero can retrieve it later. If it is lost, generate a new one and revoke the old one.

Every generated secret starts with ca_, so it can be recognised if it appears somewhere it should not. Add this prefix to your secret scanning rules.

Generating and revoking secrets take effect immediately. They do not need a Save or Publish.

5. Exchange the secret for a token (Connect)

Section titled “5. Exchange the secret for a token (Connect)”

The Connect tab hands the integrator everything needed to authenticate: the client id, the token endpoint for this environment, the scope string to request, and a working curl command. Point the integrator to this tab rather than copying details into an email. Send the secret itself through a secure channel, never in plain email.

It is a standard OAuth 2.0 client credentials exchange, so any standard OAuth client library works:

Terminal window
curl -X POST "https://api.<your Kiln host>/ca/v1/oauth/token" \
-d grant_type=client_credentials \
-d client_id=<your client code> \
-d client_secret=<the secret you copied> \
-d scope="flow:run flow:read"

Credentials may go in an Authorization: Basic header instead of the body, which takes precedence if both are present.

The response:

{
"access_token": "...",
"token_type": "Bearer",
"expires_in": 43200,
"scope": "flow:run flow:read"
}

Send the token as Authorization: Bearer <access_token> on every call after that.

Scope strings are resource:action, space separated: template:render, flow:run, flow:read, flow:discover, signal:create. The scope returned tells you what you actually got.

A client may ask for less than it holds, and get it. It may not ask for more. A request naming a scope the client does not hold is refused as invalid_scope rather than silently narrowed, so a misconfigured integration fails at the point of the mistake.

There are two ways to find out.

In Kiln, the Connect tab lists every endpoint the client could call. Endpoints it cannot currently call are shown greyed out, with the Access tab switch that would enable them.

From the integration, a client holding flow:discover can ask Kiln directly. The example below uses a fictional tenant and sample data.

Discovery is its own scope, so ask for it by name:

Terminal window
TOKEN=$(curl -s -X POST "https://api.<your Kiln host>/ca/v1/oauth/token" \
-d grant_type=client_credentials \
-d client_id=portside-ap-portal \
-d client_secret=$KILN_CLIENT_SECRET \
-d scope="flow:discover flow:run flow:read" \
| jq -r .access_token)
Terminal window
curl -s "https://api.<your Kiln host>/flow/v1/public/flows" \
-H "Authorization: Bearer $TOKEN"
{
"flows": [
{
"id": "f3c1a8e2-5b47-4d90-9c22-7a1e6f0b48d3",
"name": "Supplier invoice intake and approval",
"code": "supplier-invoice-approval",
"version": 7,
"effectiveFrom": "2026-08-14T02:11:07.482Z"
}
]
}

The list is filtered. Flows this client may not discover are left out, and a client with no access to any flow receives an empty list.

Terminal window
curl -s "https://api.<your Kiln host>/flow/v1/public/flows/f3c1a8e2-5b47-4d90-9c22-7a1e6f0b48d3" \
-H "Authorization: Bearer $TOKEN"
{
"id": "f3c1a8e2-5b47-4d90-9c22-7a1e6f0b48d3",
"name": "Supplier invoice intake and approval",
"code": "supplier-invoice-approval",
"version": 7,
"effectiveFrom": "2026-08-14T02:11:07.482Z",
"entryPoints": [
{
"startNodeId": "n_trigger_invoice_received",
"shortname": "invoice-received",
"inputs": [
{ "name": "supplierAbn", "dataType": "string" },
{ "name": "invoiceNumber", "dataType": "string" },
{ "name": "amountExGst", "dataType": "number" },
{ "name": "purchaseOrderRef", "dataType": "string" }
],
"triggerUrl": "/api/flow/v1/public/flows/f3c1a8e2-5b47-4d90-9c22-7a1e6f0b48d3/trigger/n_trigger_invoice_received"
}
],
"gates": [
{
"reason": "Invoice does not match the purchase order. A finance lead must decide.",
"resumeInputs": [
{ "name": "decision", "dataType": "string" },
{ "name": "note", "dataType": "string" }
]
}
],
"outcomes": ["approved", "rejected", "referred-to-procurement"],
"resumeUrlTemplate": "/api/flow/v1/public/flows/f3c1a8e2-5b47-4d90-9c22-7a1e6f0b48d3/runs/{instanceId}",
"instanceUrlTemplate": "/api/flow/v1/public/flow-instances/{instanceId}"
}

It describes the process as well as the inputs. gates lists every point where a person has to decide, each with its reason and the inputs needed to resume the run. This lets you build the human decision into your own product.

It describes the contract, not the internals. It does not include the flow’s node graph, thresholds or policies. It always reflects the currently published version, never a draft, which is why version and effectiveFrom are included.

outcomes are business results. rejected is a successful run. A technical failure is never an outcome.

A discovery-only token, holding flow:discover but neither flow:run nor flow:read, gets the same flow back from the same URL without three fields:

{
"id": "f3c1a8e2-5b47-4d90-9c22-7a1e6f0b48d3",
"name": "Supplier invoice intake and approval",
"code": "supplier-invoice-approval",
"version": 7,
"effectiveFrom": "2026-08-14T02:11:07.482Z",
"entryPoints": [
{
"startNodeId": "n_trigger_invoice_received",
"shortname": "invoice-received",
"inputs": [
{ "name": "supplierAbn", "dataType": "string" },
{ "name": "invoiceNumber", "dataType": "string" },
{ "name": "amountExGst", "dataType": "number" },
{ "name": "purchaseOrderRef", "dataType": "string" }
]
}
],
"gates": [ "..." ],
"outcomes": ["approved", "rejected", "referred-to-procurement"]
}

There is no triggerUrl, resumeUrlTemplate or instanceUrlTemplate. Links the client is not permitted to use are omitted rather than null, so you can offer only the actions whose links are present. triggerUrl appears only with flow:run, and instanceUrlTemplate only with flow:read.

The URLs are root relative and begin with /api. Against the API host, remove that prefix and add the API base you used for the discovery call, then send the values inputs lists:

Terminal window
TRIGGER=$(curl -s "https://api.<your Kiln host>/flow/v1/public/flows/$FLOW_ID" \
-H "Authorization: Bearer $TOKEN" | jq -r '.entryPoints[0].triggerUrl')
curl -s -X POST "https://api.<your Kiln host>${TRIGGER#/api}" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"supplierAbn": "51824753556",
"invoiceNumber": "INV-88213",
"amountExGst": 4820.00,
"purchaseOrderRef": "PO-2026-0441"
}'

Read the instanceId from the response. Use it in instanceUrlTemplate to check the run, and in resumeUrlTemplate to resume it when it pauses at a Gate. Your code follows the links it is given rather than building paths itself.

For a long running flow, start it asynchronously and poll. The trigger-async endpoint returns immediately rather than waiting for the run, which suits flows with sub-flows. Poll the instance URL until the run finishes. A synchronous trigger on a long flow will time out.

flow:discover is the only discovery grant. A client holding template:render cannot ask which template codes exist or what data each expects, and a client holding signal:create cannot ask which signals your flows act on. Agree these with whoever authored them and configure them in the calling system.

What the calling system must be configured with

Section titled “What the calling system must be configured with”

Discovery requires a token, so the calling system must be configured with the API base URL and the client credentials. Everything else can be found by following links from the flow list.

A client can hold more than one secret at a time, so rotation needs no downtime. Generate the new secret, move the integration onto it, confirm the old one is no longer in use, then revoke it.

Secrets, which Kiln uses to reach outward, work differently: they hold one value per name, with no overlap period.

These stop tokens already issued, on their next request:

  • Revoking a secret stops the tokens that secret issued. Other secrets on the client keep working.
  • Archiving the client stops all of its tokens.
  • The client’s owner leaving the tenant, being removed from it, or having their membership disabled stops all of the client’s tokens.

Removing a grant stops new tokens from carrying it, but not tokens already issued. A token keeps the grants it was issued with until it expires. The same applies when the owner loses a role but stays a member of the tenant.

Tokens last twelve hours by default. A client can be given a different lifetime, up to thirty days; a longer value is refused rather than reduced. Keep the lifetime as short as the integration allows, because it is the longest a token keeps a grant that has been removed.

To cut off an integration at once, revoke its secret or archive the client.

It is not a user account. A client has no roles, is not a member of your tenant, and cannot open the builder. Its authority is only the grants on it.

It is not how you give a person access. People are invited to the tenant and assigned roles.

It is not a Connection. A Connection is how Kiln authenticates to another system. An App client is how another system authenticates to Kiln. Many integrations need both.

More detail. App clients covers the screen and the access model in more depth.

What a client can start. Every event that can start a flow lists the events and the values each hands the flow it starts.

Mail rather than an API. If the system on the other end can send an email but cannot hold a credential, an Inbox is the simpler answer.

Changing a flow an integration already calls. Prove a change before you publish shows how to check the effect first.