Baserow User API

The User API from Baserow — 17 operation(s) for user.

OpenAPI Specification

baserow-user-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  title: Baserow API spec Admin User API
  version: 2.2.2
  description: 'For more information about our REST API, please visit [this page](https://baserow.io/docs/apis%2Frest-api).


    For more information about our deprecation policy, please visit [this page](https://baserow.io/docs/apis%2Fdeprecations).'
  contact:
    url: https://baserow.io/contact
  license:
    name: MIT
    url: https://github.com/baserow/baserow/blob/develop/LICENSE
tags:
- name: User
paths:
  /api/user/:
    post:
      operationId: create_user
      description: Creates a new user based on the provided values. If desired an authentication JWT can be generated right away. After creating an account the initial workspace containing a database is created.
      tags:
      - User
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Register'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/Register'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/Register'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                oneOf:
                - title: Without two-factor authentication
                  type: object
                  properties:
                    user:
                      type: object
                      description: An object containing information related to the user.
                      properties:
                        first_name:
                          type: string
                          description: The first name of related user.
                        username:
                          type: string
                          format: email
                          description: The username of the related user. This is always an email address.
                        language:
                          type: string
                          description: 'An ISO 639 language code (with optional variant) selected by the user. Ex: en-GB.'
                    token:
                      type: string
                      deprecated: true
                      description: Deprecated. Use the `access_token` instead.
                    access_token:
                      type: string
                      description: '''access_token'' can be used to authorize for other endpoints that require authorization. This token will be valid for 10 minutes.'
                    refresh_token:
                      type: string
                      description: '''refresh_token'' can be used to get a new valid ''access_token''. This token will be valid for 168 hours.'
                - title: With two-factor authentication
                  type: object
                  properties:
                    two_factor_auth:
                      type: string
                      description: The type of the two factor auth that is required to perform.
                    token:
                      type: string
                      description: The temporary token for verifying authentication using 2fa.
          description: ''
        '400':
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Machine readable error indicating what went wrong.
                    enum:
                    - ERROR_ALREADY_EXISTS
                    - ERROR_GROUP_INVITATION_DOES_NOT_EXIST
                    - ERROR_REQUEST_BODY_VALIDATION
                    - BAD_TOKEN_SIGNATURE
                    - ERROR_CAPTCHA_VERIFICATION_FAILED
                  detail:
                    oneOf:
                    - type: string
                      format: string
                      description: Human readable details about what went wrong.
                    - type: object
                      format: object
                      description: Machine readable object about what went wrong.
          description: ''
        '404':
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Machine readable error indicating what went wrong.
                    enum:
                    - ERROR_GROUP_INVITATION_DOES_NOT_EXIST
                  detail:
                    oneOf:
                    - type: string
                      format: string
                      description: Human readable details about what went wrong.
                    - type: object
                      format: object
                      description: Machine readable object about what went wrong.
          description: ''
  /api/user/account/:
    patch:
      operationId: update_account
      description: Updates the account information of the authenticated user.
      tags:
      - User
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PatchedAccount'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/PatchedAccount'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/PatchedAccount'
      security:
      - UserSource JWT: []
      - JWT: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Account'
          description: ''
        '400':
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Machine readable error indicating what went wrong.
                    enum:
                    - ERROR_REQUEST_BODY_VALIDATION
                  detail:
                    oneOf:
                    - type: string
                      format: string
                      description: Human readable details about what went wrong.
                    - type: object
                      format: object
                      description: Machine readable object about what went wrong.
          description: ''
  /api/user/change-email/:
    post:
      operationId: change_email
      description: Changes the email address of a user if the confirmation token is valid. The **send_change_email_confirmation** endpoint sends an email to the new address containing the token. That token can be used to change the email address here.
      tags:
      - User
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ChangeEmail'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/ChangeEmail'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/ChangeEmail'
        required: true
      responses:
        '204':
          description: No response body
        '400':
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Machine readable error indicating what went wrong.
                    enum:
                    - BAD_TOKEN_SIGNATURE
                    - EXPIRED_TOKEN_SIGNATURE
                    - ERROR_USER_NOT_FOUND
                    - ERROR_ALREADY_EXISTS
                    - ERROR_EMAIL_ALREADY_CHANGED
                    - ERROR_REQUEST_BODY_VALIDATION
                  detail:
                    oneOf:
                    - type: string
                      format: string
                      description: Human readable details about what went wrong.
                    - type: object
                      format: object
                      description: Machine readable object about what went wrong.
          description: ''
  /api/user/change-password/:
    post:
      operationId: change_password
      description: Changes the password of an authenticated user, but only if the old password matches.
      tags:
      - User
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ChangePasswordBodyValidation'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/ChangePasswordBodyValidation'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/ChangePasswordBodyValidation'
        required: true
      security:
      - UserSource JWT: []
      - JWT: []
      responses:
        '204':
          description: No response body
        '400':
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Machine readable error indicating what went wrong.
                    enum:
                    - ERROR_INVALID_OLD_PASSWORD
                    - ERROR_REQUEST_BODY_VALIDATION
                  detail:
                    oneOf:
                    - type: string
                      format: string
                      description: Human readable details about what went wrong.
                    - type: object
                      format: object
                      description: Machine readable object about what went wrong.
          description: ''
  /api/user/dashboard/:
    get:
      operationId: dashboard
      description: Lists all the relevant user information that for example could be shown on a dashboard. It will contain all the pending workspace invitations for that user.
      tags:
      - User
      security:
      - UserSource JWT: []
      - JWT: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Dashboard'
          description: ''
  /api/user/redo/:
    patch:
      operationId: redo
      description: Redoes the latest redoable action performed by the user making the request. a ClientSessionId header must be provided and only actions which were performed the same user with the same ClientSessionId value set on the api request that performed the action will be redone.Additionally the ClientSessionId header must be between 1 and 256 characters long and must only contain alphanumeric or the - characters.
      parameters:
      - in: header
        name: ClientSessionId
        schema:
          type: string
          format: uuid
        description: The particular client session to redo actions for. The actions must have been performed with this same header set with the same value for them to be redoable by this endpoint.
        required: true
      tags:
      - User
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PatchedUndoRedoRequest'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/PatchedUndoRedoRequest'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/PatchedUndoRedoRequest'
      security:
      - UserSource JWT: []
      - JWT: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UndoRedoResponse'
          description: ''
  /api/user/reset-password/:
    post:
      operationId: reset_password
      description: Changes the password of a user if the reset token is valid. The **send_password_reset_email** endpoint sends an email to the user containing the token. That token can be used to change the password here without providing the old password.
      tags:
      - User
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ResetPasswordBodyValidation'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/ResetPasswordBodyValidation'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/ResetPasswordBodyValidation'
        required: true
      responses:
        '204':
          description: No response body
        '400':
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Machine readable error indicating what went wrong.
                    enum:
                    - BAD_TOKEN_SIGNATURE
                    - EXPIRED_TOKEN_SIGNATURE
                    - ERROR_USER_NOT_FOUND
                    - ERROR_RESET_PASSWORD_TOKEN_USED
                    - ERROR_REQUEST_BODY_VALIDATION
                  detail:
                    oneOf:
                    - type: string
                      format: string
                      description: Human readable details about what went wrong.
                    - type: object
                      format: object
                      description: Machine readable object about what went wrong.
          description: ''
  /api/user/schedule-account-deletion/:
    post:
      operationId: schedule_account_deletion
      description: Schedules the account deletion of the authenticated user. The user will be permanently deleted after the grace delay defined by the instance administrator.
      tags:
      - User
      security:
      - UserSource JWT: []
      - JWT: []
      responses:
        '204':
          description: No response body
        '400':
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Machine readable error indicating what went wrong.
                    enum:
                    - ERROR_REQUEST_BODY_VALIDATION
                  detail:
                    oneOf:
                    - type: string
                      format: string
                      description: Human readable details about what went wrong.
                    - type: object
                      format: object
                      description: Machine readable object about what went wrong.
          description: ''
  /api/user/send-change-email-confirmation/:
    post:
      operationId: send_change_email_confirmation
      description: Sends an email to the new email address containing a confirmation link. The user must provide their current password to initiate this request. The link is going to be valid for 12 hours.
      tags:
      - User
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SendChangeEmailConfirmation'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/SendChangeEmailConfirmation'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/SendChangeEmailConfirmation'
        required: true
      security:
      - UserSource JWT: []
      - JWT: []
      responses:
        '204':
          description: No response body
        '400':
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Machine readable error indicating what went wrong.
                    enum:
                    - ERROR_REQUEST_BODY_VALIDATION
                    - ERROR_HOSTNAME_IS_NOT_ALLOWED
                    - ERROR_INVALID_OLD_PASSWORD
                    - ERROR_ALREADY_EXISTS
                    - ERROR_CHANGE_EMAIL_NOT_ALLOWED
                    - ERROR_AUTH_PROVIDER_DISABLED
                  detail:
                    oneOf:
                    - type: string
                      format: string
                      description: Human readable details about what went wrong.
                    - type: object
                      format: object
                      description: Machine readable object about what went wrong.
          description: ''
  /api/user/send-reset-password-email/:
    post:
      operationId: send_password_reset_email
      description: Sends an email containing the password reset link to the email address of the user. This will only be done if a user is found with the given email address. The endpoint will not fail if the email address is not found. The link is going to the valid for 2 hours.
      tags:
      - User
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SendResetPasswordEmailBodyValidation'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/SendResetPasswordEmailBodyValidation'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/SendResetPasswordEmailBodyValidation'
        required: true
      responses:
        '204':
          description: No response body
        '400':
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Machine readable error indicating what went wrong.
                    enum:
                    - ERROR_REQUEST_BODY_VALIDATION
                    - ERROR_HOSTNAME_IS_NOT_ALLOWED
                  detail:
                    oneOf:
                    - type: string
                      format: string
                      description: Human readable details about what went wrong.
                    - type: object
                      format: object
                      description: Machine readable object about what went wrong.
          description: ''
  /api/user/send-verify-email/:
    post:
      operationId: send_verify_email
      description: Sends an email to the user with an email verification link if the user's email is not verified yet.
      tags:
      - User
      security:
      - UserSource JWT: []
      - JWT: []
      - {}
      responses:
        '204':
          description: No response body
  /api/user/token-auth/:
    post:
      operationId: token_auth
      description: Authenticates an existing user based on their email and their password. If successful, an access token and a refresh token will be returned. If the account is protected with two-factor authentication, temporary token is returned to finish the verification.
      tags:
      - User
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TokenObtainPairWithUser'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/TokenObtainPairWithUser'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/TokenObtainPairWithUser'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                oneOf:
                - title: Without two-factor authentication
                  type: object
                  properties:
                    user:
                      type: object
                      description: An object containing information related to the user.
                      properties:
                        first_name:
                          type: string
                          description: The first name of related user.
                        username:
                          type: string
                          format: email
                          description: The username of the related user. This is always an email address.
                        language:
                          type: string
                          description: 'An ISO 639 language code (with optional variant) selected by the user. Ex: en-GB.'
                    token:
                      type: string
                      deprecated: true
                      description: Deprecated. Use the `access_token` instead.
                    access_token:
                      type: string
                      description: '''access_token'' can be used to authorize for other endpoints that require authorization. This token will be valid for 10 minutes.'
                    refresh_token:
                      type: string
                      description: '''refresh_token'' can be used to get a new valid ''access_token''. This token will be valid for 168 hours.'
                - title: With two-factor authentication
                  type: object
                  properties:
                    two_factor_auth:
                      type: string
                      description: The type of the two factor auth that is required to perform.
                    token:
                      type: string
                      description: The temporary token for verifying authentication using 2fa.
          description: ''
        '401':
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Machine readable error indicating what went wrong.
                    enum:
                    - ERROR_INVALID_CREDENTIALS
                    - ERROR_DEACTIVATED_USER
                    - ERROR_AUTH_PROVIDER_DISABLED
                    - ERROR_EMAIL_VERIFICATION_REQUIRED
                  detail:
                    oneOf:
                    - type: string
                      format: string
                      description: Human readable details about what went wrong.
                    - type: object
                      format: object
                      description: Machine readable object about what went wrong.
          description: ''
  /api/user/token-blacklist/:
    post:
      operationId: token_blacklist
      description: Blacklists the provided token. This can be used the sign the user off.
      tags:
      - User
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TokenBlacklist'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/TokenBlacklist'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/TokenBlacklist'
        required: true
      responses:
        '204':
          description: No response body
        '401':
          content:
            application/json:
              schema:
                description: The JWT refresh token is invalid or expired.
          description: ''
  /api/user/token-refresh/:
    post:
      operationId: token_refresh
      description: Generate a new access_token that can be used to continue operating on Baserow starting from a valid refresh token.
      tags:
      - User
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TokenRefreshWithUser'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/TokenRefreshWithUser'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/TokenRefreshWithUser'
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  user:
                    type: object
                    description: An object containing information related to the user.
                    properties:
                      first_name:
                        type: string
                        description: The first name of related user.
                      username:
                        type: string
                        format: email
                        description: The username of the related user. This is always an email address.
                      language:
                        type: string
                        description: 'An ISO 639 language code (with optional variant) selected by the user. Ex: en-GB.'
                  token:
                    type: string
                    deprecated: true
                    description: Deprecated. Use the `access_token` instead.
                  access_token:
                    type: string
                    description: '''access_token'' can be used to authorize for other endpoints that require authorization. This token will be valid for 10 minutes.'
          description: ''
        '401':
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Machine readable error indicating what went wrong.
                    enum:
                    - ERROR_INVALID_REFRESH_TOKEN
                    - ERROR_EMAIL_VERIFICATION_REQUIRED
                  detail:
                    oneOf:
                    - type: string
                      format: string
                      description: Human readable details about what went wrong.
                    - type: object
                      format: object
                      description: Machine readable object about what went wrong.
          description: ''
  /api/user/token-verify/:
    post:
      operationId: token_verify
      description: Verifies if the refresh token is valid and can be used to generate a new access_token.
      tags:
      - User
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TokenVerifyWithUser'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/TokenVerifyWithUser'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/TokenVerifyWithUser'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  user:
                    type: object
                    description: An object containing information related to the user.
                    properties:
                      first_name:
                        type: string
                        description: The first name of related user.
                      username:
                        type: string
                        format: email
                        description: The username of the related user. This is always an email address.
                      language:
                        type: string
                        description: 'An ISO 639 language code (with optional variant) selected by the user. Ex: en-GB.'
          description: ''
        '401':
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Machine readable error indicating what went wrong.
                    enum:
                    - ERROR_INVALID_REFRESH_TOKEN
                    - ERROR_EMAIL_VERIFICATION_REQUIRED
                  detail:
                    oneOf:
                    - type: string
                      format: string
                      description: Human readable details about what went wrong.
                    - type: object
                      format: object
                      description: Machine readable object about what went wrong.
          description: ''
  /api/user/undo/:
    patch:
      operationId: undo
      description: undoes the latest undoable action performed by the user making the request. a ClientSessionId header must be provided and only actions which were performed the same user with the same ClientSessionId value set on the api request that performed the action will be undone.Additionally the ClientSessionId header must be between 1 and 256 characters long and must only contain alphanumeric or the - characters.
      parameters:
      - in: header
        name: ClientSessionId
        schema:
          type: string
          format: uuid
        description: The particular client session to undo actions for. The actions must have been performed with this same header set with the same value for them to be undoable by this endpoint.
        required: true
      tags:
      - User
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PatchedUndoRedoRequest'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/PatchedUndoRedoRequest'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/PatchedUndoRedoRequest'
      security:
      - UserSource JWT: []
      - JWT: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UndoRedoResponse'
          description: ''
  /api/user/verify-email/:
    post:
      operationId: verify_email
      description: Passing the correct verification token will confirm that the user's email address belongs to the user. This endpoint also optionally returns user information, access token and the refresh token for automatically signing user in the system if the request is performed by unauthenticated user.
      tags:
      - User
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/VerifyEmailAddress'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/VerifyEmailAddress'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/VerifyEmailAddress'
        required: true
      security:
      - UserSource JWT: []
      - JWT: []
      - {}
      responses:
        '200':
          content:
            application/json:
              schema:
                oneOf:
                - title: Without two-factor authentication
                  type: object
                  properties:
                    user:
                      type: object
                      description: An object containing information related to the user.
                      properties:
                        first_name:
                          type: string
                          description: The first name of related user.
                        username:
                          type: string
                          format: email
                          description: The username of the related user. This is always an email address.
                        language:
                          type: string
                          description: 'An ISO 639 language code (with optional variant) selected by the user. Ex: en-GB.'
                    token:
                      type: string
                      deprecated: true
                      description: Deprecated. Use the `access_token` instead.
                    access_token:
                      type: string
                      description: '''access_token'' can be used to authorize for other endpoints that require authorization. This token will be valid for 10 minutes.'
                    refresh_token:
                      type: string
                      description: '''refresh_token'' can be used to get a new valid ''access_token''. This token will be valid for 168 hours.'
                - title: With two-factor authentication
                  type: object
                  properties:
                    two_factor_auth:
                      type: string
                      description: The type of the two factor auth 

# --- truncated at 32 KB (45 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/baserow/refs/heads/main/openapi/baserow-user-api-openapi.yml