Workload identities
A workload identity defines which external OpenID Connect tokens a workload can use and which Flint scopes it can receive. The identity stores the trusted issuer, audience, subject, and claim conditions. Creating one returns its configuration, with no secret to store. Use workload identity token exchange to exchange a matching issuer token for a short-lived Flint access token.
Manage identities#
Listing and retrieving identities requires accounts.workload_identities.read. Creating, updating, and archiving requires accounts.workload_identities.write. These scopes are available in test and live mode. They are separate from accounts.api_keys.read and accounts.api_keys.write, and partner apps cannot request them.
An identity belongs to the authenticated environment. A test credential manages identities only in its own sandbox; a live credential manages live identities. Send no mode or sandbox_id in the request. An ID outside that environment returns 404 RESOURCE_NOT_FOUND with param: "workload_identity_id", the same as an unknown ID.
API keys, CLI logins, and workload tokens can grant only scopes they already hold in that environment. Trying to grant more returns 403 INSUFFICIENT_SCOPE with reason scope_not_held. The details[0].missing_scopes field names the extra scopes. A PATCH that replaces scopes checks the scopes it adds. Changing the subject or claim conditions or reactivating an identity grants its whole scope set again.
Dashboard owners and admins can manage identities. A Dashboard session needs fresh identity verification to create, reactivate, or widen a live identity or to grant scopes outside the low-risk read allowlist in either mode. If verification is needed, the request returns 403 IDENTITY_VERIFICATION_REQUIRED.
If the workload identity traces back to a team member, Flint checks whether that member's current role can grant the token's scopes on each request. If the member loses that permission or loses access to the merchant, requests with the token return 401 INVALID_CREDENTIAL.
Granting accounts.api_keys.write, accounts.workload_identities.write, commerce.gift_cards.secrets.write, or commerce.license_keys.secrets.write takes full authority in both modes: a full-access key in the identity's mode, a live full-access key for a test identity, or a Dashboard session verified within the last 300 seconds. Other machine callers get 403 FORBIDDEN with reason full_access_required even when they hold the scope; see credentials that can mint keys.
curl -X POST https://api.withflintpay.com/v1/workload-identities \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "GitHub deployment",
"issuer": "https://token.actions.githubusercontent.com",
"subject": "repo:example/store:ref:refs/heads/main",
"claim_conditions": [
{"claim": "repository_owner_id", "value": "12345678", "match": "exact"},
{"claim": "repository_id", "value": "87654321", "match": "exact"}
],
"scopes": ["commerce.orders.read"]
}'
Flint checks the issuer's discovery document when creating the identity. Each merchant can have at most 100 non-archived identities across all environments.
GET /v1/workload-identities returns a cursor-paginated list. Set page_size from 1 to 100, with 20 returned by default, and pass next_page_token as the next request's page_token. Use status to filter by active, inactive, or archived; the default excludes archived identities. The timestamp filters are created_after, created_before, updated_after, and updated_before, with inclusive lower bounds and exclusive upper bounds. Sort with sort_by=created_at, last_used_at, or name, and sort_direction=asc or desc. The default is created_at descending, with workload_identity_id descending to break ties.
The identity resource#
| Field | Behavior |
|---|---|
workload_identity_id | The identity's ID, beginning with wid_. |
name | Your label, from 1 to 100 characters. |
status | active, inactive, or archived. New identities are active. |
mode | test or live, from the authenticated environment. Read-only. |
sandbox_id | The test identity's sandbox. Omitted on live identities. Read-only. |
platform | A computed, extensible description of the issuer's platform. Treat unfamiliar values as valid. Read-only. |
issuer | The exact trusted issuer URL. Immutable after creation. |
audience | The audience the external token must have. Defaults to Flint's issuer URL, https://api.withflintpay.com on the production API. Immutable after creation. |
subject | The required subject or subject pattern, from 1 to 1,024 characters. |
subject_match | exact by default, or glob. |
claim_conditions | Up to 10 distinct conditions. Every condition has claim, value, and match; match defaults to exact and also accepts glob. All conditions must match. |
scopes | At least one scope the identity can grant. Replacing this array replaces the whole set. |
created_by | A reference with resource_type (user, api_key, or workload_identity) and resource_id, identifying who created the identity. Read-only. |
last_used_at | When the identity was last used. Omitted if it has never been used. |
created_at, updated_at | Creation and last-change times, as RFC 3339 timestamps. |
archived_at | The archive time. Omitted before the identity is archived. |
version | The current version. Send it as expected_version to require the version you reviewed. |
Issuer and claim matching#
The issuer must be an HTTPS URL with a DNS host, at most 255 characters long. Only port 443 is allowed; omit credentials, query parameters, and fragments. The issuer host cannot be Flint's API host or a subdomain of it. Flint compares the issuer exactly. The issuer must expose public OpenID Connect discovery and signing keys; private network addresses and redirects are rejected.
Claim names refer to literal top-level scalar claims. Conditions cannot use the registered JWT claims iss, sub, aud, exp, nbf, iat, or jti; configure the issuer, subject, and audience through their own fields.
In a glob match, * matches characters other than :. A pattern can contain at most three * characters and cannot start with one. If the subject or any claim condition uses a glob, include at least one exact claim condition.
Shared issuers also require an exact condition that pins the workload to your tenant:
| Issuer | Required exact condition |
|---|---|
| GitHub Actions | repository_owner_id |
| GitLab.com | namespace_id |
| Buildkite | organization_id |
| Vercel | owner_id |
| CircleCI | oidc.circleci.com/org-id |
For Google Cloud's https://accounts.google.com issuer, use an exact numeric subject and no glob conditions. Microsoft issuers must identify a specific tenant; common, organizations, and consumers issuers are rejected.
For GitHub Actions, also pin repository_id to keep a renamed or recreated repository from matching only by its name. GitHub's sub claim comes in two forms. Repositories created on or after July 15, 2026, and older ones that are renamed, transferred, or opted in, get the immutable form repo:OWNER@OWNER_ID/REPO@REPO_ID:ref:refs/heads/BRANCH. Other repositories keep repo:OWNER/REPO:ref:refs/heads/BRANCH. A job that uses an environment ends in :environment:NAME instead of the :ref: part. Check a token's sub claim before you set subject, because Flint compares it as written.
Update and archive#
PATCH /v1/workload-identities/{workload_identity_id} accepts name, status, subject, subject_match, claim_conditions, and scopes. Omitted fields keep their current values. Arrays replace their current contents; send "claim_conditions": [] to remove all conditions when the resulting matching policy allows it. Include the current expected_version whenever you send claim_conditions or scopes. It is optional for scalar-only changes. An update that changes nothing preserves version and updated_at.
Set status: "inactive" to deactivate an identity, or status: "active" to reactivate it. A stale expected_version returns 409 VERSION_CONFLICT; retrieve the current identity, review the changes, and send its version with your next update.
curl -X PATCH https://api.withflintpay.com/v1/workload-identities/wid_01KWJ93G11C7MF8REX91MDS0CD \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"expected_version": 1, "status": "inactive"}'
DELETE /v1/workload-identities/{workload_identity_id} archives the identity and returns the resource with status: "archived" and archived_at set. You can pass expected_version as a query parameter to require the version you reviewed. Archiving is permanent; create a new identity if you need to replace it. An archived identity no longer counts toward the merchant's limit. Archived identities remain readable by ID and appear in lists with status=archived.
Errors#
- StatusHTTP 400CodeINVALID_
REQUEST What to doA field is invalid. An invalid issuer or discovery document has anINVALID_VALUEdetail onissuer. Correct the named field before retrying. - StatusHTTP 403What to doReason
scope_not_granted: the caller lacks a required management scope. Reasonscope_not_held: it tried to grant scopes it doesn't hold. Checkdetails[0].missing_scopes. - StatusHTTP 403CodeFORBIDDENWhat to doReason
full_access_required: only a full-access key or a freshly verified Dashboard session can grant the step-up scope named byparam. - StatusHTTP 403What to doComplete fresh identity verification in the Dashboard, then retry the live identity change or step-up grant.
details[0].verified_atreports the last verification. - StatusHTTP 404What to doThe ID does not identify a workload identity in the authenticated environment.
- StatusHTTP 409What to doRetrieve the identity and review its current version before retrying the update.
- StatusHTTP 409CodeLIMIT_
REACHED What to doWith reasonworkload_identities, the merchant already has 100 non-archived identities. Archive an unused identity before creating another. - StatusHTTP 502What to doWith reason
issuer_unavailable, issuer discovery timed out or its server returned a temporary error.error_sourceismerchant_endpointandremediation.retryissame_request. Retry after the issuer recovers.
The Workload identity object#
A policy that grants API access to a workload authenticated by an external identity provider.
Returned by GET /v1/workload-identities/{workload_identity_id} and carried by the endpoints below.
Attributes
archived_atstringTime the identity was archived. Omitted before archival.
audiencestringRequiredAudience (`aud`) a token must carry to match this identity. Set at creation and never changes.
claim_conditionsarray of objectRequiredBounded value array of top-level scalar claim conditions. Replaced as a whole on PATCH; [] clears it when the remaining policy is valid.
claimstringRequiredLiteral top-level scalar claim name. Registered JWT claims are reserved.
matchenumRequiredHow `value` is compared with the claim. Defaults to exact.
exactglob
valuestringRequiredThe value the claim must have, not empty. Strings compare as sent, booleans as `true` or `false`, and numbers as canonical decimal text. A claim that is missing, `null`, an array, or an object never matches.
created_atstringRequiredTime the identity was created.
created_byobjectRequiredThe user, API key, or workload identity whose request created this identity.
resource_idstringRequiredID of the creating user, API key, or workload identity.
resource_typeenumRequiredWhat kind of caller created the identity: a `user` through the Dashboard or a CLI login, an `api_key`, or a `workload_identity` acting with its own access token.
api_keyapi_request_logbalancebalance_transactionbundlebundle_componentcategorycheckout_sessioncheckout_session_customer_verificationcredit_notecredit_note_allocationcustom_domaincustomercustomer_addresscustomer_deletion_requestcustomer_email_preferencescustomer_sessioncustomer_tax_exemptioncustomer_verificationdelivery_choice_groupdelivery_location_setdelivery_methoddelivery_profiledelivery_quotedelivery_ratedelivery_rate_callbackdelivery_revocationdelivery_selectiondelivery_zonedemo_sessiondevicediscountdisputeemail_change_requestenvironment_grantfileflint_walletflint_wallet_cardfraud_warningfulfillmentfulfillment_eventfulfillment_notificationgift_cardgift_card_funding_dispositiongift_card_loadgift_card_notificationgift_card_redemptiongift_card_transactionimageinventory_adjustmentinventory_allocation_policyinventory_allocation_policy_revisioninventory_countinventory_iteminventory_levelinventory_movementinventory_receiptinventory_reservationinventory_reservation_lineinventory_transferinventory_transfer_lineinvoiceinvoice_delivery_attemptinvoice_late_feeinvoice_line_iteminvoice_manual_paymentinvoice_payment_attemptinvoice_payment_termlicense_keylicense_key_activationlicense_key_poollicense_key_pool_keylocationmerchantmerchant_billing_balancemerchant_billing_entrymerchant_billing_invoicemerchant_signupmodifiermodifier_groupmodifier_setorderorder_chargeorder_editorder_line_itemorder_line_item_modifierorder_payment_attemptpackagepackage_itempartner_apppartner_app_credentialpartner_app_installpayment_attemptpayment_intentpayment_linkpayment_link_custom_fieldpayment_link_line_itempayment_methodpayment_method_domainpayment_reviewpayment_splitpayoutpayout_destinationpayout_settingsplatform_feeplatform_fee_balance_transactionplatform_fee_payoutprice_listprice_list_priceproductproduct_optionproduct_option_valueproduct_variantpromotionpromotion_codepurchase_refund_allocationreaderrefundrefund_allocationrefund_line_item_adjustmentremembered_buyerreportreport_downloadreturnreturn_activityreturn_dispositionreturn_inspectionreturn_inspection_line_itemreturn_line_itemreturn_policyreturn_policy_revisionreturn_reasonreturn_receiptreturn_receipt_line_itemreturn_resolutionrisk_listrisk_list_itemrisk_rulesandboxsettingsshipmentsubscriptionsubscription_delivery_migrationsubscription_line_itemsubscription_offersubscription_payment_retrysubscription_plansubscription_plan_line_itemtax_calculation_callbacktax_connectiontax_registrationtest_clockticketuserwebhook_deliverywebhook_endpointwebhook_eventworkload_identity
issuerstringRequiredIssuer (`iss`) of the external identity provider whose tokens this identity accepts. Set at creation and never changes.
last_used_atstringMost recent use. Omitted before the first use.
modeenumRequiredEnvironment used for this resource or request.
testlive
namestringRequiredA label that helps you tell workload identities apart, 1 to 100 characters.
platformenumRequiredComputed from the issuer. New platform values may be added.
genericgithub_actionsgitlab_cigoogle_cloudawsazurekubernetescirclecibuildkitevercelfly_io
sandbox_idstringThe sandbox containing this identity. Present only in test mode.
scopesarray of stringRequiredComplete scope set granted to this identity. Replaced as a whole on PATCH.
statusenumRequiredWhether the identity currently accepts token exchanges. Only active identities do.
activeinactivearchived
subjectstringRequiredSubject (`sub`) a token must carry, compared as subject_match says.
subject_matchenumRequiredHow `subject` is compared with a token's `sub` claim.
exactglob
updated_atstringRequiredTime the identity last changed.
versionintegerRequiredPositive concurrency version. Increases on policy and lifecycle changes.
workload_identity_idstringRequiredUnique identifier for this workload identity, prefixed `wid_`.
{
"audience": "https://api.withflintpay.com",
"claim_conditions": [
{
"claim": "repository_owner_id",
"match": "exact",
"value": "123456"
}
],
"created_at": "2026-10-24T12:00:00Z",
"created_by": {
"resource_id": "usr_01K8ABCDEF0123456789ABCDEF",
"resource_type": "user"
},
"issuer": "https://token.actions.githubusercontent.com",
"mode": "live",
"name": "Production deploy",
"platform": "github_actions",
"scopes": [
"commerce.orders.read"
],
"status": "active",
"subject": "repo:acme/shop:ref:refs/heads/main",
"subject_match": "exact",
"updated_at": "2026-10-24T12:00:00Z",
"version": 1,
"workload_identity_id": "wid_01K8ABCDEF0123456789ABCDEF"
}List workload identities#
/v1/workload-identitiesRequires scope accounts.workload_identities.read or accounts.workload_identities.write
Rate limit: read
Returns identities in the authenticated environment, ordered by created_at descending and workload_identity_id descending by default. Archived identities are excluded unless status includes archived. Default order: created_at descending, then workload_identity_id descending.
Query parameters
statusarray of enumFilter by status. Omitted, the list leaves out archived rows; name archived to include them. Values are trimmed and deduplicated in first-seen order; empty or unknown entries are rejected. Values within this filter are ORed; separate filters are ANDed.
activeinactivearchived
page_sizeintegerMaximum number of results to return, from 1 to 100. Defaults to 20.
page_tokenstringOpaque, signed next_page_token from the previous response, bound to the list and caller. Omit on the first request. You may change `page_size` between pages. Reuse it with the same endpoint, filters, sort, and request context. Do not parse or construct tokens. An altered, invalid, expired, or mismatched token returns a validation error.
sort_byenumField to sort by. Defaults to created_at; ties are broken by workload_identity_id.
created_atlast_used_atname
sort_directionenumSort direction. Defaults to desc.
ascdesc
created_afterstringInclusive lower bound on created_at.
created_beforestringExclusive upper bound on created_at.
updated_afterstringInclusive lower bound on updated_at.
updated_beforestringExclusive upper bound on updated_at.
Response · 200
The workload identity.
dataarray of objectRequiredResource, collection, or operation result returned by this request.
archived_atstringTime the identity was archived. Omitted before archival.
audiencestringRequiredAudience (`aud`) a token must carry to match this identity. Set at creation and never changes.
claim_conditionsarray of objectRequiredBounded value array of top-level scalar claim conditions. Replaced as a whole on PATCH; [] clears it when the remaining policy is valid.
created_atstringRequiredTime the identity was created.
created_byobjectRequiredThe user, API key, or workload identity whose request created this identity.
issuerstringRequiredIssuer (`iss`) of the external identity provider whose tokens this identity accepts. Set at creation and never changes.
last_used_atstringMost recent use. Omitted before the first use.
modeenumRequiredEnvironment used for this resource or request.
testlive
namestringRequiredA label that helps you tell workload identities apart, 1 to 100 characters.
platformenumRequiredComputed from the issuer. New platform values may be added.
genericgithub_actionsgitlab_cigoogle_cloudawsazurekubernetescirclecibuildkitevercelfly_io
sandbox_idstringThe sandbox containing this identity. Present only in test mode.
scopesarray of stringRequiredComplete scope set granted to this identity. Replaced as a whole on PATCH.
statusenumRequiredWhether the identity currently accepts token exchanges. Only active identities do.
activeinactivearchived
subjectstringRequiredSubject (`sub`) a token must carry, compared as subject_match says.
subject_matchenumRequiredHow `subject` is compared with a token's `sub` claim.
exactglob
updated_atstringRequiredTime the identity last changed.
versionintegerRequiredPositive concurrency version. Increases on policy and lifecycle changes.
workload_identity_idstringRequiredUnique identifier for this workload identity, prefixed `wid_`.
metaobjectAdditional information about this response.
api_versionstringAPI version used to produce this response.
idempotency_replayedbooleanWhether this response replays a stored result for the supplied Idempotency-Key.
trace_idstringTrace identifier to include when contacting Flint about this request.
warningsarray of objectConditions that need attention even though the request succeeded.
next_page_tokenstringOpaque token to send as `page_token` to retrieve the next page. Omitted when there is no next page.
request_idstringRequiredIdentifier of this API request, used to correlate logs and support requests.
curl https://api.withflintpay.com/v1/workload-identities \
-H "Flint-Version: 2026-09-07" \
-H "Authorization: Bearer YOUR_API_KEY"The workload identity.
{
"data": [
{
"audience": "https://api.withflintpay.com",
"claim_conditions": [
{
"claim": "repository_owner_id",
"match": "exact",
"value": "123456"
}
],
"created_at": "2026-10-24T12:00:00Z",
"created_by": {
"resource_id": "usr_01K8ABCDEF0123456789ABCDEF",
"resource_type": "user"
},
"issuer": "https://token.actions.githubusercontent.com",
"mode": "live",
"name": "Production deploy",
"platform": "github_actions",
"scopes": [
"commerce.orders.read"
],
"status": "active",
"subject": "repo:acme/shop:ref:refs/heads/main",
"subject_match": "exact",
"updated_at": "2026-10-24T12:00:00Z",
"version": 1,
"workload_identity_id": "wid_01K8ABCDEF0123456789ABCDEF"
}
],
"meta": {
"api_version": "2026-09-07"
},
"next_page_token": "opaque-next-page-token",
"request_id": "req_01KWM6WAHG3N9Q8T2V5XRZ7C4D"
}Create a workload identity#
/v1/workload-identitiesIdempotentRequires scope accounts.workload_identities.write
Rate limit: sensitive_write
Creates an active identity in the authenticated environment and validates issuer discovery. A Dashboard session needs fresh identity verification to create a live identity or to grant scopes outside the low-risk read allowlist. Other callers may grant only scopes they hold in this environment. Only a full-access key can grant scopes that require full authority.
Request body
audiencestringImmutable token audience. Defaults to Flint's configured issuer URL when omitted.
claim_conditionsarray of objectBounded value array, at most 10. Defaults to []. Any glob requires an exact claim condition; shared issuers require tenant pinning.
claimstringRequiredLiteral top-level scalar claim name. Registered JWT claims are reserved.
matchenumHow `value` is compared with the claim. Defaults to exact.
exactglob
valuestringRequiredThe value the claim must have, not empty. Strings compare as sent, booleans as `true` or `false`, and numbers as canonical decimal text. A claim that is missing, `null`, an array, or an object never matches.
issuerstringRequiredImmutable public HTTPS issuer with a DNS host, optional port 443, and no userinfo, query, or fragment. Compared exactly.
namestringRequiredA label that helps you tell workload identities apart, 1 to 100 characters. Surrounding whitespace is trimmed before length validation. A supplied value cannot be blank; use null where clearing is supported.
scopesarray of enumRequiredComplete scope set to grant. A Dashboard session needs fresh verification to grant scopes outside this list: commerce.products.read, commerce.subscription_plans.read, commerce.bundles.read, commerce.catalog.read. API credentials may grant only scopes they hold in the same environment. Among API credentials, only full-access keys may grant these scopes: accounts.api_keys.write, commerce.gift_cards.secrets.write, accounts.workload_identities.write, commerce.license_keys.secrets.write.
accounts.api_keys.readaccounts.api_keys.writeaccounts.devices.readaccounts.devices.writeaccounts.workload_identities.readaccounts.workload_identities.writeanalytics.readcheckouts.checkout_sessions.readcheckouts.checkout_sessions.writecheckouts.payment_links.readcheckouts.payment_links.writecommerce.bundles.readcommerce.bundles.writecommerce.catalog.readcommerce.catalog.writecommerce.credit_notes.readcommerce.credit_notes.writecommerce.delivery.readcommerce.delivery.writecommerce.gift_cards.adjustments.writecommerce.gift_cards.readcommerce.gift_cards.redemptions.writecommerce.gift_cards.secrets.writecommerce.gift_cards.writecommerce.inventory.allocation.writecommerce.inventory.policies.writecommerce.inventory.readcommerce.inventory.writecommerce.invoices.readcommerce.invoices.writecommerce.license_keys.readcommerce.license_keys.secrets.writecommerce.license_keys.writecommerce.orders.readcommerce.orders.writecommerce.products.readcommerce.products.writecommerce.promotions.readcommerce.promotions.writecommerce.refunds.readcommerce.refunds.tax_overrides.writecommerce.refunds.writecommerce.returns.operations.writecommerce.returns.policies.writecommerce.returns.readcommerce.returns.reasons.writecommerce.returns.resolutions.writecommerce.returns.writecommerce.subscription_plans.readcommerce.subscription_plans.writecommerce.subscriptions.readcommerce.subscriptions.writecommerce.tickets.readcommerce.tickets.writecustomers.readcustomers.sessions.writecustomers.writedeveloper.merchant_signups.readdeveloper.merchant_signups.writedeveloper.partner_apps.readdeveloper.partner_apps.writedeveloper.request_logs.readdeveloper.request_logs.self.readdeveloper.resource_timelines.readdeveloper.sandboxes.readdeveloper.sandboxes.writedeveloper.test_clocks.readdeveloper.test_clocks.writemerchant_billing.readmerchants.account_sessions.writemerchants.locations.readmerchants.locations.writemerchants.onboarding.readmerchants.onboarding.writemerchants.profile.readmerchants.profile.writemoney_movement.balance_transactions.readmoney_movement.balances.readmoney_movement.payment_splits.readmoney_movement.payout_settings.readmoney_movement.payout_settings.writemoney_movement.payouts.readmoney_movement.payouts.writemoney_movement.platform_fees.readpayments.disputes.readpayments.disputes.writepayments.payment_intents.readpayments.payment_intents.writepayments.payment_method_domains.readpayments.payment_method_domains.writepayments.payment_methods.readpayments.payment_methods.writepayments.readers.readpayments.readers.writereports.readreports.writerisk.controls.writerisk.readrisk.reviews.writesettings.readsettings.writewebhooks.readwebhooks.write
subjectstringRequiredThe subject (`sub`) a token must carry, 1 to 1,024 characters. Compared as subject_match says.
subject_matchenumHow `subject` is compared with a token's `sub` claim. Defaults to exact.
exactglob
Response · 201
The created workload identity.
dataobjectRequiredResource, collection, or operation result returned by this request.
archived_atstringTime the identity was archived. Omitted before archival.
audiencestringRequiredAudience (`aud`) a token must carry to match this identity. Set at creation and never changes.
claim_conditionsarray of objectRequiredBounded value array of top-level scalar claim conditions. Replaced as a whole on PATCH; [] clears it when the remaining policy is valid.
created_atstringRequiredTime the identity was created.
created_byobjectRequiredThe user, API key, or workload identity whose request created this identity.
issuerstringRequiredIssuer (`iss`) of the external identity provider whose tokens this identity accepts. Set at creation and never changes.
last_used_atstringMost recent use. Omitted before the first use.
modeenumRequiredEnvironment used for this resource or request.
testlive
namestringRequiredA label that helps you tell workload identities apart, 1 to 100 characters.
platformenumRequiredComputed from the issuer. New platform values may be added.
genericgithub_actionsgitlab_cigoogle_cloudawsazurekubernetescirclecibuildkitevercelfly_io
sandbox_idstringThe sandbox containing this identity. Present only in test mode.
scopesarray of stringRequiredComplete scope set granted to this identity. Replaced as a whole on PATCH.
statusenumRequiredWhether the identity currently accepts token exchanges. Only active identities do.
activeinactivearchived
subjectstringRequiredSubject (`sub`) a token must carry, compared as subject_match says.
subject_matchenumRequiredHow `subject` is compared with a token's `sub` claim.
exactglob
updated_atstringRequiredTime the identity last changed.
versionintegerRequiredPositive concurrency version. Increases on policy and lifecycle changes.
workload_identity_idstringRequiredUnique identifier for this workload identity, prefixed `wid_`.
metaobjectAdditional information about this response.
api_versionstringAPI version used to produce this response.
idempotency_replayedbooleanWhether this response replays a stored result for the supplied Idempotency-Key.
trace_idstringTrace identifier to include when contacting Flint about this request.
warningsarray of objectConditions that need attention even though the request succeeded.
request_idstringRequiredIdentifier of this API request, used to correlate logs and support requests.
curl -X POST https://api.withflintpay.com/v1/workload-identities \
-H "Flint-Version: 2026-09-07" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: a-unique-key" \
-d '{
"claim_conditions": [
{
"claim": "repository_owner_id",
"match": "exact",
"value": "123456"
}
],
"issuer": "https://token.actions.githubusercontent.com",
"name": "Production deploy",
"scopes": [
"commerce.orders.read"
],
"subject": "repo:acme/shop:ref:refs/heads/main"
}'Get a workload identity#
/v1/workload-identities/{workload_identity_id}Requires scope accounts.workload_identities.read or accounts.workload_identities.write
Rate limit: read
Returns an identity in the authenticated environment, including an archived identity.
Path parameters
workload_identity_idstringRequiredFlint workload identity ID. Must be a valid ID with prefix wid_. Malformed IDs return 400 INVALID_REQUEST with detail INVALID_VALUE; well-formed IDs that do not exist return 404 RESOURCE_NOT_FOUND.
curl https://api.withflintpay.com/v1/workload-identities/wid_01KEZF7C00GKCN7Y1482VY8TWP \
-H "Flint-Version: 2026-09-07" \
-H "Authorization: Bearer YOUR_API_KEY"The workload identity.
{
"data": {
"audience": "https://api.withflintpay.com",
"claim_conditions": [
{
"claim": "repository_owner_id",
"match": "exact",
"value": "123456"
}
],
"created_at": "2026-10-24T12:00:00Z",
"created_by": {
"resource_id": "usr_01K8ABCDEF0123456789ABCDEF",
"resource_type": "user"
},
"issuer": "https://token.actions.githubusercontent.com",
"mode": "live",
"name": "Production deploy",
"platform": "github_actions",
"scopes": [
"commerce.orders.read"
],
"status": "active",
"subject": "repo:acme/shop:ref:refs/heads/main",
"subject_match": "exact",
"updated_at": "2026-10-24T12:00:00Z",
"version": 1,
"workload_identity_id": "wid_01K8ABCDEF0123456789ABCDEF"
},
"meta": {
"api_version": "2026-09-07"
},
"request_id": "req_01KWM6WAHG3N9Q8T2V5XRZ7C4D"
}Update a workload identity#
/v1/workload-identities/{workload_identity_id}IdempotentRequires scope accounts.workload_identities.write
Rate limit: sensitive_write
Updates mutable policy fields. expected_version is optional for scalar updates and required when claim_conditions or scopes is supplied. Arrays replace their entire value. Issuer and audience are immutable. Dashboard callers reactivating or widening live identities need fresh identity verification.
Path parameters
workload_identity_idstringRequiredFlint workload identity ID. Must be a valid ID with prefix wid_. Malformed IDs return 400 INVALID_REQUEST with detail INVALID_VALUE; well-formed IDs that do not exist return 404 RESOURCE_NOT_FOUND.
Request body
claim_conditionsarray of objectBounded value array, at most 10. Defaults to []. Any glob requires an exact claim condition; shared issuers require tenant pinning.
claimstringRequiredLiteral top-level scalar claim name. Registered JWT claims are reserved.
matchenumHow `value` is compared with the claim. Defaults to exact.
exactglob
valuestringRequiredThe value the claim must have, not empty. Strings compare as sent, booleans as `true` or `false`, and numbers as canonical decimal text. A claim that is missing, `null`, an array, or an object never matches.
expected_versionintegerVersion most recently read. Required when claim_conditions or scopes is supplied; optional for scalar updates.
namestringA label that helps you tell workload identities apart, 1 to 100 characters. Omit to keep the current name. Surrounding whitespace is trimmed before length validation. A supplied value cannot be blank; use null where clearing is supported.
scopesarray of enumComplete scope set to grant. A Dashboard session needs fresh verification to grant scopes outside this list: commerce.products.read, commerce.subscription_plans.read, commerce.bundles.read, commerce.catalog.read. API credentials may grant only scopes they hold in the same environment. Among API credentials, only full-access keys may grant these scopes: accounts.api_keys.write, commerce.gift_cards.secrets.write, accounts.workload_identities.write, commerce.license_keys.secrets.write.
accounts.api_keys.readaccounts.api_keys.writeaccounts.devices.readaccounts.devices.writeaccounts.workload_identities.readaccounts.workload_identities.writeanalytics.readcheckouts.checkout_sessions.readcheckouts.checkout_sessions.writecheckouts.payment_links.readcheckouts.payment_links.writecommerce.bundles.readcommerce.bundles.writecommerce.catalog.readcommerce.catalog.writecommerce.credit_notes.readcommerce.credit_notes.writecommerce.delivery.readcommerce.delivery.writecommerce.gift_cards.adjustments.writecommerce.gift_cards.readcommerce.gift_cards.redemptions.writecommerce.gift_cards.secrets.writecommerce.gift_cards.writecommerce.inventory.allocation.writecommerce.inventory.policies.writecommerce.inventory.readcommerce.inventory.writecommerce.invoices.readcommerce.invoices.writecommerce.license_keys.readcommerce.license_keys.secrets.writecommerce.license_keys.writecommerce.orders.readcommerce.orders.writecommerce.products.readcommerce.products.writecommerce.promotions.readcommerce.promotions.writecommerce.refunds.readcommerce.refunds.tax_overrides.writecommerce.refunds.writecommerce.returns.operations.writecommerce.returns.policies.writecommerce.returns.readcommerce.returns.reasons.writecommerce.returns.resolutions.writecommerce.returns.writecommerce.subscription_plans.readcommerce.subscription_plans.writecommerce.subscriptions.readcommerce.subscriptions.writecommerce.tickets.readcommerce.tickets.writecustomers.readcustomers.sessions.writecustomers.writedeveloper.merchant_signups.readdeveloper.merchant_signups.writedeveloper.partner_apps.readdeveloper.partner_apps.writedeveloper.request_logs.readdeveloper.request_logs.self.readdeveloper.resource_timelines.readdeveloper.sandboxes.readdeveloper.sandboxes.writedeveloper.test_clocks.readdeveloper.test_clocks.writemerchant_billing.readmerchants.account_sessions.writemerchants.locations.readmerchants.locations.writemerchants.onboarding.readmerchants.onboarding.writemerchants.profile.readmerchants.profile.writemoney_movement.balance_transactions.readmoney_movement.balances.readmoney_movement.payment_splits.readmoney_movement.payout_settings.readmoney_movement.payout_settings.writemoney_movement.payouts.readmoney_movement.payouts.writemoney_movement.platform_fees.readpayments.disputes.readpayments.disputes.writepayments.payment_intents.readpayments.payment_intents.writepayments.payment_method_domains.readpayments.payment_method_domains.writepayments.payment_methods.readpayments.payment_methods.writepayments.readers.readpayments.readers.writereports.readreports.writerisk.controls.writerisk.readrisk.reviews.writesettings.readsettings.writewebhooks.readwebhooks.write
statusenumTurns the identity on or off. Archiving is a separate DELETE. Omit to keep the current status.
activeinactive
subjectstringThe subject (`sub`) a token must carry, 1 to 1,024 characters, compared as subject_match says. Omit to keep the current subject.
subject_matchenumHow `subject` is compared with a token's `sub` claim. Omit to keep the current setting.
exactglob
curl -X PATCH https://api.withflintpay.com/v1/workload-identities/wid_01KEZF7C00GKCN7Y1482VY8TWP \
-H "Flint-Version: 2026-09-07" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: a-unique-key" \
-d '{
"expected_version": 1,
"name": "Release deploy",
"status": "inactive"
}'Archive a workload identity#
/v1/workload-identities/{workload_identity_id}IdempotentRequires scope accounts.workload_identities.write
Rate limit: sensitive_write
Soft-archives the identity and returns it with status archived. The identity remains readable by ID and cannot be reactivated. Repeating DELETE without a stale fence returns the archived identity without changing its version.
Path parameters
workload_identity_idstringRequiredFlint workload identity ID. Must be a valid ID with prefix wid_. Malformed IDs return 400 INVALID_REQUEST with detail INVALID_VALUE; well-formed IDs that do not exist return 404 RESOURCE_NOT_FOUND.
Query parameters
expected_versionintegerOptional version most recently read.
curl -X DELETE https://api.withflintpay.com/v1/workload-identities/wid_01KEZF7C00GKCN7Y1482VY8TWP \
-H "Flint-Version: 2026-09-07" \
-H "Authorization: Bearer YOUR_API_KEY"Was this helpful?