{
  "openapi": "3.1.0",
  "info": {
    "title": "Silicon Organizations Interface API",
    "version": "1.0.0",
    "description": "Full frontend API for the selected personal or work account. See the Interface guide for permissions, workflows, limits and recovery."
  },
  "servers": [
    {
      "url": "https://organizations.teamofsilicons.com/v1"
    }
  ],
  "externalDocs": {
    "url": "https://organizations.teamofsilicons.com/docs/interfaces"
  },
  "security": [
    {
      "OrganizationsAccess": []
    }
  ],
  "paths": {
    "/meta": {
      "get": {
        "operationId": "metadata",
        "summary": "Discover service and documentation",
        "security": [],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "app_id": {
                      "type": "string"
                    },
                    "accounts_url": {
                      "type": "string"
                    },
                    "public_url": {
                      "type": "string"
                    },
                    "openapi_url": {
                      "type": "string"
                    },
                    "interface_api_documentation_url": {
                      "type": "string"
                    },
                    "version": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "description": "Domain error, or plain text for invalid transport input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/openapi.json": {
      "get": {
        "operationId": "openapi",
        "summary": "Download this OpenAPI document",
        "security": [],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "default": {
            "description": "Domain error, or plain text for invalid transport input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/me": {
      "get": {
        "operationId": "me",
        "summary": "Get the signed-in workspace",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Workspace"
                }
              }
            }
          },
          "default": {
            "description": "Domain error, or plain text for invalid transport input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/orgs": {
      "get": {
        "operationId": "organizations",
        "summary": "Get selectable organizations and invitations",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Workspace"
                }
              }
            }
          },
          "default": {
            "description": "Domain error, or plain text for invalid transport input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "createOrganization",
        "summary": "Create from a personal account",
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200
            },
            "description": "Reuse the same key and body for retries."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "org_id": {
                    "type": "string"
                  },
                  "name": {
                    "type": "string"
                  },
                  "handle": {
                    "type": "string"
                  },
                  "logo_id": {
                    "type": "string"
                  },
                  "logo_url": {
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                },
                "required": [
                  "org_id",
                  "name",
                  "handle"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "org": {
                      "type": "object"
                    },
                    "work_account": {
                      "$ref": "#/components/schemas/Account"
                    },
                    "switch_account_required": {
                      "type": "boolean"
                    },
                    "stk": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "description": "Domain error, or plain text for invalid transport input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/orgs/availability/{org}": {
      "get": {
        "operationId": "availability",
        "summary": "Check a proposed permanent organization ID",
        "security": [],
        "parameters": [
          {
            "name": "org",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "available": {
                      "type": "boolean"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "description": "Domain error, or plain text for invalid transport input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/creations/status": {
      "get": {
        "operationId": "creationStatus",
        "summary": "Recover a pending organization creation",
        "parameters": [
          {
            "name": "key",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "none",
                        "pending",
                        "complete"
                      ]
                    },
                    "org_id": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "description": "Domain error, or plain text for invalid transport input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/orgs/{org}": {
      "get": {
        "operationId": "organization",
        "summary": "Read the current role-filtered view",
        "parameters": [
          {
            "name": "org",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrganizationView"
                }
              }
            }
          },
          "default": {
            "description": "Domain error, or plain text for invalid transport input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      },
      "patch": {
        "operationId": "updateOrganization",
        "summary": "Update organization identity or permissions",
        "parameters": [
          {
            "name": "org",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200
            },
            "description": "Reuse the same key and body for retries."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "logo_id": {
                    "type": "string"
                  },
                  "logo_url": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "admin_team_permissions": {
                    "$ref": "#/components/schemas/AdminTeamPermissions"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrganizationView"
                }
              }
            }
          },
          "default": {
            "description": "Domain error, or plain text for invalid transport input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/orgs/{org}/actions": {
      "post": {
        "operationId": "organizationAction",
        "summary": "Perform an authorized organization action",
        "parameters": [
          {
            "name": "org",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200
            },
            "description": "Reuse the same key and body for retries."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Action"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/OrganizationView"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "left": {
                          "const": true
                        },
                        "org_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "left",
                        "org_id"
                      ]
                    }
                  ],
                  "description": "Authorized view, with extra receipt fields such as team, invite, acceptance_url, offer, vote, request_id, or stk depending on the action."
                }
              }
            }
          },
          "default": {
            "description": "Domain error, or plain text for invalid transport input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/orgs/{org}/publishing-policy": {
      "get": {
        "operationId": "publishingPolicy",
        "summary": "Read current organization publishing grants as an admin",
        "parameters": [
          {
            "name": "org",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "org_id": {
                      "type": "string"
                    },
                    "publishing_policy": {
                      "$ref": "#/components/schemas/PublishingPolicy"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "description": "Domain error, or plain text for invalid transport input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/logos": {
      "post": {
        "operationId": "uploadLogo",
        "summary": "Upload a still logo of at most 2 MiB",
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200
            },
            "description": "Reuse the same key and body for retries."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "image/png": {
              "schema": {
                "type": "string",
                "format": "binary"
              }
            },
            "image/jpeg": {
              "schema": {
                "type": "string",
                "format": "binary"
              }
            },
            "image/webp": {
              "schema": {
                "type": "string",
                "format": "binary"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "logo_url": {
                      "type": "string"
                    },
                    "width": {
                      "type": "integer"
                    },
                    "height": {
                      "type": "integer"
                    },
                    "expires_at": {
                      "type": "integer"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "description": "Domain error, or plain text for invalid transport input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/logos/{id}": {
      "get": {
        "operationId": "logo",
        "summary": "Read a logo as PNG",
        "security": [],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "image/png": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "default": {
            "description": "Domain error, or plain text for invalid transport input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/invites/{id}": {
      "get": {
        "operationId": "invitation",
        "summary": "Review invitation and optional signed-in eligibility",
        "security": [
          {},
          {
            "OrganizationsAccess": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "org_id": {
                      "type": "string"
                    },
                    "org_name": {
                      "type": "string"
                    },
                    "logo_url": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "handle": {
                      "type": "string"
                    },
                    "status": {
                      "type": "string"
                    },
                    "expires_at": {
                      "type": "integer"
                    },
                    "acceptance_url": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "can_accept": {
                      "type": [
                        "boolean",
                        "null"
                      ]
                    },
                    "linking_notice": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "description": "Domain error, or plain text for invalid transport input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/invites/{id}/accept": {
      "post": {
        "operationId": "acceptInvitation",
        "summary": "Answer an invitation as its verified recipient",
        "security": [
          {},
          {
            "OrganizationsAccess": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200
            },
            "description": "Reuse the same key and body for retries."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "invitation_proof": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "accepted": {
                      "type": "boolean"
                    },
                    "declined": {
                      "type": "boolean"
                    },
                    "org_id": {
                      "type": "string"
                    },
                    "work_account": {
                      "$ref": "#/components/schemas/Account"
                    },
                    "switch_account_required": {
                      "type": "boolean"
                    },
                    "tokens": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "description": "Domain error, or plain text for invalid transport input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/invites/{id}/decline": {
      "post": {
        "operationId": "declineInvitation",
        "summary": "Answer an invitation as its verified recipient",
        "security": [
          {},
          {
            "OrganizationsAccess": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200
            },
            "description": "Reuse the same key and body for retries."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "invitation_proof": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "accepted": {
                      "type": "boolean"
                    },
                    "declined": {
                      "type": "boolean"
                    },
                    "org_id": {
                      "type": "string"
                    },
                    "work_account": {
                      "$ref": "#/components/schemas/Account"
                    },
                    "switch_account_required": {
                      "type": "boolean"
                    },
                    "tokens": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "description": "Domain error, or plain text for invalid transport input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/orgs/{org}/events": {
      "get": {
        "operationId": "listen",
        "summary": "Subscribe to ready, refresh, reconnect, unavailable and closed hints",
        "parameters": [
          {
            "name": "org",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "text/event-stream": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "default": {
            "description": "Domain error, or plain text for invalid transport input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/orgs/{org}/logs": {
      "get": {
        "operationId": "logs",
        "summary": "Read visible events or export filtered CSV",
        "parameters": [
          {
            "name": "org",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "member",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "team",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "app",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "kind",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "after",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "format",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "csv"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "events": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer"
                          },
                          "actor": {
                            "type": "string"
                          },
                          "member": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "kind": {
                            "type": "string"
                          },
                          "occurred_at": {
                            "type": "integer"
                          },
                          "team": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "app": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "data": {
                            "type": "object"
                          }
                        }
                      }
                    },
                    "next_cursor": {
                      "type": "integer"
                    },
                    "has_more": {
                      "type": "boolean"
                    }
                  }
                }
              },
              "text/csv": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "default": {
            "description": "Domain error, or plain text for invalid transport input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/apps": {
      "get": {
        "operationId": "appSuggestions",
        "summary": "Find apps for policies",
        "security": [],
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "default": {
            "description": "Domain error, or plain text for invalid transport input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/reports": {
      "post": {
        "operationId": "report",
        "summary": "Queue a support report",
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200
            },
            "description": "Reuse the same key and body for retries."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "message": {
                    "type": "string"
                  },
                  "pr": {
                    "type": "string"
                  }
                },
                "required": [
                  "message"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "report_id": {
                      "type": "string"
                    },
                    "queued": {
                      "type": "boolean"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "description": "Domain error, or plain text for invalid transport input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/people": {
      "get": {
        "operationId": "people",
        "summary": "Rank and fuzzy-filter visible people for this account",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "kind",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "carbon",
                "silicon"
              ]
            }
          },
          {
            "name": "org",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "scope",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "all",
                "members"
              ]
            }
          },
          {
            "name": "exclude_owners",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "exclude_team",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "personal",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PeoplePage"
                }
              }
            }
          },
          "default": {
            "description": "Domain error, or plain text for invalid transport input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/people/resolve": {
      "get": {
        "operationId": "resolvePerson",
        "summary": "Get a precise recipient preview",
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Person"
                }
              }
            }
          },
          "default": {
            "description": "Domain error, or plain text for invalid transport input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/contacts/connection": {
      "get": {
        "operationId": "contactConnection",
        "summary": "Check address-book consent",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Connection"
                }
              }
            }
          },
          "default": {
            "description": "Domain error, or plain text for invalid transport input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "connectContacts",
        "summary": "Connect or disconnect this account’s canonical address book",
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200
            },
            "description": "Reuse the same key and body for retries."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "enabled": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "enabled"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Connection"
                }
              }
            }
          },
          "default": {
            "description": "Domain error, or plain text for invalid transport input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/contacts": {
      "get": {
        "operationId": "contacts",
        "summary": "Page through saved contacts by trust",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "kind",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "carbon",
                "silicon"
              ]
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ContactsPage"
                }
              }
            }
          },
          "default": {
            "description": "Domain error, or plain text for invalid transport input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "saveContact",
        "summary": "Save name and trust in Silicon Contacts",
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200
            },
            "description": "Reuse the same key and body for retries."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "name": {
                    "type": "string"
                  },
                  "trust": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 255
                  }
                },
                "required": [
                  "id",
                  "name",
                  "trust"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Person"
                }
              }
            }
          },
          "default": {
            "description": "Domain error, or plain text for invalid transport input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/contacts/photos/{id}": {
      "get": {
        "operationId": "contactPhoto",
        "summary": "Read a private saved photo as its owner",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "image/png": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "default": {
            "description": "Domain error, or plain text for invalid transport input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/auth/slt": {
      "post": {
        "operationId": "directAuthSlt",
        "summary": "Direct app session slt",
        "security": [],
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200
            },
            "description": "Reuse the same key and body for retries."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "slt": {
                    "type": "string"
                  }
                },
                "required": [
                  "slt"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "default": {
            "description": "Domain error, or plain text for invalid transport input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/auth/code": {
      "post": {
        "operationId": "directAuthCode",
        "summary": "Direct app session code",
        "security": [],
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200
            },
            "description": "Reuse the same key and body for retries."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "code": {
                    "type": "string"
                  },
                  "redirect_uri": {
                    "type": "string"
                  },
                  "code_verifier": {
                    "type": "string"
                  }
                },
                "required": [
                  "code",
                  "redirect_uri"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "default": {
            "description": "Domain error, or plain text for invalid transport input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/auth/refresh": {
      "post": {
        "operationId": "directAuthRefresh",
        "summary": "Direct app session refresh",
        "security": [],
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200
            },
            "description": "Reuse the same key and body for retries."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "refresh_token": {
                    "type": "string"
                  }
                },
                "required": [
                  "refresh_token"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "default": {
            "description": "Domain error, or plain text for invalid transport input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/auth/logout": {
      "post": {
        "operationId": "directAuthLogout",
        "summary": "Direct app session logout",
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200
            },
            "description": "Reuse the same key and body for retries."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "default": {
            "description": "Domain error, or plain text for invalid transport input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "OrganizationsAccess": {
        "type": "http",
        "scheme": "bearer",
        "description": "Active Silicon Accounts access token issued for silicon-organizations."
      }
    },
    "schemas": {
      "Account": {
        "type": "object",
        "properties": {
          "uuid": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "kind": {
            "type": "string",
            "enum": [
              "carbon",
              "silicon"
            ]
          },
          "display_name": {
            "type": "string"
          },
          "pfp_url": {
            "type": [
              "string",
              "null"
            ]
          },
          "timezone": {
            "type": [
              "string",
              "null"
            ]
          },
          "org_id": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "uuid",
          "id",
          "kind"
        ]
      },
      "AccessSettings": {
        "type": "object",
        "properties": {
          "mode": {
            "type": "string",
            "enum": [
              "everywhere",
              "only",
              "except"
            ]
          },
          "apps": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "extra_apps": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "excluded_apps": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "AdminTeamPermissions": {
        "type": "object",
        "properties": {
          "enabled": {
            "type": "boolean"
          },
          "structure": {
            "type": "boolean"
          },
          "members": {
            "type": "boolean"
          },
          "admins": {
            "type": "boolean"
          },
          "settings": {
            "type": "boolean"
          }
        },
        "required": [
          "enabled",
          "structure",
          "members",
          "admins",
          "settings"
        ]
      },
      "Member": {
        "type": "object",
        "properties": {
          "uuid": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "kind": {
            "type": "string",
            "enum": [
              "carbon",
              "silicon"
            ]
          },
          "display_name": {
            "type": "string"
          },
          "pfp_url": {
            "type": [
              "string",
              "null"
            ]
          },
          "timezone": {
            "type": [
              "string",
              "null"
            ]
          },
          "org_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "owner": {
            "type": "boolean"
          },
          "admin": {
            "type": "boolean"
          },
          "manage_admins": {
            "type": "boolean"
          },
          "effective_admin": {
            "type": "boolean"
          },
          "settings": {
            "$ref": "#/components/schemas/AccessSettings"
          },
          "joined_at": {
            "type": "integer"
          },
          "removed_at": {
            "type": [
              "integer",
              "null"
            ]
          }
        },
        "required": [
          "uuid",
          "id",
          "kind",
          "owner",
          "admin"
        ]
      },
      "Team": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "members": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "admins": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "admin_team": {
            "type": "boolean"
          },
          "settings": {
            "$ref": "#/components/schemas/AccessSettings"
          }
        },
        "required": [
          "id",
          "name",
          "description",
          "members",
          "admins",
          "admin_team",
          "settings"
        ]
      },
      "Invite": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "target": {
            "type": "string"
          },
          "target_uuid": {
            "type": [
              "string",
              "null"
            ]
          },
          "handle": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "teams": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "team_admins": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "admin": {
            "type": "boolean"
          },
          "manage_admins": {
            "type": "boolean"
          },
          "invited_by": {
            "type": "string"
          },
          "settings": {
            "$ref": "#/components/schemas/AccessSettings"
          },
          "expires_at": {
            "type": "integer"
          },
          "created_at": {
            "type": "integer"
          },
          "acceptance_url": {
            "type": [
              "string",
              "null"
            ]
          },
          "accepted_by": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "target",
          "handle",
          "status",
          "expires_at"
        ]
      },
      "OwnerOffer": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "member": {
            "type": "string"
          },
          "offered_by": {
            "type": "string"
          },
          "created_at": {
            "type": "integer"
          },
          "status": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "member",
          "offered_by",
          "created_at",
          "status"
        ]
      },
      "RemovalVote": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "target": {
            "type": "string"
          },
          "started_by": {
            "type": "string"
          },
          "also_remove": {
            "type": "boolean"
          },
          "electorate": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "ballots": {
            "type": "object",
            "additionalProperties": {
              "type": "boolean"
            }
          },
          "created_at": {
            "type": "integer"
          },
          "expires_at": {
            "type": "integer"
          },
          "status": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "target",
          "started_by",
          "also_remove",
          "electorate",
          "ballots",
          "created_at",
          "expires_at",
          "status"
        ]
      },
      "Capabilities": {
        "type": "object",
        "properties": {
          "owner": {
            "type": "boolean"
          },
          "admin": {
            "type": "boolean"
          },
          "manage_admins": {
            "type": "boolean"
          },
          "team_structure": {
            "type": "boolean"
          },
          "team_members": {
            "type": "boolean"
          },
          "team_admins_manage": {
            "type": "boolean"
          },
          "team_settings": {
            "type": "boolean"
          },
          "team_admins": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "owner",
          "admin",
          "manage_admins",
          "team_structure",
          "team_members",
          "team_admins_manage",
          "team_settings",
          "team_admins"
        ]
      },
      "Organization": {
        "type": "object",
        "properties": {
          "org_id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "logo_url": {
            "type": [
              "string",
              "null"
            ]
          },
          "created_at": {
            "type": "integer"
          },
          "version": {
            "type": "integer"
          },
          "settings": {
            "$ref": "#/components/schemas/AccessSettings"
          },
          "admin_team_permissions": {
            "$ref": "#/components/schemas/AdminTeamPermissions"
          }
        },
        "required": [
          "org_id",
          "name",
          "logo_url",
          "created_at",
          "version",
          "settings",
          "admin_team_permissions"
        ]
      },
      "OrganizationView": {
        "type": "object",
        "properties": {
          "org": {
            "$ref": "#/components/schemas/Organization"
          },
          "members": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Member"
            }
          },
          "teams": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Team"
            }
          },
          "invites": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Invite"
            }
          },
          "owner_offers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OwnerOffer"
            }
          },
          "votes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RemovalVote"
            }
          },
          "capabilities": {
            "$ref": "#/components/schemas/Capabilities"
          }
        },
        "required": [
          "org",
          "members",
          "teams",
          "invites",
          "owner_offers",
          "votes",
          "capabilities"
        ]
      },
      "Person": {
        "type": "object",
        "properties": {
          "uuid": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "kind": {
            "type": "string",
            "enum": [
              "carbon",
              "silicon"
            ]
          },
          "display_name": {
            "type": "string"
          },
          "account_name": {
            "type": "string"
          },
          "pfp_url": {
            "type": [
              "string",
              "null"
            ]
          },
          "account_pfp_url": {
            "type": [
              "string",
              "null"
            ]
          },
          "trust": {
            "type": [
              "integer",
              "null"
            ]
          },
          "blocked": {
            "type": "boolean"
          },
          "sent": {
            "type": "integer"
          },
          "received": {
            "type": "integer"
          },
          "last_invited_at": {
            "type": [
              "integer",
              "null"
            ]
          }
        },
        "required": [
          "uuid",
          "id",
          "kind",
          "display_name",
          "account_name",
          "pfp_url",
          "account_pfp_url",
          "trust",
          "blocked",
          "sent",
          "received",
          "last_invited_at"
        ]
      },
      "PeoplePage": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Person"
            }
          },
          "total": {
            "type": "integer"
          },
          "next_offset": {
            "type": [
              "integer",
              "null"
            ]
          },
          "contacts_status": {
            "type": "string",
            "enum": [
              "connected",
              "disconnected",
              "unavailable"
            ]
          }
        },
        "required": [
          "items",
          "total",
          "next_offset",
          "contacts_status"
        ]
      },
      "ContactsPage": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Person"
            }
          },
          "total": {
            "type": "integer"
          },
          "next_offset": {
            "type": [
              "integer",
              "null"
            ]
          },
          "connected": {
            "type": "boolean"
          }
        },
        "required": [
          "items",
          "total",
          "next_offset",
          "connected"
        ]
      },
      "Connection": {
        "type": "object",
        "properties": {
          "connected": {
            "type": "boolean"
          }
        },
        "required": [
          "connected"
        ]
      },
      "Subject": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "account",
              "team"
            ]
          },
          "id": {
            "type": "string"
          }
        },
        "required": [
          "type",
          "id"
        ]
      },
      "PublishingGrant": {
        "type": "object",
        "properties": {
          "subject": {
            "$ref": "#/components/schemas/Subject"
          },
          "resources": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "apps",
                "interfaces",
                "cells"
              ]
            }
          },
          "permissions": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "create",
                "read",
                "edit",
                "publish",
                "manage"
              ]
            }
          }
        },
        "required": [
          "subject",
          "permissions"
        ]
      },
      "PublishingPolicy": {
        "type": "object",
        "properties": {
          "grants": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PublishingGrant"
            }
          }
        },
        "required": [
          "grants"
        ]
      },
      "Workspace": {
        "type": "object",
        "properties": {
          "account": {
            "$ref": "#/components/schemas/Account"
          },
          "organizations": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "org_id": {
                  "type": "string"
                },
                "name": {
                  "type": "string"
                },
                "logo_url": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "work_account": {
                  "$ref": "#/components/schemas/Account"
                },
                "owner": {
                  "type": "boolean"
                },
                "admin": {
                  "type": "boolean"
                }
              }
            }
          },
          "invites": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "org_id": {
                  "type": "string"
                },
                "org_name": {
                  "type": "string"
                },
                "handle": {
                  "type": "string"
                },
                "expires_at": {
                  "type": "integer"
                },
                "acceptance_url": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              }
            }
          }
        },
        "required": [
          "account",
          "organizations",
          "invites"
        ]
      },
      "Problem": {
        "type": "object",
        "properties": {
          "error": {
            "type": "object",
            "properties": {
              "code": {
                "type": "string"
              },
              "message": {
                "type": "string"
              },
              "hint": {
                "type": "string"
              }
            },
            "required": [
              "code",
              "message"
            ]
          }
        },
        "required": [
          "error"
        ]
      },
      "Action_update": {
        "type": "object",
        "properties": {
          "action": {
            "const": "update"
          },
          "name": {
            "type": "string"
          },
          "logo_id": {
            "type": "string"
          },
          "logo_url": {
            "type": [
              "string",
              "null"
            ]
          },
          "admin_team_permissions": {
            "$ref": "#/components/schemas/AdminTeamPermissions"
          }
        },
        "required": [
          "action"
        ]
      },
      "Action_invite": {
        "type": "object",
        "properties": {
          "action": {
            "const": "invite"
          },
          "target": {
            "type": "string"
          },
          "handle": {
            "type": "string"
          },
          "target_uuid": {
            "type": "string"
          },
          "teams": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "team_admins": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "admin": {
            "type": "boolean"
          },
          "manage_admins": {
            "type": "boolean"
          },
          "settings": {
            "$ref": "#/components/schemas/AccessSettings"
          }
        },
        "required": [
          "action",
          "target",
          "handle"
        ]
      },
      "Action_invite_cancel": {
        "type": "object",
        "properties": {
          "action": {
            "const": "invite_cancel"
          },
          "invite": {
            "type": "string"
          }
        },
        "required": [
          "action",
          "invite"
        ]
      },
      "Action_invite_resend": {
        "type": "object",
        "properties": {
          "action": {
            "const": "invite_resend"
          },
          "invite": {
            "type": "string"
          }
        },
        "required": [
          "action",
          "invite"
        ]
      },
      "Action_silicon_create": {
        "type": "object",
        "properties": {
          "action": {
            "const": "silicon_create"
          },
          "handle": {
            "type": "string"
          },
          "display_name": {
            "type": "string"
          },
          "teams": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "team_admins": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "admin": {
            "type": "boolean"
          },
          "manage_admins": {
            "type": "boolean"
          },
          "settings": {
            "$ref": "#/components/schemas/AccessSettings"
          }
        },
        "required": [
          "action",
          "handle",
          "display_name"
        ]
      },
      "Action_silicon_update": {
        "type": "object",
        "properties": {
          "action": {
            "const": "silicon_update"
          },
          "member": {
            "type": "string"
          },
          "display_name": {
            "type": "string"
          },
          "timezone": {
            "type": "string"
          },
          "pfp_url": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "action",
          "member"
        ]
      },
      "Action_silicon_link": {
        "type": "object",
        "properties": {
          "action": {
            "const": "silicon_link"
          },
          "member": {
            "type": "string"
          },
          "target_id": {
            "type": "string"
          },
          "target_uuid": {
            "type": "string"
          }
        },
        "required": [
          "action",
          "member",
          "target_id"
        ]
      },
      "Action_member_rename": {
        "type": "object",
        "properties": {
          "action": {
            "const": "member_rename"
          },
          "member": {
            "type": "string"
          },
          "handle": {
            "type": "string"
          }
        },
        "required": [
          "action",
          "member",
          "handle"
        ]
      },
      "Action_silicon_rotate": {
        "type": "object",
        "properties": {
          "action": {
            "const": "silicon_rotate"
          },
          "member": {
            "type": "string"
          }
        },
        "required": [
          "action",
          "member"
        ]
      },
      "Action_member_remove": {
        "type": "object",
        "properties": {
          "action": {
            "const": "member_remove"
          },
          "member": {
            "type": "string"
          }
        },
        "required": [
          "action",
          "member"
        ]
      },
      "Action_owner_offer": {
        "type": "object",
        "properties": {
          "action": {
            "const": "owner_offer"
          },
          "member": {
            "type": "string"
          }
        },
        "required": [
          "action",
          "member"
        ]
      },
      "Action_member_update": {
        "type": "object",
        "properties": {
          "action": {
            "const": "member_update"
          },
          "member": {
            "type": "string"
          },
          "settings": {
            "$ref": "#/components/schemas/AccessSettings"
          }
        },
        "required": [
          "action",
          "member"
        ]
      },
      "Action_admin_set": {
        "type": "object",
        "properties": {
          "action": {
            "const": "admin_set"
          },
          "member": {
            "type": "string"
          },
          "admin": {
            "type": "boolean"
          },
          "manage_admins": {
            "type": "boolean"
          }
        },
        "required": [
          "action",
          "member",
          "admin"
        ]
      },
      "Action_owner_accept": {
        "type": "object",
        "properties": {
          "action": {
            "const": "owner_accept"
          },
          "offer": {
            "type": "string"
          }
        },
        "required": [
          "action",
          "offer"
        ]
      },
      "Action_owner_decline": {
        "type": "object",
        "properties": {
          "action": {
            "const": "owner_decline"
          },
          "offer": {
            "type": "string"
          }
        },
        "required": [
          "action",
          "offer"
        ]
      },
      "Action_owner_step_down": {
        "type": "object",
        "properties": {
          "action": {
            "const": "owner_step_down"
          }
        },
        "required": [
          "action"
        ]
      },
      "Action_leave": {
        "type": "object",
        "properties": {
          "action": {
            "const": "leave"
          }
        },
        "required": [
          "action"
        ]
      },
      "Action_vote_start": {
        "type": "object",
        "properties": {
          "action": {
            "const": "vote_start"
          },
          "member": {
            "type": "string"
          },
          "also_remove": {
            "type": "boolean"
          }
        },
        "required": [
          "action",
          "member"
        ]
      },
      "Action_vote_cast": {
        "type": "object",
        "properties": {
          "action": {
            "const": "vote_cast"
          },
          "vote": {
            "type": "string"
          },
          "yes": {
            "type": "boolean"
          }
        },
        "required": [
          "action",
          "vote",
          "yes"
        ]
      },
      "Action_vote_cancel": {
        "type": "object",
        "properties": {
          "action": {
            "const": "vote_cancel"
          },
          "vote": {
            "type": "string"
          }
        },
        "required": [
          "action",
          "vote"
        ]
      },
      "Action_team_create": {
        "type": "object",
        "properties": {
          "action": {
            "const": "team_create"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          }
        },
        "required": [
          "action",
          "name"
        ]
      },
      "Action_team_update": {
        "type": "object",
        "properties": {
          "action": {
            "const": "team_update"
          },
          "team": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "admin_team": {
            "type": "boolean"
          },
          "settings": {
            "$ref": "#/components/schemas/AccessSettings"
          }
        },
        "required": [
          "action",
          "team"
        ]
      },
      "Action_team_delete": {
        "type": "object",
        "properties": {
          "action": {
            "const": "team_delete"
          },
          "team": {
            "type": "string"
          }
        },
        "required": [
          "action",
          "team"
        ]
      },
      "Action_team_member_add": {
        "type": "object",
        "properties": {
          "action": {
            "const": "team_member_add"
          },
          "member": {
            "type": "string"
          },
          "team": {
            "type": "string"
          }
        },
        "required": [
          "action",
          "member",
          "team"
        ]
      },
      "Action_team_member_remove": {
        "type": "object",
        "properties": {
          "action": {
            "const": "team_member_remove"
          },
          "member": {
            "type": "string"
          },
          "team": {
            "type": "string"
          }
        },
        "required": [
          "action",
          "member",
          "team"
        ]
      },
      "Action_team_admin_set": {
        "type": "object",
        "properties": {
          "action": {
            "const": "team_admin_set"
          },
          "member": {
            "type": "string"
          },
          "team": {
            "type": "string"
          },
          "admin": {
            "type": "boolean"
          }
        },
        "required": [
          "action",
          "member",
          "team",
          "admin"
        ]
      },
      "Action_policy_update": {
        "type": "object",
        "properties": {
          "action": {
            "const": "policy_update"
          },
          "scope": {
            "type": "string",
            "enum": [
              "org",
              "member",
              "team"
            ]
          },
          "settings": {
            "$ref": "#/components/schemas/AccessSettings"
          },
          "member": {
            "type": "string"
          },
          "team": {
            "type": "string"
          }
        },
        "required": [
          "action",
          "scope",
          "settings"
        ]
      },
      "Action_publishing_policy_update": {
        "type": "object",
        "properties": {
          "action": {
            "const": "publishing_policy_update"
          },
          "publishing_policy": {
            "$ref": "#/components/schemas/PublishingPolicy"
          }
        },
        "required": [
          "action",
          "publishing_policy"
        ]
      },
      "Action": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/Action_update"
          },
          {
            "$ref": "#/components/schemas/Action_invite"
          },
          {
            "$ref": "#/components/schemas/Action_invite_cancel"
          },
          {
            "$ref": "#/components/schemas/Action_invite_resend"
          },
          {
            "$ref": "#/components/schemas/Action_silicon_create"
          },
          {
            "$ref": "#/components/schemas/Action_silicon_update"
          },
          {
            "$ref": "#/components/schemas/Action_silicon_link"
          },
          {
            "$ref": "#/components/schemas/Action_member_rename"
          },
          {
            "$ref": "#/components/schemas/Action_silicon_rotate"
          },
          {
            "$ref": "#/components/schemas/Action_member_remove"
          },
          {
            "$ref": "#/components/schemas/Action_owner_offer"
          },
          {
            "$ref": "#/components/schemas/Action_member_update"
          },
          {
            "$ref": "#/components/schemas/Action_admin_set"
          },
          {
            "$ref": "#/components/schemas/Action_owner_accept"
          },
          {
            "$ref": "#/components/schemas/Action_owner_decline"
          },
          {
            "$ref": "#/components/schemas/Action_owner_step_down"
          },
          {
            "$ref": "#/components/schemas/Action_leave"
          },
          {
            "$ref": "#/components/schemas/Action_vote_start"
          },
          {
            "$ref": "#/components/schemas/Action_vote_cast"
          },
          {
            "$ref": "#/components/schemas/Action_vote_cancel"
          },
          {
            "$ref": "#/components/schemas/Action_team_create"
          },
          {
            "$ref": "#/components/schemas/Action_team_update"
          },
          {
            "$ref": "#/components/schemas/Action_team_delete"
          },
          {
            "$ref": "#/components/schemas/Action_team_member_add"
          },
          {
            "$ref": "#/components/schemas/Action_team_member_remove"
          },
          {
            "$ref": "#/components/schemas/Action_team_admin_set"
          },
          {
            "$ref": "#/components/schemas/Action_policy_update"
          },
          {
            "$ref": "#/components/schemas/Action_publishing_policy_update"
          }
        ],
        "discriminator": {
          "propertyName": "action",
          "mapping": {
            "update": "#/components/schemas/Action_update",
            "invite": "#/components/schemas/Action_invite",
            "invite_cancel": "#/components/schemas/Action_invite_cancel",
            "invite_resend": "#/components/schemas/Action_invite_resend",
            "silicon_create": "#/components/schemas/Action_silicon_create",
            "silicon_update": "#/components/schemas/Action_silicon_update",
            "silicon_link": "#/components/schemas/Action_silicon_link",
            "member_rename": "#/components/schemas/Action_member_rename",
            "silicon_rotate": "#/components/schemas/Action_silicon_rotate",
            "member_remove": "#/components/schemas/Action_member_remove",
            "owner_offer": "#/components/schemas/Action_owner_offer",
            "member_update": "#/components/schemas/Action_member_update",
            "admin_set": "#/components/schemas/Action_admin_set",
            "owner_accept": "#/components/schemas/Action_owner_accept",
            "owner_decline": "#/components/schemas/Action_owner_decline",
            "owner_step_down": "#/components/schemas/Action_owner_step_down",
            "leave": "#/components/schemas/Action_leave",
            "vote_start": "#/components/schemas/Action_vote_start",
            "vote_cast": "#/components/schemas/Action_vote_cast",
            "vote_cancel": "#/components/schemas/Action_vote_cancel",
            "team_create": "#/components/schemas/Action_team_create",
            "team_update": "#/components/schemas/Action_team_update",
            "team_delete": "#/components/schemas/Action_team_delete",
            "team_member_add": "#/components/schemas/Action_team_member_add",
            "team_member_remove": "#/components/schemas/Action_team_member_remove",
            "team_admin_set": "#/components/schemas/Action_team_admin_set",
            "policy_update": "#/components/schemas/Action_policy_update",
            "publishing_policy_update": "#/components/schemas/Action_publishing_policy_update"
          }
        }
      }
    }
  }
}
