Docupilot user API

The user API from Docupilot — 8 operation(s) for user.

OpenAPI Specification

docupilot-user-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  title: Docupilot accounts APIs ai user API
  version: '1.0'
  description: Docupilot accounts APIs
  termsOfService: https://docupilot.app/terms-and-conditions/
  contact:
    name: Team Docupilot
    email: support@docupilot.app
tags:
- name: user
paths:
  /accounts/user/change_email/:
    put:
      operationId: change_email
      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
      security:
      - OAuthAuthentication: []
      - SessionAuthentication: []
      responses:
        '204':
          description: No response body
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationError'
          description: ''
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthenticatedError'
          description: ''
  /accounts/user/change_password/:
    put:
      operationId: change_password
      tags:
      - user
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ChangePassword'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/ChangePassword'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/ChangePassword'
        required: true
      security:
      - OAuthAuthentication: []
      - SessionAuthentication: []
      responses:
        '204':
          description: No response body
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationError'
          description: ''
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthenticatedError'
          description: ''
  /accounts/user/config_meta/:
    get:
      operationId: user_config_meta
      summary: User config meta
      tags:
      - user
      security:
      - OAuthAuthentication: []
      - SessionAuthentication: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserMeta'
          description: ''
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthenticatedError'
          description: ''
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenError'
          description: ''
  /accounts/user/detail/{guid}/:
    get:
      operationId: get_use_by_guid
      summary: get logged in user details
      parameters:
      - in: path
        name: guid
        schema:
          type: string
          pattern: ^[0-9a-f-]+$
        required: true
      tags:
      - user
      security:
      - OAuthAuthentication: []
      - SessionAuthentication: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/User'
          description: ''
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthenticatedError'
          description: ''
  /accounts/user/initiate_authorization_sequence/:
    post:
      operationId: initiate_authorization_sequence
      tags:
      - user
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SendAuthorizationOTP'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/SendAuthorizationOTP'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/SendAuthorizationOTP'
        required: true
      security:
      - OAuthAuthentication: []
      - SessionAuthentication: []
      responses:
        '204':
          description: No response body
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationError'
          description: ''
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthenticatedError'
          description: ''
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenError'
          description: ''
  /accounts/user/me/:
    get:
      operationId: get_me
      summary: get logged in user details
      tags:
      - user
      security:
      - OAuthAuthentication: []
      - SessionAuthentication: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/User'
          description: ''
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthenticatedError'
          description: ''
    put:
      operationId: update_me
      summary: update logged in user details
      tags:
      - user
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/User'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/User'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/User'
      security:
      - OAuthAuthentication: []
      - SessionAuthentication: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/User'
          description: ''
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationError'
          description: ''
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthenticatedError'
          description: ''
    patch:
      operationId: partial_update_user_details
      summary: partial update user details
      tags:
      - user
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PatchedUser'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/PatchedUser'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/PatchedUser'
      security:
      - OAuthAuthentication: []
      - SessionAuthentication: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/User'
          description: ''
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationError'
          description: ''
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthenticatedError'
          description: ''
  /accounts/user/organizations/:
    get:
      operationId: get_user_organizations
      summary: Get all organizations for the current user
      parameters:
      - name: ordering
        required: false
        in: query
        description: Which field to use when ordering the results.
        schema:
          type: string
      tags:
      - user
      security:
      - OAuthAuthentication: []
      - SessionAuthentication: []
      responses:
        '200':
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Organization'
          description: ''
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthenticatedError'
          description: ''
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenError'
          description: ''
  /accounts/user/verify_authorization/:
    post:
      operationId: verify_authorization
      tags:
      - user
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/VerifyAuthorizationOTP'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/VerifyAuthorizationOTP'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/VerifyAuthorizationOTP'
        required: true
      security:
      - OAuthAuthentication: []
      - SessionAuthentication: []
      responses:
        '204':
          description: No response body
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationError'
          description: ''
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthenticatedError'
          description: ''
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenError'
          description: ''
