openapi: 3.2.0 info: title: Beehiiv Authorizations API version: 1.0.0 description: 'Operations tagged Authorizations across 2 of this provider''s published API definitions: beehiiv-oauth2-api-openapi.yml, beehiiv-oauth2-openapi.json. Each path carries the servers of the definition it was published in.' servers: - url: https://app.beehiiv.com description: Default tags: - name: Authorizations paths: /oauth/authorize: get: operationId: authorize summary: Authorize description: Starts the OAuth2 authorization code flow. This endpoint redirects the user to login and consent (if needed), then redirects back to your `redirect_uri` with a `code` and `state`. tags: - Authorizations parameters: - name: client_id in: query description: The OAuth application client ID (`uid`). required: true schema: type: string - name: redirect_uri in: query description: Must exactly match one of the app's configured redirect URIs. required: true schema: type: string - name: response_type in: query description: Must be `code` for the authorization code flow. required: true schema: type: string - name: scope in: query description: Space-delimited list of requested scopes. required: false schema: type: string - name: state in: query description: Opaque value returned to your callback for CSRF protection. required: false schema: type: string - name: code_challenge in: query description: PKCE code challenge. Required for public clients. required: false schema: type: string - name: code_challenge_method in: query description: PKCE challenge method (`plain` or `S256`). Required for public clients when using PKCE. required: false schema: $ref: '#/components/schemas/type__CodeChallengeMethod' responses: '302': description: Redirect content: application/json: schema: $ref: '#/components/schemas/type__EmptyResponse' '400': description: The request is invalid or missing required parameters. content: application/json: schema: $ref: '#/components/schemas/type__OAuthError' '401': description: Client authentication failed or the token is invalid. content: application/json: schema: $ref: '#/components/schemas/type__OAuthError' servers: - url: https://app.beehiiv.com description: Default components: schemas: type__EmptyResponse: type: object properties: {} title: EmptyResponse type__CodeChallengeMethod: type: string enum: - plain - S256 description: The PKCE code challenge method. title: CodeChallengeMethod type__OAuthError: type: object properties: error: type: string error_description: type: string error_uri: type: string state: type: string required: - error description: Standard OAuth2 error response. title: OAuthError x-refined-from: - beehiiv-oauth2-api-openapi.yml - beehiiv-oauth2-openapi.json