> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://help.sigmacomputing.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://help.sigmacomputing.com/_mcp/server.

# Export a workbook

POST https://api.sigmacomputing.com/v2/workbooks/{workbookId}/send
Content-Type: application/json

Export a workbook to one or more destinations, such as an email address, a Slack channel, or cloud storage.

  ### Usage notes

  - Retrieve the **workbookId** by calling the [/v2/workbooks](https://help.sigmacomputing.com/reference/list-workbooks) endpoint.
  - This endpoint is rate limited to 100 requests per minute.
      

Reference: https://help.sigmacomputing.com/reference/send-workbook

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: sigma-rest-api
  version: 1.0.0
paths:
  /v2/workbooks/{workbookId}/send:
    post:
      operationId: sendWorkbook
      summary: Export a workbook
      description: >-
        Export a workbook to one or more destinations, such as an email address,
        a Slack channel, or cloud storage.

          ### Usage notes

          - Retrieve the **workbookId** by calling the [/v2/workbooks](https://help.sigmacomputing.com/reference/list-workbooks) endpoint.
          - This endpoint is rate limited to 100 requests per minute.
              
      tags:
        - Workbooks
      parameters:
        - name: workbookId
          in: path
          required: true
          schema:
            type: string
        - name: Authorization
          in: header
          description: OAuth authentication
          required: true
          schema:
            type: string
      responses:
        '200':
          description: The response body.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/workbooks_sendWorkbook_Response_200'
      requestBody:
        description: The request body.
        content:
          application/json:
            schema:
              type: object
              properties:
                parameters:
                  type: object
                  additionalProperties:
                    type: string
                timeout:
                  type: number
                  format: double
                conditions:
                  type: array
                  items:
                    $ref: >-
                      #/components/schemas/V2WorkbooksWorkbookIdSendPostRequestBodyContentApplicationJsonSchemaConditionsItems
                sendAsUser:
                  type: string
                targets:
                  type: array
                  items:
                    $ref: >-
                      #/components/schemas/V2WorkbooksWorkbookIdSendPostRequestBodyContentApplicationJsonSchemaTargetsItems
                config:
                  $ref: >-
                    #/components/schemas/V2WorkbooksWorkbookIdSendPostRequestBodyContentApplicationJsonSchemaConfig
                attachments:
                  type: array
                  items:
                    $ref: >-
                      #/components/schemas/V2WorkbooksWorkbookIdSendPostRequestBodyContentApplicationJsonSchemaAttachmentsItems
              required:
                - targets
                - config
                - attachments
servers:
  - url: https://api.sigmacomputing.com
    description: Server for GCP (US) hosted organizations
  - url: https://api.sa.gcp.sigmacomputing.com
    description: Server for GCP (KSA) hosted organizations
  - url: https://aws-api.sigmacomputing.com
    description: Server for AWS US (West) hosted organizations
  - url: https://api.us-a.aws.sigmacomputing.com
    description: Server for AWS US (East) hosted organizations
  - url: https://api.ca.aws.sigmacomputing.com
    description: Server for AWS Canada hosted organizations
  - url: https://api.eu.aws.sigmacomputing.com
    description: Server for AWS Europe hosted organizations
  - url: https://api.au.aws.sigmacomputing.com
    description: Server for AWS Australia and APAC hosted organizations
  - url: https://api.uk.aws.sigmacomputing.com
    description: Server for AWS UK hosted organizations
  - url: https://api.us.azure.sigmacomputing.com
    description: Server for Azure US hosted organizations
  - url: https://api.eu.azure.sigmacomputing.com
    description: Server for Azure Europe hosted organizations
  - url: https://api.ca.azure.sigmacomputing.com
    description: Server for Azure Canada hosted organizations
  - url: https://api.uk.azure.sigmacomputing.com
    description: Server for Azure United Kingdom hosted organizations
  - url: https://api.au.azure.sigmacomputing.com
    description: Server for Azure Australia hosted organizations
components:
  schemas:
    V2WorkbooksWorkbookIdSendPostRequestBodyContentApplicationJsonSchemaConditionsItemsOneOf0Type:
      type: string
      enum:
        - isEmpty
      title: >-
        V2WorkbooksWorkbookIdSendPostRequestBodyContentApplicationJsonSchemaConditionsItemsOneOf0Type
    V2WorkbooksWorkbookIdSendPostRequestBodyContentApplicationJsonSchemaConditionsItems0:
      type: object
      properties:
        type:
          $ref: >-
            #/components/schemas/V2WorkbooksWorkbookIdSendPostRequestBodyContentApplicationJsonSchemaConditionsItemsOneOf0Type
        elementId:
          type: string
      required:
        - type
        - elementId
      title: >-
        V2WorkbooksWorkbookIdSendPostRequestBodyContentApplicationJsonSchemaConditionsItems0
    V2WorkbooksWorkbookIdSendPostRequestBodyContentApplicationJsonSchemaConditionsItemsOneOf1Type:
      type: string
      enum:
        - isNotEmpty
      title: >-
        V2WorkbooksWorkbookIdSendPostRequestBodyContentApplicationJsonSchemaConditionsItemsOneOf1Type
    V2WorkbooksWorkbookIdSendPostRequestBodyContentApplicationJsonSchemaConditionsItems1:
      type: object
      properties:
        type:
          $ref: >-
            #/components/schemas/V2WorkbooksWorkbookIdSendPostRequestBodyContentApplicationJsonSchemaConditionsItemsOneOf1Type
        elementId:
          type: string
      required:
        - type
        - elementId
      title: >-
        V2WorkbooksWorkbookIdSendPostRequestBodyContentApplicationJsonSchemaConditionsItems1
    V2WorkbooksWorkbookIdSendPostRequestBodyContentApplicationJsonSchemaConditionsItemsOneOf2Type:
      type: string
      enum:
        - sheetColumn
      title: >-
        V2WorkbooksWorkbookIdSendPostRequestBodyContentApplicationJsonSchemaConditionsItemsOneOf2Type
    V2WorkbooksWorkbookIdSendPostRequestBodyContentApplicationJsonSchemaConditionsItemsOneOf2Op:
      type: string
      enum:
        - Equals
        - GreaterThan
        - GreaterThanEq
        - LessThan
        - LessThanEq
        - NotEquals
        - IsNull
        - IsNotNull
        - Contains
        - StartsWith
        - EndsWith
      description: Operator
      title: >-
        V2WorkbooksWorkbookIdSendPostRequestBodyContentApplicationJsonSchemaConditionsItemsOneOf2Op
    V2WorkbooksWorkbookIdSendPostRequestBodyContentApplicationJsonSchemaConditionsItemsOneOf2Mode:
      type: string
      enum:
        - any
        - all
      description: Check condition
      title: >-
        V2WorkbooksWorkbookIdSendPostRequestBodyContentApplicationJsonSchemaConditionsItemsOneOf2Mode
    DataTypesOneOf0Type:
      type: string
      enum:
        - 'null'
      title: DataTypesOneOf0Type
    DataTypes0:
      type: object
      properties:
        type:
          $ref: '#/components/schemas/DataTypesOneOf0Type'
      required:
        - type
      title: DataTypes0
    DataTypesOneOf1Type:
      type: string
      enum:
        - bool
      title: DataTypesOneOf1Type
    DataTypes1:
      type: object
      properties:
        type:
          $ref: '#/components/schemas/DataTypesOneOf1Type'
        val:
          type: boolean
          description: Set data value
      required:
        - type
        - val
      title: DataTypes1
    DataTypesOneOf2Type:
      type: string
      enum:
        - number
      title: DataTypesOneOf2Type
    DataTypes2:
      type: object
      properties:
        type:
          $ref: '#/components/schemas/DataTypesOneOf2Type'
        val:
          type: number
          format: double
          description: Set data value
      required:
        - type
        - val
      title: DataTypes2
    DataTypesOneOf3Type:
      type: string
      enum:
        - string
      title: DataTypesOneOf3Type
    DataTypes3:
      type: object
      properties:
        type:
          $ref: '#/components/schemas/DataTypesOneOf3Type'
        val:
          type: string
          description: Set data value
      required:
        - type
        - val
      title: DataTypes3
    DataTypesOneOf4Type:
      type: string
      enum:
        - integer
      title: DataTypesOneOf4Type
    DataTypes4:
      type: object
      properties:
        type:
          $ref: '#/components/schemas/DataTypesOneOf4Type'
        val:
          type: string
          description: Set data value
      required:
        - type
        - val
      title: DataTypes4
    DataTypesOneOf5Type:
      type: string
      enum:
        - datetime
      title: DataTypesOneOf5Type
    DataTypes5:
      type: object
      properties:
        type:
          $ref: '#/components/schemas/DataTypesOneOf5Type'
        val:
          type: string
          description: Set data value
      required:
        - type
        - val
      title: DataTypes5
    DataTypesOneOf6Type:
      type: string
      enum:
        - error
      title: DataTypesOneOf6Type
    DataTypes6:
      type: object
      properties:
        type:
          $ref: '#/components/schemas/DataTypesOneOf6Type'
        val:
          type: string
          description: Set data value
      required:
        - type
        - val
      title: DataTypes6
    DataTypesOneOf7Type:
      type: string
      enum:
        - record
      title: DataTypesOneOf7Type
    DataTypes7:
      type: object
      properties:
        type:
          $ref: '#/components/schemas/DataTypesOneOf7Type'
        val:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/DataTypes'
          description: Set data value
      required:
        - type
        - val
      title: DataTypes7
    DataTypesOneOf8Type:
      type: string
      enum:
        - variant
      title: DataTypesOneOf8Type
    DataTypes8:
      type: object
      properties:
        type:
          $ref: '#/components/schemas/DataTypesOneOf8Type'
        val:
          type: string
      required:
        - type
        - val
      title: DataTypes8
    DataTypesOneOf9Type:
      type: string
      enum:
        - array
      title: DataTypesOneOf9Type
    DataTypesOneOf9ValOneOf0Type:
      type: string
      enum:
        - boolArr
      title: DataTypesOneOf9ValOneOf0Type
    DataTypesOneOf9Val0:
      type: object
      properties:
        type:
          $ref: '#/components/schemas/DataTypesOneOf9ValOneOf0Type'
        data:
          type: array
          items:
            type:
              - boolean
              - 'null'
      required:
        - type
        - data
      title: DataTypesOneOf9Val0
    DataTypesOneOf9ValOneOf1Type:
      type: string
      enum:
        - numberArr
      title: DataTypesOneOf9ValOneOf1Type
    DataTypesOneOf9Val1:
      type: object
      properties:
        type:
          $ref: '#/components/schemas/DataTypesOneOf9ValOneOf1Type'
        data:
          type: array
          items:
            type:
              - number
              - 'null'
            format: double
      required:
        - type
        - data
      title: DataTypesOneOf9Val1
    DataTypesOneOf9ValOneOf2Type:
      type: string
      enum:
        - bigintArr
      title: DataTypesOneOf9ValOneOf2Type
    DataTypesOneOf9Val2:
      type: object
      properties:
        type:
          $ref: '#/components/schemas/DataTypesOneOf9ValOneOf2Type'
        data:
          type: array
          items:
            type:
              - string
              - 'null'
      required:
        - type
        - data
      title: DataTypesOneOf9Val2
    DataTypesOneOf9ValOneOf3Type:
      type: string
      enum:
        - stringArr
      title: DataTypesOneOf9ValOneOf3Type
    DataTypesOneOf9Val3:
      type: object
      properties:
        type:
          $ref: '#/components/schemas/DataTypesOneOf9ValOneOf3Type'
        data:
          type: array
          items:
            type:
              - string
              - 'null'
      required:
        - type
        - data
      title: DataTypesOneOf9Val3
    DataTypesOneOf9ValOneOf4Type:
      type: string
      enum:
        - datetimeArr
      title: DataTypesOneOf9ValOneOf4Type
    DataTypesOneOf9Val4:
      type: object
      properties:
        type:
          $ref: '#/components/schemas/DataTypesOneOf9ValOneOf4Type'
        data:
          type: array
          items:
            type:
              - number
              - 'null'
            format: double
      required:
        - type
        - data
      title: DataTypesOneOf9Val4
    DataTypesOneOf9ValOneOf5Type:
      type: string
      enum:
        - bytesArr
      title: DataTypesOneOf9ValOneOf5Type
    DataTypesOneOf9Val5:
      type: object
      properties:
        type:
          $ref: '#/components/schemas/DataTypesOneOf9ValOneOf5Type'
        data:
          type: array
          items:
            type:
              - string
              - 'null'
      required:
        - type
        - data
      title: DataTypesOneOf9Val5
    DataTypesOneOf9ValOneOf6Type:
      type: string
      enum:
        - variantArr
      title: DataTypesOneOf9ValOneOf6Type
    DataTypesOneOf9Val6:
      type: object
      properties:
        type:
          $ref: '#/components/schemas/DataTypesOneOf9ValOneOf6Type'
        data:
          type: array
          items:
            type:
              - string
              - 'null'
      required:
        - type
        - data
      title: DataTypesOneOf9Val6
    DataTypesOneOf9Val:
      oneOf:
        - $ref: '#/components/schemas/DataTypesOneOf9Val0'
        - $ref: '#/components/schemas/DataTypesOneOf9Val1'
        - $ref: '#/components/schemas/DataTypesOneOf9Val2'
        - $ref: '#/components/schemas/DataTypesOneOf9Val3'
        - $ref: '#/components/schemas/DataTypesOneOf9Val4'
        - $ref: '#/components/schemas/DataTypesOneOf9Val5'
        - $ref: '#/components/schemas/DataTypesOneOf9Val6'
      title: DataTypesOneOf9Val
    DataTypes9:
      type: object
      properties:
        type:
          $ref: '#/components/schemas/DataTypesOneOf9Type'
        val:
          $ref: '#/components/schemas/DataTypesOneOf9Val'
      required:
        - type
        - val
      title: DataTypes9
    DataTypes:
      oneOf:
        - $ref: '#/components/schemas/DataTypes0'
        - $ref: '#/components/schemas/DataTypes1'
        - $ref: '#/components/schemas/DataTypes2'
        - $ref: '#/components/schemas/DataTypes3'
        - $ref: '#/components/schemas/DataTypes4'
        - $ref: '#/components/schemas/DataTypes5'
        - $ref: '#/components/schemas/DataTypes6'
        - $ref: '#/components/schemas/DataTypes7'
        - $ref: '#/components/schemas/DataTypes8'
        - $ref: '#/components/schemas/DataTypes9'
      description: Set a constant value for condition
      title: DataTypes
    V2WorkbooksWorkbookIdSendPostRequestBodyContentApplicationJsonSchemaConditionsItems2:
      type: object
      properties:
        type:
          $ref: >-
            #/components/schemas/V2WorkbooksWorkbookIdSendPostRequestBodyContentApplicationJsonSchemaConditionsItemsOneOf2Type
        elementId:
          type: string
        columnId:
          type: string
        op:
          $ref: >-
            #/components/schemas/V2WorkbooksWorkbookIdSendPostRequestBodyContentApplicationJsonSchemaConditionsItemsOneOf2Op
          description: Operator
        mode:
          $ref: >-
            #/components/schemas/V2WorkbooksWorkbookIdSendPostRequestBodyContentApplicationJsonSchemaConditionsItemsOneOf2Mode
          description: Check condition
        value:
          oneOf:
            - $ref: '#/components/schemas/DataTypes'
            - type: 'null'
          description: Data value
      required:
        - type
        - elementId
        - columnId
        - op
        - mode
      title: >-
        V2WorkbooksWorkbookIdSendPostRequestBodyContentApplicationJsonSchemaConditionsItems2
    V2WorkbooksWorkbookIdSendPostRequestBodyContentApplicationJsonSchemaConditionsItems:
      oneOf:
        - $ref: >-
            #/components/schemas/V2WorkbooksWorkbookIdSendPostRequestBodyContentApplicationJsonSchemaConditionsItems0
        - $ref: >-
            #/components/schemas/V2WorkbooksWorkbookIdSendPostRequestBodyContentApplicationJsonSchemaConditionsItems1
        - $ref: >-
            #/components/schemas/V2WorkbooksWorkbookIdSendPostRequestBodyContentApplicationJsonSchemaConditionsItems2
      description: Send based on conditions
      title: >-
        V2WorkbooksWorkbookIdSendPostRequestBodyContentApplicationJsonSchemaConditionsItems
    V2WorkbooksWorkbookIdSendPostRequestBodyContentApplicationJsonSchemaTargetsItemsOneOf0Type:
      type: string
      enum:
        - member
      title: >-
        V2WorkbooksWorkbookIdSendPostRequestBodyContentApplicationJsonSchemaTargetsItemsOneOf0Type
    V2WorkbooksWorkbookIdSendPostRequestBodyContentApplicationJsonSchemaTargetsItems0:
      type: object
      properties:
        type:
          $ref: >-
            #/components/schemas/V2WorkbooksWorkbookIdSendPostRequestBodyContentApplicationJsonSchemaTargetsItemsOneOf0Type
        userId:
          type: string
      required:
        - type
        - userId
      title: >-
        V2WorkbooksWorkbookIdSendPostRequestBodyContentApplicationJsonSchemaTargetsItems0
    V2WorkbooksWorkbookIdSendPostRequestBodyContentApplicationJsonSchemaTargetsItemsOneOf1Type:
      type: string
      enum:
        - team
      title: >-
        V2WorkbooksWorkbookIdSendPostRequestBodyContentApplicationJsonSchemaTargetsItemsOneOf1Type
    V2WorkbooksWorkbookIdSendPostRequestBodyContentApplicationJsonSchemaTargetsItems1:
      type: object
      properties:
        type:
          $ref: >-
            #/components/schemas/V2WorkbooksWorkbookIdSendPostRequestBodyContentApplicationJsonSchemaTargetsItemsOneOf1Type
        teamId:
          type: string
      required:
        - type
        - teamId
      title: >-
        V2WorkbooksWorkbookIdSendPostRequestBodyContentApplicationJsonSchemaTargetsItems1
    V2WorkbooksWorkbookIdSendPostRequestBodyContentApplicationJsonSchemaTargetsItemsOneOf2Type:
      type: string
      enum:
        - email
      title: >-
        V2WorkbooksWorkbookIdSendPostRequestBodyContentApplicationJsonSchemaTargetsItemsOneOf2Type
    V2WorkbooksWorkbookIdSendPostRequestBodyContentApplicationJsonSchemaTargetsItems2:
      type: object
      properties:
        type:
          $ref: >-
            #/components/schemas/V2WorkbooksWorkbookIdSendPostRequestBodyContentApplicationJsonSchemaTargetsItemsOneOf2Type
        email:
          type: string
      required:
        - type
        - email
      title: >-
        V2WorkbooksWorkbookIdSendPostRequestBodyContentApplicationJsonSchemaTargetsItems2
    V2WorkbooksWorkbookIdSendPostRequestBodyContentApplicationJsonSchemaTargetsItemsOneOf3Type:
      type: string
      enum:
        - slackChannel
      title: >-
        V2WorkbooksWorkbookIdSendPostRequestBodyContentApplicationJsonSchemaTargetsItemsOneOf3Type
    V2WorkbooksWorkbookIdSendPostRequestBodyContentApplicationJsonSchemaTargetsItems3:
      type: object
      properties:
        type:
          $ref: >-
            #/components/schemas/V2WorkbooksWorkbookIdSendPostRequestBodyContentApplicationJsonSchemaTargetsItemsOneOf3Type
        slackConversationId:
          type: string
      required:
        - type
        - slackConversationId
      title: >-
        V2WorkbooksWorkbookIdSendPostRequestBodyContentApplicationJsonSchemaTargetsItems3
    V2WorkbooksWorkbookIdSendPostRequestBodyContentApplicationJsonSchemaTargetsItemsOneOf4Type:
      type: string
      enum:
        - gsheet
      title: >-
        V2WorkbooksWorkbookIdSendPostRequestBodyContentApplicationJsonSchemaTargetsItemsOneOf4Type
    V2WorkbooksWorkbookIdSendPostRequestBodyContentApplicationJsonSchemaTargetsItems4:
      type: object
      properties:
        type:
          $ref: >-
            #/components/schemas/V2WorkbooksWorkbookIdSendPostRequestBodyContentApplicationJsonSchemaTargetsItemsOneOf4Type
        googleSpreadsheetUrl:
          type: string
      required:
        - type
        - googleSpreadsheetUrl
      title: >-
        V2WorkbooksWorkbookIdSendPostRequestBodyContentApplicationJsonSchemaTargetsItems4
    V2WorkbooksWorkbookIdSendPostRequestBodyContentApplicationJsonSchemaTargetsItemsOneOf5Type:
      type: string
      enum:
        - gdrive
      title: >-
        V2WorkbooksWorkbookIdSendPostRequestBodyContentApplicationJsonSchemaTargetsItemsOneOf5Type
    V2WorkbooksWorkbookIdSendPostRequestBodyContentApplicationJsonSchemaTargetsItems5:
      type: object
      properties:
        type:
          $ref: >-
            #/components/schemas/V2WorkbooksWorkbookIdSendPostRequestBodyContentApplicationJsonSchemaTargetsItemsOneOf5Type
        googleDriveFolderUrl:
          type: string
      required:
        - type
        - googleDriveFolderUrl
      title: >-
        V2WorkbooksWorkbookIdSendPostRequestBodyContentApplicationJsonSchemaTargetsItems5
    V2WorkbooksWorkbookIdSendPostRequestBodyContentApplicationJsonSchemaTargetsItemsOneOf6Type:
      type: string
      enum:
        - cloud-export
      title: >-
        V2WorkbooksWorkbookIdSendPostRequestBodyContentApplicationJsonSchemaTargetsItemsOneOf6Type
    V2WorkbooksWorkbookIdSendPostRequestBodyContentApplicationJsonSchemaTargetsItemsOneOf6CloudExportOneOf0Bq:
      type: object
      properties:
        bqDestination:
          type: string
      required:
        - bqDestination
      title: >-
        V2WorkbooksWorkbookIdSendPostRequestBodyContentApplicationJsonSchemaTargetsItemsOneOf6CloudExportOneOf0Bq
    V2WorkbooksWorkbookIdSendPostRequestBodyContentApplicationJsonSchemaTargetsItemsOneOf6CloudExport0:
      type: object
      properties:
        bq:
          $ref: >-
            #/components/schemas/V2WorkbooksWorkbookIdSendPostRequestBodyContentApplicationJsonSchemaTargetsItemsOneOf6CloudExportOneOf0Bq
      required:
        - bq
      title: >-
        V2WorkbooksWorkbookIdSendPostRequestBodyContentApplicationJsonSchemaTargetsItemsOneOf6CloudExport0
    V2WorkbooksWorkbookIdSendPostRequestBodyContentApplicationJsonSchemaTargetsItemsOneOf6CloudExportOneOf1Sf:
      type: object
      properties:
        sfDestination:
          type: string
        authorization:
          type: string
      required:
        - sfDestination
        - authorization
      title: >-
        V2WorkbooksWorkbookIdSendPostRequestBodyContentApplicationJsonSchemaTargetsItemsOneOf6CloudExportOneOf1Sf
    V2WorkbooksWorkbookIdSendPostRequestBodyContentApplicationJsonSchemaTargetsItemsOneOf6CloudExport1:
      type: object
      properties:
        sf:
          $ref: >-
            #/components/schemas/V2WorkbooksWorkbookIdSendPostRequestBodyContentApplicationJsonSchemaTargetsItemsOneOf6CloudExportOneOf1Sf
      required:
        - sf
      title: >-
        V2WorkbooksWorkbookIdSendPostRequestBodyContentApplicationJsonSchemaTargetsItemsOneOf6CloudExport1
    V2WorkbooksWorkbookIdSendPostRequestBodyContentApplicationJsonSchemaTargetsItemsOneOf6CloudExportOneOf2Rs:
      type: object
      properties:
        rsDestination:
          type: string
        authorization:
          type: string
      required:
        - rsDestination
        - authorization
      title: >-
        V2WorkbooksWorkbookIdSendPostRequestBodyContentApplicationJsonSchemaTargetsItemsOneOf6CloudExportOneOf2Rs
    V2WorkbooksWorkbookIdSendPostRequestBodyContentApplicationJsonSchemaTargetsItemsOneOf6CloudExport2:
      type: object
      properties:
        rs:
          $ref: >-
            #/components/schemas/V2WorkbooksWorkbookIdSendPostRequestBodyContentApplicationJsonSchemaTargetsItemsOneOf6CloudExportOneOf2Rs
      required:
        - rs
      title: >-
        V2WorkbooksWorkbookIdSendPostRequestBodyContentApplicationJsonSchemaTargetsItemsOneOf6CloudExport2
    V2WorkbooksWorkbookIdSendPostRequestBodyContentApplicationJsonSchemaTargetsItemsOneOf6CloudExport:
      oneOf:
        - $ref: >-
            #/components/schemas/V2WorkbooksWorkbookIdSendPostRequestBodyContentApplicationJsonSchemaTargetsItemsOneOf6CloudExport0
        - $ref: >-
            #/components/schemas/V2WorkbooksWorkbookIdSendPostRequestBodyContentApplicationJsonSchemaTargetsItemsOneOf6CloudExport1
        - $ref: >-
            #/components/schemas/V2WorkbooksWorkbookIdSendPostRequestBodyContentApplicationJsonSchemaTargetsItemsOneOf6CloudExport2
      title: >-
        V2WorkbooksWorkbookIdSendPostRequestBodyContentApplicationJsonSchemaTargetsItemsOneOf6CloudExport
    V2WorkbooksWorkbookIdSendPostRequestBodyContentApplicationJsonSchemaTargetsItems6:
      type: object
      properties:
        type:
          $ref: >-
            #/components/schemas/V2WorkbooksWorkbookIdSendPostRequestBodyContentApplicationJsonSchemaTargetsItemsOneOf6Type
        cloudExport:
          $ref: >-
            #/components/schemas/V2WorkbooksWorkbookIdSendPostRequestBodyContentApplicationJsonSchemaTargetsItemsOneOf6CloudExport
      required:
        - type
        - cloudExport
      title: >-
        V2WorkbooksWorkbookIdSendPostRequestBodyContentApplicationJsonSchemaTargetsItems6
    V2WorkbooksWorkbookIdSendPostRequestBodyContentApplicationJsonSchemaTargetsItemsOneOf7Type:
      type: string
      enum:
        - webhook
      title: >-
        V2WorkbooksWorkbookIdSendPostRequestBodyContentApplicationJsonSchemaTargetsItemsOneOf7Type
    V2WorkbooksWorkbookIdSendPostRequestBodyContentApplicationJsonSchemaTargetsItems7:
      type: object
      properties:
        type:
          $ref: >-
            #/components/schemas/V2WorkbooksWorkbookIdSendPostRequestBodyContentApplicationJsonSchemaTargetsItemsOneOf7Type
        webhookUrl:
          type: string
      required:
        - type
        - webhookUrl
      title: >-
        V2WorkbooksWorkbookIdSendPostRequestBodyContentApplicationJsonSchemaTargetsItems7
    V2WorkbooksWorkbookIdSendPostRequestBodyContentApplicationJsonSchemaTargetsItemsOneOf8Type:
      type: string
      enum:
        - workbook-cloud-export
      title: >-
        V2WorkbooksWorkbookIdSendPostRequestBodyContentApplicationJsonSchemaTargetsItemsOneOf8Type
    V2WorkbooksWorkbookIdSendPostRequestBodyContentApplicationJsonSchemaTargetsItemsOneOf8WorkbookCloudExportConnectionType:
      type: string
      enum:
        - snowflake
        - redshift
      title: >-
        V2WorkbooksWorkbookIdSendPostRequestBodyContentApplicationJsonSchemaTargetsItemsOneOf8WorkbookCloudExportConnectionType
    V2WorkbooksWorkbookIdSendPostRequestBodyContentApplicationJsonSchemaTargetsItemsOneOf8WorkbookCloudExportExportFormat:
      type: string
      enum:
        - csv
        - csv.gzip
      title: >-
        V2WorkbooksWorkbookIdSendPostRequestBodyContentApplicationJsonSchemaTargetsItemsOneOf8WorkbookCloudExportExportFormat
    V2WorkbooksWorkbookIdSendPostRequestBodyContentApplicationJsonSchemaTargetsItemsOneOf8WorkbookCloudExport:
      type: object
      properties:
        connectionType:
          $ref: >-
            #/components/schemas/V2WorkbooksWorkbookIdSendPostRequestBodyContentApplicationJsonSchemaTargetsItemsOneOf8WorkbookCloudExportConnectionType
        authorization:
          type: string
        uri:
          type: string
        exportFormat:
          $ref: >-
            #/components/schemas/V2WorkbooksWorkbookIdSendPostRequestBodyContentApplicationJsonSchemaTargetsItemsOneOf8WorkbookCloudExportExportFormat
        timestampedUri:
          type:
            - string
            - 'null'
      required:
        - uri
        - exportFormat
        - timestampedUri
      title: >-
        V2WorkbooksWorkbookIdSendPostRequestBodyContentApplicationJsonSchemaTargetsItemsOneOf8WorkbookCloudExport
    V2WorkbooksWorkbookIdSendPostRequestBodyContentApplicationJsonSchemaTargetsItems8:
      type: object
      properties:
        type:
          $ref: >-
            #/components/schemas/V2WorkbooksWorkbookIdSendPostRequestBodyContentApplicationJsonSchemaTargetsItemsOneOf8Type
        workbookCloudExport:
          $ref: >-
            #/components/schemas/V2WorkbooksWorkbookIdSendPostRequestBodyContentApplicationJsonSchemaTargetsItemsOneOf8WorkbookCloudExport
      required:
        - type
        - workbookCloudExport
      title: >-
        V2WorkbooksWorkbookIdSendPostRequestBodyContentApplicationJsonSchemaTargetsItems8
    V2WorkbooksWorkbookIdSendPostRequestBodyContentApplicationJsonSchemaTargetsItems:
      oneOf:
        - $ref: >-
            #/components/schemas/V2WorkbooksWorkbookIdSendPostRequestBodyContentApplicationJsonSchemaTargetsItems0
        - $ref: >-
            #/components/schemas/V2WorkbooksWorkbookIdSendPostRequestBodyContentApplicationJsonSchemaTargetsItems1
        - $ref: >-
            #/components/schemas/V2WorkbooksWorkbookIdSendPostRequestBodyContentApplicationJsonSchemaTargetsItems2
        - $ref: >-
            #/components/schemas/V2WorkbooksWorkbookIdSendPostRequestBodyContentApplicationJsonSchemaTargetsItems3
        - $ref: >-
            #/components/schemas/V2WorkbooksWorkbookIdSendPostRequestBodyContentApplicationJsonSchemaTargetsItems4
        - $ref: >-
            #/components/schemas/V2WorkbooksWorkbookIdSendPostRequestBodyContentApplicationJsonSchemaTargetsItems5
        - $ref: >-
            #/components/schemas/V2WorkbooksWorkbookIdSendPostRequestBodyContentApplicationJsonSchemaTargetsItems6
        - $ref: >-
            #/components/schemas/V2WorkbooksWorkbookIdSendPostRequestBodyContentApplicationJsonSchemaTargetsItems7
        - $ref: >-
            #/components/schemas/V2WorkbooksWorkbookIdSendPostRequestBodyContentApplicationJsonSchemaTargetsItems8
      title: >-
        V2WorkbooksWorkbookIdSendPostRequestBodyContentApplicationJsonSchemaTargetsItems
    V2WorkbooksWorkbookIdSendPostRequestBodyContentApplicationJsonSchemaConfig:
      type: object
      properties:
        title:
          type: string
        messageBody:
          type: string
        includeLink:
          type: boolean
        runAsRecipient:
          type: boolean
        rowLimit:
          type: number
          format: double
      required:
        - title
        - messageBody
      title: >-
        V2WorkbooksWorkbookIdSendPostRequestBodyContentApplicationJsonSchemaConfig
    V2WorkbooksWorkbookIdSendPostRequestBodyContentApplicationJsonSchemaAttachmentsItemsFormatOptionsOneOf0Type:
      type: string
      enum:
        - CSV
      title: >-
        V2WorkbooksWorkbookIdSendPostRequestBodyContentApplicationJsonSchemaAttachmentsItemsFormatOptionsOneOf0Type
    V2WorkbooksWorkbookIdSendPostRequestBodyContentApplicationJsonSchemaAttachmentsItemsFormatOptions0:
      type: object
      properties:
        type:
          $ref: >-
            #/components/schemas/V2WorkbooksWorkbookIdSendPostRequestBodyContentApplicationJsonSchemaAttachmentsItemsFormatOptionsOneOf0Type
      required:
        - type
      title: >-
        V2WorkbooksWorkbookIdSendPostRequestBodyContentApplicationJsonSchemaAttachmentsItemsFormatOptions0
    V2WorkbooksWorkbookIdSendPostRequestBodyContentApplicationJsonSchemaAttachmentsItemsFormatOptionsOneOf1Type:
      type: string
      enum:
        - JSON
      title: >-
        V2WorkbooksWorkbookIdSendPostRequestBodyContentApplicationJsonSchemaAttachmentsItemsFormatOptionsOneOf1Type
    V2WorkbooksWorkbookIdSendPostRequestBodyContentApplicationJsonSchemaAttachmentsItemsFormatOptions1:
      type: object
      properties:
        type:
          $ref: >-
            #/components/schemas/V2WorkbooksWorkbookIdSendPostRequestBodyContentApplicationJsonSchemaAttachmentsItemsFormatOptionsOneOf1Type
      required:
        - type
      title: >-
        V2WorkbooksWorkbookIdSendPostRequestBodyContentApplicationJsonSchemaAttachmentsItemsFormatOptions1
    V2WorkbooksWorkbookIdSendPostRequestBodyContentApplicationJsonSchemaAttachmentsItemsFormatOptionsOneOf2Type:
      type: string
      enum:
        - JSONL
      title: >-
        V2WorkbooksWorkbookIdSendPostRequestBodyContentApplicationJsonSchemaAttachmentsItemsFormatOptionsOneOf2Type
    V2WorkbooksWorkbookIdSendPostRequestBodyContentApplicationJsonSchemaAttachmentsItemsFormatOptions2:
      type: object
      properties:
        type:
          $ref: >-
            #/components/schemas/V2WorkbooksWorkbookIdSendPostRequestBodyContentApplicationJsonSchemaAttachmentsItemsFormatOptionsOneOf2Type
      required:
        - type
      title: >-
        V2WorkbooksWorkbookIdSendPostRequestBodyContentApplicationJsonSchemaAttachmentsItemsFormatOptions2
    V2WorkbooksWorkbookIdSendPostRequestBodyContentApplicationJsonSchemaAttachmentsItemsFormatOptionsOneOf3Type:
      type: string
      enum:
        - EXCEL
      title: >-
        V2WorkbooksWorkbookIdSendPostRequestBodyContentApplicationJsonSchemaAttachmentsItemsFormatOptionsOneOf3Type
    V2WorkbooksWorkbookIdSendPostRequestBodyContentApplicationJsonSchemaAttachmentsItemsFormatOptions3:
      type: object
      properties:
        type:
          $ref: >-
            #/components/schemas/V2WorkbooksWorkbookIdSendPostRequestBodyContentApplicationJsonSchemaAttachmentsItemsFormatOptionsOneOf3Type
      required:
        - type
      title: >-
        V2WorkbooksWorkbookIdSendPostRequestBodyContentApplicationJsonSchemaAttachmentsItemsFormatOptions3
    V2WorkbooksWorkbookIdSendPostRequestBodyContentApplicationJsonSchemaAttachmentsItemsFormatOptionsOneOf4Type:
      type: string
      enum:
        - PDF
      title: >-
        V2WorkbooksWorkbookIdSendPostRequestBodyContentApplicationJsonSchemaAttachmentsItemsFormatOptionsOneOf4Type
    V2WorkbooksWorkbookIdSendPostRequestBodyContentApplicationJsonSchemaAttachmentsItemsFormatOptionsOneOf4Layout:
      type: string
      enum:
        - portrait
        - landscape
      title: >-
        V2WorkbooksWorkbookIdSendPostRequestBodyContentApplicationJsonSchemaAttachmentsItemsFormatOptionsOneOf4Layout
    V2WorkbooksWorkbookIdSendPostRequestBodyContentApplicationJsonSchemaAttachmentsItemsFormatOptions4:
      type: object
      properties:
        type:
          $ref: >-
            #/components/schemas/V2WorkbooksWorkbookIdSendPostRequestBodyContentApplicationJsonSchemaAttachmentsItemsFormatOptionsOneOf4Type
        layout:
          $ref: >-
            #/components/schemas/V2WorkbooksWorkbookIdSendPostRequestBodyContentApplicationJsonSchemaAttachmentsItemsFormatOptionsOneOf4Layout
        scaleFactor:
          type: number
          format: double
      required:
        - type
      title: >-
        V2WorkbooksWorkbookIdSendPostRequestBodyContentApplicationJsonSchemaAttachmentsItemsFormatOptions4
    V2WorkbooksWorkbookIdSendPostRequestBodyContentApplicationJsonSchemaAttachmentsItemsFormatOptionsOneOf5Type:
      type: string
      enum:
        - PNG
      title: >-
        V2WorkbooksWorkbookIdSendPostRequestBodyContentApplicationJsonSchemaAttachmentsItemsFormatOptionsOneOf5Type
    V2WorkbooksWorkbookIdSendPostRequestBodyContentApplicationJsonSchemaAttachmentsItemsFormatOptions5:
      type: object
      properties:
        type:
          $ref: >-
            #/components/schemas/V2WorkbooksWorkbookIdSendPostRequestBodyContentApplicationJsonSchemaAttachmentsItemsFormatOptionsOneOf5Type
        pixelWidth:
          type:
            - number
            - 'null'
          format: double
        pixelHeight:
          type:
            - number
            - 'null'
          format: double
      required:
        - type
      title: >-
        V2WorkbooksWorkbookIdSendPostRequestBodyContentApplicationJsonSchemaAttachmentsItemsFormatOptions5
    V2WorkbooksWorkbookIdSendPostRequestBodyContentApplicationJsonSchemaAttachmentsItemsFormatOptionsOneOf6Type:
      type: string
      enum:
        - NONE
      title: >-
        V2WorkbooksWorkbookIdSendPostRequestBodyContentApplicationJsonSchemaAttachmentsItemsFormatOptionsOneOf6Type
    V2WorkbooksWorkbookIdSendPostRequestBodyContentApplicationJsonSchemaAttachmentsItemsFormatOptions6:
      type: object
      properties:
        type:
          $ref: >-
            #/components/schemas/V2WorkbooksWorkbookIdSendPostRequestBodyContentApplicationJsonSchemaAttachmentsItemsFormatOptionsOneOf6Type
      required:
        - type
      title: >-
        V2WorkbooksWorkbookIdSendPostRequestBodyContentApplicationJsonSchemaAttachmentsItemsFormatOptions6
    V2WorkbooksWorkbookIdSendPostRequestBodyContentApplicationJsonSchemaAttachmentsItemsFormatOptions:
      oneOf:
        - $ref: >-
            #/components/schemas/V2WorkbooksWorkbookIdSendPostRequestBodyContentApplicationJsonSchemaAttachmentsItemsFormatOptions0
        - $ref: >-
            #/components/schemas/V2WorkbooksWorkbookIdSendPostRequestBodyContentApplicationJsonSchemaAttachmentsItemsFormatOptions1
        - $ref: >-
            #/components/schemas/V2WorkbooksWorkbookIdSendPostRequestBodyContentApplicationJsonSchemaAttachmentsItemsFormatOptions2
        - $ref: >-
            #/components/schemas/V2WorkbooksWorkbookIdSendPostRequestBodyContentApplicationJsonSchemaAttachmentsItemsFormatOptions3
        - $ref: >-
            #/components/schemas/V2WorkbooksWorkbookIdSendPostRequestBodyContentApplicationJsonSchemaAttachmentsItemsFormatOptions4
        - $ref: >-
            #/components/schemas/V2WorkbooksWorkbookIdSendPostRequestBodyContentApplicationJsonSchemaAttachmentsItemsFormatOptions5
        - $ref: >-
            #/components/schemas/V2WorkbooksWorkbookIdSendPostRequestBodyContentApplicationJsonSchemaAttachmentsItemsFormatOptions6
      title: >-
        V2WorkbooksWorkbookIdSendPostRequestBodyContentApplicationJsonSchemaAttachmentsItemsFormatOptions
    V2WorkbooksWorkbookIdSendPostRequestBodyContentApplicationJsonSchemaAttachmentsItemsSourceOneOf0Type:
      type: string
      enum:
        - element
      title: >-
        V2WorkbooksWorkbookIdSendPostRequestBodyContentApplicationJsonSchemaAttachmentsItemsSourceOneOf0Type
    V2WorkbooksWorkbookIdSendPostRequestBodyContentApplicationJsonSchemaAttachmentsItemsSource0:
      type: object
      properties:
        type:
          $ref: >-
            #/components/schemas/V2WorkbooksWorkbookIdSendPostRequestBodyContentApplicationJsonSchemaAttachmentsItemsSourceOneOf0Type
        elementId:
          type: string
      required:
        - type
        - elementId
      description: Export one element
      title: >-
        V2WorkbooksWorkbookIdSendPostRequestBodyContentApplicationJsonSchemaAttachmentsItemsSource0
    V2WorkbooksWorkbookIdSendPostRequestBodyContentApplicationJsonSchemaAttachmentsItemsSourceOneOf1Type:
      type: string
      enum:
        - page
      title: >-
        V2WorkbooksWorkbookIdSendPostRequestBodyContentApplicationJsonSchemaAttachmentsItemsSourceOneOf1Type
    V2WorkbooksWorkbookIdSendPostRequestBodyContentApplicationJsonSchemaAttachmentsItemsSource1:
      type: object
      properties:
        type:
          $ref: >-
            #/components/schemas/V2WorkbooksWorkbookIdSendPostRequestBodyContentApplicationJsonSchemaAttachmentsItemsSourceOneOf1Type
        pageId:
          type: string
      required:
        - type
        - pageId
      description: Export one page
      title: >-
        V2WorkbooksWorkbookIdSendPostRequestBodyContentApplicationJsonSchemaAttachmentsItemsSource1
    V2WorkbooksWorkbookIdSendPostRequestBodyContentApplicationJsonSchemaAttachmentsItemsSourceOneOf2Type:
      type: string
      enum:
        - element
      title: >-
        V2WorkbooksWorkbookIdSendPostRequestBodyContentApplicationJsonSchemaAttachmentsItemsSourceOneOf2Type
    V2WorkbooksWorkbookIdSendPostRequestBodyContentApplicationJsonSchemaAttachmentsItemsSource2:
      type: object
      properties:
        type:
          $ref: >-
            #/components/schemas/V2WorkbooksWorkbookIdSendPostRequestBodyContentApplicationJsonSchemaAttachmentsItemsSourceOneOf2Type
        nodeIds:
          type: array
          items:
            type: string
      required:
        - type
        - nodeIds
      description: Export multiple elements
      title: >-
        V2WorkbooksWorkbookIdSendPostRequestBodyContentApplicationJsonSchemaAttachmentsItemsSource2
    V2WorkbooksWorkbookIdSendPostRequestBodyContentApplicationJsonSchemaAttachmentsItemsSourceOneOf3Type:
      type: string
      enum:
        - page
      title: >-
        V2WorkbooksWorkbookIdSendPostRequestBodyContentApplicationJsonSchemaAttachmentsItemsSourceOneOf3Type
    V2WorkbooksWorkbookIdSendPostRequestBodyContentApplicationJsonSchemaAttachmentsItemsSource3:
      type: object
      properties:
        type:
          $ref: >-
            #/components/schemas/V2WorkbooksWorkbookIdSendPostRequestBodyContentApplicationJsonSchemaAttachmentsItemsSourceOneOf3Type
        nodeIds:
          type: array
          items:
            type: string
      required:
        - type
        - nodeIds
      description: Export multiple pages
      title: >-
        V2WorkbooksWorkbookIdSendPostRequestBodyContentApplicationJsonSchemaAttachmentsItemsSource3
    V2WorkbooksWorkbookIdSendPostRequestBodyContentApplicationJsonSchemaAttachmentsItemsSourceOneOf4Type:
      type: string
      enum:
        - all
      title: >-
        V2WorkbooksWorkbookIdSendPostRequestBodyContentApplicationJsonSchemaAttachmentsItemsSourceOneOf4Type
    V2WorkbooksWorkbookIdSendPostRequestBodyContentApplicationJsonSchemaAttachmentsItemsSource4:
      type: object
      properties:
        type:
          $ref: >-
            #/components/schemas/V2WorkbooksWorkbookIdSendPostRequestBodyContentApplicationJsonSchemaAttachmentsItemsSourceOneOf4Type
      required:
        - type
      description: Export all pages and elements in a workbook
      title: >-
        V2WorkbooksWorkbookIdSendPostRequestBodyContentApplicationJsonSchemaAttachmentsItemsSource4
    V2WorkbooksWorkbookIdSendPostRequestBodyContentApplicationJsonSchemaAttachmentsItemsSource:
      oneOf:
        - $ref: >-
            #/components/schemas/V2WorkbooksWorkbookIdSendPostRequestBodyContentApplicationJsonSchemaAttachmentsItemsSource0
        - $ref: >-
            #/components/schemas/V2WorkbooksWorkbookIdSendPostRequestBodyContentApplicationJsonSchemaAttachmentsItemsSource1
        - $ref: >-
            #/components/schemas/V2WorkbooksWorkbookIdSendPostRequestBodyContentApplicationJsonSchemaAttachmentsItemsSource2
        - $ref: >-
            #/components/schemas/V2WorkbooksWorkbookIdSendPostRequestBodyContentApplicationJsonSchemaAttachmentsItemsSource3
        - $ref: >-
            #/components/schemas/V2WorkbooksWorkbookIdSendPostRequestBodyContentApplicationJsonSchemaAttachmentsItemsSource4
      title: >-
        V2WorkbooksWorkbookIdSendPostRequestBodyContentApplicationJsonSchemaAttachmentsItemsSource
    V2WorkbooksWorkbookIdSendPostRequestBodyContentApplicationJsonSchemaAttachmentsItems:
      type: object
      properties:
        formatOptions:
          $ref: >-
            #/components/schemas/V2WorkbooksWorkbookIdSendPostRequestBodyContentApplicationJsonSchemaAttachmentsItemsFormatOptions
        source:
          $ref: >-
            #/components/schemas/V2WorkbooksWorkbookIdSendPostRequestBodyContentApplicationJsonSchemaAttachmentsItemsSource
      required:
        - formatOptions
        - source
      title: >-
        V2WorkbooksWorkbookIdSendPostRequestBodyContentApplicationJsonSchemaAttachmentsItems
    workbooks_sendWorkbook_Response_200:
      type: object
      properties: {}
      title: workbooks_sendWorkbook_Response_200
  securitySchemes:
    OAuth:
      type: http
      scheme: bearer
      description: OAuth 2.0 authentication

```

## Examples



**Request**

```json
{
  "targets": [
    {
      "email": "test@example.com",
      "type": "email"
    }
  ],
  "config": {
    "title": "My report",
    "messageBody": "My report body",
    "includeLink": true,
    "runAsRecipient": true
  },
  "attachments": [
    {
      "formatOptions": {
        "type": "PDF"
      },
      "source": {
        "type": "all"
      }
    }
  ]
}
```

**Response**

```json
{}
```

**SDK Code**

```python Example request
import requests

url = "https://api.sigmacomputing.com/v2/workbooks/workbookId/send"

payload = {
    "targets": [
        {
            "email": "test@example.com",
            "type": "email"
        }
    ],
    "config": {
        "title": "My report",
        "messageBody": "My report body",
        "includeLink": True,
        "runAsRecipient": True
    },
    "attachments": [
        {
            "formatOptions": { "type": "PDF" },
            "source": { "type": "all" }
        }
    ]
}
headers = {
    "Authorization": "<token>.",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript Example request
const url = 'https://api.sigmacomputing.com/v2/workbooks/workbookId/send';
const options = {
  method: 'POST',
  headers: {Authorization: '<token>.', 'Content-Type': 'application/json'},
  body: '{"targets":[{"email":"test@example.com","type":"email"}],"config":{"title":"My report","messageBody":"My report body","includeLink":true,"runAsRecipient":true},"attachments":[{"formatOptions":{"type":"PDF"},"source":{"type":"all"}}]}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Example request
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.sigmacomputing.com/v2/workbooks/workbookId/send"

	payload := strings.NewReader("{\n  \"targets\": [\n    {\n      \"email\": \"test@example.com\",\n      \"type\": \"email\"\n    }\n  ],\n  \"config\": {\n    \"title\": \"My report\",\n    \"messageBody\": \"My report body\",\n    \"includeLink\": true,\n    \"runAsRecipient\": true\n  },\n  \"attachments\": [\n    {\n      \"formatOptions\": {\n        \"type\": \"PDF\"\n      },\n      \"source\": {\n        \"type\": \"all\"\n      }\n    }\n  ]\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Authorization", "<token>.")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Example request
require 'uri'
require 'net/http'

url = URI("https://api.sigmacomputing.com/v2/workbooks/workbookId/send")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = '<token>.'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"targets\": [\n    {\n      \"email\": \"test@example.com\",\n      \"type\": \"email\"\n    }\n  ],\n  \"config\": {\n    \"title\": \"My report\",\n    \"messageBody\": \"My report body\",\n    \"includeLink\": true,\n    \"runAsRecipient\": true\n  },\n  \"attachments\": [\n    {\n      \"formatOptions\": {\n        \"type\": \"PDF\"\n      },\n      \"source\": {\n        \"type\": \"all\"\n      }\n    }\n  ]\n}"

response = http.request(request)
puts response.read_body
```

```java Example request
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.sigmacomputing.com/v2/workbooks/workbookId/send")
  .header("Authorization", "<token>.")
  .header("Content-Type", "application/json")
  .body("{\n  \"targets\": [\n    {\n      \"email\": \"test@example.com\",\n      \"type\": \"email\"\n    }\n  ],\n  \"config\": {\n    \"title\": \"My report\",\n    \"messageBody\": \"My report body\",\n    \"includeLink\": true,\n    \"runAsRecipient\": true\n  },\n  \"attachments\": [\n    {\n      \"formatOptions\": {\n        \"type\": \"PDF\"\n      },\n      \"source\": {\n        \"type\": \"all\"\n      }\n    }\n  ]\n}")
  .asString();
```

```php Example request
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.sigmacomputing.com/v2/workbooks/workbookId/send', [
  'body' => '{
  "targets": [
    {
      "email": "test@example.com",
      "type": "email"
    }
  ],
  "config": {
    "title": "My report",
    "messageBody": "My report body",
    "includeLink": true,
    "runAsRecipient": true
  },
  "attachments": [
    {
      "formatOptions": {
        "type": "PDF"
      },
      "source": {
        "type": "all"
      }
    }
  ]
}',
  'headers' => [
    'Authorization' => '<token>.',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp Example request
using RestSharp;

var client = new RestClient("https://api.sigmacomputing.com/v2/workbooks/workbookId/send");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "<token>.");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"targets\": [\n    {\n      \"email\": \"test@example.com\",\n      \"type\": \"email\"\n    }\n  ],\n  \"config\": {\n    \"title\": \"My report\",\n    \"messageBody\": \"My report body\",\n    \"includeLink\": true,\n    \"runAsRecipient\": true\n  },\n  \"attachments\": [\n    {\n      \"formatOptions\": {\n        \"type\": \"PDF\"\n      },\n      \"source\": {\n        \"type\": \"all\"\n      }\n    }\n  ]\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Example request
import Foundation

let headers = [
  "Authorization": "<token>.",
  "Content-Type": "application/json"
]
let parameters = [
  "targets": [
    [
      "email": "test@example.com",
      "type": "email"
    ]
  ],
  "config": [
    "title": "My report",
    "messageBody": "My report body",
    "includeLink": true,
    "runAsRecipient": true
  ],
  "attachments": [
    [
      "formatOptions": ["type": "PDF"],
      "source": ["type": "all"]
    ]
  ]
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.sigmacomputing.com/v2/workbooks/workbookId/send")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```