{
  "openapi": "3.0.3",
  "info": {
    "title": "Atlassian OAuth 2.0 (3LO)",
    "version": "1"
  },
  "servers": [
    {
      "url": "https://auth.atlassian.com"
    },
    {
      "url": "https://api.atlassian.com"
    }
  ],
  "paths": {
    "/oauth/token": {
      "post": {
        "operationId": "oauthToken",
        "summary": "Exchange an authorization code, or a rotating refresh token, for an access token",
        "externalDocs": {
          "url": "https://developer.atlassian.com/cloud/jira/platform/oauth-2-3lo-apps/"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "grant_type",
                  "client_id",
                  "client_secret"
                ],
                "properties": {
                  "grant_type": {
                    "type": "string"
                  },
                  "client_id": {
                    "type": "string"
                  },
                  "client_secret": {
                    "type": "string"
                  },
                  "code": {
                    "type": "string"
                  },
                  "redirect_uri": {
                    "type": "string"
                  },
                  "refresh_token": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "the token",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "access_token": {
                      "type": "string"
                    },
                    "expires_in": {
                      "type": "integer"
                    },
                    "scope": {
                      "type": "string"
                    },
                    "refresh_token": {
                      "type": "string"
                    },
                    "token_type": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "invalid_grant"
          }
        }
      }
    },
    "/oauth/token/accessible-resources": {
      "get": {
        "operationId": "accessibleResources",
        "summary": "The sites the access token can reach, with each cloudid",
        "externalDocs": {
          "url": "https://developer.atlassian.com/cloud/jira/platform/oauth-2-3lo-apps/"
        },
        "responses": {
          "200": {
            "description": "the sites",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "name": {
                        "type": "string"
                      },
                      "url": {
                        "type": "string"
                      },
                      "scopes": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "avatarUrl": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}