components:
  schemas:
    UnauthenticatedError:
      type: object
      properties:
        detail:
          type: string
      required:
      - detail
    PatchedUser:
      type: object
      properties:
        id:
          type: integer
          readOnly: true
        guid:
          type: string
          format: uuid
          readOnly: true
          description: globally unique identifier for user
        first_name:
          type: string
          maxLength: 50
        last_name:
          type: string
          maxLength: 50
        email:
          type: string
          format: email
          readOnly: true
        timezone:
          enum:
          - Pacific/Midway
          - America/Adak
          - Pacific/Honolulu
          - Pacific/Marquesas
          - America/Anchorage
          - America/Tijuana
          - America/Los_Angeles
          - America/Phoenix
          - America/Chihuahua
          - America/Denver
          - America/Belize
          - America/Chicago
          - Pacific/Easter
          - America/Mexico_City
          - America/Regina
          - America/Bogota
          - America/Cancun
          - America/New_York
          - America/Port-au-Prince
          - America/Havana
          - America/Indiana/Indianapolis
          - America/Asuncion
          - America/Halifax
          - America/Caracas
          - America/Cuiaba
          - America/Manaus
          - America/Santiago
          - America/Grand_Turk
          - America/St_Johns
          - America/Fortaleza
          - America/Sao_Paulo
          - America/Cayenne
          - America/Buenos_Aires
          - America/Godthab
          - America/Montevideo
          - America/Miquelon
          - America/Bahia
          - America/Noronha
          - Atlantic/Azores
          - Atlantic/Cape_Verde
          - UTC
          - Africa/Casablanca
          - Europe/London
          - Africa/Monrovia
          - Europe/Amsterdam
          - Europe/Belgrade
          - Europe/Brussels
          - Europe/Warsaw
          - Africa/Algiers
          - Africa/Windhoek
          - Asia/Amman
          - Europe/Athens
          - Asia/Beirut
          - Africa/Cairo
          - Asia/Damascus
          - Asia/Gaza
          - Africa/Harare
          - Europe/Helsinki
          - Asia/Jerusalem
          - Europe/Kaliningrad
          - Africa/Tripoli
          - Asia/Baghdad
          - Asia/Istanbul
          - Asia/Kuwait
          - Europe/Minsk
          - Europe/Moscow
          - Africa/Nairobi
          - Asia/Tehran
          - Asia/Muscat
          - Europe/Astrakhan
          - Asia/Baku
          - Europe/Samara
          - Indian/Mauritius
          - Asia/Tbilisi
          - Asia/Yerevan
          - Asia/Kabul
          - Asia/Tashkent
          - Asia/Yekaterinburg
          - Asia/Karachi
          - Asia/Kolkata
          - Asia/Colombo
          - Asia/Katmandu
          - Asia/Almaty
          - Asia/Dhaka
          - Asia/Rangoon
          - Asia/Novosibirsk
          - Asia/Bangkok
          - Asia/Barnaul
          - Asia/Hovd
          - Asia/Krasnoyarsk
          - Asia/Tomsk
          - Asia/Chongqing
          - Asia/Irkutsk
          - Asia/Kuala_Lumpur
          - Australia/Perth
          - Asia/Taipei
          - Asia/Ulaanbaatar
          - Asia/Pyongyang
          - Australia/Eucla
          - Asia/Chita
          - Asia/Tokyo
          - Asia/Seoul
          - Asia/Yakutsk
          - Australia/Adelaide
          - Australia/Darwin
          - Australia/Brisbane
          - Australia/Canberra
          - Pacific/Guam
          - Australia/Hobart
          - Asia/Vladivostok
          - Australia/Lord_Howe
          - Pacific/Bougainville
          - Asia/Srednekolymsk
          - Asia/Magadan
          - Pacific/Norfolk
          - Asia/Sakhalin
          - Pacific/Guadalcanal
          - Asia/Anadyr
          - Pacific/Auckland
          - Pacific/Fiji
          - Pacific/Chatham
          - Pacific/Tongatapu
          - Pacific/Apia
          - Pacific/Kiritimati
          type: string
        locale:
          enum:
          - en
          - nl
          - fr
          - de
          - es
          - ar
          - he
          - null
          type: string
          nullable: true
        is_active:
          type: boolean
          readOnly: true
          title: Active
          description: Designates whether this user should be treated as active. Unselect this instead of deleting accounts.
        locale_display_name:
          type: string
          readOnly: true
        theme:
          enum:
          - light
          - dark
          - system
          type: string
        is_mfa_enabled:
          type: boolean
          readOnly: true
        organization:
          allOf:
          - $ref: '#/components/schemas/UserOrganization'
          readOnly: true
        role:
          enum:
          - owner
          - admin
          - member
          type: string
          readOnly: true
        workspaces:
          type: array
          items:
            $ref: '#/components/schemas/Workspace'
          readOnly: true
    ValidationError:
      type: object
      properties:
        errors:
          type: object
          additionalProperties: {}
        non_field_errors:
          type: array
          items:
            type: string
      required:
      - errors
      - non_field_errors
    ForbiddenError:
      type: object
      properties:
        detail:
          type: string
      required:
      - detail
    UserMeta:
      type: object
      properties:
        timezone:
          type: array
          items:
            $ref: '#/components/schemas/TimeZone'
        locale:
          type: array
          items:
            $ref: '#/components/schemas/Locale'
      required:
      - locale
      - timezone
    UserOrganization:
      type: object
      properties:
        id:
          type: integer
          readOnly: true
        name:
          type: string
          maxLength: 50
        subdomain:
          type: string
          maxLength: 50
        active:
          type: boolean
        enforce_mfa:
          type: boolean
        region:
          enum:
          - us1
          type: string
      required:
      - id
      - name
      - subdomain
    Organization:
      type: object
      properties:
        name:
          type: string
          maxLength: 50
        subdomain:
          type: string
          readOnly: true
        created_time:
          type: string
          format: date-time
          readOnly: true
        updated_time:
          type: string
          format: date-time
          readOnly: true
        enforce_mfa:
          type: boolean
          readOnly: true
        logo:
          type: string
          format: uri
          nullable: true
        password_based_login:
          type: boolean
          readOnly: true
          description: Whether password-based login is allowed for this organization
        region:
          enum:
          - us1
          type: string
          readOnly: true
        provisioning_mode:
          enum:
          - manual
          - scim
          type: string
          readOnly: true
      required:
      - created_time
      - enforce_mfa
      - name
      - password_based_login
      - provisioning_mode
      - region
      - subdomain
      - updated_time
    User:
      type: object
      properties:
        id:
          type: integer
          readOnly: true
        guid:
          type: string
          format: uuid
          readOnly: true
          description: globally unique identifier for user
        first_name:
          type: string
          maxLength: 50
        last_name:
          type: string
          maxLength: 50
        email:
          type: string
          format: email
          readOnly: true
        timezone:
          enum:
          - Pacific/Midway
          - America/Adak
          - Pacific/Honolulu
          - Pacific/Marquesas
          - America/Anchorage
          - America/Tijuana
          - America/Los_Angeles
          - America/Phoenix
          - America/Chihuahua
          - America/Denver
          - America/Belize
          - America/Chicago
          - Pacific/Easter
          - America/Mexico_City
          - America/Regina
          - America/Bogota
          - America/Cancun
          - America/New_York
          - America/Port-au-Prince
          - America/Havana
          - America/Indiana/Indianapolis
          - America/Asuncion
          - America/Halifax
          - America/Caracas
          - America/Cuiaba
          - America/Manaus
          - America/Santiago
          - America/Grand_Turk
          - America/St_Johns
          - America/Fortaleza
          - America/Sao_Paulo
          - America/Cayenne
          - America/Buenos_Aires
          - America/Godthab
          - America/Montevideo
          - America/Miquelon
          - America/Bahia
          - America/Noronha
          - Atlantic/Azores
          - Atlantic/Cape_Verde
          - UTC
          - Africa/Casablanca
          - Europe/London
          - Africa/Monrovia
          - Europe/Amsterdam
          - Europe/Belgrade
          - Europe/Brussels
          - Europe/Warsaw
          - Africa/Algiers
          - Africa/Windhoek
          - Asia/Amman
          - Europe/Athens
          - Asia/Beirut
          - Africa/Cairo
          - Asia/Damascus
          - Asia/Gaza
          - Africa/Harare
          - Europe/Helsinki
          - Asia/Jerusalem
          - Europe/Kaliningrad
          - Africa/Tripoli
          - Asia/Baghdad
          - Asia/Istanbul
          - Asia/Kuwait
          - Europe/Minsk
          - Europe/Moscow
          - Africa/Nairobi
          - Asia/Tehran
          - Asia/Muscat
          - Europe/Astrakhan
          - Asia/Baku
          - Europe/Samara
          - Indian/Mauritius
          - Asia/Tbilisi
          - Asia/Yerevan
          - Asia/Kabul
          - Asia/Tashkent
          - Asia/Yekaterinburg
          - Asia/Karachi
          - Asia/Kolkata
          - Asia/Colombo
          - Asia/Katmandu
          - Asia/Almaty
          - Asia/Dhaka
          - Asia/Rangoon
          - Asia/Novosibirsk
          - Asia/Bangkok
          - Asia/Barnaul
          - Asia/Hovd
          - Asia/Krasnoyarsk
          - Asia/Tomsk
          - Asia/Chongqing
          - Asia/Irkutsk
          - Asia/Kuala_Lumpur
          - Australia/Perth
          - Asia/Taipei
          - Asia/Ulaanbaatar
          - Asia/Pyongyang
          - Australia/Eucla
          - Asia/Chita
          - Asia/Tokyo
          - Asia/Seoul
          - Asia/Yakutsk
          - Australia/Adelaide
          - Australia/Darwin
          - Australia/Brisbane
          - Australia/Canberra
          - Pacific/Guam
          - Australia/Hobart
          - Asia/Vladivostok
          - Australia/Lord_Howe
          - Pacific/Bougainville
          - Asia/Srednekolymsk
          - Asia/Magadan
          - Pacific/Norfolk
          - Asia/Sakhalin
          - Pacific/Guadalcanal
          - Asia/Anadyr
          - Pacific/Auckland
          - Pacific/Fiji
          - Pacific/Chatham
          - Pacific/Tongatapu
          - Pacific/Apia
          - Pacific/Kiritimati
          type: string
        locale:
          enum:
          - en
          - nl
          - fr
          - de
          - es
          - ar
          - he
          - null
          type: string
          nullable: true
        is_active:
          type: boolean
          readOnly: true
          title: Active
          description: Designates whether this user should be treated as active. Unselect this instead of deleting accounts.
        locale_display_name:
          type: string
          readOnly: true
        theme:
          enum:
          - light
          - dark
          - system
          type: string
        is_mfa_enabled:
          type: boolean
          readOnly: true
        organization:
          allOf:
          - $ref: '#/components/schemas/UserOrganization'
          readOnly: true
        role:
          enum:
          - owner
          - admin
          - member
          type: string
          readOnly: true
        workspaces:
          type: array
          items:
            $ref: '#/components/schemas/Workspace'
          readOnly: true
      required:
      - email
      - guid
      - id
      - is_active
      - is_mfa_enabled
      - locale_display_name
      - organization
      - role
      - workspaces
    ChangePassword:
      type: object
      properties:
        current_password:
          type: string
          writeOnly: true
        new_password:
          type: string
          writeOnly: true
        clear_other_sessions:
          type: boolean
          default: false
      required:
      - current_password
      - new_password
    Workspace:
      type: object
      properties:
        id:
          type: integer
        name:
          type: string
        role:
          enum:
          - owner
          - admin
          - manager
          - member
          - billing_manager
          type: string
        unique_key:
          type: string
        plan:
          type: string
        users:
          type: integer
        plan_status:
          type: string
      required:
      - id
      - name
      - plan
      - plan_status
      - unique_key
      - users
    VerifyAuthorizationOTP:
      type: object
      properties:
        otp:
          type: string
      required:
      - otp
    Locale:
      type: object
      properties:
        code:
          type: string
        display:
          type: string
      required:
      - code
      - display
    TimeZone:
      type: object
      properties:
        name:
          type: string
        tz:
          type: string
        offset:
          type: string
      required:
      - name
      - offset
      - tz
    ChangeEmail:
      type: object
      properties:
        email:
          type: string
          format: email
          maxLength: 255
        password:
          type: string
          maxLength: 128
      required:
      - email
      - password
    SendAuthorizationOTP:
      type: object
      properties:
        action_name:
          type: string
      required:
      - action_name
  securitySchemes:
    OAuthAuthentication:
      type: http
      scheme: bearer
      description: OAuth2 Bearer Token Authentication
    SessionAuthentication:
      type: apiKey
      in: cookie
      name: sessionid
      description: browser based login takes care of this
externalDocs:
  description: Help docs on how to use API
  url: https://help.docupilot.app/developers/api-overview