{
  "openapi": "3.0.4",
  "info": {
    "title": "The Social Media App Public API",
    "description": "Customer API. Authenticate with an API key: Authorization: Bearer tsma_...",
    "version": "v1"
  },
  "paths": {
    "/v1/analytics/posts/{id}": {
      "get": {
        "tags": [
          "Analytics"
        ],
        "summary": "Get the latest metrics of each target of a post, or their history.",
        "description": "Required scope: `analytics:read`.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "history",
            "in": "query",
            "schema": {
              "type": "boolean",
              "default": false
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PostMetricsViewModel"
                }
              }
            }
          },
          "401": {
            "description": "The API key is missing, invalid, expired or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The API key lacks the required scope, or the workspace refuses the call.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests, or a request repeated too soon: the key or the workspace is over its request limit, or the operation refuses a repeat inside its minimum interval. Retry after the delay in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before the request is sent again.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/analytics/refresh": {
      "post": {
        "tags": [
          "Analytics"
        ],
        "summary": "Ask for a new metrics reading of a published post.",
        "description": "Required scope: `analytics:refresh`.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RefreshInput"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Accepted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RefreshAcceptedViewModel"
                }
              }
            }
          },
          "401": {
            "description": "The API key is missing, invalid, expired or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The API key lacks the required scope, or the workspace refuses the call.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests, or a request repeated too soon: the key or the workspace is over its request limit, or the operation refuses a repeat inside its minimum interval. Retry after the delay in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before the request is sent again.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/analytics/definitions": {
      "get": {
        "tags": [
          "Analytics"
        ],
        "summary": "List the metrics each network reports.",
        "description": "Required scope: `analytics:read`.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ProviderDefinitionsViewModel"
                  }
                }
              }
            }
          },
          "401": {
            "description": "The API key is missing, invalid, expired or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The API key lacks the required scope, or the workspace refuses the call.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests, or a request repeated too soon: the key or the workspace is over its request limit, or the operation refuses a repeat inside its minimum interval. Retry after the delay in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before the request is sent again.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/approvals": {
      "post": {
        "tags": [
          "Approvals"
        ],
        "summary": "Ask for a review of a post before it publishes.",
        "description": "Required scope: `posts:write`.",
        "parameters": [
          {
            "name": "post_id",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApprovalRequestInput"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created",
            "headers": {
              "Location": {
                "description": "Where to read the created resource, or the status of the accepted work.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApprovalViewModel"
                }
              }
            }
          },
          "401": {
            "description": "The API key is missing, invalid, expired or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The API key lacks the required scope, or the workspace refuses the call.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests, or a request repeated too soon: the key or the workspace is over its request limit, or the operation refuses a repeat inside its minimum interval. Retry after the delay in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before the request is sent again.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "get": {
        "tags": [
          "Approvals"
        ],
        "summary": "List the review requests of a product, or the caller's review inbox.",
        "description": "Required scope: `posts:read`.",
        "parameters": [
          {
            "name": "product_id",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "status",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/ApprovalStatus"
            }
          },
          {
            "name": "mine",
            "in": "query",
            "schema": {
              "type": "boolean",
              "default": false
            }
          },
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 1
            }
          },
          {
            "name": "page_size",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 20
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApprovalViewModelPagedResult"
                }
              }
            }
          },
          "401": {
            "description": "The API key is missing, invalid, expired or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The API key lacks the required scope, or the workspace refuses the call.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests, or a request repeated too soon: the key or the workspace is over its request limit, or the operation refuses a repeat inside its minimum interval. Retry after the delay in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before the request is sent again.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/approvals/{id}": {
      "get": {
        "tags": [
          "Approvals"
        ],
        "summary": "Get one review request.",
        "description": "Required scope: `posts:read`.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApprovalViewModel"
                }
              }
            }
          },
          "401": {
            "description": "The API key is missing, invalid, expired or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The API key lacks the required scope, or the workspace refuses the call.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests, or a request repeated too soon: the key or the workspace is over its request limit, or the operation refuses a repeat inside its minimum interval. Retry after the delay in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before the request is sent again.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/connections": {
      "get": {
        "tags": [
          "Connections"
        ],
        "summary": "List the social network connections of a product.",
        "description": "Required scope: `connections:read`.",
        "parameters": [
          {
            "name": "product_id",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ConnectionViewModel"
                  }
                }
              }
            }
          },
          "401": {
            "description": "The API key is missing, invalid, expired or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The API key lacks the required scope, or the workspace refuses the call.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests, or a request repeated too soon: the key or the workspace is over its request limit, or the operation refuses a repeat inside its minimum interval. Retry after the delay in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before the request is sent again.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Connections"
        ],
        "summary": "Register a connection for a product.",
        "description": "Required scope: `connections:write`.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ConnectionInput"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created",
            "headers": {
              "Location": {
                "description": "Where to read the created resource, or the status of the accepted work.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectionViewModel"
                }
              }
            }
          },
          "401": {
            "description": "The API key is missing, invalid, expired or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The API key lacks the required scope, or the workspace refuses the call.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests, or a request repeated too soon: the key or the workspace is over its request limit, or the operation refuses a repeat inside its minimum interval. Retry after the delay in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before the request is sent again.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/connections/{id}": {
      "get": {
        "tags": [
          "Connections"
        ],
        "summary": "Get one connection.",
        "description": "Required scope: `connections:read`.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectionViewModel"
                }
              }
            }
          },
          "401": {
            "description": "The API key is missing, invalid, expired or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The API key lacks the required scope, or the workspace refuses the call.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests, or a request repeated too soon: the key or the workspace is over its request limit, or the operation refuses a repeat inside its minimum interval. Retry after the delay in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before the request is sent again.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Connections"
        ],
        "summary": "Revoke a connection.",
        "description": "Required scope: `connections:remove`.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "401": {
            "description": "The API key is missing, invalid, expired or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The API key lacks the required scope, or the workspace refuses the call.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests, or a request repeated too soon: the key or the workspace is over its request limit, or the operation refuses a repeat inside its minimum interval. Retry after the delay in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before the request is sent again.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/connections/{id}/capabilities": {
      "get": {
        "tags": [
          "Connections"
        ],
        "summary": "List what a connection can do, per content format and action.",
        "description": "Required scope: `connections:read`.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/CapabilityViewModel"
                  }
                }
              }
            }
          },
          "401": {
            "description": "The API key is missing, invalid, expired or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The API key lacks the required scope, or the workspace refuses the call.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests, or a request repeated too soon: the key or the workspace is over its request limit, or the operation refuses a repeat inside its minimum interval. Retry after the delay in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before the request is sent again.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/connections/{id}/requirements": {
      "get": {
        "tags": [
          "Connections"
        ],
        "summary": "Get the target options, network limits and consent rule of a connection for one content format.",
        "description": "Required scope: `connections:read`.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "format",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublishingRequirementsViewModel"
                }
              }
            }
          },
          "401": {
            "description": "The API key is missing, invalid, expired or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The API key lacks the required scope, or the workspace refuses the call.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests, or a request repeated too soon: the key or the workspace is over its request limit, or the operation refuses a repeat inside its minimum interval. Retry after the delay in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before the request is sent again.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/connections/{id}/verify": {
      "post": {
        "tags": [
          "Connections"
        ],
        "summary": "Verify a connection with its network and return its updated state.",
        "description": "Required scope: `connections:write`.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectionViewModel"
                }
              }
            }
          },
          "401": {
            "description": "The API key is missing, invalid, expired or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The API key lacks the required scope, or the workspace refuses the call.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests, or a request repeated too soon: the key or the workspace is over its request limit, or the operation refuses a repeat inside its minimum interval. Retry after the delay in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before the request is sent again.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/connectors": {
      "get": {
        "tags": [
          "Connectors"
        ],
        "summary": "List the social networks available to connect (stage beta or generally available) and whether the product can connect each one.",
        "description": "Required scope: `connections:read`.",
        "parameters": [
          {
            "name": "product_id",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ConnectorViewModel"
                  }
                }
              }
            }
          },
          "401": {
            "description": "The API key is missing, invalid, expired or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The API key lacks the required scope, or the workspace refuses the call.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests, or a request repeated too soon: the key or the workspace is over its request limit, or the operation refuses a repeat inside its minimum interval. Retry after the delay in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before the request is sent again.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/exports": {
      "post": {
        "tags": [
          "Exports"
        ],
        "summary": "Start an export of the workspace's data.",
        "description": "Required scope: `workspace:export`.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ExportRequestInput"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Accepted",
            "headers": {
              "Location": {
                "description": "Where to read the created resource, or the status of the accepted work.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataExportJobViewModel"
                }
              }
            }
          },
          "401": {
            "description": "The API key is missing, invalid, expired or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The API key lacks the required scope, or the workspace refuses the call.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests, or a request repeated too soon: the key or the workspace is over its request limit, or the operation refuses a repeat inside its minimum interval. Retry after the delay in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before the request is sent again.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "get": {
        "tags": [
          "Exports"
        ],
        "summary": "List the exports of a workspace.",
        "description": "Required scope: `workspace:export`.",
        "parameters": [
          {
            "name": "product_id",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/DataExportJobViewModel"
                  }
                }
              }
            }
          },
          "401": {
            "description": "The API key is missing, invalid, expired or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The API key lacks the required scope, or the workspace refuses the call.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests, or a request repeated too soon: the key or the workspace is over its request limit, or the operation refuses a repeat inside its minimum interval. Retry after the delay in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before the request is sent again.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/exports/{id}": {
      "get": {
        "tags": [
          "Exports"
        ],
        "summary": "Get one export and its status.",
        "description": "Required scope: `workspace:export`.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataExportJobViewModel"
                }
              }
            }
          },
          "401": {
            "description": "The API key is missing, invalid, expired or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The API key lacks the required scope, or the workspace refuses the call.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests, or a request repeated too soon: the key or the workspace is over its request limit, or the operation refuses a repeat inside its minimum interval. Retry after the delay in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before the request is sent again.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/exports/{id}/download": {
      "get": {
        "tags": [
          "Exports"
        ],
        "summary": "Download a finished export: a redirect to a short-lived download URL, also given in the body.",
        "description": "Required scope: `workspace:export`.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "302": {
            "description": "Found",
            "headers": {
              "Location": {
                "description": "The short-lived URL to download the file from. It is also given in the response body.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExportDownloadViewModel"
                }
              }
            }
          },
          "401": {
            "description": "The API key is missing, invalid, expired or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The API key lacks the required scope, or the workspace refuses the call.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests, or a request repeated too soon: the key or the workspace is over its request limit, or the operation refuses a repeat inside its minimum interval. Retry after the delay in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before the request is sent again.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/media/uploads": {
      "post": {
        "tags": [
          "Media"
        ],
        "summary": "Start a media upload and get the URL to send the file to.",
        "description": "Required scope: `media:write`.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MediaUploadInput"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created",
            "headers": {
              "Location": {
                "description": "Where to read the created resource, or the status of the accepted work.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MediaUploadCreatedViewModel"
                }
              }
            }
          },
          "401": {
            "description": "The API key is missing, invalid, expired or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The API key lacks the required scope, or the workspace refuses the call.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests, or a request repeated too soon: the key or the workspace is over its request limit, or the operation refuses a repeat inside its minimum interval. Retry after the delay in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before the request is sent again.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/media/{id}/complete": {
      "post": {
        "tags": [
          "Media"
        ],
        "summary": "Mark an upload as complete so the file is checked and prepared.",
        "description": "Required scope: `media:write`.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "ETag": {
                "description": "The version of the resource, as a quoted number such as `\"3\"`. Send it back in `If-Match` to change or delete the resource.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MediaViewModel"
                }
              }
            }
          },
          "401": {
            "description": "The API key is missing, invalid, expired or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The API key lacks the required scope, or the workspace refuses the call.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests, or a request repeated too soon: the key or the workspace is over its request limit, or the operation refuses a repeat inside its minimum interval. Retry after the delay in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before the request is sent again.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/media/imports": {
      "post": {
        "tags": [
          "Media"
        ],
        "summary": "Import a media file from a public URL.",
        "description": "Required scope: `media:write`.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MediaImportInput"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created",
            "headers": {
              "Location": {
                "description": "Where to read the created resource, or the status of the accepted work.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MediaViewModel"
                }
              }
            }
          },
          "401": {
            "description": "The API key is missing, invalid, expired or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The API key lacks the required scope, or the workspace refuses the call.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests, or a request repeated too soon: the key or the workspace is over its request limit, or the operation refuses a repeat inside its minimum interval. Retry after the delay in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before the request is sent again.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/media": {
      "get": {
        "tags": [
          "Media"
        ],
        "summary": "List the media of a product.",
        "description": "Required scope: `media:read`.",
        "parameters": [
          {
            "name": "product_id",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "status",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 1
            }
          },
          {
            "name": "page_size",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 20
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MediaViewModelPagedResult"
                }
              }
            }
          },
          "401": {
            "description": "The API key is missing, invalid, expired or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The API key lacks the required scope, or the workspace refuses the call.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests, or a request repeated too soon: the key or the workspace is over its request limit, or the operation refuses a repeat inside its minimum interval. Retry after the delay in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before the request is sent again.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/media/usage": {
      "get": {
        "tags": [
          "Media"
        ],
        "summary": "Get how many media files a product stores and their total size.",
        "description": "Required scope: `media:read`.",
        "parameters": [
          {
            "name": "product_id",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MediaUsageViewModel"
                }
              }
            }
          },
          "401": {
            "description": "The API key is missing, invalid, expired or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The API key lacks the required scope, or the workspace refuses the call.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests, or a request repeated too soon: the key or the workspace is over its request limit, or the operation refuses a repeat inside its minimum interval. Retry after the delay in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before the request is sent again.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/media/{id}": {
      "get": {
        "tags": [
          "Media"
        ],
        "summary": "Get one media file; the ETag carries its version.",
        "description": "Required scope: `media:read`.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "ETag": {
                "description": "The version of the resource, as a quoted number such as `\"3\"`. Send it back in `If-Match` to change or delete the resource.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MediaViewModel"
                }
              }
            }
          },
          "401": {
            "description": "The API key is missing, invalid, expired or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The API key lacks the required scope, or the workspace refuses the call.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests, or a request repeated too soon: the key or the workspace is over its request limit, or the operation refuses a repeat inside its minimum interval. Retry after the delay in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before the request is sent again.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Media"
        ],
        "summary": "Change the alt text of a media file.",
        "description": "Required scope: `media:write`.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "If-Match",
            "in": "header",
            "description": "The resource `version`, as `3`, `\"3\"` or `W/\"3\"`. `*` is refused.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MediaPatch"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "ETag": {
                "description": "The version of the resource, as a quoted number such as `\"3\"`. Send it back in `If-Match` to change or delete the resource.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MediaViewModel"
                }
              }
            }
          },
          "401": {
            "description": "The API key is missing, invalid, expired or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The API key lacks the required scope, or the workspace refuses the call.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests, or a request repeated too soon: the key or the workspace is over its request limit, or the operation refuses a repeat inside its minimum interval. Retry after the delay in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before the request is sent again.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Media"
        ],
        "summary": "Delete a media file.",
        "description": "Required scope: `media:write`.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "401": {
            "description": "The API key is missing, invalid, expired or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The API key lacks the required scope, or the workspace refuses the call.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests, or a request repeated too soon: the key or the workspace is over its request limit, or the operation refuses a repeat inside its minimum interval. Retry after the delay in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before the request is sent again.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/posts": {
      "post": {
        "tags": [
          "Posts"
        ],
        "summary": "Create a draft post with its per-network targets and media.",
        "description": "Required scope: `posts:write`.",
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "A unique string you choose for this request. A retry with the same key and the same body returns the first response (with `Idempotent-Replayed: true`); the same key with a different body is refused. While a request with the same key is still running, a retry is refused with `409 idempotency_in_progress` and a `Retry-After` header: retry after that delay. A `503` (the service is briefly unavailable) may also carry `Retry-After`. A replayed response repeats the status and body only; `ETag` and `Location` are not sent again.",
            "required": true,
            "schema": {
              "maxLength": 128,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PostInput"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created",
            "headers": {
              "ETag": {
                "description": "The version of the resource, as a quoted number such as `\"3\"`. Send it back in `If-Match` to change or delete the resource. Not repeated on a replayed response (`Idempotent-Replayed: true`): read the resource by its `id`.",
                "schema": {
                  "type": "string"
                }
              },
              "Location": {
                "description": "Where to read the created resource, or the status of the accepted work. Not repeated on a replayed response (`Idempotent-Replayed: true`): read the resource by its `id`.",
                "schema": {
                  "type": "string"
                }
              },
              "Idempotent-Replayed": {
                "description": "`true` when this is the stored response of an earlier request with the same `Idempotency-Key`; absent on the first response. A replayed response repeats the status and body only: `ETag` and `Location` are not sent again, so read the resource by its `id`.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PostViewModel"
                }
              }
            }
          },
          "401": {
            "description": "The API key is missing, invalid, expired or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The API key lacks the required scope, or the workspace refuses the call.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "A conflict. `idempotency_conflict`: the `Idempotency-Key` was already used with a different body, or by another API key of the workspace. `idempotency_in_progress`: a request with the same key is still running; retry after the delay in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before the request is sent again. Sent only with `idempotency_in_progress`.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests, or a request repeated too soon: the key or the workspace is over its request limit, or the operation refuses a repeat inside its minimum interval. Retry after the delay in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before the request is sent again.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "get": {
        "tags": [
          "Posts"
        ],
        "summary": "List the posts of a product, filtered by status, target status and time window.",
        "description": "Required scope: `posts:read`.",
        "parameters": [
          {
            "name": "product_id",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "status",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "target_status",
            "in": "query",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "from",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "to",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 1
            }
          },
          {
            "name": "page_size",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 20
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PostViewModelPagedResult"
                }
              }
            }
          },
          "401": {
            "description": "The API key is missing, invalid, expired or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The API key lacks the required scope, or the workspace refuses the call.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests, or a request repeated too soon: the key or the workspace is over its request limit, or the operation refuses a repeat inside its minimum interval. Retry after the delay in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before the request is sent again.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/posts/{id}": {
      "get": {
        "tags": [
          "Posts"
        ],
        "summary": "Get one post with its targets; the ETag carries its version.",
        "description": "Required scope: `posts:read`.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "ETag": {
                "description": "The version of the resource, as a quoted number such as `\"3\"`. Send it back in `If-Match` to change or delete the resource.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PostViewModel"
                }
              }
            }
          },
          "401": {
            "description": "The API key is missing, invalid, expired or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The API key lacks the required scope, or the workspace refuses the call.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests, or a request repeated too soon: the key or the workspace is over its request limit, or the operation refuses a repeat inside its minimum interval. Retry after the delay in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before the request is sent again.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Posts"
        ],
        "summary": "Change the text, targets or media of a post.",
        "description": "Required scope: `posts:write`.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "If-Match",
            "in": "header",
            "description": "The resource `version`, as `3`, `\"3\"` or `W/\"3\"`. `*` is refused.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PostPatch"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "ETag": {
                "description": "The version of the resource, as a quoted number such as `\"3\"`. Send it back in `If-Match` to change or delete the resource.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PostViewModel"
                }
              }
            }
          },
          "401": {
            "description": "The API key is missing, invalid, expired or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The API key lacks the required scope, or the workspace refuses the call.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests, or a request repeated too soon: the key or the workspace is over its request limit, or the operation refuses a repeat inside its minimum interval. Retry after the delay in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before the request is sent again.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Posts"
        ],
        "summary": "Delete a draft, cancelled or failed post.",
        "description": "Required scope: `posts:write`.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "If-Match",
            "in": "header",
            "description": "The resource `version`, as `3`, `\"3\"` or `W/\"3\"`. `*` is refused.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "401": {
            "description": "The API key is missing, invalid, expired or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The API key lacks the required scope, or the workspace refuses the call.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests, or a request repeated too soon: the key or the workspace is over its request limit, or the operation refuses a repeat inside its minimum interval. Retry after the delay in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before the request is sent again.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/posts/{id}/validate": {
      "post": {
        "tags": [
          "Posts"
        ],
        "summary": "Check a post against the limits and capabilities of each target network.",
        "description": "Required scope: `posts:read`.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PostValidationViewModel"
                }
              }
            }
          },
          "401": {
            "description": "The API key is missing, invalid, expired or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The API key lacks the required scope, or the workspace refuses the call.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests, or a request repeated too soon: the key or the workspace is over its request limit, or the operation refuses a repeat inside its minimum interval. Retry after the delay in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before the request is sent again.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/posts/{id}/schedule": {
      "post": {
        "tags": [
          "Posts"
        ],
        "summary": "Schedule a post for a time in a time zone.",
        "description": "Required scope: `posts:publish`.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ScheduleInput"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Accepted",
            "headers": {
              "Location": {
                "description": "Where to read the created resource, or the status of the accepted work.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ScheduleAccepted"
                }
              }
            }
          },
          "401": {
            "description": "The API key is missing, invalid, expired or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The API key lacks the required scope, or the workspace refuses the call.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests, or a request repeated too soon: the key or the workspace is over its request limit, or the operation refuses a repeat inside its minimum interval. Retry after the delay in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before the request is sent again.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/posts/{id}/reschedule": {
      "post": {
        "tags": [
          "Posts"
        ],
        "summary": "Move a scheduled post to a new time; a change that needs a review holds the post until a person decides.",
        "description": "Required scope: `posts:publish`.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "If-Match",
            "in": "header",
            "description": "The resource `version`, as `3`, `\"3\"` or `W/\"3\"`. `*` is refused.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RescheduleInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "ETag": {
                "description": "The version of the resource, as a quoted number such as `\"3\"`. Send it back in `If-Match` to change or delete the resource.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PostViewModel"
                }
              }
            }
          },
          "202": {
            "description": "Accepted",
            "headers": {
              "ETag": {
                "description": "The version of the resource, as a quoted number such as `\"3\"`. Send it back in `If-Match` to change or delete the resource.",
                "schema": {
                  "type": "string"
                }
              },
              "Location": {
                "description": "Where to read the created resource, or the status of the accepted work.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HeldPostViewModel"
                }
              }
            }
          },
          "401": {
            "description": "The API key is missing, invalid, expired or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The API key lacks the required scope, or the workspace refuses the call.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests, or a request repeated too soon: the key or the workspace is over its request limit, or the operation refuses a repeat inside its minimum interval. Retry after the delay in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before the request is sent again.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/posts/{id}/publish": {
      "post": {
        "tags": [
          "Posts"
        ],
        "summary": "Publish a post now.",
        "description": "Required scope: `posts:publish`.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PublishNowInput"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Accepted",
            "headers": {
              "Location": {
                "description": "Where to read the created resource, or the status of the accepted work.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ScheduleAccepted"
                }
              }
            }
          },
          "401": {
            "description": "The API key is missing, invalid, expired or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The API key lacks the required scope, or the workspace refuses the call.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests, or a request repeated too soon: the key or the workspace is over its request limit, or the operation refuses a repeat inside its minimum interval. Retry after the delay in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before the request is sent again.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/products": {
      "get": {
        "tags": [
          "Products"
        ],
        "summary": "List the products of the workspace.",
        "description": "Required scope: `products:read`.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ProductViewModel"
                  }
                }
              }
            }
          },
          "401": {
            "description": "The API key is missing, invalid, expired or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The API key lacks the required scope, or the workspace refuses the call.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests, or a request repeated too soon: the key or the workspace is over its request limit, or the operation refuses a repeat inside its minimum interval. Retry after the delay in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before the request is sent again.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Products"
        ],
        "summary": "Create a product in the workspace.",
        "description": "Required scope: `products:write`.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ProductInput"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created",
            "headers": {
              "Location": {
                "description": "Where to read the created resource, or the status of the accepted work.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProductViewModel"
                }
              }
            }
          },
          "401": {
            "description": "The API key is missing, invalid, expired or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The API key lacks the required scope, or the workspace refuses the call.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests, or a request repeated too soon: the key or the workspace is over its request limit, or the operation refuses a repeat inside its minimum interval. Retry after the delay in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before the request is sent again.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/products/{id}": {
      "get": {
        "tags": [
          "Products"
        ],
        "summary": "Get one product.",
        "description": "Required scope: `products:read`.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProductViewModel"
                }
              }
            }
          },
          "401": {
            "description": "The API key is missing, invalid, expired or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The API key lacks the required scope, or the workspace refuses the call.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests, or a request repeated too soon: the key or the workspace is over its request limit, or the operation refuses a repeat inside its minimum interval. Retry after the delay in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before the request is sent again.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Products"
        ],
        "summary": "Change the name, slug, default locale or time zone of a product.",
        "description": "Required scope: `products:write`.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ProductPatch"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProductViewModel"
                }
              }
            }
          },
          "401": {
            "description": "The API key is missing, invalid, expired or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The API key lacks the required scope, or the workspace refuses the call.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests, or a request repeated too soon: the key or the workspace is over its request limit, or the operation refuses a repeat inside its minimum interval. Retry after the delay in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before the request is sent again.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/publications/{id}": {
      "get": {
        "tags": [
          "Publications"
        ],
        "summary": "Get the publication of a post and the status of each target.",
        "description": "Required scope: `posts:read`.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicationViewModel"
                }
              }
            }
          },
          "401": {
            "description": "The API key is missing, invalid, expired or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The API key lacks the required scope, or the workspace refuses the call.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests, or a request repeated too soon: the key or the workspace is over its request limit, or the operation refuses a repeat inside its minimum interval. Retry after the delay in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before the request is sent again.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/publications/{id}/cancel": {
      "post": {
        "tags": [
          "Publications"
        ],
        "summary": "Cancel a publication, or one of its targets.",
        "description": "Required scope: `posts:publish`.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CancelInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicationViewModel"
                }
              }
            }
          },
          "401": {
            "description": "The API key is missing, invalid, expired or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The API key lacks the required scope, or the workspace refuses the call.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests, or a request repeated too soon: the key or the workspace is over its request limit, or the operation refuses a repeat inside its minimum interval. Retry after the delay in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before the request is sent again.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/webhook-subscriptions": {
      "get": {
        "tags": [
          "WebhookSubscriptions"
        ],
        "summary": "List the webhook subscriptions of a product.",
        "description": "Required scope: `webhooks:read`.",
        "parameters": [
          {
            "name": "product_id",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/WebhookSubscriptionViewModel"
                  }
                }
              }
            }
          },
          "401": {
            "description": "The API key is missing, invalid, expired or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The API key lacks the required scope, or the workspace refuses the call.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests, or a request repeated too soon: the key or the workspace is over its request limit, or the operation refuses a repeat inside its minimum interval. Retry after the delay in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before the request is sent again.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "WebhookSubscriptions"
        ],
        "summary": "Create a webhook subscription; the response shows the signing secret once.",
        "description": "Required scope: `webhooks:write`.",
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "A unique string you choose for this request. A retry with the same key and the same body returns the first response (with `Idempotent-Replayed: true`); the same key with a different body is refused. While a request with the same key is still running, a retry is refused with `409 idempotency_in_progress` and a `Retry-After` header: retry after that delay. A `503` (the service is briefly unavailable) may also carry `Retry-After`. A replayed response repeats the status and body only; `ETag` and `Location` are not sent again.",
            "required": true,
            "schema": {
              "maxLength": 128,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookSubscriptionInput"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created",
            "headers": {
              "Location": {
                "description": "Where to read the created resource, or the status of the accepted work. Not repeated on a replayed response (`Idempotent-Replayed: true`): read the resource by its `id`.",
                "schema": {
                  "type": "string"
                }
              },
              "Idempotent-Replayed": {
                "description": "`true` when this is the stored response of an earlier request with the same `Idempotency-Key`; absent on the first response. A replayed response repeats the status and body only: `ETag` and `Location` are not sent again, so read the resource by its `id`.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookSubscriptionCreatedViewModel"
                }
              }
            }
          },
          "401": {
            "description": "The API key is missing, invalid, expired or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The API key lacks the required scope, or the workspace refuses the call.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "A conflict. `idempotency_conflict`: the `Idempotency-Key` was already used with a different body, or by another API key of the workspace. `idempotency_in_progress`: a request with the same key is still running; retry after the delay in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before the request is sent again. Sent only with `idempotency_in_progress`.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests, or a request repeated too soon: the key or the workspace is over its request limit, or the operation refuses a repeat inside its minimum interval. Retry after the delay in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before the request is sent again.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/webhook-subscriptions/{id}": {
      "get": {
        "tags": [
          "WebhookSubscriptions"
        ],
        "summary": "Get one webhook subscription; the ETag carries its version.",
        "description": "Required scope: `webhooks:read`.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "ETag": {
                "description": "The version of the resource, as a quoted number such as `\"3\"`. Send it back in `If-Match` to change or delete the resource.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookSubscriptionViewModel"
                }
              }
            }
          },
          "401": {
            "description": "The API key is missing, invalid, expired or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The API key lacks the required scope, or the workspace refuses the call.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests, or a request repeated too soon: the key or the workspace is over its request limit, or the operation refuses a repeat inside its minimum interval. Retry after the delay in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before the request is sent again.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "WebhookSubscriptions"
        ],
        "summary": "Change the URL or the events of a webhook subscription.",
        "description": "Required scope: `webhooks:write`.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "If-Match",
            "in": "header",
            "description": "The resource `version`, as `3`, `\"3\"` or `W/\"3\"`. `*` is refused.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookSubscriptionPatch"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "ETag": {
                "description": "The version of the resource, as a quoted number such as `\"3\"`. Send it back in `If-Match` to change or delete the resource.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookSubscriptionViewModel"
                }
              }
            }
          },
          "401": {
            "description": "The API key is missing, invalid, expired or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The API key lacks the required scope, or the workspace refuses the call.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests, or a request repeated too soon: the key or the workspace is over its request limit, or the operation refuses a repeat inside its minimum interval. Retry after the delay in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before the request is sent again.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "WebhookSubscriptions"
        ],
        "summary": "Delete a webhook subscription.",
        "description": "Required scope: `webhooks:write`.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "401": {
            "description": "The API key is missing, invalid, expired or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The API key lacks the required scope, or the workspace refuses the call.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests, or a request repeated too soon: the key or the workspace is over its request limit, or the operation refuses a repeat inside its minimum interval. Retry after the delay in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before the request is sent again.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/webhook-subscriptions/{id}/pause": {
      "post": {
        "tags": [
          "WebhookSubscriptions"
        ],
        "summary": "Pause a webhook subscription; events are not recorded while it is paused.",
        "description": "Required scope: `webhooks:write`.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookSubscriptionViewModel"
                }
              }
            }
          },
          "401": {
            "description": "The API key is missing, invalid, expired or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The API key lacks the required scope, or the workspace refuses the call.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests, or a request repeated too soon: the key or the workspace is over its request limit, or the operation refuses a repeat inside its minimum interval. Retry after the delay in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before the request is sent again.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/webhook-subscriptions/{id}/resume": {
      "post": {
        "tags": [
          "WebhookSubscriptions"
        ],
        "summary": "Resume a paused webhook subscription.",
        "description": "Required scope: `webhooks:write`.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookSubscriptionViewModel"
                }
              }
            }
          },
          "401": {
            "description": "The API key is missing, invalid, expired or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The API key lacks the required scope, or the workspace refuses the call.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests, or a request repeated too soon: the key or the workspace is over its request limit, or the operation refuses a repeat inside its minimum interval. Retry after the delay in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before the request is sent again.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/webhook-subscriptions/{id}/rotate-secret": {
      "post": {
        "tags": [
          "WebhookSubscriptions"
        ],
        "summary": "Replace the signing secret of a webhook subscription; the response shows the new secret once.",
        "description": "Required scope: `webhooks:write`.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookSubscriptionCreatedViewModel"
                }
              }
            }
          },
          "401": {
            "description": "The API key is missing, invalid, expired or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The API key lacks the required scope, or the workspace refuses the call.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests, or a request repeated too soon: the key or the workspace is over its request limit, or the operation refuses a repeat inside its minimum interval. Retry after the delay in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before the request is sent again.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/webhook-subscriptions/{id}/test": {
      "post": {
        "tags": [
          "WebhookSubscriptions"
        ],
        "summary": "Send a test ping event to a webhook subscription.",
        "description": "Required scope: `webhooks:write`.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "202": {
            "description": "Accepted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookPingViewModel"
                }
              }
            }
          },
          "401": {
            "description": "The API key is missing, invalid, expired or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The API key lacks the required scope, or the workspace refuses the call.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests, or a request repeated too soon: the key or the workspace is over its request limit, or the operation refuses a repeat inside its minimum interval. Retry after the delay in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before the request is sent again.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/webhook-subscriptions/{id}/deliveries": {
      "get": {
        "tags": [
          "WebhookSubscriptions"
        ],
        "summary": "List the deliveries of a webhook subscription, newest first.",
        "description": "Required scope: `webhooks:read`.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "status",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 1
            }
          },
          {
            "name": "page_size",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 20
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookDeliveryViewModelPagedResult"
                }
              }
            }
          },
          "401": {
            "description": "The API key is missing, invalid, expired or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The API key lacks the required scope, or the workspace refuses the call.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests, or a request repeated too soon: the key or the workspace is over its request limit, or the operation refuses a repeat inside its minimum interval. Retry after the delay in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before the request is sent again.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/webhook-subscriptions/{id}/deliveries/{delivery_id}/redeliver": {
      "post": {
        "tags": [
          "WebhookSubscriptions"
        ],
        "summary": "Send a past delivery again.",
        "description": "Required scope: `webhooks:write`.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "delivery_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookDeliveryViewModel"
                }
              }
            }
          },
          "401": {
            "description": "The API key is missing, invalid, expired or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The API key lacks the required scope, or the workspace refuses the call.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests, or a request repeated too soon: the key or the workspace is over its request limit, or the operation refuses a repeat inside its minimum interval. Retry after the delay in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before the request is sent again.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/workspaces": {
      "get": {
        "tags": [
          "Workspaces"
        ],
        "summary": "List the workspaces the API key can reach, with its role and effective scopes.",
        "description": "Required scope: none (any valid API key).",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/WorkspaceViewModel"
                  }
                }
              }
            }
          },
          "401": {
            "description": "The API key is missing, invalid, expired or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The API key lacks the required scope, or the workspace refuses the call.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests, or a request repeated too soon: the key or the workspace is over its request limit, or the operation refuses a repeat inside its minimum interval. Retry after the delay in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before the request is sent again.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/workspaces/{organization_id}/plan": {
      "get": {
        "tags": [
          "Workspaces"
        ],
        "summary": "Get the plan of the workspace's owner, the workspace's usage and any block.",
        "description": "Required scope: `workspaces:read`.",
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkspacePlanViewModel"
                }
              }
            }
          },
          "401": {
            "description": "The API key is missing, invalid, expired or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The API key lacks the required scope, or the workspace refuses the call.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests, or a request repeated too soon: the key or the workspace is over its request limit, or the operation refuses a repeat inside its minimum interval. Retry after the delay in `Retry-After`.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before the request is sent again.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "ApprovalMode": {
        "enum": [
          "schedule",
          "publish_now",
          "reschedule"
        ],
        "type": "string"
      },
      "ApprovalRequestInput": {
        "required": [
          "mode",
          "post_version"
        ],
        "type": "object",
        "properties": {
          "post_version": {
            "type": "integer",
            "format": "int32"
          },
          "mode": {
            "minLength": 1,
            "type": "string"
          },
          "scheduled_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "timezone": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "ApprovalStatus": {
        "enum": [
          "pending",
          "approved",
          "rejected",
          "expired",
          "consumed"
        ],
        "type": "string"
      },
      "ApprovalViewModel": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "product_id": {
            "type": "string",
            "format": "uuid"
          },
          "post_id": {
            "type": "string",
            "format": "uuid"
          },
          "post_version": {
            "type": "integer",
            "format": "int32"
          },
          "mode": {
            "$ref": "#/components/schemas/ApprovalMode"
          },
          "scheduled_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "timezone": {
            "type": "string",
            "nullable": true
          },
          "previous_scheduled_at": {
            "type": "string",
            "description": "`reschedule` only: the time the review would replace (UTC) and its zone; `scheduled_at`/`timezone` are the new time.",
            "format": "date-time",
            "nullable": true
          },
          "previous_timezone": {
            "type": "string",
            "nullable": true
          },
          "client_id": {
            "type": "string",
            "nullable": true
          },
          "status": {
            "$ref": "#/components/schemas/ApprovalStatus"
          },
          "requested_at_utc": {
            "type": "string",
            "format": "date-time"
          },
          "decided_at_utc": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "expires_at_utc": {
            "type": "string",
            "format": "date-time"
          },
          "review_url": {
            "type": "string",
            "nullable": true
          },
          "preview": {
            "$ref": "#/components/schemas/PublicationPreviewViewModel"
          }
        },
        "additionalProperties": false
      },
      "ApprovalViewModelPagedResult": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApprovalViewModel"
            },
            "nullable": true
          },
          "page": {
            "type": "integer",
            "format": "int32"
          },
          "page_size": {
            "type": "integer",
            "format": "int32"
          },
          "total": {
            "type": "integer",
            "format": "int32"
          }
        },
        "additionalProperties": false
      },
      "CancelInput": {
        "type": "object",
        "properties": {
          "target_id": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "CapabilityViewModel": {
        "type": "object",
        "properties": {
          "format": {
            "$ref": "#/components/schemas/ContentFormat"
          },
          "action": {
            "$ref": "#/components/schemas/ConnectionAction"
          },
          "enabled": {
            "type": "boolean"
          },
          "max_text_length": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "limits": {
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "CollectionJobViewModel": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "trigger": {
            "type": "string",
            "nullable": true
          },
          "status": {
            "type": "string",
            "nullable": true
          },
          "result": {
            "type": "string",
            "nullable": true
          },
          "requested_at_utc": {
            "type": "string",
            "format": "date-time"
          },
          "finished_at_utc": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "ConnectionAction": {
        "enum": [
          "publish",
          "delete",
          "read_metrics"
        ],
        "type": "string"
      },
      "ConnectionInput": {
        "required": [
          "external_account_id",
          "handle",
          "product_id",
          "provider"
        ],
        "type": "object",
        "properties": {
          "product_id": {
            "type": "string",
            "format": "uuid"
          },
          "provider": {
            "minLength": 1,
            "type": "string"
          },
          "external_account_id": {
            "minLength": 1,
            "type": "string"
          },
          "handle": {
            "minLength": 1,
            "type": "string"
          },
          "display_name": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "ConnectionStatus": {
        "enum": [
          "active",
          "reauthorize_required",
          "revoked",
          "in_review",
          "suspended"
        ],
        "type": "string"
      },
      "ConnectionViewModel": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "product_id": {
            "type": "string",
            "format": "uuid"
          },
          "provider": {
            "type": "string",
            "nullable": true
          },
          "external_account_id": {
            "type": "string",
            "nullable": true
          },
          "handle": {
            "type": "string",
            "nullable": true
          },
          "display_name": {
            "type": "string",
            "nullable": true
          },
          "status": {
            "$ref": "#/components/schemas/ConnectionStatus"
          },
          "api_version": {
            "type": "string",
            "nullable": true
          },
          "last_verified_at_utc": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "revoked_at_utc": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "account_type": {
            "type": "string",
            "nullable": true
          },
          "granted_scopes": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "refreshable_until_utc": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "reauthorize_reason": {
            "type": "string",
            "nullable": true
          },
          "paused": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "ConnectorStage": {
        "enum": [
          "research",
          "approved",
          "beta",
          "generally_available"
        ],
        "type": "string"
      },
      "ConnectorViewModel": {
        "type": "object",
        "properties": {
          "provider": {
            "type": "string",
            "nullable": true
          },
          "stage": {
            "$ref": "#/components/schemas/ConnectorStage"
          },
          "enabled": {
            "type": "boolean"
          },
          "notices": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "requires_consent": {
            "type": "boolean"
          },
          "paused": {
            "type": "boolean"
          },
          "early_access": {
            "type": "boolean"
          },
          "connectable": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "ContentFormat": {
        "enum": [
          "text",
          "link",
          "image",
          "video"
        ],
        "type": "string"
      },
      "DataExportJobViewModel": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "product_id": {
            "type": "string",
            "format": "uuid"
          },
          "status": {
            "type": "string",
            "nullable": true
          },
          "requested_at_utc": {
            "type": "string",
            "format": "date-time"
          },
          "finished_at_utc": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "expires_at_utc": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "bytes": {
            "type": "integer",
            "format": "int64",
            "nullable": true
          },
          "asset_count": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "error": {
            "type": "string",
            "nullable": true
          },
          "counts": {
            "$ref": "#/components/schemas/ExportCountsViewModel"
          }
        },
        "additionalProperties": false
      },
      "Error": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "nullable": true
          },
          "message": {
            "type": "string",
            "nullable": true
          },
          "target": {
            "type": "string",
            "nullable": true
          },
          "retryable": {
            "type": "boolean"
          },
          "current_status": {
            "type": "string",
            "nullable": true
          },
          "correlation_id": {
            "type": "string",
            "nullable": true
          },
          "action": {
            "$ref": "#/components/schemas/V1UserAction"
          },
          "retry_after": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "errors": {
            "$ref": "#/components/schemas/V1ErrorDetails"
          }
        },
        "additionalProperties": false
      },
      "ExportCountsViewModel": {
        "type": "object",
        "properties": {
          "bytes": {
            "type": "integer",
            "format": "int64"
          },
          "assets": {
            "type": "integer",
            "format": "int32"
          },
          "max_bytes": {
            "type": "integer",
            "format": "int64"
          },
          "max_assets": {
            "type": "integer",
            "format": "int32"
          }
        },
        "additionalProperties": false
      },
      "ExportDownloadViewModel": {
        "type": "object",
        "properties": {
          "url": {
            "type": "string",
            "nullable": true
          },
          "expires_at_utc": {
            "type": "string",
            "format": "date-time"
          }
        },
        "additionalProperties": false
      },
      "ExportRequestInput": {
        "required": [
          "product_id"
        ],
        "type": "object",
        "properties": {
          "product_id": {
            "type": "string",
            "format": "uuid"
          }
        },
        "additionalProperties": false
      },
      "HeldPostViewModel": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "product_id": {
            "type": "string",
            "format": "uuid"
          },
          "version": {
            "type": "integer",
            "format": "int32"
          },
          "status": {
            "$ref": "#/components/schemas/PostStatus"
          },
          "base_text": {
            "type": "string",
            "nullable": true
          },
          "scheduled_at_utc": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "timezone": {
            "type": "string",
            "nullable": true
          },
          "created_at_utc": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at_utc": {
            "type": "string",
            "format": "date-time"
          },
          "targets": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PostTargetViewModel"
            },
            "nullable": true
          },
          "media": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PostMediaViewModel"
            },
            "nullable": true
          },
          "deletable": {
            "type": "boolean",
            "description": "True when `DELETE /v1/posts/{id}` is allowed by the post's own state (Draft, Cancelled or Failed, nothing in flight,\nno target on a network). The server still refuses while a job remains. A Scheduled post is false: cancel first."
          },
          "reschedule_until_utc": {
            "type": "string",
            "description": "The last instant (UTC, inclusive) at which `POST /v1/posts/{id}/reschedule` is accepted: the current scheduled time\nminus the reschedule lead. Null when the post is not reschedulable by state. Past this instant every reschedule is refused\nwith 409 `post_reschedule_window_closed`; the post can still be cancelled.",
            "format": "date-time",
            "nullable": true
          },
          "held_for_review": {
            "type": "boolean",
            "description": "True while a reschedule waits for a review: the post carries the requested time but publishes at neither time until\nthe review `review_approval_id` is approved (it then publishes at that time) or rejected or expired (the post is cancelled).\nNo reschedule is accepted meanwhile (`reschedule_until_utc` is null); cancelling the post withdraws the request."
          },
          "review_approval_id": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "action": {
            "$ref": "#/components/schemas/ReviewActionViewModel"
          }
        },
        "additionalProperties": false,
        "description": "The 202 answer of `POST /v1/posts/{id}/reschedule` when the new time needs a review: the held post and what a person must do."
      },
      "MediaImportInput": {
        "required": [
          "product_id",
          "url"
        ],
        "type": "object",
        "properties": {
          "product_id": {
            "type": "string",
            "format": "uuid"
          },
          "url": {
            "minLength": 1,
            "type": "string"
          },
          "alt_text": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "MediaKind": {
        "enum": [
          "image",
          "video"
        ],
        "type": "string"
      },
      "MediaPatch": {
        "type": "object",
        "properties": {
          "alt_text": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "MediaSource": {
        "enum": [
          "upload",
          "url"
        ],
        "type": "string"
      },
      "MediaStatus": {
        "enum": [
          "pending_upload",
          "processing",
          "ready",
          "rejected",
          "deleted"
        ],
        "type": "string"
      },
      "MediaUploadCreatedViewModel": {
        "type": "object",
        "properties": {
          "media_id": {
            "type": "string",
            "format": "uuid"
          },
          "upload_url": {
            "type": "string",
            "format": "uri",
            "nullable": true
          },
          "headers": {
            "type": "object",
            "additionalProperties": {
              "type": "string",
              "nullable": true
            },
            "nullable": true
          },
          "expires_at_utc": {
            "type": "string",
            "format": "date-time"
          },
          "media": {
            "$ref": "#/components/schemas/MediaViewModel"
          }
        },
        "additionalProperties": false
      },
      "MediaUploadInput": {
        "required": [
          "bytes",
          "mime",
          "product_id"
        ],
        "type": "object",
        "properties": {
          "product_id": {
            "type": "string",
            "format": "uuid",
            "example": "3f2b8c1e-5d4a-4e7b-9c61-2a8f0d7e4b19"
          },
          "mime": {
            "minLength": 1,
            "type": "string",
            "example": "image/jpeg"
          },
          "bytes": {
            "type": "integer",
            "format": "int64",
            "example": 482133
          },
          "alt_text": {
            "type": "string",
            "nullable": true,
            "example": "A latte on a wooden table."
          }
        },
        "additionalProperties": false
      },
      "MediaUsageViewModel": {
        "type": "object",
        "properties": {
          "product_id": {
            "type": "string",
            "format": "uuid"
          },
          "stored_bytes": {
            "type": "integer",
            "format": "int64"
          },
          "asset_count": {
            "type": "integer",
            "format": "int32"
          },
          "measured_at_utc": {
            "type": "string",
            "format": "date-time"
          }
        },
        "additionalProperties": false
      },
      "MediaVariantKind": {
        "enum": [
          "original",
          "thumb",
          "bluesky",
          "poster",
          "instagram"
        ],
        "type": "string"
      },
      "MediaVariantViewModel": {
        "type": "object",
        "properties": {
          "kind": {
            "$ref": "#/components/schemas/MediaVariantKind"
          },
          "mime": {
            "type": "string",
            "nullable": true
          },
          "bytes": {
            "type": "integer",
            "format": "int64"
          },
          "width": {
            "type": "integer",
            "format": "int32"
          },
          "height": {
            "type": "integer",
            "format": "int32"
          }
        },
        "additionalProperties": false
      },
      "MediaVideoViewModel": {
        "type": "object",
        "properties": {
          "container": {
            "type": "string",
            "nullable": true
          },
          "video_codec": {
            "type": "string",
            "nullable": true
          },
          "audio_codec": {
            "type": "string",
            "nullable": true
          },
          "frame_rate": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "bitrate_kbps": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "MediaViewModel": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "product_id": {
            "type": "string",
            "format": "uuid"
          },
          "status": {
            "$ref": "#/components/schemas/MediaStatus"
          },
          "kind": {
            "$ref": "#/components/schemas/MediaKind"
          },
          "source": {
            "$ref": "#/components/schemas/MediaSource"
          },
          "source_url": {
            "type": "string",
            "description": "For an imported asset, the address it was imported from: scheme, host, port and path only. The query string, the\nfragment and any user information are never returned. The path is kept as sent, so a secret carried inside the path\nitself (a signed path segment, a `;` parameter or an encoded `%3F`) is returned with it.",
            "nullable": true
          },
          "mime": {
            "type": "string",
            "nullable": true
          },
          "bytes": {
            "type": "integer",
            "format": "int64",
            "nullable": true
          },
          "width": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "height": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "sha256": {
            "type": "string",
            "nullable": true
          },
          "alt_text": {
            "type": "string",
            "nullable": true
          },
          "duration_ms": {
            "type": "integer",
            "format": "int64",
            "nullable": true
          },
          "video": {
            "$ref": "#/components/schemas/MediaVideoViewModel"
          },
          "rejection_code": {
            "type": "string",
            "nullable": true
          },
          "rejection_message": {
            "type": "string",
            "nullable": true
          },
          "in_use": {
            "type": "boolean"
          },
          "expired": {
            "type": "boolean"
          },
          "created_at_utc": {
            "type": "string",
            "format": "date-time"
          },
          "ready_at_utc": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "expires_at_utc": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "deleted_at_utc": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "version": {
            "type": "integer",
            "format": "int32"
          },
          "variants": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MediaVariantViewModel"
            },
            "nullable": true
          },
          "thumb_url": {
            "type": "string",
            "format": "uri",
            "nullable": true
          },
          "thumb_url_expires_at_utc": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "MediaViewModelPagedResult": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MediaViewModel"
            },
            "nullable": true
          },
          "page": {
            "type": "integer",
            "format": "int32"
          },
          "page_size": {
            "type": "integer",
            "format": "int32"
          },
          "total": {
            "type": "integer",
            "format": "int32"
          }
        },
        "additionalProperties": false
      },
      "MemberRole": {
        "enum": [
          "owner",
          "admin",
          "publisher",
          "editor",
          "viewer"
        ],
        "type": "string"
      },
      "MetricDefinitionViewModel": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "nullable": true
          },
          "native_id": {
            "type": "string",
            "nullable": true
          },
          "definition_key": {
            "type": "string",
            "nullable": true
          },
          "definition": {
            "type": "string",
            "nullable": true
          },
          "window": {
            "type": "string",
            "nullable": true
          },
          "cumulative": {
            "type": "boolean"
          },
          "exportable": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "MetricSnapshotViewModel": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "collected_at_utc": {
            "type": "string",
            "format": "date-time"
          },
          "available": {
            "type": "boolean"
          },
          "reason": {
            "type": "string",
            "nullable": true
          },
          "trigger": {
            "type": "string",
            "nullable": true
          },
          "metrics": {
            "type": "object",
            "additionalProperties": {
              "type": "integer",
              "format": "int64",
              "nullable": true
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "PendingApprovalViewModel": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "status": {
            "$ref": "#/components/schemas/ApprovalStatus"
          },
          "expires_at_utc": {
            "type": "string",
            "format": "date-time"
          },
          "review_url": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "PostInput": {
        "required": [
          "base_text",
          "product_id"
        ],
        "type": "object",
        "properties": {
          "product_id": {
            "type": "string",
            "format": "uuid",
            "example": "3f2b8c1e-5d4a-4e7b-9c61-2a8f0d7e4b19"
          },
          "base_text": {
            "minLength": 1,
            "type": "string",
            "example": "Our winter menu is here."
          },
          "targets": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PostTargetInputModel"
            },
            "nullable": true
          },
          "media_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "nullable": true,
            "example": []
          }
        },
        "additionalProperties": false
      },
      "PostMediaViewModel": {
        "type": "object",
        "properties": {
          "media_id": {
            "type": "string",
            "format": "uuid"
          },
          "order": {
            "type": "integer",
            "format": "int32"
          }
        },
        "additionalProperties": false
      },
      "PostMetricsViewModel": {
        "type": "object",
        "properties": {
          "post_id": {
            "type": "string",
            "format": "uuid"
          },
          "product_id": {
            "type": "string",
            "format": "uuid"
          },
          "targets": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TargetMetricsViewModel"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "PostPatch": {
        "type": "object",
        "properties": {
          "base_text": {
            "type": "string",
            "nullable": true
          },
          "targets": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PostTargetInputModel"
            },
            "nullable": true
          },
          "media_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "PostStatus": {
        "enum": [
          "draft",
          "scheduled",
          "publishing",
          "partially_published",
          "published",
          "failed",
          "cancelled"
        ],
        "type": "string"
      },
      "PostTargetInputModel": {
        "required": [
          "connection_id"
        ],
        "type": "object",
        "properties": {
          "connection_id": {
            "type": "string",
            "format": "uuid",
            "example": "b6e0c2d4-8f1a-4c3e-a7d5-9e2f4b6c8a01"
          },
          "format": {
            "$ref": "#/components/schemas/ContentFormat"
          },
          "text_override": {
            "type": "string",
            "nullable": true,
            "example": "Our winter menu is here. #coffee"
          },
          "options": {
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "PostTargetStatus": {
        "enum": [
          "pending",
          "scheduled",
          "publishing",
          "processing",
          "published",
          "failed",
          "unknown",
          "needs_review",
          "cancelled"
        ],
        "type": "string"
      },
      "PostTargetViewModel": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "connection_id": {
            "type": "string",
            "format": "uuid"
          },
          "format": {
            "$ref": "#/components/schemas/ContentFormat"
          },
          "text_override": {
            "type": "string",
            "nullable": true
          },
          "status": {
            "$ref": "#/components/schemas/PostTargetStatus"
          },
          "external_post_id": {
            "type": "string",
            "nullable": true
          },
          "external_url": {
            "type": "string",
            "nullable": true
          },
          "attempts": {
            "type": "integer",
            "format": "int32"
          },
          "last_error": {
            "type": "string",
            "description": "Why the destination last failed or is waiting, as a code. It is a known code (for example `timeout`,\n`deferred:paused` or `Publication.ProcessingTimeout`), or `reason:detail` where the detail is a short token\nof letters, digits and underscores (at most 34 characters, for example `rejected:invalid_params`), a numeric\n`code/subcode` pair, or one of this API's error keys. Any other detail from the network is replaced by\n`withheld`, and a value that fits none of these shapes is returned as `provider_error`.",
            "nullable": true
          },
          "published_at_utc": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "options": {
            "nullable": true
          },
          "consent_at_utc": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "processing_since_utc": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "PostValidationViewModel": {
        "type": "object",
        "properties": {
          "valid": {
            "type": "boolean",
            "description": "Always `true` in a successful response.",
            "example": true
          }
        },
        "additionalProperties": false,
        "description": "The answer of a post check that found no problem; a post that fails the check is refused with an error instead."
      },
      "PostViewModel": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "product_id": {
            "type": "string",
            "format": "uuid"
          },
          "version": {
            "type": "integer",
            "format": "int32"
          },
          "status": {
            "$ref": "#/components/schemas/PostStatus"
          },
          "base_text": {
            "type": "string",
            "nullable": true
          },
          "scheduled_at_utc": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "timezone": {
            "type": "string",
            "nullable": true
          },
          "created_at_utc": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at_utc": {
            "type": "string",
            "format": "date-time"
          },
          "targets": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PostTargetViewModel"
            },
            "nullable": true
          },
          "media": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PostMediaViewModel"
            },
            "nullable": true
          },
          "deletable": {
            "type": "boolean",
            "description": "True when `DELETE /v1/posts/{id}` is allowed by the post's own state (Draft, Cancelled or Failed, nothing in flight,\nno target on a network). The server still refuses while a job remains. A Scheduled post is false: cancel first."
          },
          "reschedule_until_utc": {
            "type": "string",
            "description": "The last instant (UTC, inclusive) at which `POST /v1/posts/{id}/reschedule` is accepted: the current scheduled time\nminus the reschedule lead. Null when the post is not reschedulable by state. Past this instant every reschedule is refused\nwith 409 `post_reschedule_window_closed`; the post can still be cancelled.",
            "format": "date-time",
            "nullable": true
          },
          "held_for_review": {
            "type": "boolean",
            "description": "True while a reschedule waits for a review: the post carries the requested time but publishes at neither time until\nthe review `review_approval_id` is approved (it then publishes at that time) or rejected or expired (the post is cancelled).\nNo reschedule is accepted meanwhile (`reschedule_until_utc` is null); cancelling the post withdraws the request."
          },
          "review_approval_id": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "PostViewModelPagedResult": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PostViewModel"
            },
            "nullable": true
          },
          "page": {
            "type": "integer",
            "format": "int32"
          },
          "page_size": {
            "type": "integer",
            "format": "int32"
          },
          "total": {
            "type": "integer",
            "format": "int32"
          }
        },
        "additionalProperties": false
      },
      "PreviewAttachmentViewModel": {
        "type": "object",
        "properties": {
          "key": {
            "type": "string",
            "description": "The option key that names the image.",
            "nullable": true
          },
          "media_id": {
            "type": "string",
            "format": "uuid"
          },
          "width": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "height": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "status": {
            "$ref": "#/components/schemas/MediaStatus"
          }
        },
        "additionalProperties": false,
        "description": "An image a target option names (for example `cover_media_id`). Read it through the media endpoints with its id."
      },
      "PreviewConnectionViewModel": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "provider": {
            "type": "string",
            "nullable": true
          },
          "handle": {
            "type": "string",
            "nullable": true
          },
          "display_name": {
            "type": "string",
            "nullable": true
          },
          "status": {
            "$ref": "#/components/schemas/ConnectionStatus"
          }
        },
        "additionalProperties": false
      },
      "PreviewMediaViewModel": {
        "type": "object",
        "properties": {
          "media_id": {
            "type": "string",
            "format": "uuid"
          },
          "alt_text": {
            "type": "string",
            "nullable": true
          },
          "width": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "height": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "mime": {
            "type": "string",
            "nullable": true
          },
          "status": {
            "$ref": "#/components/schemas/MediaStatus"
          },
          "kind": {
            "$ref": "#/components/schemas/MediaKind"
          },
          "duration_ms": {
            "type": "integer",
            "format": "int64",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "PreviewScheduleViewModel": {
        "type": "object",
        "properties": {
          "requested_at": {
            "type": "string",
            "format": "date-time"
          },
          "timezone": {
            "type": "string",
            "nullable": true
          },
          "resolved_utc": {
            "type": "string",
            "format": "date-time"
          },
          "resolved_local": {
            "type": "string",
            "format": "date-time"
          },
          "adjusted_for_gap": {
            "type": "boolean"
          },
          "was_ambiguous": {
            "type": "boolean"
          },
          "offset_mismatch": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "PreviewTargetViewModel": {
        "type": "object",
        "properties": {
          "target_id": {
            "type": "string",
            "format": "uuid"
          },
          "connection": {
            "$ref": "#/components/schemas/PreviewConnectionViewModel"
          },
          "format": {
            "$ref": "#/components/schemas/ContentFormat"
          },
          "effective_text": {
            "type": "string",
            "nullable": true
          },
          "text_graphemes": {
            "type": "integer",
            "format": "int32"
          },
          "max_text_graphemes": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "capability_ok": {
            "type": "boolean"
          },
          "links": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "media": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PreviewMediaViewModel"
            },
            "nullable": true
          },
          "attachments": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PreviewAttachmentViewModel"
            },
            "description": "Images this target's options name, such as a Reels cover or a video thumbnail. They are never published as the post's media.",
            "nullable": true
          },
          "options": {
            "nullable": true
          },
          "requires_consent": {
            "type": "boolean"
          },
          "consent_at_utc": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "ProductInput": {
        "required": [
          "default_locale",
          "name",
          "slug",
          "timezone"
        ],
        "type": "object",
        "properties": {
          "organization_id": {
            "type": "string",
            "format": "uuid",
            "nullable": true,
            "example": "5a1d7e3c-2b9f-4d6a-8c0e-1f4b7a9d3e62"
          },
          "name": {
            "minLength": 1,
            "type": "string",
            "example": "Acme Coffee"
          },
          "slug": {
            "minLength": 1,
            "type": "string",
            "example": "acme-coffee"
          },
          "default_locale": {
            "minLength": 1,
            "type": "string",
            "example": "en"
          },
          "timezone": {
            "minLength": 1,
            "type": "string",
            "example": "America/New_York"
          }
        },
        "additionalProperties": false
      },
      "ProductPatch": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "nullable": true
          },
          "slug": {
            "type": "string",
            "nullable": true
          },
          "default_locale": {
            "type": "string",
            "nullable": true
          },
          "timezone": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "ProductViewModel": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "organization_id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "slug": {
            "type": "string",
            "nullable": true
          },
          "default_locale": {
            "type": "string",
            "nullable": true
          },
          "timezone": {
            "type": "string",
            "nullable": true
          },
          "archived_at_utc": {
            "type": "string",
            "description": "When the product was archived, in UTC; absent while the product is active. An archived product is read-only: it can be\nread and exported, and every change to it is refused with product_archived.",
            "format": "date-time",
            "nullable": true,
            "example": "2026-11-26T12:00:00Z"
          }
        },
        "additionalProperties": false
      },
      "ProviderDefinitionsViewModel": {
        "type": "object",
        "properties": {
          "provider": {
            "type": "string",
            "nullable": true
          },
          "available": {
            "type": "boolean"
          },
          "metrics": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MetricDefinitionViewModel"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "PublicationPreviewViewModel": {
        "type": "object",
        "properties": {
          "post": {
            "$ref": "#/components/schemas/PostViewModel"
          },
          "targets": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PreviewTargetViewModel"
            },
            "nullable": true
          },
          "schedule": {
            "$ref": "#/components/schemas/PreviewScheduleViewModel"
          },
          "pending_approval": {
            "$ref": "#/components/schemas/PendingApprovalViewModel"
          }
        },
        "additionalProperties": false
      },
      "PublicationStepViewModel": {
        "type": "object",
        "properties": {
          "step": {
            "type": "string",
            "nullable": true
          },
          "state": {
            "type": "string",
            "nullable": true
          },
          "created_at_utc": {
            "type": "string",
            "format": "date-time"
          }
        },
        "additionalProperties": false
      },
      "PublicationTargetViewModel": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "connection_id": {
            "type": "string",
            "format": "uuid"
          },
          "format": {
            "$ref": "#/components/schemas/ContentFormat"
          },
          "text_override": {
            "type": "string",
            "nullable": true
          },
          "status": {
            "$ref": "#/components/schemas/PostTargetStatus"
          },
          "external_post_id": {
            "type": "string",
            "nullable": true
          },
          "external_url": {
            "type": "string",
            "nullable": true
          },
          "attempts": {
            "type": "integer",
            "format": "int32"
          },
          "last_error": {
            "type": "string",
            "description": "Why the destination last failed or is waiting, as a code. It is a known code (for example `timeout`,\n`deferred:paused` or `Publication.ProcessingTimeout`), or `reason:detail` where the detail is a short token\nof letters, digits and underscores (at most 34 characters, for example `rejected:invalid_params`), a numeric\n`code/subcode` pair, or one of this API's error keys. Any other detail from the network is replaced by\n`withheld`, and a value that fits none of these shapes is returned as `provider_error`.",
            "nullable": true
          },
          "published_at_utc": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "options": {
            "nullable": true
          },
          "consent_at_utc": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "processing_since_utc": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "steps": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PublicationStepViewModel"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "PublicationViewModel": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "product_id": {
            "type": "string",
            "format": "uuid"
          },
          "status": {
            "$ref": "#/components/schemas/PostStatus"
          },
          "version": {
            "type": "integer",
            "format": "int32"
          },
          "scheduled_at_utc": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "timezone": {
            "type": "string",
            "nullable": true
          },
          "targets": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PublicationTargetViewModel"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "PublishNowInput": {
        "required": [
          "post_version"
        ],
        "type": "object",
        "properties": {
          "post_version": {
            "type": "integer",
            "format": "int32"
          },
          "authorization_reference": {
            "type": "string",
            "description": "The id of an approved review (the `authorization_reference` of a `requires_user_action` answer), for the request it approved; single use.",
            "format": "uuid",
            "nullable": true
          },
          "consent_confirmed": {
            "type": "boolean",
            "description": "Counts only for a person in the web app: from an API key it is ignored, and a network that requires consent needs an approved review instead."
          }
        },
        "additionalProperties": false
      },
      "PublishingRequirementsViewModel": {
        "type": "object",
        "properties": {
          "provider": {
            "type": "string",
            "nullable": true
          },
          "format": {
            "$ref": "#/components/schemas/ContentFormat"
          },
          "enabled": {
            "type": "boolean"
          },
          "requires_consent": {
            "type": "boolean"
          },
          "schema": {},
          "live": {
            "nullable": true
          },
          "limits": {
            "nullable": true
          },
          "fetched_at_utc": {
            "type": "string",
            "format": "date-time"
          },
          "notices": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "RefreshAcceptedViewModel": {
        "type": "object",
        "properties": {
          "jobs": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "nullable": true
          },
          "unavailable": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/UnavailableTargetViewModel"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "RefreshInput": {
        "required": [
          "post_id"
        ],
        "type": "object",
        "properties": {
          "post_id": {
            "type": "string",
            "format": "uuid"
          }
        },
        "additionalProperties": false
      },
      "RescheduleInput": {
        "type": "object",
        "properties": {
          "scheduled_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "example": "2030-01-16T10:00:00-05:00"
          },
          "timezone": {
            "type": "string",
            "nullable": true,
            "example": "America/New_York"
          },
          "consent_confirmed": {
            "type": "boolean",
            "description": "Counts only for a person in the web app: from an API key it is ignored."
          }
        },
        "additionalProperties": false
      },
      "ReviewActionViewModel": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string",
            "nullable": true
          },
          "authorization_reference": {
            "type": "string",
            "format": "uuid"
          },
          "review_url": {
            "type": "string",
            "nullable": true
          },
          "expires_at_utc": {
            "type": "string",
            "format": "date-time"
          }
        },
        "additionalProperties": false,
        "description": "Same shape as the `action` of a requires_user_action error: open `review_url` before `expires_at_utc`."
      },
      "ScheduleAccepted": {
        "type": "object",
        "properties": {
          "publication_id": {
            "type": "string",
            "format": "uuid"
          },
          "status_url": {
            "type": "string",
            "nullable": true
          },
          "resolved_at": {
            "type": "string",
            "format": "date-time"
          },
          "adjusted_for_dst_gap": {
            "type": "boolean"
          },
          "was_ambiguous": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "ScheduleInput": {
        "required": [
          "post_version"
        ],
        "type": "object",
        "properties": {
          "post_version": {
            "type": "integer",
            "format": "int32",
            "example": 1
          },
          "scheduled_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "example": "2030-01-15T09:30:00-05:00"
          },
          "timezone": {
            "type": "string",
            "nullable": true,
            "example": "America/New_York"
          },
          "authorization_reference": {
            "type": "string",
            "description": "The id of an approved review (the `authorization_reference` of a `requires_user_action` answer), for the request it approved; single use.",
            "format": "uuid",
            "nullable": true
          },
          "consent_confirmed": {
            "type": "boolean",
            "description": "Counts only for a person in the web app: from an API key it is ignored, and a network that requires consent needs an approved review instead."
          }
        },
        "additionalProperties": false
      },
      "TargetMetricsViewModel": {
        "type": "object",
        "properties": {
          "target_id": {
            "type": "string",
            "format": "uuid"
          },
          "connection_id": {
            "type": "string",
            "format": "uuid"
          },
          "provider": {
            "type": "string",
            "nullable": true
          },
          "format": {
            "type": "string",
            "nullable": true
          },
          "available": {
            "type": "boolean"
          },
          "unavailable_reason": {
            "type": "string",
            "nullable": true
          },
          "collected_at_utc": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "window": {
            "type": "string",
            "nullable": true
          },
          "source": {
            "type": "string",
            "nullable": true
          },
          "trigger": {
            "type": "string",
            "nullable": true
          },
          "metrics": {
            "type": "object",
            "additionalProperties": {
              "type": "integer",
              "format": "int64",
              "nullable": true
            },
            "nullable": true
          },
          "definitions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MetricDefinitionViewModel"
            },
            "nullable": true
          },
          "job": {
            "$ref": "#/components/schemas/CollectionJobViewModel"
          },
          "snapshots": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MetricSnapshotViewModel"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "UnavailableTargetViewModel": {
        "type": "object",
        "properties": {
          "target_id": {
            "type": "string",
            "format": "uuid"
          },
          "reason": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "V1ErrorDetails": {
        "type": "object",
        "properties": {
          "Messages": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "Codes": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "V1UserAction": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string",
            "nullable": true
          },
          "authorization_reference": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "review_url": {
            "type": "string",
            "nullable": true
          },
          "expires_at_utc": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "WebhookDeliveryViewModel": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "event_id": {
            "type": "string",
            "format": "uuid"
          },
          "event_type": {
            "type": "string",
            "nullable": true
          },
          "status": {
            "type": "string",
            "nullable": true
          },
          "attempts": {
            "type": "integer",
            "format": "int32"
          },
          "max_attempts": {
            "type": "integer",
            "format": "int32"
          },
          "last_status_code": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "last_error": {
            "type": "string",
            "nullable": true
          },
          "due_at_utc": {
            "type": "string",
            "format": "date-time"
          },
          "next_attempt_at_utc": {
            "type": "string",
            "format": "date-time"
          },
          "delivered_at_utc": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "WebhookDeliveryViewModelPagedResult": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WebhookDeliveryViewModel"
            },
            "nullable": true
          },
          "page": {
            "type": "integer",
            "format": "int32"
          },
          "page_size": {
            "type": "integer",
            "format": "int32"
          },
          "total": {
            "type": "integer",
            "format": "int32"
          }
        },
        "additionalProperties": false
      },
      "WebhookPingViewModel": {
        "type": "object",
        "properties": {
          "delivery_id": {
            "type": "string",
            "format": "uuid"
          },
          "event_id": {
            "type": "string",
            "format": "uuid"
          }
        },
        "additionalProperties": false
      },
      "WebhookSubscriptionCreatedViewModel": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "product_id": {
            "type": "string",
            "format": "uuid"
          },
          "url": {
            "type": "string",
            "nullable": true
          },
          "events": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "status": {
            "type": "string",
            "nullable": true
          },
          "status_reason": {
            "type": "string",
            "nullable": true
          },
          "consecutive_dead": {
            "type": "integer",
            "format": "int32"
          },
          "created_at_utc": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at_utc": {
            "type": "string",
            "format": "date-time"
          },
          "previous_secret_expires_at_utc": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "version": {
            "type": "integer",
            "format": "int32"
          },
          "secret": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "WebhookSubscriptionInput": {
        "required": [
          "product_id"
        ],
        "type": "object",
        "properties": {
          "product_id": {
            "type": "string",
            "format": "uuid",
            "example": "3f2b8c1e-5d4a-4e7b-9c61-2a8f0d7e4b19"
          },
          "url": {
            "type": "string",
            "nullable": true,
            "example": "https://example.com/webhooks/tsma"
          },
          "events": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true,
            "example": [
              "publication.published",
              "publication.failed"
            ]
          }
        },
        "additionalProperties": false
      },
      "WebhookSubscriptionPatch": {
        "type": "object",
        "properties": {
          "url": {
            "type": "string",
            "nullable": true
          },
          "events": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "WebhookSubscriptionViewModel": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "product_id": {
            "type": "string",
            "format": "uuid"
          },
          "url": {
            "type": "string",
            "nullable": true
          },
          "events": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "status": {
            "type": "string",
            "nullable": true
          },
          "status_reason": {
            "type": "string",
            "nullable": true
          },
          "consecutive_dead": {
            "type": "integer",
            "format": "int32"
          },
          "created_at_utc": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at_utc": {
            "type": "string",
            "format": "date-time"
          },
          "previous_secret_expires_at_utc": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "version": {
            "type": "integer",
            "format": "int32"
          }
        },
        "additionalProperties": false
      },
      "WorkspacePlanPendingChangeViewModel": {
        "type": "object",
        "properties": {
          "plan_key": {
            "type": "string",
            "nullable": true
          },
          "effective_at_utc": {
            "type": "string",
            "format": "date-time"
          }
        },
        "additionalProperties": false
      },
      "WorkspacePlanProductViewModel": {
        "type": "object",
        "properties": {
          "product_id": {
            "type": "string",
            "description": "The product id.",
            "format": "uuid"
          },
          "accounts_in_use": {
            "type": "integer",
            "description": "Connected accounts of this product that count (revoked and suspended ones do not); 0 for an archived product.",
            "format": "int32"
          },
          "archived": {
            "type": "boolean",
            "description": "True when the product is archived: read-only and not counted."
          }
        },
        "additionalProperties": false,
        "description": "One product of the organization and its use of the plan."
      },
      "WorkspacePlanViewModel": {
        "type": "object",
        "properties": {
          "plan_key": {
            "type": "string",
            "nullable": true
          },
          "interval": {
            "type": "string",
            "nullable": true
          },
          "enforced": {
            "type": "boolean"
          },
          "blocked": {
            "type": "boolean"
          },
          "block_reason": {
            "type": "string",
            "nullable": true
          },
          "max_organizations": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "max_accounts_per_organization": {
            "type": "integer",
            "description": "Deprecated: use max_products_per_organization and max_accounts_per_product. The products ceiling times the accounts\nceiling, an upper bound of the organization's connected accounts; null when either is unlimited.",
            "format": "int32",
            "nullable": true
          },
          "max_products_per_organization": {
            "type": "integer",
            "description": "The most active products (workspaces) one organization of the owner can hold; always present, null = unlimited.",
            "format": "int32",
            "nullable": true
          },
          "max_accounts_per_product": {
            "type": "integer",
            "description": "The most connected social accounts that count in one product; always present, null = unlimited.",
            "format": "int32",
            "nullable": true
          },
          "accounts_in_use": {
            "type": "integer",
            "format": "int32"
          },
          "products_in_use": {
            "type": "integer",
            "description": "The organization's active (not archived) products.",
            "format": "int32"
          },
          "products": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WorkspacePlanProductViewModel"
            },
            "description": "The organization's products this credential can read, each with its connected accounts that count.",
            "nullable": true
          },
          "pending_change": {
            "$ref": "#/components/schemas/WorkspacePlanPendingChangeViewModel"
          }
        },
        "additionalProperties": false
      },
      "WorkspaceViewModel": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "slug": {
            "type": "string",
            "nullable": true
          },
          "role": {
            "$ref": "#/components/schemas/MemberRole"
          },
          "scopes": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "require_approval": {
            "type": "boolean"
          },
          "status": {
            "type": "string",
            "nullable": true
          },
          "deletion_scheduled_at_utc": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          }
        },
        "additionalProperties": false
      }
    },
    "securitySchemes": {
      "ApiKey": {
        "type": "http",
        "description": "An API key of your organization, sent as `Authorization: Bearer tsma_...`. Never paste a production key into a shared screen.",
        "scheme": "bearer",
        "bearerFormat": "tsma_..."
      }
    }
  },
  "security": [
    {
      "ApiKey": []
    }
  ],
  "tags": [
    {
      "name": "Analytics",
      "description": "Observed metrics of published posts, the metric catalog per network, and on-demand metric refreshes."
    },
    {
      "name": "Approvals",
      "description": "Review requests that a person approves or rejects on the review page before a post may publish."
    },
    {
      "name": "Connections",
      "description": "Social network accounts connected to a product: their capabilities, publishing requirements and verification."
    },
    {
      "name": "Connectors",
      "description": "The catalog of supported social networks and whether a product can connect each one."
    },
    {
      "name": "Exports",
      "description": "Exports of a workspace's own data as a downloadable archive."
    },
    {
      "name": "Media",
      "description": "Images and videos for posts: uploads, imports from a URL, alt text and storage usage."
    },
    {
      "name": "Posts",
      "description": "Posts and their per-network targets: create, edit, validate, schedule, reschedule, publish now and delete."
    },
    {
      "name": "Products",
      "description": "Products of a workspace; each product owns its connections, posts, media and webhook subscriptions."
    },
    {
      "name": "Publications",
      "description": "The publication of a scheduled post, its per-target status, and its cancellation."
    },
    {
      "name": "WebhookSubscriptions",
      "description": "Outbound webhook subscriptions: target URL, events, signing secret, pause and delivery history."
    },
    {
      "name": "Workspaces",
      "description": "The workspaces the API key can reach, with its role and effective scopes, and each workspace's plan."
    }
  ],
  "servers": [
    {
      "url": "https://api.thesocialmediapp.com",
      "description": "Production"
    }
  ]
}