{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/contraforce/json-schema/contraforce-api-response-of-service-account-credential-created-dto-schema.json",
  "title": "ApiResponseOfServiceAccountCredentialCreatedDto",
  "description": "Standard v2 API response envelope for single-item responses.",
  "x-generated": "2026-11-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/contraforce-service-accounts-api-openapi.yml#/components/schemas/ApiResponseOfServiceAccountCredentialCreatedDto",
  "type": "object",
  "properties": {
    "data": {
      "description": "Returned only when a credential is created. Contains the plaintext client secret which is shown once.",
      "$ref": "#/$defs/ServiceAccountCredentialCreatedDto"
    },
    "meta": {
      "$ref": "#/$defs/ResponseMeta"
    }
  },
  "$defs": {
    "ResponseMeta": {
      "type": "object",
      "properties": {
        "requestId": {
          "type": [
            "null",
            "string"
          ]
        },
        "timestamp": {
          "type": [
            "null",
            "string"
          ]
        }
      }
    },
    "ServiceAccountCredentialCreatedDto": {
      "type": "object",
      "properties": {
        "clientId": {
          "type": "string",
          "format": "uuid"
        },
        "clientSecret": {
          "type": [
            "null",
            "string"
          ]
        },
        "id": {
          "type": "string",
          "format": "uuid"
        },
        "clientSecretPrefix": {
          "type": [
            "null",
            "string"
          ]
        },
        "status": {
          "$ref": "#/$defs/ServiceAccountCredentialStatus"
        },
        "expirationDate": {
          "type": [
            "null",
            "string"
          ],
          "format": "date-time"
        },
        "lastUsedAt": {
          "type": [
            "null",
            "string"
          ],
          "format": "date-time"
        },
        "createdAt": {
          "type": "string",
          "format": "date-time"
        },
        "scopes": {
          "type": [
            "null",
            "array"
          ],
          "items": {
            "type": "string"
          },
          "description": "The API scopes granted to this credential."
        }
      },
      "description": "Returned only when a credential is created. Contains the plaintext client secret which is shown once."
    },
    "ServiceAccountCredentialStatus": {
      "enum": [
        "Active",
        "Revoked"
      ]
    }
  }
}