Verify and store a service-account credential using the fields from List Credential Providers, encoded as a JSON object string in credentials. Secrets are never returned. A matching source returns the existing credential with 200; creation returns 201. Workspace API keys return 403; use a personal API key or scoped OAuth token.
OAuth scope: api:write.
/api/v2/credentialsYour 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 a write-only JSON object string containing the 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
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": "string", "type": "service_account", "providerId": "string", "credentials": "string" }'{
"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": "Invalid request"
}
}{
"error": {
"code": "UNAUTHORIZED",
"message": "Authentication required"
}
}{
"error": {
"code": "FORBIDDEN",
"message": "Insufficient workspace permissions",
"details": {
"code": "INSUFFICIENT_WORKSPACE_ROLE"
}
}
}{
"error": {
"code": "NOT_FOUND",
"message": "Not found"
}
}{
"error": {
"code": "CONFLICT",
"message": "The request conflicts with the current state of the resource"
}
}{
"error": {
"code": "PAYLOAD_TOO_LARGE",
"message": "Request body is too large"
}
}{
"error": {
"code": "UNSUPPORTED_MEDIA_TYPE",
"message": "Request body must be sent as application/json"
}
}{
"error": {
"code": "RATE_LIMITED",
"message": "API rate limit exceeded",
"details": {
"retryAfter": "2026-01-01T00:00:30.000Z"
}
}
}{
"error": {
"code": "INTERNAL_ERROR",
"message": "Internal server error"
}
}{
"error": {
"code": "SERVICE_UNAVAILABLE",
"message": "Service temporarily unavailable"
}
}