---
title: "Create a new Service Account"
method: POST
path: "/v2/service_account/create"
tags: ["Service Account Governance"]
---

# Create a new Service Account

`POST /v2/service_account/create`

Creates a new Service Account

## Request body

- ServiceAccountDetails
  - `created_by` string — Name of the user who created the account.
  - `created_at` string, date-time — Account creation timestamp
  - `updated_by` string — Name of the user who recently updated the account.
  - `updated_at` string, date-time — Account last updated timestamp.
  - `parent_id` string — Parent account of the account.
  - `source_account_id` string — Source account id in case of created from associated accounts.
  - `billing_account_id` string — Link to Service Account that is used to retrieve billing information.
  - `resource_service_account_id` string — Reference to the Service Account under which the resource is provisioned.
  - `tenant_id` string — Tenant Id. This is a required field.
  - `name` string — Name of the account. This is a required field.
  - `description` string — A brief description of the account.
  - `currency` 'AED' | 'ALL' | 'ARS' | 'AUD' | 'BAM' | 'BDT' | 'BGN' | 'BHD' | 'BRL' | 'CAD' | 'CHF' | 'CLP' | 'CNY' | 'COP' | 'CRC' | 'CZK' | 'DKK' | 'EGP' | 'EUR' | 'GBP' | 'HKD' | 'HRK' | 'HUF' | 'IDR' | 'ILS' | 'INR' | 'ISK' | 'JPY' | 'KES' | 'KRW' | 'KWD' | 'KZT' | 'MOP' | 'MVR' | 'MXN' | 'MYR' | 'NOK' | 'NZD' | 'OMR' | 'PEN' | 'PHP' | 'PKR' | 'PLN' | 'QAR' | 'RON' | 'RSD' | 'RUB' | 'SAR' | 'SEK' | 'SGD' | 'THB' | 'TRY' | 'TWD' | 'USD' | 'VND' | 'ZAR' — Billing currency of the account.
  - `use_in_self_service` boolean — If set, the account will be used in self service for its tenant.
  - `status` 'not_validated' | 'validated' | 'not_onboarded' | 'not_onboarded_validated' | 'active' | 'inactive' | 'retired' | 'deleting' — Indicates the status of the account. This is a required field.
  - `keystone_tenant_id` string — Id of the keystone tenant for mistral template executions.
  - `scope` 'global' | 'account' | 'tenant' — Scope of the account. This is a required field.
  - `onboarding_type` 'manual' | 'on_demand' | 'automatic' — Type of the onboarding. This is a required field.
  - `onboarded_features` ServiceAccountFeatureDetails[]
    - `feature` 'appsecops__onboarding' | 'assessments__wellarchitected' | 'assessments__wellarchitected__auto_assessment' | 'assessments__wellarchitected__auto_assessment__aws_sync' | 'assessments__wellarchitected__custom_framework__aws_sync' | 'cloudops__activity' | 'cloudops__activity__periodic' | 'cloudops__activity__real_time_sync_read' | 'cloudops__activity__real_time_sync_write' | 'cloudops__backup_management' | 'cloudops__cloudwatch_agent' | 'cloudops__monitoring_alerts' | 'cloudops__monitoring_alerts__periodic' | 'cloudops__monitoring_alerts__real_time_sync_read' | 'cloudops__monitoring_alerts__real_time_sync_write' | 'cloudops__patch_management' | 'cloudops__runbooks' | 'cloudops__utilization' | 'core__inventory' | 'core__inventory__management' | 'core__policy_engine' | 'core__policy_engine__aws_config' | 'core__policy_engine__azure_policy' | 'core__resource_discovery' | 'core__resource_discovery_extra' | 'core__tagging_governance' | 'core__tagging_governance_extra' | 'finops__assessments' | 'finops__azurehybridbenefit_recommendations' | 'finops__budget' | 'finops__cloud_native_recommendations' | 'finops__cost_anomaly' | 'finops__cost_processing' | 'finops__cost_savings' | 'finops__enterprise_discount_program' | 'finops__reservation' | 'finops__right_size_recommendations' | 'finops__savings_plans' | 'finops__schedule_recommendations' | 'governance__request' | 'integration__application_performance_monitoring' | 'integration__azure_security_graph' | 'integration__azure_sentinel' | 'integration__tenable_nessus' | 'secops__access' | 'secops__aws_security_hub' | 'secops__cloud_native_security_information_event_management' | 'secops__compliance' | 'secops__threats' | 'secops__threats__posture_read' | 'secops__threats__posture_write' | 'secops__threats__realtime_alerts_read' | 'secops__threats__realtime_alerts_write' | 'secops__vulnerabilities' | 'secops__vulnerabilities__read' | 'secops__vulnerabilities__write' | 'selfservice__governance' | 'stackops' | 'stackops__deployment' | 'system__roles' — Feature for the account
    - `status` 'onboarding' | 'onboarding_failed' | 'onboarded' | 'offboarding' | 'offboarding_failed' — Status of an account feature
    - `inactive` boolean — If set, feature is temporarily inactive
    - `silence` boolean — If set, feature failures will not raise a warning in the UI
    - `desired_status` 'onboarding' | 'onboarding_failed' | 'onboarded' | 'offboarding' | 'offboarding_failed' — The desired status of the service account
    - `failure_reason` string — Failure reason
    - `tool_account_id` string — Optional tool account linked to this feature.
    - `onboarded_at` string, date-time — Onboarding timestamp
    - `onboarded_by` string — Name of the user who onboarded the feature.
    - `updated_at` string, date-time — Last update timestamp
    - `background_job_id` RecordIdentity
      - `sysId` string — Unique Identifier of the tracked item
      - `lastUpdate` string, date-time — Last update of the tracked item
      - `table` string — Context of the tracked item
  - `native_details` ServiceAccountNativeDetailsBase
    - `type` string, required — Concrete type used for polymorphic deserialization (discriminator)
  - `credentials` ServiceAccountCredentialsBase
    - `type` string, required — Concrete type used for polymorphic deserialization (discriminator)
  - `credentials_temp` ServiceAccountCredentialsBase
    - `type` string, required — Concrete type used for polymorphic deserialization (discriminator)
  - `custom_tags` KeyValuePairKind[] — List of tag key/value and kind
    - `key` string — Key of the pair
    - `value` string — Value of the pair
    - `kind` string — Type of the key
  - `assessment_details` ServiceAccountAssessmentDetails
    - `score` integer — Assessment Score
    - `grade` string — Assessment Grade
    - `last_assessed_time` string — Last Assessment Time
  - `governance_configuration` GovernanceConfiguration
    - `settings` GovernanceConfigurationBase[] — Governance Configuration settings
      - `version_number` integer — Version number of this setting
      - `type` string, required — Concrete type used for polymorphic deserialization (discriminator)
  - `is_active_in_cloud` boolean — Indicates whether the account is active in the native cloud.
  - `skip_access_validation` boolean — If set, access validation checks will be skipped for this account.

## Response `201`

Created

- string

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `500` — Internal Server Error

---

[API](https://skmtc.dev/corestack/apis/corestack-external-api.md) · [All operations](https://skmtc.dev/corestack/apis/corestack-external-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/corestack/corestack-external-api/revisions/bf2cdf20826d/schema)
