{"openapi":"3.1.0","info":{"title":"Worlds API","version":"1"},"servers":[{"url":"https://makeworlds.dev"}],"tags":[{"name":"Worlds","description":"Create, list and archive worlds."},{"name":"Slack world","description":"Act inside a world's Slack, on its own host."},{"name":"Jira world","description":"Act inside a world's Jira, on its own host."},{"name":"Teams","description":"Your teams and their members."},{"name":"API keys","description":"Keys for calling the API from code."}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"An API key from Settings on makeworlds.dev, as Authorization: Bearer wk_live_…"},"sessionCookie":{"type":"apiKey","in":"cookie","name":"worlds_session","description":"The session from signing in at makeworlds.dev. Requests that change data must come from makeworlds.dev."}},"schemas":{"TeamList":{"type":"object","properties":{"teams":{"type":"array","items":{"$ref":"#/components/schemas/Team"}}},"required":["teams"],"description":"The teams you can see."},"Team":{"type":"object","properties":{"id":{"type":"string","example":"team_k2v9x0q1m4s7d8f3a6b5"},"name":{"type":"string","example":"Empirical"},"role":{"type":["string","null"],"enum":["owner","member",null],"description":"Your role in the team. null when the request is authenticated with an API key, which belongs to the team rather than a person."},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"required":["id","name","role","created_at","updated_at"],"description":"A team. Worlds and API keys belong to a team."},"ApiError":{"type":"object","properties":{"error":{"$ref":"#/components/schemas/ApiErrorDetail"}},"required":["error"],"description":"Every error response from the API and world controls."},"ApiErrorDetail":{"type":"object","properties":{"code":{"type":"string","description":"Stable, for code to match on.","example":"not_found"},"message":{"type":"string","description":"For people; may change.","example":"No team with that id is visible to you."}},"required":["code","message"],"description":"What went wrong."},"TeamDetail":{"allOf":[{"$ref":"#/components/schemas/Team"},{"type":"object","properties":{"members":{"type":"array","items":{"$ref":"#/components/schemas/Member"}}},"required":["members"]}],"description":"A team with its members."},"Member":{"type":"object","properties":{"id":{"type":"string","example":"user_p0r7w2c9n5h1j4k8l3m6"},"email":{"type":"string","format":"email"},"name":{"type":["string","null"]},"role":{"type":"string","enum":["owner","member"]}},"required":["id","email","name","role"],"description":"A person in a team."},"TeamUpdate":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":80,"example":"Empirical"}},"required":["name"],"description":"New values for a team."},"ApiKeyList":{"type":"object","properties":{"api_keys":{"type":"array","items":{"$ref":"#/components/schemas/ApiKey"}}},"required":["api_keys"],"description":"The team's API keys, without their secrets."},"ApiKey":{"type":"object","properties":{"id":{"type":"string","example":"key_w2rh3pmnhl1pe2wjxgqs"},"name":{"type":"string","example":"CI"},"prefix":{"type":"string","description":"The first characters of the secret, to tell keys apart.","example":"wk_live_4fQ9zT"},"created_by":{"type":["string","null"],"description":"Id of the user who created the key."},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"last_used_at":{"type":["string","null"],"format":"date-time"}},"required":["id","name","prefix","created_by","created_at","updated_at","last_used_at"],"description":"An API key. The secret itself is shown only when the key is created."},"ApiKeyCreated":{"allOf":[{"$ref":"#/components/schemas/ApiKey"},{"type":"object","properties":{"secret":{"type":"string","description":"The key itself. Shown only in this response.","example":"wk_live_4fQ9zTb1Lx7mKc2RyV8nHs0dWq5ePj3uGa6oNi9E"}},"required":["secret"]}],"description":"A new API key with its secret."},"ApiKeyCreate":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":80,"example":"CI"}},"required":["name"],"description":"A new API key."},"WorldList":{"type":"object","properties":{"worlds":{"type":"array","items":{"$ref":"#/components/schemas/World"}}},"required":["worlds"],"description":"The worlds you can see."},"World":{"type":"object","properties":{"id":{"type":"string","example":"world_k2v9x0q1m4"},"name":{"type":"string","example":"Thread routing eval"},"team_id":{"type":"string","example":"team_k2v9x0q1m4s7d8f3a6b5"},"created_by":{"type":["string","null"],"description":"Id of the user who created the world. null when an API key created it."},"ui_url":{"type":"string","format":"uri","description":"The world's main page: the UI of its first service. Each service's own URLs are under its name.","example":"https://k2v9x0q1m4-slack.makeworlds.dev/"},"services":{"type":"array","items":{"$ref":"#/components/schemas/WorldService"},"description":"The services in this world, each with its UI."},"slack":{"$ref":"#/components/schemas/SlackUrls"},"jira":{"$ref":"#/components/schemas/JiraUrls"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"required":["id","name","team_id","created_by","ui_url","services","slack","jira","created_at","updated_at"],"description":"A world: private copies of the services your app talks to, with their URLs."},"WorldService":{"type":"object","properties":{"name":{"type":"string","enum":["slack","jira"]},"title":{"type":"string","example":"Slack"},"ui_url":{"type":"string","format":"uri","description":"The service's UI in this world."}},"required":["name","title","ui_url"],"description":"A service in a world."},"SlackUrls":{"type":["object","null"],"properties":{"api_url":{"type":"string","format":"uri","description":"Use as the Slack Web API base URL, e.g. slackApiUrl in @slack/web-api.","example":"https://k2v9x0q1m4-slack.makeworlds.dev/api/"},"oauth_authorize_url":{"type":"string","format":"uri","description":"Send users here instead of slack.com/oauth/v2/authorize to install your app.","example":"https://k2v9x0q1m4-slack.makeworlds.dev/oauth/v2/authorize"},"ui_url":{"type":"string","format":"uri","description":"The world's Slack UI.","example":"https://k2v9x0q1m4-slack.makeworlds.dev/"}},"required":["api_url","oauth_authorize_url","ui_url"],"description":"null when the world has no Slack."},"JiraUrls":{"type":["object","null"],"properties":{"site_url":{"type":"string","format":"uri","description":"The Jira site, in place of https://your-site.atlassian.net. Issue pages are at /browse/{key}.","example":"https://k2v9x0q1m4-jira.makeworlds.dev"},"auth_url":{"type":"string","format":"uri","description":"In place of https://auth.atlassian.com: /authorize and /oauth/token.","example":"https://k2v9x0q1m4-jira-auth.makeworlds.dev"},"api_url":{"type":"string","format":"uri","description":"In place of https://api.atlassian.com: /oauth/token/accessible-resources and /ex/jira/{cloudId}/rest/api/3.","example":"https://k2v9x0q1m4-jira-api.makeworlds.dev"}},"required":["site_url","auth_url","api_url"],"description":"null when the world has no Jira."},"WorldCreated":{"allOf":[{"$ref":"#/components/schemas/World"},{"type":"object","properties":{"slack":{"$ref":"#/components/schemas/SlackCreated"},"jira":{"$ref":"#/components/schemas/JiraCreated"}}}],"description":"A new world, with each service's URLs and effective spec."},"SlackCreated":{"allOf":[{"$ref":"#/components/schemas/SlackUrls"},{"type":["object","null"],"properties":{"spec":{"$ref":"#/components/schemas/SlackState"}},"required":["spec"]}],"description":"null when the world has no Slack."},"SlackState":{"type":"object","properties":{"team":{"$ref":"#/components/schemas/SlackTeamState"},"users":{"type":"array","items":{"$ref":"#/components/schemas/SlackUserState"}},"channels":{"type":"array","items":{"$ref":"#/components/schemas/SlackChannelState"}},"apps":{"type":"array","items":{"$ref":"#/components/schemas/SlackAppState"}}},"required":["team","users","channels","apps"],"description":"The world's spec with every generated id, credential and token filled in. Create a world from it to get an identical one."},"SlackTeamState":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"domain":{"type":"string"}},"required":["id","name","domain"],"description":"The workspace, with its id."},"SlackUserState":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"real_name":{"type":"string"},"email":{"type":"string"},"token":{"type":["string","null"],"description":"The pinned user token. null when none was pinned."}},"required":["id","name","real_name","email","token"],"description":"A user, with every generated field filled in."},"SlackChannelState":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"private":{"type":"boolean"},"topic":{"type":"string"},"members":{"type":"array","items":{"type":"string"},"description":"User ids."},"messages":{"type":"array","items":{"$ref":"#/components/schemas/SlackMessageSpec"}}},"required":["id","name","private","topic","members","messages"],"description":"A channel, with its id and member ids."},"SlackMessageSpec":{"type":"object","properties":{"user":{"type":"string","minLength":1,"description":"A user's name or id.","example":"alice"},"text":{"type":"string","maxLength":40000,"example":"Deploy failed on main, can someone look?"},"replies":{"type":"array","items":{"$ref":"#/components/schemas/SlackReplySpec"},"maxItems":100}},"required":["user","text"],"description":"A message posted when the world is created."},"SlackReplySpec":{"type":"object","properties":{"user":{"type":"string","minLength":1,"description":"A user's name or id.","example":"alice"},"text":{"type":"string","maxLength":40000,"example":"Looking now."}},"required":["user","text"],"description":"A reply in the message's thread."},"SlackAppState":{"type":"object","properties":{"app_id":{"type":"string"},"manifest":{"$ref":"#/components/schemas/SlackManifest"},"credentials":{"$ref":"#/components/schemas/SlackCredentials"},"install":{"$ref":"#/components/schemas/SlackInstallState"}},"required":["app_id","manifest","credentials","install"],"description":"An app, with all its credentials."},"SlackManifest":{"type":"object","properties":{"display_information":{"$ref":"#/components/schemas/SlackManifestDisplayInformation"},"features":{"$ref":"#/components/schemas/SlackManifestFeatures"},"oauth_config":{"$ref":"#/components/schemas/SlackManifestOAuthConfig"},"settings":{"$ref":"#/components/schemas/SlackManifestSettings"}},"required":["display_information"],"additionalProperties":{},"description":"A Slack app manifest (JSON). Its redirect_urls, scopes, event_subscriptions and interactivity apply in this world.","example":{"display_information":{"name":"My app"},"features":{"bot_user":{"display_name":"my-app"}},"oauth_config":{"scopes":{"bot":["app_mentions:read","chat:write","channels:history"]}},"settings":{"event_subscriptions":{"request_url":"https://example.com/slack/events","bot_events":["app_mention"]}}}},"SlackManifestDisplayInformation":{"type":"object","properties":{"name":{"type":"string","minLength":1},"description":{"type":"string"}},"required":["name"],"additionalProperties":{},"description":"How the app shows in Slack."},"SlackManifestFeatures":{"type":"object","properties":{"bot_user":{"$ref":"#/components/schemas/SlackManifestBotUser"}},"additionalProperties":{},"description":"The app's features."},"SlackManifestBotUser":{"type":"object","properties":{"display_name":{"type":"string"},"always_online":{"type":"boolean"}},"additionalProperties":{},"description":"The app's bot user."},"SlackManifestOAuthConfig":{"type":"object","properties":{"redirect_urls":{"type":"array","items":{"type":"string"},"description":"Allowed redirect_uri prefixes. A * in the host matches one label."},"scopes":{"$ref":"#/components/schemas/SlackManifestScopes"}},"additionalProperties":{},"description":"How the app is installed over OAuth."},"SlackManifestScopes":{"type":"object","properties":{"bot":{"type":"array","items":{"type":"string"}},"user":{"type":"array","items":{"type":"string"}}},"additionalProperties":{},"description":"OAuth scopes the app asks for."},"SlackManifestSettings":{"type":"object","properties":{"event_subscriptions":{"$ref":"#/components/schemas/SlackManifestEventSubscriptions"},"interactivity":{"$ref":"#/components/schemas/SlackManifestInteractivity"}},"additionalProperties":{},"description":"Events and interactivity settings."},"SlackManifestEventSubscriptions":{"type":"object","properties":{"request_url":{"type":"string","format":"uri","description":"Where the world posts events."},"bot_events":{"type":"array","items":{"type":"string"},"description":"Event types to send, such as app_mention."}},"additionalProperties":{},"description":"The Events API subscription."},"SlackManifestInteractivity":{"type":"object","properties":{"is_enabled":{"type":"boolean"},"request_url":{"type":"string","format":"uri"}},"additionalProperties":{},"description":"Where the world posts interactive payloads."},"SlackCredentials":{"type":"object","properties":{"client_id":{"type":"string"},"client_secret":{"type":"string"},"signing_secret":{"type":"string"},"verification_token":{"type":"string"}},"required":["client_id","client_secret","signing_secret","verification_token"],"description":"The app's OAuth and request-signing credentials."},"SlackInstallState":{"type":["object","null"],"properties":{"installer":{"type":"string","description":"The installing user's id."},"bot_user_id":{"type":"string"},"bot_token":{"type":"string"},"channels":{"type":"array","items":{"type":"string"},"description":"Channel names the bot is a member of."}},"required":["installer","bot_user_id","bot_token","channels"],"description":"null when the spec didn't install the app."},"JiraCreated":{"allOf":[{"$ref":"#/components/schemas/JiraUrls"},{"type":["object","null"],"properties":{"spec":{"$ref":"#/components/schemas/JiraState"}},"required":["spec"]}],"description":"null when the world has no Jira."},"JiraState":{"type":"object","properties":{"site":{"$ref":"#/components/schemas/JiraSiteState"},"users":{"type":"array","items":{"$ref":"#/components/schemas/JiraUserState"}},"projects":{"type":"array","items":{"$ref":"#/components/schemas/JiraProjectState"}},"issues":{"type":"array","items":{"$ref":"#/components/schemas/JiraIssueState"}},"apps":{"type":"array","items":{"$ref":"#/components/schemas/JiraAppState"}}},"required":["site","users","projects","issues","apps"],"description":"The world's Jira spec with every generated id and credential filled in."},"JiraSiteState":{"type":"object","properties":{"cloud_id":{"type":"string"},"name":{"type":"string"},"url":{"type":"string"}},"required":["cloud_id","name","url"],"description":"The site, with its cloud id and URL."},"JiraUserState":{"type":"object","properties":{"account_id":{"type":"string"},"name":{"type":"string"},"display_name":{"type":"string"},"email":{"type":"string"},"hide_email":{"type":"boolean"}},"required":["account_id","name","display_name","email","hide_email"],"description":"A user, with every generated field filled in."},"JiraProjectState":{"type":"object","properties":{"id":{"type":"string"},"key":{"type":"string"},"name":{"type":"string"}},"required":["id","key","name"],"description":"A project, with its id."},"JiraIssueState":{"allOf":[{"$ref":"#/components/schemas/JiraIssueSpec"},{"type":"object","properties":{"key":{"type":"string"}},"required":["key"]}],"description":"An issue from the spec, with the key it was given."},"JiraCommentSpec":{"type":"object","properties":{"author":{"type":"string","minLength":1,"description":"A user's name or id.","example":"alice"},"body":{"type":"string","minLength":1,"maxLength":32000,"example":"Repro'd on staging."}},"required":["author","body"],"description":"A comment on the issue, oldest first."},"JiraIssueSpec":{"type":"object","properties":{"project":{"type":"string","example":"WRLD"},"summary":{"type":"string","minLength":1,"maxLength":255,"example":"Checkout fails for guest users"},"description":{"type":"string","maxLength":32000},"labels":{"type":"array","items":{"type":"string","pattern":"^\\S{1,255}$"},"maxItems":50},"status":{"type":"string","enum":["To Do","In Progress","Done"]},"reporter":{"type":"string","minLength":1,"description":"A user's name or id.","example":"alice"},"assignee":{"type":"string","minLength":1,"description":"A user's name or id.","example":"alice"},"comments":{"type":"array","items":{"$ref":"#/components/schemas/JiraCommentSpec"},"maxItems":100}},"required":["project","summary","status","reporter"],"description":"An issue created with the world."},"JiraAppState":{"type":"object","properties":{"name":{"type":"string"},"callback_urls":{"type":"array","items":{"type":"string"}},"scopes":{"type":"array","items":{"type":"string","enum":["read:jira-work","write:jira-work","read:jira-user","manage:jira-webhook","manage:jira-project","manage:jira-configuration","read:me"]}},"credentials":{"$ref":"#/components/schemas/JiraCredentials"}},"required":["name","callback_urls","scopes","credentials"],"description":"An app, with its credentials."},"JiraCredentials":{"type":"object","properties":{"client_id":{"type":"string","minLength":8,"maxLength":128},"client_secret":{"type":"string","minLength":16,"maxLength":256}},"required":["client_id","client_secret"],"description":"The app's OAuth client credentials."},"WorldCreate":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":80,"example":"Thread routing eval"},"slack":{"$ref":"#/components/schemas/SlackSpec"},"jira":{"$ref":"#/components/schemas/JiraSpec"}},"required":["name"],"description":"A new world. Give a spec for each service it should have."},"SlackSpec":{"type":"object","properties":{"team":{"$ref":"#/components/schemas/SlackTeamSpec"},"users":{"type":"array","items":{"$ref":"#/components/schemas/SlackUserSpec"},"maxItems":200},"channels":{"type":"array","items":{"$ref":"#/components/schemas/SlackChannelSpec"},"maxItems":200},"apps":{"type":"array","items":{"$ref":"#/components/schemas/SlackAppSpec"},"maxItems":10}},"required":["team"],"description":"Everything in the world's Slack workspace. Omitted ids, credentials and tokens are generated. Leave it out to create the world without Slack."},"SlackTeamSpec":{"type":"object","properties":{"id":{"type":"string","pattern":"^T[0-9A-Z]{2,20}$","example":"T0ACME00001","description":"Pin the team id, e.g. to match installs your app already stored. Generated if left out."},"name":{"type":"string","minLength":1,"maxLength":80,"description":"The workspace name.","example":"Acme"},"domain":{"type":"string","pattern":"^[a-z0-9-]{1,40}$","description":"The workspace subdomain.","example":"acme"}},"required":["name","domain"],"description":"The world's Slack workspace."},"SlackUserSpec":{"type":"object","properties":{"id":{"type":"string","pattern":"^U[0-9A-Z]{2,20}$","example":"U0ALICE00001"},"name":{"type":"string","pattern":"^[a-z0-9._-]{1,80}$","example":"alice"},"real_name":{"type":"string","minLength":1,"maxLength":200,"example":"Alice Tester"},"email":{"type":"string","format":"email","example":"alice@acme.test"},"token":{"type":"string","description":"Pin the user's token, to act as them with any Slack client."}},"required":["name","real_name","email"],"description":"A person in the workspace."},"SlackChannelSpec":{"type":"object","properties":{"id":{"type":"string","pattern":"^[CG][0-9A-Z]{2,20}$","example":"C0GENERAL001"},"name":{"type":"string","pattern":"^[a-z0-9_-]{1,80}$","example":"general"},"private":{"type":"boolean"},"topic":{"type":"string","maxLength":250},"members":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":500,"description":"User names or ids. The first member created the channel."},"messages":{"type":"array","items":{"$ref":"#/components/schemas/SlackMessageSpec"},"maxItems":500,"description":"Posted in order before any app is installed, so they send no events."}},"required":["name","members"],"description":"A channel, its members and its first messages."},"SlackAppSpec":{"type":"object","properties":{"manifest":{"$ref":"#/components/schemas/SlackManifest"},"credentials":{"$ref":"#/components/schemas/SlackCredentialsSpec"},"install":{"$ref":"#/components/schemas/SlackInstallSpec"}},"required":["manifest"],"description":"A Slack app, defined by its manifest."},"SlackCredentialsSpec":{"type":"object","properties":{"client_id":{"type":"string"},"client_secret":{"type":"string"},"signing_secret":{"type":"string"},"verification_token":{"type":"string"}},"description":"Pin some or all credentials, e.g. to match secrets your app already has. Real Slack generates them; worlds lets you choose."},"SlackInstallSpec":{"type":"object","properties":{"installer":{"type":"string","description":"The user (name or id) who installs the app."},"bot_user_id":{"type":"string","pattern":"^U[0-9A-Z]{2,20}$","example":"U0EMPIRICAL1"},"bot_token":{"type":"string","description":"Pin the bot token, so a recreated world matches tokens your app already stored."},"channels":{"type":"array","items":{"type":"string"},"maxItems":100,"description":"Channel names the bot is a member of."}},"required":["installer"],"description":"Install the app into the world's workspace."},"JiraSpec":{"type":"object","properties":{"site":{"$ref":"#/components/schemas/JiraSiteSpec"},"users":{"type":"array","items":{"$ref":"#/components/schemas/JiraUserSpec"},"maxItems":200},"projects":{"type":"array","items":{"$ref":"#/components/schemas/JiraProjectSpec"},"maxItems":50},"issues":{"type":"array","items":{"$ref":"#/components/schemas/JiraIssueSpec"},"maxItems":500,"description":"Created in order before any app is installed, so they send no webhooks."},"apps":{"type":"array","items":{"$ref":"#/components/schemas/JiraAppSpec"},"maxItems":10}},"required":["site"],"description":"Everything in the world's Jira site. Omitted ids and credentials are generated. Leave it out to create the world without Jira."},"JiraSiteSpec":{"type":"object","properties":{"cloud_id":{"type":"string","format":"uuid","description":"Pin the cloud id, e.g. to match one your app already stored. Generated if left out."},"name":{"type":"string","pattern":"^[a-z0-9-]{1,40}$","description":"The site's subdomain, as in <name>.atlassian.net.","example":"acme"}},"required":["name"],"description":"The world's Jira Cloud site."},"JiraUserSpec":{"type":"object","properties":{"account_id":{"type":"string","pattern":"^[0-9A-Za-z:-]{6,128}$","example":"712020:4f1c6b9e-3d2a-4e8f-9b7c-1a2b3c4d5e6f"},"name":{"type":"string","pattern":"^[a-z0-9._-]{1,80}$","example":"alice"},"display_name":{"type":"string","minLength":1,"maxLength":200,"example":"Alice Tester"},"email":{"type":"string","format":"email","example":"alice@acme.test"},"hide_email":{"type":"boolean","description":"Hide the email from apps, like a profile with email visibility off. GET /user then has no emailAddress."}},"required":["name","display_name","email"],"description":"A person on the site."},"JiraProjectSpec":{"type":"object","properties":{"id":{"type":"string","pattern":"^[0-9]{1,18}$"},"key":{"type":"string","pattern":"^[A-Z][A-Z0-9]{1,9}$","example":"WRLD"},"name":{"type":"string","minLength":1,"maxLength":80,"example":"Worlds"}},"required":["key","name"],"description":"A project; issues belong to one."},"JiraAppSpec":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":80,"example":"My app"},"callback_urls":{"type":"array","items":{"type":"string","pattern":"^https?:\\/\\/[^\\s]+$"},"minItems":1,"maxItems":20,"description":"OAuth 2.0 (3LO) callback URLs. redirect_uri must equal one of them; a * in the host matches one label.","example":["https://example.com/jira/callback"]},"scopes":{"type":"array","items":{"type":"string","enum":["read:jira-work","write:jira-work","read:jira-user","manage:jira-webhook","manage:jira-project","manage:jira-configuration","read:me"]},"minItems":1,"description":"Scopes the app may request (offline_access is always allowed).","example":["read:jira-work","write:jira-work","read:jira-user","manage:jira-webhook"]},"credentials":{"$ref":"#/components/schemas/JiraCredentialsSpec"}},"required":["name","callback_urls","scopes"],"description":"An OAuth 2.0 (3LO) app, as in the Atlassian developer console."},"JiraCredentialsSpec":{"type":"object","properties":{"client_id":{"type":"string","minLength":8,"maxLength":128},"client_secret":{"type":"string","minLength":16,"maxLength":256}},"description":"Pin the client id and secret, e.g. to match ones your app already has."},"WorldSpec":{"type":"object","properties":{"slack":{"allOf":[{"$ref":"#/components/schemas/SlackState"},{"type":["object","null"]}]},"jira":{"allOf":[{"$ref":"#/components/schemas/JiraState"},{"type":["object","null"]}]}},"required":["slack","jira"],"description":"Each service's spec, or null for a service the world was created without."},"SlackToken":{"type":"object","properties":{"user_id":{"type":"string","example":"U0ALICE00001"},"token":{"type":"string","example":"xoxp-worlds-0b6c…"}},"required":["user_id","token"],"description":"A user token, to call the Web API as that user."},"SlackTokenRequest":{"type":"object","properties":{"user":{"type":"string","minLength":1,"description":"The user who acts: their name or id. Bots can't be acted as.","example":"alice"}},"required":["user"],"description":"Whose token to get."},"SlackWorldState":{"type":"object","properties":{"team":{"$ref":"#/components/schemas/SlackWorldTeam"},"users":{"type":"array","items":{"$ref":"#/components/schemas/SlackWorldUser"}},"channels":{"type":"array","items":{"$ref":"#/components/schemas/SlackWorldChannel"}},"messages":{"type":"array","items":{"$ref":"#/components/schemas/SlackMessage"},"description":"The channel's messages, oldest first. Empty without channel."}},"required":["team","users","channels","messages"],"description":"The workspace as it is now, and one channel's messages."},"SlackWorldTeam":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"description":"The workspace."},"SlackWorldUser":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"real_name":{"type":"string"},"is_bot":{"type":"boolean"},"has_token":{"type":"boolean","description":"Whether the user can be acted as."}},"required":["id","name","real_name","is_bot","has_token"],"description":"A user or bot in the workspace now."},"SlackWorldChannel":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"is_private":{"type":"boolean"},"topic":{"type":"string"},"members":{"type":"array","items":{"type":"string"},"description":"User ids."}},"required":["id","name","is_private","topic","members"],"description":"A channel in the workspace now."},"SlackMessage":{"type":"object","properties":{"ts":{"type":"string"},"thread_ts":{"type":"string"},"user":{"type":"string"},"text":{"type":"string"},"reply_count":{"type":"integer"},"reply_users":{"type":"array","items":{"type":"string"}},"reactions":{"type":"array","items":{"$ref":"#/components/schemas/SlackReaction"}},"bot_name":{"type":"string"},"edited":{"type":"boolean"},"files":{"type":"array","items":{"$ref":"#/components/schemas/SlackFileRef"}},"images":{"type":"array","items":{"$ref":"#/components/schemas/SlackImage"}}},"required":["ts","user","text","reply_count","reply_users","reactions","edited","files","images"],"description":"A message as the world's Slack UI shows it."},"SlackReaction":{"type":"object","properties":{"name":{"type":"string","description":"The emoji name.","example":"eyes"},"users":{"type":"array","items":{"type":"string"},"description":"Ids of the users who reacted."},"count":{"type":"integer"}},"required":["name","users","count"],"description":"An emoji reaction on a message."},"SlackFileRef":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"mimetype":{"type":"string"},"size":{"type":"integer"}},"required":["id","name","mimetype","size"],"description":"A file shared in a message."},"SlackImage":{"type":"object","properties":{"file_id":{"type":"string"},"url":{"type":"string"},"alt":{"type":"string"}},"required":["alt"],"description":"An image in a message, from a file or a block."},"SlackWebApiResponse":{"type":"object","properties":{"ok":{"type":"boolean"},"error":{"type":"string"}},"required":["ok"],"additionalProperties":{},"description":"The Slack Web API's response, as is: ok false with an error is a Slack error, not a failed request."},"SlackActRequest":{"type":"object","properties":{"user":{"type":"string","minLength":1,"description":"The user who acts: their name or id. Bots can't be acted as.","example":"alice"},"method":{"type":"string","enum":["chat.postMessage","conversations.create","conversations.invite","reactions.add","reactions.remove"],"example":"chat.postMessage"},"args":{"type":"object","additionalProperties":{},"description":"The method's arguments, as the Web API takes them.","example":{"channel":"C0GENERAL001","text":"Hey <@U0EMPIRICAL1>, can you take a look?"}}},"required":["user","method"],"description":"A Web API call to make as a user."},"SlackUploadRequest":{"type":"object","properties":{"user":{"type":"string","minLength":1,"description":"The user who acts: their name or id. Bots can't be acted as.","example":"alice"},"channel":{"type":"string","minLength":1,"description":"A channel id.","example":"C0GENERAL001"},"file":{"type":"string","format":"binary"},"text":{"type":"string","description":"A message to share the file with."},"thread_ts":{"type":"string","description":"Share it in this thread."}},"required":["user","channel","file"],"description":"A file to share as a user."},"JiraWorldState":{"type":"object","properties":{"spec":{"$ref":"#/components/schemas/JiraState"},"issues":{"type":"array","items":{"$ref":"#/components/schemas/JiraIssue"}},"webhooks":{"type":"array","items":{"$ref":"#/components/schemas/JiraWebhook"}}},"required":["spec","issues","webhooks"],"description":"The site as it is now: its spec, issues and registered webhooks."},"JiraIssue":{"type":"object","properties":{"id":{"type":"string"},"key":{"type":"string","example":"WRLD-1"},"self":{"type":"string","format":"uri"},"fields":{"$ref":"#/components/schemas/JiraIssueFields"}},"required":["id","key","self","fields"],"additionalProperties":{},"description":"The issue as the Jira REST API returns it."},"JiraIssueFields":{"type":"object","properties":{"summary":{"type":"string"},"description":{"$ref":"#/components/schemas/JiraAdf"},"labels":{"type":"array","items":{"type":"string"}},"status":{"$ref":"#/components/schemas/JiraStatus"},"reporter":{"$ref":"#/components/schemas/JiraUser"},"assignee":{"$ref":"#/components/schemas/JiraUser"},"created":{"type":"string"},"updated":{"type":"string"}},"required":["summary","description","labels","status","reporter","assignee","created","updated"],"additionalProperties":{},"description":"The issue's fields."},"JiraAdf":{"type":["object","null"],"properties":{"type":{"type":"string","enum":["doc"]},"version":{"type":"number","enum":[1]},"content":{"type":"array","items":{}}},"required":["type","version","content"],"additionalProperties":{},"description":"An Atlassian Document Format document."},"JiraStatus":{"type":"object","properties":{"name":{"type":"string","enum":["To Do","In Progress","Done"]}},"required":["name"],"additionalProperties":{},"description":"The issue's workflow status."},"JiraUser":{"type":["object","null"],"properties":{"accountId":{"type":"string"},"displayName":{"type":"string"},"emailAddress":{"type":"string"}},"required":["accountId","displayName"],"additionalProperties":{},"description":"A user as the Jira REST API returns them."},"JiraWebhook":{"type":"object","properties":{"id":{"type":"integer"},"client_id":{"type":"string","description":"The app that registered it."},"account_id":{"type":"string","description":"The user it was registered as."},"url":{"type":"string"},"jql":{"type":"string"},"events":{"type":"array","items":{"type":"string"}},"expires_at":{"type":"number","description":"Milliseconds since the epoch."}},"required":["id","client_id","account_id","url","jql","events","expires_at"],"description":"A dynamic webhook an app registered."},"JiraIssueCreate":{"type":"object","properties":{"user":{"type":"string","minLength":1,"description":"The user who acts: their name or account id. Webhooks name them as the actor.","example":"alice"},"project":{"type":"string","description":"A project key.","example":"WRLD"},"summary":{"type":"string","minLength":1,"maxLength":255,"example":"Checkout fails for guest users"},"description":{"anyOf":[{"type":"string","maxLength":32000},{"$ref":"#/components/schemas/JiraAdf"}],"description":"Plain text, or an Atlassian Document Format document."},"labels":{"type":"array","items":{"type":"string","pattern":"^\\S{1,255}$"},"maxItems":50},"status":{"type":"string","enum":["To Do","In Progress","Done"]},"assignee":{"type":"string","minLength":1,"description":"A user's name or id.","example":"alice"}},"required":["user","project","summary","status"],"description":"An issue to create as a user."},"JiraIssueUpdated":{"type":"object","properties":{"issue":{"$ref":"#/components/schemas/JiraIssue"},"changelog":{"type":"array","items":{"$ref":"#/components/schemas/JiraChangeItem"}}},"required":["issue","changelog"],"description":"The changed issue and what changed."},"JiraChangeItem":{"type":"object","properties":{"field":{"type":"string"},"fieldtype":{"type":"string","enum":["jira"]},"fieldId":{"type":"string"},"from":{"type":["string","null"]},"fromString":{"type":["string","null"]},"to":{"type":["string","null"]},"toString":{"type":["string","null"]}},"required":["field","fieldtype","fieldId","from","fromString","to","toString"],"description":"One changed field, as in a Jira changelog."},"JiraIssueUpdate":{"type":"object","properties":{"user":{"type":"string","minLength":1,"description":"The user who acts: their name or account id. Webhooks name them as the actor.","example":"alice"},"summary":{"type":"string","minLength":1,"maxLength":255,"example":"Checkout fails for guest users"},"description":{"anyOf":[{"type":"string","maxLength":32000},{"$ref":"#/components/schemas/JiraAdf"},{"type":"null"}],"description":"Plain text, or an Atlassian Document Format document."},"labels":{"type":"array","items":{"type":"string","pattern":"^\\S{1,255}$"},"maxItems":50},"status":{"type":"string","enum":["To Do","In Progress","Done"]},"assignee":{"type":["string","null"],"minLength":1,"description":"null unassigns the issue.","example":"alice"}},"required":["user"],"description":"Changes to make to an issue as a user."},"JiraComment":{"type":"object","properties":{"id":{"type":"string"},"self":{"type":"string","format":"uri"},"author":{"$ref":"#/components/schemas/JiraUser"},"body":{"$ref":"#/components/schemas/JiraAdf"},"created":{"type":"string"},"updated":{"type":"string"}},"required":["id","self","author","body","created","updated"],"additionalProperties":{},"description":"The comment as the Jira REST API returns it."},"JiraCommentCreate":{"type":"object","properties":{"user":{"type":"string","minLength":1,"description":"The user who acts: their name or account id. Webhooks name them as the actor.","example":"alice"},"body":{"anyOf":[{"type":"string","maxLength":32000},{"$ref":"#/components/schemas/JiraAdf"}],"description":"Plain text, or an Atlassian Document Format document."}},"required":["user","body"],"description":"A comment to post as a user."}},"parameters":{}},"paths":{"/api/teams":{"get":{"tags":["Teams"],"summary":"List teams","description":"Teams you can see. With an API key, that is the key's team.","security":[{"bearerAuth":[]},{"sessionCookie":[]}],"responses":{"200":{"description":"Your teams","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamList"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/teams/{teamId}":{"get":{"tags":["Teams"],"summary":"Get a team","description":"One team and its members.","security":[{"bearerAuth":[]},{"sessionCookie":[]}],"parameters":[{"schema":{"type":"string","example":"team_k2v9x0q1m4s7d8f3a6b5"},"required":true,"name":"teamId","in":"path"}],"responses":{"200":{"description":"The team","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamDetail"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"No team with that id is visible to you","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"patch":{"tags":["Teams"],"summary":"Rename a team","description":"Team owners only, signed in. API keys cannot change teams.","security":[{"bearerAuth":[]},{"sessionCookie":[]}],"parameters":[{"schema":{"type":"string","example":"team_k2v9x0q1m4s7d8f3a6b5"},"required":true,"name":"teamId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamUpdate"}}}},"responses":{"200":{"description":"The renamed team","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Team"}}}},"400":{"description":"Invalid name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Not a team owner, or called with an API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"No team with that id is visible to you","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/teams/{teamId}/api-keys":{"get":{"tags":["API keys"],"summary":"List API keys","description":"Active keys of a team, newest first. Secrets are never returned.","security":[{"bearerAuth":[]},{"sessionCookie":[]}],"parameters":[{"schema":{"type":"string","example":"team_k2v9x0q1m4s7d8f3a6b5"},"required":true,"name":"teamId","in":"path"}],"responses":{"200":{"description":"The team's keys","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyList"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"No team with that id is visible to you","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"post":{"tags":["API keys"],"summary":"Create an API key","description":"Team members only, signed in. The response is the only time the secret is shown.","security":[{"bearerAuth":[]},{"sessionCookie":[]}],"parameters":[{"schema":{"type":"string","example":"team_k2v9x0q1m4s7d8f3a6b5"},"required":true,"name":"teamId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyCreate"}}}},"responses":{"201":{"description":"The new key, with its secret","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyCreated"}}}},"400":{"description":"Invalid name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Called with an API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"No team with that id is visible to you","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/teams/{teamId}/api-keys/{keyId}":{"delete":{"tags":["API keys"],"summary":"Revoke an API key","description":"Team members only, signed in. The key stops working immediately.","security":[{"bearerAuth":[]},{"sessionCookie":[]}],"parameters":[{"schema":{"type":"string","example":"team_k2v9x0q1m4s7d8f3a6b5"},"required":true,"name":"teamId","in":"path"},{"schema":{"type":"string","example":"key_w2rh3pmnhl1pe2wjxgqs"},"required":true,"name":"keyId","in":"path"}],"responses":{"204":{"description":"Revoked"},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Called with an API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"No such active key in a team visible to you","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/worlds":{"get":{"tags":["Worlds"],"summary":"List worlds","description":"Worlds in the teams you can see, newest first. Archived worlds are not listed.","security":[{"bearerAuth":[]},{"sessionCookie":[]}],"responses":{"200":{"description":"Your worlds","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorldList"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"post":{"tags":["Worlds"],"summary":"Create a world","description":"A new world with a spec for each service it should have (Slack and Jira). Point your app at the returned URLs.","security":[{"bearerAuth":[]},{"sessionCookie":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorldCreate"}}}},"responses":{"201":{"description":"The new world, with each service's effective spec (generated ids, credentials and tokens filled in)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorldCreated"}}}},"400":{"description":"Invalid name, no service spec, or an invalid Slack or Jira spec","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"You are not in any team","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/worlds/{worldId}":{"get":{"tags":["Worlds"],"summary":"Get a world","security":[{"bearerAuth":[]},{"sessionCookie":[]}],"parameters":[{"schema":{"type":"string","example":"world_k2v9x0q1m4"},"required":true,"name":"worldId","in":"path"}],"responses":{"200":{"description":"The world","content":{"application/json":{"schema":{"$ref":"#/components/schemas/World"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"No world with that id is visible to you","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/worlds/{worldId}/spec":{"get":{"tags":["Worlds"],"summary":"Get a world's spec","description":"The spec the world was created from, with generated ids, credentials and tokens filled in. Create a world from it to get an identical one.","security":[{"bearerAuth":[]},{"sessionCookie":[]}],"parameters":[{"schema":{"type":"string","example":"world_k2v9x0q1m4"},"required":true,"name":"worldId","in":"path"}],"responses":{"200":{"description":"The world's spec","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorldSpec"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"No world with that id is visible to you, or it predates world specs","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/worlds/{worldId}/archive":{"post":{"tags":["Worlds"],"summary":"Archive a world","description":"Takes the world offline for good: it leaves the list, its URLs stop working and pending event deliveries are dropped. Archiving cannot be undone.","security":[{"bearerAuth":[]},{"sessionCookie":[]}],"parameters":[{"schema":{"type":"string","example":"world_k2v9x0q1m4"},"required":true,"name":"worldId","in":"path"}],"responses":{"204":{"description":"Archived"},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"No world with that id is visible to you","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/_worlds/slack/tokens":{"post":{"tags":["Slack world"],"servers":[{"url":"https://{world}-slack.makeworlds.dev","description":"{world} is the world id without its world_ prefix, as in the world's URLs.","variables":{"world":{"default":"k2v9x0q1m4","description":"The world id without its world_ prefix."}}}],"security":[{"bearerAuth":[]},{"sessionCookie":[]}],"summary":"Get a user token","description":"A user token to act as the user with any Slack client. Minted on first use, then the same token.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SlackTokenRequest"}}}},"responses":{"200":{"description":"The user's token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SlackToken"}}}},"400":{"description":"Unknown user, or a bot","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Missing or invalid credentials, or not your team's world","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/_worlds/slack/state":{"get":{"tags":["Slack world"],"servers":[{"url":"https://{world}-slack.makeworlds.dev","description":"{world} is the world id without its world_ prefix, as in the world's URLs.","variables":{"world":{"default":"k2v9x0q1m4","description":"The world id without its world_ prefix."}}}],"security":[{"bearerAuth":[]},{"sessionCookie":[]}],"summary":"Get the workspace's state","description":"Users, channels and, with channel, that channel's messages.","parameters":[{"schema":{"type":"string","description":"A channel id.","example":"C0GENERAL001"},"required":false,"description":"A channel id.","name":"channel","in":"query"}],"responses":{"200":{"description":"The workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SlackWorldState"}}}},"401":{"description":"Missing or invalid credentials, or not your team's world","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/_worlds/slack/act":{"post":{"tags":["Slack world"],"servers":[{"url":"https://{world}-slack.makeworlds.dev","description":"{world} is the world id without its world_ prefix, as in the world's URLs.","variables":{"world":{"default":"k2v9x0q1m4","description":"The world id without its world_ prefix."}}}],"security":[{"bearerAuth":[]},{"sessionCookie":[]}],"summary":"Call a Web API method as a user","description":"Calls method as the user, minting their token if needed, and sends the events Slack would, e.g. app_mention for a message that mentions your app.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SlackActRequest"}}}},"responses":{"200":{"description":"The method's response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SlackWebApiResponse"}}}},"400":{"description":"A method that can't be called this way, or an unknown user","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Missing or invalid credentials, or not your team's world","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/_worlds/slack/upload":{"post":{"tags":["Slack world"],"servers":[{"url":"https://{world}-slack.makeworlds.dev","description":"{world} is the world id without its world_ prefix, as in the world's URLs.","variables":{"world":{"default":"k2v9x0q1m4","description":"The world id without its world_ prefix."}}}],"security":[{"bearerAuth":[]},{"sessionCookie":[]}],"summary":"Share a file as a user","description":"Uploads the file and shares it in the channel, as files.uploadV2 does.","requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/SlackUploadRequest"}}}},"responses":{"200":{"description":"files.completeUploadExternal's response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SlackWebApiResponse"}}}},"400":{"description":"Missing fields or an unknown user","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Missing or invalid credentials, or not your team's world","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"502":{"description":"The upload failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/_worlds/slack/files/{fileId}":{"get":{"tags":["Slack world"],"servers":[{"url":"https://{world}-slack.makeworlds.dev","description":"{world} is the world id without its world_ prefix, as in the world's URLs.","variables":{"world":{"default":"k2v9x0q1m4","description":"The world id without its world_ prefix."}}}],"security":[{"bearerAuth":[]},{"sessionCookie":[]}],"summary":"Download a file","parameters":[{"schema":{"type":"string","example":"F0A1B2C3D4"},"required":true,"name":"fileId","in":"path"}],"responses":{"200":{"description":"The file's bytes, with its mimetype as content-type","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}},"401":{"description":"Missing or invalid credentials, or not your team's world","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"No file with that id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/_worlds/jira/state":{"get":{"tags":["Jira world"],"servers":[{"url":"https://{world}-jira.makeworlds.dev","description":"{world} is the world id without its world_ prefix, as in the world's URLs.","variables":{"world":{"default":"k2v9x0q1m4","description":"The world id without its world_ prefix."}}}],"security":[{"bearerAuth":[]},{"sessionCookie":[]}],"summary":"Get the Jira site's state","description":"The spec with generated ids filled in, every issue and the registered webhooks.","responses":{"200":{"description":"The site's state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JiraWorldState"}}}},"401":{"description":"Missing or invalid credentials, or not your team's world","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/_worlds/jira/issues":{"post":{"tags":["Jira world"],"servers":[{"url":"https://{world}-jira.makeworlds.dev","description":"{world} is the world id without its world_ prefix, as in the world's URLs.","variables":{"world":{"default":"k2v9x0q1m4","description":"The world id without its world_ prefix."}}}],"security":[{"bearerAuth":[]},{"sessionCookie":[]}],"summary":"Create an issue","description":"Creates the issue as user and sends jira:issue_created to matching webhooks.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JiraIssueCreate"}}}},"responses":{"201":{"description":"The new issue","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JiraIssue"}}}},"400":{"description":"Invalid fields, or an unknown user, assignee or project","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Missing or invalid credentials, or not your team's world","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/_worlds/jira/issues/{key}":{"patch":{"tags":["Jira world"],"servers":[{"url":"https://{world}-jira.makeworlds.dev","description":"{world} is the world id without its world_ prefix, as in the world's URLs.","variables":{"world":{"default":"k2v9x0q1m4","description":"The world id without its world_ prefix."}}}],"security":[{"bearerAuth":[]},{"sessionCookie":[]}],"summary":"Update an issue","description":"Changes the given fields as user and sends jira:issue_updated with the changelog to matching webhooks.","parameters":[{"schema":{"type":"string","example":"WRLD-1"},"required":true,"name":"key","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JiraIssueUpdate"}}}},"responses":{"200":{"description":"The issue and what changed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JiraIssueUpdated"}}}},"400":{"description":"Invalid fields, or an unknown user or assignee","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Missing or invalid credentials, or not your team's world","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"No issue with that key or id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"delete":{"tags":["Jira world"],"servers":[{"url":"https://{world}-jira.makeworlds.dev","description":"{world} is the world id without its world_ prefix, as in the world's URLs.","variables":{"world":{"default":"k2v9x0q1m4","description":"The world id without its world_ prefix."}}}],"security":[{"bearerAuth":[]},{"sessionCookie":[]}],"summary":"Delete an issue","description":"Deletes the issue as user and sends jira:issue_deleted to matching webhooks.","parameters":[{"schema":{"type":"string","example":"WRLD-1"},"required":true,"name":"key","in":"path"},{"schema":{"type":"string","minLength":1,"description":"The user who acts: their name or account id. Webhooks name them as the actor.","example":"alice"},"required":true,"description":"The user who acts: their name or account id. Webhooks name them as the actor.","name":"user","in":"query"}],"responses":{"204":{"description":"Deleted"},"400":{"description":"Unknown user","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Missing or invalid credentials, or not your team's world","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"No issue with that key or id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/_worlds/jira/issues/{key}/comments":{"post":{"tags":["Jira world"],"servers":[{"url":"https://{world}-jira.makeworlds.dev","description":"{world} is the world id without its world_ prefix, as in the world's URLs.","variables":{"world":{"default":"k2v9x0q1m4","description":"The world id without its world_ prefix."}}}],"security":[{"bearerAuth":[]},{"sessionCookie":[]}],"summary":"Comment on an issue","description":"Adds the comment as user and sends comment_created to matching webhooks.","parameters":[{"schema":{"type":"string","example":"WRLD-1"},"required":true,"name":"key","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JiraCommentCreate"}}}},"responses":{"201":{"description":"The new comment","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JiraComment"}}}},"400":{"description":"Empty body or unknown user","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Missing or invalid credentials, or not your team's world","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"No issue with that key or id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}}},"webhooks":{}}