1Fort google_workspace (v2) API

**Access:** requires a JWT access token.

OpenAPI Specification

1fort-google-workspace-v2-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: 1Fort API Documentation google_workspace (v2) google_workspace (v2) API
  description: '# 1Fort API


    REST API for the 1Fort insurance platform. This document is the authoritative

    map of the API surface; endpoints are grouped in the sidebar by **app** and

    **version**, and large apps are split into per-resource sub-groups.


    ## Authentication


    Almost every endpoint requires a **JWT access token**. Send it in the

    `Authorization` header as either `Bearer <token>` or `JWT <token>`. Tokens may

    also be presented as an HTTP-only cookie. Endpoints documented with no security

    requirement are intentionally public (for example sign-in, OTP and storefront

    endpoints).


    ## Multi-tenancy


    Resources are scoped to a tenant. Nested routes carry the owning resource id in

    the path (for example `/v2/broker/{business_pk}/applications`); a token is only

    authorised for the businesses its user may access. Object-level permissions are

    enforced per endpoint.


    ## Versioning


    `v2` endpoints live under `/apis/v2/...` and are the current surface. `v1`

    endpoints remain documented for compatibility. Endpoints marked **deprecated**

    are scheduled for removal; prefer the documented replacement.

    '
  termsOfService: https://www.1fort.com/
  license:
    name: Privately owned
  version: v1
servers:
- url: https://api.1fort.com/apis/
security:
- Bearer: []
tags:
- name: google_workspace (v2)
  x-displayName: Google workspace (v2)
  description: '**Access:** requires a JWT access token.'
