> ## Documentation Index
> Fetch the complete documentation index at: https://conductorone-eu-instance.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Save

> Save copies the program behind an already-rendered reporting surface into
 a report. The caller identifies the surface; the server resolves which
 program produced it. There is no create-from-prompt: the prompt has already
 been answered by the time a report is worth keeping.



## OpenAPI

````yaml https://spec.speakeasy.com/conductor-one/conductorone/my-source-with-code-samples post /api/v1/reporting/reports
openapi: 3.1.0
info:
  description: The C1 API is a HTTP API for managing C1 resources.
  title: C1 API
  version: 0.1.0-alpha
servers:
  - description: The C1 API server for the current tenant.
    url: https://{tenantDomain}.conductor.one
    variables:
      tenantDomain:
        default: example
        description: The domain of the tenant to use for this request.
security:
  - bearerAuth: []
    oauth: []
paths:
  /api/v1/reporting/reports:
    post:
      tags:
        - Report
      summary: Save
      description: >-
        Save copies the program behind an already-rendered reporting surface
        into
         a report. The caller identifies the surface; the server resolves which
         program produced it. There is no create-from-prompt: the prompt has already
         been answered by the time a report is worth keeping.
      operationId: c1.api.reporting.v1.ReportingService.Save
      requestBody:
        content:
          application/json:
            schema:
              $ref: >-
                #/components/schemas/c1.api.reporting.v1.ReportingServiceSaveRequest
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/c1.api.reporting.v1.ReportingServiceSaveResponse
          description: Successful response
components:
  schemas:
    c1.api.reporting.v1.ReportingServiceSaveRequest:
      description: The ReportingServiceSaveRequest message.
      properties:
        conversationId:
          description: |-
            The conversation and surface are both required to address a rendered
             surface; neither identifies one alone.
          type: string
        displayName:
          description: Required for a new report and rejected when report_id is set.
          type: string
        expectedProgramId:
          description: >-
            Required with report_id. A stale source version is rejected rather
            than
             silently overwriting a newer edit.
          type: string
        prompt:
          description: >-
            The question this surface answered. Used only when creating a
            report;
             applying an edit preserves the report's canonical question and records the
             incremental instruction on the immutable run.
          type: string
        reportId:
          description: >-
            Empty creates a report. Set to apply the validated edit surface to
            an
             existing report without changing its identity or history.
          type: string
        surfaceId:
          description: The surfaceId field.
          type: string
      title: Reporting Service Save Request
      type: object
      x-speakeasy-name-override: ReportingServiceSaveRequest
    c1.api.reporting.v1.ReportingServiceSaveResponse:
      description: The ReportingServiceSaveResponse message.
      properties:
        report:
          oneOf:
            - $ref: '#/components/schemas/c1.api.reporting.v1.Report'
            - type: 'null'
      title: Reporting Service Save Response
      type: object
      x-speakeasy-name-override: ReportingServiceSaveResponse
    c1.api.reporting.v1.Report:
      description: >-
        Report is a saved report: the question, the program that answers it, and
        the
         parameters a re-run may vary.
      properties:
        createdAt:
          format: date-time
          type:
            - string
            - 'null'
        createdByUserId:
          description: The createdByUserId field.
          type: string
        deletedAt:
          format: date-time
          type:
            - string
            - 'null'
        displayName:
          description: The displayName field.
          type: string
        id:
          description: The id field.
          type: string
        latestRunId:
          description: >-
            Separate pointers: the last attempt may have failed while callers
            still need
             the last renderable result.
          type: string
        latestSuccessfulRunId:
          description: The latestSuccessfulRunId field.
          type: string
        parameterSchema:
          additionalProperties: true
          type:
            - object
            - 'null'
        parameterValues:
          additionalProperties: true
          type:
            - object
            - 'null'
        program:
          oneOf:
            - $ref: '#/components/schemas/c1.api.reporting.v1.ProgramRef'
            - type: 'null'
        prompt:
          description: The editable natural-language question. Only a re-plan reads this.
          type: string
        tenantId:
          description: The tenantId field.
          type: string
        updatedAt:
          format: date-time
          type:
            - string
            - 'null'
      title: Report
      type: object
      x-speakeasy-name-override: Report
    c1.api.reporting.v1.ProgramRef:
      description: ProgramRef identifies a report's own copy of an executable program.
      properties:
        commitId:
          deprecated: true
          description: The commitId field.
          type: string
        functionId:
          deprecated: true
          description: >-
            Deprecated tombstones. Source-owned reports never populate Function
            or
             commit identity; these declarations remain only because c1api forbids
             deleting published fields.
          type: string
        plannedFromPrompt:
          description: >-
            The prompt this program was planned from. Report.prompt is editable
            and a
             refresh never re-plans, so this is the only way to detect that a report's
             question has drifted from the program answering it.
          type: string
        programId:
          description: Identifies this durable source version. Minted for each save.
          type: string
      title: Program Ref
      type: object
      x-speakeasy-name-override: ProgramRef
  securitySchemes:
    bearerAuth:
      scheme: bearer
      type: http
    oauth:
      description: >-
        This API uses OAuth2 with the Client Credential flow.

        Client Credentials must be sent in the BODY, not the headers.

        For an example of how to implement this, refer to the
        [c1TokenSource.Token()](https://github.com/ConductorOne/conductorone-sdk-go/blob/3375fe7c0126d17e7ec4e711693dee7b791023aa/token_source.go#L101-L187)
        function.
      flows:
        clientCredentials:
          scopes: {}
          tokenUrl: /auth/v1/token
      type: oauth2

````