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

# Trusted Workloads

A trusted workload is a job outside Telnyx, such as a GitHub Actions run, that acts as a service account without a stored Telnyx credential. The service account lists the workloads it trusts, and each run trades the token its own platform gives it for a short-lived Telnyx token.

> [!WARNING]
>
> **Preview.** Not available yet.

## Trust

A service account names each workload by the issuer of its tokens and the subject those tokens carry.

```json POST /v2/iam/service_accounts theme={null}
{
  "name": "ivr-deploy",
  "trusted_workloads": [
    {
      "issuer": "https://token.actions.githubusercontent.com",
      "subject": "repo:example/deploy:ref:refs/heads/main"
    }
  ]
}
```

Only runs from the `main` branch of that repository match. Any other subject from the same issuer is refused.

## Exchange

Each run sends the token its platform issued and receives a Telnyx token for the service account, valid for one hour.

```json POST /v2/iam/tokens theme={null}
{
  "service_account": "ivr-deploy",
  "token": "eyJhbGciOiJSUzI1NiIs..."
}
```

The run then sends requests with that token as `Authorization: Bearer <token>`. The service account's [grants](https://developers.telnyx.com/docs/iam/access/grants.md) decide them.

No Telnyx credential lives in the CI system.
