Skip to content

Credentials

Create workload identity subject

Start a keyless credential. Returns the issuer, audience, and a fresh subject to configure in the cloud's trust policy, plus `keylessConfig`: a prefilled `serviceAccountJson` whose `subjectProof` is valid for 24 hours and only for the requesting user. Add the `requiredConfigFields`, then call Create service-account credential with the same `providerId`; Sim verifies the trust while saving. Google Cloud has no fixed audience: it is the credential's own pool provider. Without keyless support the deployment returns `400` with `details.code` `WORKLOAD_IDENTITY_NOT_CONFIGURED`. Workspace API keys return `403`; use a personal API key or scoped OAuth token. OAuth scope: `api:write`.

POST/api/v2/credentials/workload-identity/subjects

Start a keyless credential. Returns the issuer, audience, and a fresh subject to configure in the cloud's trust policy, plus keylessConfig: a prefilled serviceAccountJson whose subjectProof is valid for 24 hours and only for the requesting user. Add the requiredConfigFields, then call Create service-account credential with the same providerId; Sim verifies the trust while saving. Google Cloud has no fixed audience: it is the credential's own pool provider. Without keyless support the deployment returns 400 with details.code WORKLOAD_IDENTITY_NOT_CONFIGURED. Workspace API keys return 403; use a personal API key or scoped OAuth token.

OAuth scope: api:write.

Authentication

Send a personal or workspace API key in X-API-Key. See key types and access; operations that reject workspace keys say so in their description.

Send X-API-Key in the request header.

Alternatively

Send a Sim OAuth access token in Authorization: Bearer. See OAuth authentication and scopes.

Authorization: Bearer YOUR_ACCESS_TOKEN

Required scopes: api:write

OAuth flows
json
{
  "authorizationCode": {
    "authorizationUrl": "https://www.sim.ai/api/auth/oauth2/authorize",
    "tokenUrl": "https://www.sim.ai/api/auth/oauth2/token",
    "refreshUrl": "https://www.sim.ai/api/auth/oauth2/token",
    "scopes": {
      "api:read": "Read your workspaces, workflows, files, tables, and logs",
      "api:write": "Read, create, change, run, and delete resources in your workspaces",
      "offline_access": "Stay signed in without asking again"
    }
  }
}

OAuth scope: api:write.

Request body

Required

Workspace that will own the keyless credential and the service-account provider it will be created under.

object

Workspace that will own the keyless credential and the service-account provider it will be created under.

2 fields
workspaceIdstringRequired

Workspace that will own the keyless credential.

minLength
1
maxLength
128
providerIdstringRequired

Service-account provider the keyless credential will be created under; pass the same value to Create service-account credential. The response and List credential providers name the fields its keyless configuration needs.

enum
["aws-service-account","databricks-service-account","snowflake-service-account","microsoft-app-service-account","google-service-account"]

Additional properties are not allowed.

Request example 1

json
{
  "workspaceId": "a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64",
  "providerId": "aws-service-account"
}

Responses

200

A subject and proof for one new keyless credential.

object

Trust values to configure in the cloud, and the proof to submit when creating the credential.

1 field
dataobjectRequired

Response data.

8 fields
issuerstringRequired

OpenID Connect issuer URL to register as the identity provider the cloud trusts.

audiencestring

The aud claim the cloud must accept. Absent for Google Cloud, whose audience is each credential's own workload identity pool provider.

subjectstringRequired

The exact sub claim the trust configuration must allow; unique to one credential.

subjectProofstringRequired

Opaque proof submitted with subject when the credential is created. Bound to the requesting user, workspace, and provider.

expiresAtstringRequired

ISO 8601 timestamp after which subjectProof can no longer create a credential.

format
date-time
pattern
^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
keylessConfigobjectRequired

Prefilled keyless serviceAccountJson: add requiredConfigFields, then send it to Create service-account credential.

3 fields
authTypestringRequired

The provider's keyless authentication type.

subjectstringRequired

The exact sub claim the trust configuration must allow; unique to one credential.

subjectProofstringRequired

Opaque proof submitted with subject when the credential is created. Bound to the requesting user, workspace, and provider.

Additional properties are not allowed.

requiredConfigFieldsarrayRequired

Fields from your cloud setup that keylessConfig still needs, such as roleArn or host.

Schema details
Array itemstring
optionalConfigFieldsarrayRequired

Fields keylessConfig may also carry.

Schema details
Array itemstring

Additional properties are not allowed.

Additional properties are not allowed.

Response example 1

json
{
  "data": {
    "issuer": "https://www.sim.ai/oidc/workload",
    "audience": "sts.amazonaws.com",
    "subject": "sim:workspace:<workspaceId>:credential:<subjectId>",
    "subjectProof": "<subjectProof from Create workload identity subject>",
    "expiresAt": "2026-06-21T14:17:11.000Z",
    "keylessConfig": {
      "authType": "oidc_role",
      "subject": "sim:workspace:<workspaceId>:credential:<subjectId>",
      "subjectProof": "<subjectProof from Create workload identity subject>"
    },
    "requiredConfigFields": [
      "roleArn"
    ],
    "optionalConfigFields": [
      "stsRegion",
      "sessionDurationSeconds"
    ]
  }
}

Response headers

X-RateLimit-Limitinteger

Maximum requests allowed in the current window.

minimum
0
maximum
9007199254740991
X-RateLimit-Remaininginteger

Requests remaining in the current window.

minimum
0
maximum
9007199254740991
X-RateLimit-Resetstring

ISO 8601 timestamp when the current rate-limit window resets.

format
date-time
pattern
^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
Was this helpful?
Suggest an edit