openapi: 3.0.3 info: title: Docupilot accounts APIs ai organization 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: organization paths: /accounts/organization/csm_details/: get: operationId: get_csm_details description: Returns csm details for Organization if available tags: - organization security: - SessionAuthentication: [] responses: '200': content: application/json: schema: $ref: '#/components/schemas/CSMDetails' examples: ResponseExample: value: name: test1 phone_number: '12345678' summary: Response Example description: '' '401': content: application/json: schema: $ref: '#/components/schemas/UnauthenticatedError' description: '' '403': content: application/json: schema: $ref: '#/components/schemas/ForbiddenError' description: '' /accounts/organization/delete_organization/: post: operationId: delete_organization summary: 'Delete a Organization and other related data permanently ' tags: - organization requestBody: content: application/json: schema: $ref: '#/components/schemas/OrganizationDelete' application/x-www-form-urlencoded: schema: $ref: '#/components/schemas/OrganizationDelete' multipart/form-data: schema: $ref: '#/components/schemas/OrganizationDelete' required: true security: - 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/organization/details/: get: operationId: get_organization tags: - organization security: - SessionAuthentication: [] responses: '200': content: application/json: schema: $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/organization/meta/: get: operationId: get_organization_meta summary: Get organization meta information tags: - organization security: - SessionAuthentication: [] responses: '200': content: application/json: schema: $ref: '#/components/schemas/OrganizationMetaResponse' description: '' '401': content: application/json: schema: $ref: '#/components/schemas/UnauthenticatedError' description: '' '403': content: application/json: schema: $ref: '#/components/schemas/ForbiddenError' description: '' /accounts/organization/toggle_mfa_status/: patch: operationId: toggle_organization_mfa_status summary: Activate or Deactivate Organization MFA tags: - organization security: - SessionAuthentication: [] responses: '200': content: application/json: schema: $ref: '#/components/schemas/Organization' description: '' '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/organization/toggle_password_based_login/: patch: operationId: toggle_password_based_login description: Flips the organization setting. Disabling is only allowed if at least one active SAML provider is configured. summary: Toggle password-based login tags: - organization security: - SessionAuthentication: [] responses: '200': content: application/json: schema: $ref: '#/components/schemas/Organization' description: '' '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/organization/update_org/: patch: operationId: update_organization tags: - organization requestBody: content: multipart/form-data: schema: $ref: '#/components/schemas/PatchedOrganization' security: - SessionAuthentication: [] responses: '200': content: application/json: schema: $ref: '#/components/schemas/Organization' description: '' '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/organization/update_subdomain/: patch: operationId: update_organization_subdomain summary: Update organization subdomain tags: - organization requestBody: content: application/json: schema: $ref: '#/components/schemas/PatchedOrganizationSubdomainChange' application/x-www-form-urlencoded: schema: $ref: '#/components/schemas/PatchedOrganizationSubdomainChange' multipart/form-data: schema: $ref: '#/components/schemas/PatchedOrganizationSubdomainChange' security: - SessionAuthentication: [] responses: '200': content: application/json: schema: $ref: '#/components/schemas/OrganizationSubdomainChangeResponse' description: '' '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: '' /dashboard/accounts/v2/organization/current/: get: operationId: get_current_organization summary: get current organization details tags: - organization security: - OAuthAuthentication: [] - SessionAuthentication: [] - tokenAuth: [] responses: '200': content: application/json: schema: $ref: '#/components/schemas/Organization_2' description: '' '401': content: application/json: schema: $ref: '#/components/schemas/UnauthenticatedError_2' description: '' '403': content: application/json: schema: $ref: '#/components/schemas/ForbiddenError_2' description: '' components: schemas: OrganizationDelete: type: object properties: otp: type: string writeOnly: true maxLength: 6 minLength: 6 required: - otp Organization_2: type: object properties: name: type: string readOnly: true subdomain: type: string readOnly: true logo: type: string format: uri readOnly: true nullable: true required: - logo - name - subdomain description: '' CSMDetails: type: object properties: name: type: string maxLength: 100 phone_number: type: string maxLength: 20 required: - name - phone_number UnauthenticatedError: type: object properties: detail: type: string required: - detail ValidationError: type: object properties: errors: type: object additionalProperties: {} non_field_errors: type: array items: type: string required: - errors - non_field_errors PatchedOrganizationSubdomainChange: type: object properties: subdomain: type: string maxLength: 50 minLength: 3 ForbiddenError: type: object properties: detail: type: string required: - detail OrganizationMetaResponse: type: object properties: scim_enabled: type: boolean required: - scim_enabled 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 OrganizationSubdomainChangeResponse: type: object properties: new_url: type: string required: - new_url ForbiddenError_2: type: object properties: detail: type: string required: - detail description: '' PatchedOrganization: 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: binary 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 UnauthenticatedError_2: type: object properties: detail: type: string required: - detail description: '' 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