paths:
  /v2/broker/integrations/google/dwd:
    parameters: []
    get:
      operationId: v2_broker_integrations_google_dwd_list
      description: ViewSet for Broker Google DWD integrations using Service Account Domain-Wide Delegation.
      parameters:
      - name: search
        in: query
        description: A search term.
        required: false
        schema:
          type: string
      - name: ordering
        in: query
        description: Which field to use when ordering the results.
        required: false
        schema:
          type: string
      - name: limit
        in: query
        description: Number of results to return per page.
        required: false
        schema:
          type: integer
      - name: offset
        in: query
        description: The initial index from which to return the results.
        required: false
        schema:
          type: integer
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                required:
                - count
                - results
                type: object
                properties:
                  count:
                    type: integer
                  next:
                    type:
                    - string
                    - 'null'
                    format: uri
                  previous:
                    type:
                    - string
                    - 'null'
                    format: uri
                  results:
                    type: array
                    items:
                      $ref: '#/components/schemas/BrokerGoogleDwdIntegration'
        '403':
          description: Authentication credentials were invalid, absent or insufficient.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericError'
        '500':
          description: Internal server error.
      tags:
      - google_workspace (v2)
      summary: List DWD
  /v2/broker/integrations/google/dwd/connect:
    parameters: []
    post:
      operationId: v2_broker_integrations_google_dwd_connect
      summary: Set up Google DWD integration
      description: '

        Set up a Domain-Wide Delegation integration for a broker agency.

        This endpoint requires specifying the domain for which the integration should be set up.

        Returns setup instructions and a pending integration record.

        '
      responses:
        '201':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BrokerGoogleDwdIntegration'
        '400':
          description: Invalid domain or domain already exists
        '403':
          description: Authentication credentials were invalid, absent or insufficient.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericError'
        '500':
          description: Internal server error.
      tags:
      - google_workspace (v2)
      requestBody:
        content:
          application/json:
            schema:
              required:
              - domain
              type: object
              properties:
                domain:
                  description: Google Workspace domain to integrate with (e.g. example.com)
                  type: string
                super_admin_email:
                  description: Email of the super administrator for this domain (defaults to current user's email)
                  type: string
        required: true
  /v2/broker/integrations/google/dwd/{id}:
    parameters:
    - name: id
      in: path
      required: true
      schema:
        type: string
    get:
      operationId: v2_broker_integrations_google_dwd_read
      description: ViewSet for Broker Google DWD integrations using Service Account Domain-Wide Delegation.
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BrokerGoogleDwdIntegration'
        '403':
          description: Authentication credentials were invalid, absent or insufficient.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericError'
        '404':
          description: Object does not exist or caller has insufficient permissions to access it.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIException'
        '500':
          description: Internal server error.
      tags:
      - google_workspace (v2)
      summary: Retrieve DWD
    put:
      operationId: v2_broker_integrations_google_dwd_update
      summary: Update Google DWD integration
      description: '

        Update a Google DWD integration. Currently only supports updating the super_admin_email.

        The integration must be in PENDING_SETUP or CONNECTED status.

        '
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BrokerGoogleDwdIntegration'
        '400':
          description: Invalid request data
        '404':
          description: Integration not found
        '403':
          description: Authentication credentials were invalid, absent or insufficient.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericError'
        '500':
          description: Internal server error.
      tags:
      - google_workspace (v2)
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                super_admin_email:
                  description: Email of the super administrator for this domain
                  type: string
        required: true
    patch:
      operationId: v2_broker_integrations_google_dwd_partial_update
      description: Handle PATCH requests - delegate to update method.
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BrokerGoogleDwdIntegration'
        '400':
          description: Invalid input.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationError'
        '403':
          description: Authentication credentials were invalid, absent or insufficient.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericError'
        '404':
          description: Object does not exist or caller has insufficient permissions to access it.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIException'
        '500':
          description: Internal server error.
      tags:
      - google_workspace (v2)
      summary: Update DWD
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BrokerGoogleDwdIntegration'
        required: true
  /v2/broker/integrations/google/dwd/{id}/verify:
    parameters:
    - name: id
      in: path
      required: true
      schema:
        type: string
    post:
      operationId: v2_broker_integrations_google_dwd_verify
      summary: Verify Google DWD integration setup
      description: '

        Verify that the Google Workspace Admin has properly configured Domain-Wide Delegation

        in their Admin Console by attempting a test API call.

        If the integration is already CONNECTED, returns success without re-verifying.

        Status changes to CONNECTED if verification is successful.

        '
      responses:
        '200':
          description: Verification result
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    description: Whether verification was successful or integration is already connected
                    type: boolean
                  integration:
                    description: Integration data
                    type: object
        '404':
          description: Integration not found
        '400':
          description: Invalid input.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationError'
        '403':
          description: Authentication credentials were invalid, absent or insufficient.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericError'
        '500':
          description: Internal server error.
      tags:
      - google_workspace (v2)
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BrokerGoogleDwdIntegration'
        required: true
  /v2/broker/integrations/google/oauth:
    parameters: []
    get:
      operationId: v2_broker_integrations_google_oauth_list
      description: ViewSet for Broker Google OAuth integrations.
      parameters:
      - name: search
        in: query
        description: A search term.
        required: false
        schema:
          type: string
      - name: ordering
        in: query
        description: Which field to use when ordering the results.
        required: false
        schema:
          type: string
      - name: limit
        in: query
        description: Number of results to return per page.
        required: false
        schema:
          type: integer
      - name: offset
        in: query
        description: The initial index from which to return the results.
        required: false
        schema:
          type: integer
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                required:
                - count
                - results
                type: object
                properties:
                  count:
                    type: integer
                  next:
                    type:
                    - string
                    - 'null'
                    format: uri
                  previous:
                    type:
                    - string
                    - 'null'
                    format: uri
                  results:
                    type: array
                    items:
                      $ref: '#/components/schemas/BrokerGoogleOAuthIntegration'
        '403':
          description: Authentication credentials were invalid, absent or insufficient.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericError'
        '500':
          description: Internal server error.
      tags:
      - google_workspace (v2)
      summary: List OAuth
  /v2/broker/integrations/google/oauth/connect:
    parameters: []
    get:
      operationId: v2_broker_integrations_google_oauth_connect
      summary: Start Google OAuth integration for broker
      description: '

        Start the Google OAuth integration process for a broker agency.

        This will return a URL that the user should be redirected to for consent.

        '
      parameters:
      - name: search
        in: query
        description: A search term.
        required: false
        schema:
          type: string
      - name: ordering
        in: query
        description: Which field to use when ordering the results.
        required: false
        schema:
          type: string
      - name: limit
        in: query
        description: Number of results to return per page.
        required: false
        schema:
          type: integer
      - name: offset
        in: query
        description: The initial index from which to return the results.
        required: false
        schema:
          type: integer
      responses:
        '200':
          description: Google OAuth integration started
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    description: Google integration ID
                    type: string
                  url:
                    description: Google Authentication URL
                    type: string
        '403':
          description: Authentication credentials were invalid, absent or insufficient.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericError'
        '500':
          description: Internal server error.
      tags:
      - google_workspace (v2)
  /v2/broker/integrations/google/oauth/{id}:
    parameters:
    - name: id
      in: path
      required: true
      schema:
        type: string
    get:
      operationId: v2_broker_integrations_google_oauth_read
      description: ViewSet for Broker Google OAuth integrations.
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BrokerGoogleOAuthIntegration'
        '403':
          description: Authentication credentials were invalid, absent or insufficient.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericError'
        '404':
          description: Object does not exist or caller has insufficient permissions to access it.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIException'
        '500':
          description: Internal server error.
      tags:
      - google_workspace (v2)
      summary: Retrieve OAuth
  /v2/broker/integrations/google/oauth/{id}/reconnect:
    parameters:
    - name: id
      in: path
      required: true
      schema:
        type: string
    get:
      operationId: v2_broker_integrations_google_oauth_reconnect
      summary: Reconnect Google OAuth integration
      description: '

        Reconnect a Google OAuth integration. This will return a URL that the user should redirect to.

        '
      responses:
        '200':
          description: Google OAuth integration reconnection URL
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    description: Google integration ID
                    type: string
                  url:
                    description: Google Authentication URL
                    type: string
        '403':
          description: Authentication credentials were invalid, absent or insufficient.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericError'
        '404':
          description: Object does not exist or caller has insufficient permissions to access it.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIException'
        '500':
          description: Internal server error.
      tags:
      - google_workspace (v2)
components:
  schemas:
    BrokerGoogleDwdIntegration:
      required:
      - domain
      type: object
      properties:
        id:
          title: Id
          type: string
          format: uuid
          readOnly: true
        integration_status:
          title: Integration status
          type: string
          enum:
          - PENDING
          - PENDING_SETUP
          - CONNECTED
          - DISCONNECTED
          - ERROR
          readOnly: true
        domain:
          title: Domain
          description: Google Workspace domain this integration applies to.
          type: string
          maxLength: 255
          minLength: 1
        super_admin_email:
          title: Super admin email
          description: Email of a Google Workspace super admin to impersonate for Admin SDK calls.
          type:
          - string
          - 'null'
          format: email
          maxLength: 254
        service_account_client_id:
          title: Service account client id
          type: string
          readOnly: true
        error_message:
          title: Error message
          type:
          - string
          - 'null'
          readOnly: true
          minLength: 1
        created_at:
          title: Created at
          type: string
          format: date-time
          readOnly: true
        updated_at:
          title: Updated at
          type: string
          format: date-time
          readOnly: true
        last_synced:
          title: Last synced
          type: string
          format: date-time
          readOnly: true
        scopes:
          title: Scopes
          type: string
          readOnly: true
    APIException:
      title: Generic API Error
      required:
      - detail
      type: object
      properties:
        detail:
          description: Error details
          type: string
    GenericError:
      title: Generic API Error
      required:
      - detail
      type: object
      properties:
        detail:
          description: Error details
          type: string
    BrokerGoogleOAuthIntegration:
      type: object
      properties:
        id:
          title: Id
          type: string
          format: uuid
          readOnly: true
        integration_status:
          title: Integration status
          type: string
          enum:
          - PENDING
          - PENDING_SETUP
          - CONNECTED
          - DISCONNECTED
          - ERROR
          readOnly: true
        user_email:
          title: User email
          description: Email of the user who granted OAuth consent
          type:
          - string
          - 'null'
          format: email
          readOnly: true
          minLength: 1
        created_at:
          title: Created at
          type: string
          format: date-time
          readOnly: true
        updated_at:
          title: Updated at
          type: string
          format: date-time
          readOnly: true
        last_synced:
          title: Last synced
          type: string
          format: date-time
          readOnly: true
        connection_link:
          title: Connection link
          type: string
          readOnly: true
    ValidationError:
      title: Validation Error
      type: object
      properties:
        non_field_errors:
          description: List of validation errors not related to any field
          type: array
          items:
            type: string
      additionalProperties:
        description: A list of error messages for each field that triggered a validation error
        type: array
        items:
          type: string
  securitySchemes:
    Bearer:
      type: apiKey
      name: Authorization
      in: header
      description: JWT access token. Send as `Bearer <token>` or `JWT <token>`.
    ApiKey:
      type: apiKey
      name: Authorization
      in: header
      description: API key. Send as `Api-Key <key>`.
x-tagGroups:
- name: Agent runtime (v2)
  tags:
  - agent_runtime (v2)
- name: Analytics
  tags:
  - analytics
- name: Application
  tags:
  - 'application: applications'
  - 'application: clients'
- name: Application (v2)
  tags:
  - 'application (v2): applications'
  - 'application (v2): coverages'
- name: Ascend
  tags:
  - ascend
- name: Ascend (v2)
  tags:
  - ascend (v2)
- name: Authentication
  tags:
  - Authentication
  - auth
- name: Billing (v2)
  tags:
  - billing (v2)
- name: Broker
  tags:
  - broker
  - broker-ams-integration
  - broker-google
  - broker-office365
  - broker-office365-individual
  - 'broker: ai-customization-types'
  - 'broker: ai-customizations'
  - 'broker: clients'
  - 'broker: email_preferences'
  - 'broker: proposal-preferences'
  - 'broker: take-rates'
  - 'broker: user-ai-customizations'
  - 'broker: users'
  - broker_groups
  - broker_settings
- name: Broker (v2)
  tags:
  - 'broker (v2): applications'
  - 'broker (v2): clients'
  - 'broker (v2): coverages'
  - 'broker (v2): email-templates'
  - 'broker (v2): quote-policies'
  - 'broker (v2): quotes'
  - 'broker (v2): storefront'
  - 'broker (v2): team-users'
- name: Business
  tags:
  - business
  - business-broker-users
  - business-user
  - business_admin
- name: Carrier
  tags:
  - carrier
- name: Checkout
  tags:
  - checkout
- name: Email AI
  tags:
  - email_ai
- name: Email AI (v2)
  tags:
  - 'email_ai (v2): attachments'
  - 'email_ai (v2): carriers'
  - 'email_ai (v2): coverage-types'
  - 'email_ai (v2): emails'
  - 'email_ai (v2): gmail'
  - 'email_ai (v2): office365'
  - 'email_ai (v2): profiles'
  - 'email_ai (v2): wholesalers'
- name: Email AI Agent
  tags:
  - Email AI Agent
  - Email AI Agent - Attachments
  - Email AI Agent - Businesses
  - Email AI Agent - Entities
  - Email AI Agent - Markets
  - Email AI Agent - Profiles
  - Email AI Agent - Reference Data
- name: Google workspace (v2)
  tags:
  - google_workspace (v2)
- name: Herald (v2)
  tags:
  - herald (v2)
- name: Indications (v2)
  tags:
  - indications (v2)
- name: Insurance (v2)
  tags:
  - insurance (v2)
- name: Invite
  tags:
  - invite
- name: Legal
  tags:
  - legal
- name: Market
  tags:
  - Markets
  - Markets - Business
- name: Market (v2)
  tags:
  - market (v2)
- name: Office365 (v2)
  tags:
  - office365 (v2)
- name: Premium finance (v2)
  tags:
  - premium_finance (v2)
- name: Quote
  tags:
  - 'quote: applications'
  - 'quote: clients'
  - 'quote: quotes'
- name: Quote (v2)
  tags:
  - 'quote (v2): application'
  - 'quote (v2): binders'
  - 'quote (v2): checkout'
  - 'quote (v2): cios'
  - 'quote (v2): coverages'
  - 'quote (v2): quote-policies'
  - 'quote (v2): quotes'
  - 'quote (v2): tasks'
  - quote_ai (v2)
- name: Reports
  tags:
  - reports
- name: Reward
  tags:
  - reward
- name: Risk manager
  tags:
  - risk_manager
- name: Sanity check AI
  tags:
  - sanity_check_ai
- name: Storefront (v2)
  tags:
  - storefront (v2)
- name: Stripe
  tags:
  - stripe
- name: Suggestion AI
  tags:
  - suggestion_ai
- name: Treasury (v2)
  tags:
  - treasury (v2)
- name: User
  tags:
  - user
  - 'user: default-access-role'