openapi: 3.2.0 info: title: Temp.md Embedded Preview Platform Organizations API version: 0.1.0 description: Versioned partner API for creating and governing previews on behalf of opaque end customers. Application keys are server credentials; browser publishers must use short-lived publish grants. servers: - url: https://api.temp.md tags: - name: Organizations paths: /v1/organizations: post: operationId: createOrganization summary: Create an Organization security: - dashboardBearer: [] requestBody: required: true content: application/json: schema: type: object required: - name - slug properties: name: type: string maxLength: 80 slug: type: string maxLength: 48 pattern: ^[a-z0-9](?:[a-z0-9-]{0,46}[a-z0-9])?$ responses: '201': description: Organization created '400': $ref: '#/components/responses/Error' '401': $ref: '#/components/responses/Error' '409': $ref: '#/components/responses/Error' tags: - Organizations /v1/organizations/{organizationId}: get: operationId: getOrganization summary: Get an Organization and its Applications security: - dashboardBearer: [] parameters: - $ref: '#/components/parameters/OrganizationId' responses: '200': description: Organization and Applications '401': $ref: '#/components/responses/Error' '404': $ref: '#/components/responses/Error' tags: - Organizations /v1/organizations/{organizationId}/applications: post: operationId: createApplication summary: Create a partner Application security: - dashboardBearer: [] parameters: - $ref: '#/components/parameters/OrganizationId' requestBody: required: true content: application/json: schema: type: object required: - name properties: name: type: string maxLength: 80 environment: enum: - production - staging - development responses: '201': description: Application created '400': $ref: '#/components/responses/Error' '404': $ref: '#/components/responses/Error' tags: - Organizations components: parameters: OrganizationId: name: organizationId in: path required: true schema: type: string responses: Error: description: Structured error content: application/json: schema: $ref: '#/components/schemas/Error' schemas: Error: type: object required: - error - code properties: error: type: string code: type: string message: type: string request_id: type: string securitySchemes: dashboardBearer: type: http scheme: bearer description: A Temp.md dashboard session or personal account API key. applicationBearer: type: http scheme: bearer bearerFormat: tempmd_app__ description: Server-only Application key with explicit scopes. publishGrantBearer: type: http scheme: bearer bearerFormat: tempmd_grant__ description: Short-lived, one-session delegated publishing authority. reviewBearer: type: http scheme: bearer bearerFormat: tempmd_view__ description: Short-lived viewer capability bound to one frozen review request.