Create Service-Account Credential
Verify and store one service-account credential. Use provider discovery to select a service-account provider and submit its required fields. Secret fields are write-only and are never returned. A retried source match returns the existing credential with 200; a newly created credential returns 201. A workspace API key is rejected with 403; use a personal API key.
/api/v2/credentialsAuthorization
apiKey Your Sim API key, personal or workspace-scoped. Generate one under Settings, then API Keys. Operations that reject workspace keys say so in their own description.
In: header
Request Body
application/json
Provider identifier, optional display metadata, and the write-only fields declared by provider discovery.
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://www.sim.ai/api/v2/credentials" \ -H "X-API-Key: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "workspaceId": "a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64", "type": "service_account", "providerId": "zoom-service-account", "displayName": "Zoom automation", "clientId": "YOUR_CLIENT_ID", "clientSecret": "YOUR_CLIENT_SECRET", "orgId": "YOUR_ACCOUNT_ID" }'{
"data": {
"id": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
"type": "service_account",
"displayName": "Zoom service account",
"description": null,
"providerId": "zoom-service-account",
"accountId": null,
"hasServiceAccountKey": true,
"role": "admin",
"createdAt": "2026-06-01T09:14:00.000Z",
"updatedAt": "2026-06-20T14:02:11.000Z"
}
}{
"data": {
"id": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
"type": "service_account",
"displayName": "Zoom service account",
"description": null,
"providerId": "zoom-service-account",
"accountId": null,
"hasServiceAccountKey": true,
"role": "admin",
"createdAt": "2026-06-01T09:14:00.000Z",
"updatedAt": "2026-06-20T14:02:11.000Z"
}
}{
"error": {
"code": "BAD_REQUEST",
"message": "The request is invalid."
}
}{
"error": {
"code": "BAD_REQUEST",
"message": "The request is invalid."
}
}{
"error": {
"code": "BAD_REQUEST",
"message": "The request is invalid."
}
}{
"error": {
"code": "BAD_REQUEST",
"message": "The request is invalid."
}
}{
"error": {
"code": "BAD_REQUEST",
"message": "The request is invalid."
}
}{
"error": {
"code": "BAD_REQUEST",
"message": "The request is invalid."
}
}{
"error": {
"code": "BAD_REQUEST",
"message": "The request is invalid."
}
}{
"error": {
"code": "BAD_REQUEST",
"message": "The request is invalid."
}
}{
"error": {
"code": "BAD_REQUEST",
"message": "The request is invalid."
}
}