Skip to main content
POST
/
workspaces
/
{workspace_id}
/
service-accounts
Error
A valid request URL is required to generate request examples
{
  "issued_api_key": {
    "raw_key": "<string>",
    "api_key": {
      "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "name": "<string>",
      "key_id": "<string>",
      "preview": "<string>",
      "created_at": "2023-11-07T05:31:56Z",
      "updated_at": "2023-11-07T05:31:56Z",
      "created_by": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "created_by_user": {
        "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
        "email": "jsmith@example.com",
        "first_name": "<string>",
        "last_name": "<string>"
      },
      "revoked_by": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "revoked_by_user": {
        "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
        "email": "jsmith@example.com",
        "first_name": "<string>",
        "last_name": "<string>"
      },
      "last_used_at": "2023-11-07T05:31:56Z",
      "revoked_at": "2023-11-07T05:31:56Z"
    }
  },
  "service_account": {
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "organization_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "name": "<string>",
    "created_at": "2023-11-07T05:31:56Z",
    "updated_at": "2023-11-07T05:31:56Z",
    "workspace_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "owner_user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "owner_user": {
      "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "email": "jsmith@example.com",
      "first_name": "<string>",
      "last_name": "<string>"
    },
    "description": "<string>",
    "disabled_at": "2023-11-07T05:31:56Z",
    "last_used_at": "2023-11-07T05:31:56Z",
    "scopes": [
      {
        "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
        "name": "<string>",
        "resource": "<string>",
        "action": "<string>",
        "description": "<string>"
      }
    ],
    "active_api_key": {
      "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "name": "<string>",
      "key_id": "<string>",
      "preview": "<string>",
      "created_at": "2023-11-07T05:31:56Z",
      "updated_at": "2023-11-07T05:31:56Z",
      "created_by": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "created_by_user": {
        "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
        "email": "jsmith@example.com",
        "first_name": "<string>",
        "last_name": "<string>"
      },
      "revoked_by": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "revoked_by_user": {
        "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
        "email": "jsmith@example.com",
        "first_name": "<string>",
        "last_name": "<string>"
      },
      "last_used_at": "2023-11-07T05:31:56Z",
      "revoked_at": "2023-11-07T05:31:56Z"
    },
    "api_key_counts": {
      "total": 0,
      "active": 0,
      "revoked": 0
    }
  }
}
{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}

Authorizations

fastapiusersauth
string
cookie
required

Path Parameters

workspace_id
string<uuid>
required

Body

application/json
name
string
required
Required string length: 1 - 255
description
string | null
Maximum string length: 512
scope_ids
string<uuid>[]
initial_key_name
string
default:Primary
Required string length: 1 - 255

Response

Successful Response

issued_api_key
IssuedServiceAccountApiKey · object
required
service_account
ServiceAccountRead · object
required