> ## Documentation Index
> Fetch the complete documentation index at: https://woku.app/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Capture a woku review or NPS response (mobile SDK)

> Ingestion endpoint for the Woku mobile SDK. Routes by `kind`: `woku` creates a woku review, `nps` an NPS response. The company is resolved from the API key and the response channel is sealed server-side to `mobile-sdk`. Send `application/json` for text/rating captures, or `multipart/form-data` (a `file` part plus a `payload` field with the CaptureSubmission JSON) for audio captures, which are stored as voicemail reviews. Idempotent by the submission's client id (`X-Woku-Idempotency-Key` header or `payload.id`): retrying a processed submission returns the same result instead of duplicating it.



## OpenAPI

````yaml /openapi-v1.json post /v1/captures
openapi: 3.0.3
info:
  title: Woku Client API v1
  description: >-
    Public Woku Client API. Switch the version selector at the top to view the
    v0 reference.


    This spec covers:

    - **Wokus** — create wokus, fetch review data, submit text/voice reviews,
    share by email.

    - **Companies** — `GET /companies/me` returns the caller company.

    - **Reports** — company-wide and per-tool NPS reports.

    - **External Trackers** — tag your Wokus with identifiers from third-party
    systems (CRM transaction id, ERP order id, etc.) and look them up later.


    ## Authentication


    All endpoints require a Bearer token in the `Authorization` header. Obtain
    your company API key from the Woku dashboard.


    ```

    Authorization: Bearer your_api_key_here

    ```


    ## Base URL


    Production: `https://clientapi.woku.app`


    ## Model (External Trackers)


    - **Tracker definition** (`ExternalTracker`): a per-company catalog entry
    like `{ name: 'trr', system: 'crm interno', description: '...' }`. Defined
    by an admin in the Woku dashboard.

    - **Tracker value** (`WokuExternalTrackerValue`): a string value bound to a
    (Woku, Tracker) pair. Multiple Wokus may share the same value.
  version: 1.0.0
  contact:
    name: Woku Support
    url: https://woku.app
    email: team@woku.app
servers:
  - url: https://clientapi.woku.app
    description: Production server
security: []
tags:
  - name: Wokus
    description: >-
      Create wokus, fetch review data, submit text and voice reviews, share
      review links by email.
  - name: Companies
    description: Caller-company endpoint.
  - name: Reports
    description: NPS reports for the caller company and individual NPS tools.
  - name: NPS
    description: >-
      Capture NPS scores (company-level or per NPS tool) and fetch NPS tool
      definitions.
  - name: CSAT
    description: >-
      Capture CSAT (1-5 satisfaction) scores company-level or per CSAT tool,
      fetch tool definitions and responses, and submit text and voice feedback.
  - name: CES
    description: >-
      Capture CES (effort) scores company-level or per CES tool, fetch tool
      definitions and responses, and submit text and voice feedback.
  - name: External Trackers
    description: >-
      Tag Wokus with identifiers from external systems and look them up by name
      + value.
  - name: Quarantines
    description: >-
      Check whether a respondent is currently quarantined before prompting for
      feedback.
  - name: Invitations
    description: >-
      Survey distribution: send NPS surveys, forms and woku review invitations
      by email or WhatsApp.
  - name: Forms
    description: Fetch form definitions and submit responses from your own UI.
  - name: Flows
    description: Render flow journeys (ordered wokus with an optional NPS) in your own app.
  - name: Captures
    description: Mobile SDK capture ingestion
paths:
  /v1/captures:
    post:
      tags:
        - Captures
      summary: Capture a woku review or NPS response (mobile SDK)
      description: >-
        Ingestion endpoint for the Woku mobile SDK. Routes by `kind`: `woku`
        creates a woku review, `nps` an NPS response. The company is resolved
        from the API key and the response channel is sealed server-side to
        `mobile-sdk`. Send `application/json` for text/rating captures, or
        `multipart/form-data` (a `file` part plus a `payload` field with the
        CaptureSubmission JSON) for audio captures, which are stored as
        voicemail reviews. Idempotent by the submission's client id
        (`X-Woku-Idempotency-Key` header or `payload.id`): retrying a processed
        submission returns the same result instead of duplicating it.
      operationId: v1CreateCapture
      parameters:
        - name: X-Woku-Idempotency-Key
          in: header
          required: false
          schema:
            type: string
          description: >-
            Client-generated submission id for idempotent retries (falls back to
            payload.id).
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/V1CaptureRequest'
          multipart/form-data:
            schema:
              type: object
              required:
                - file
                - payload
              properties:
                file:
                  type: string
                  format: binary
                  description: Audio file (m4a/aac/mp4). Transcribed server-side.
                payload:
                  type: string
                  description: >-
                    The CaptureSubmission as a JSON string (same shape as the
                    JSON body).
      responses:
        '201':
          description: Capture accepted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/V1CaptureResponse'
        '400':
          description: Validation error, or audio capture not yet supported
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationError'
        '403':
          description: Invalid or missing API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenError'
      security:
        - BearerAuth: []
        - PublishableKey: []
components:
  schemas:
    V1CaptureRequest:
      type: object
      description: >-
        Normalized capture from the Woku mobile SDK. The response channel is
        sealed server-side to 'mobile-sdk' (it is not read from the body).
      required:
        - kind
      properties:
        id:
          type: string
          description: Client-generated idempotency id
        kind:
          type: string
          enum:
            - woku
            - nps
        targetId:
          type: string
          description: >-
            wokuId for a woku capture; optional npsToolId for an NPS capture
            (company-level when omitted)
        rating:
          type: integer
          minimum: 1
          maximum: 5
          description: Woku star rating (kind=woku)
        score:
          type: integer
          minimum: 0
          maximum: 10
          description: NPS score (kind=nps)
        comment:
          type: string
          maxLength: 3000
        respondent:
          type: object
          properties:
            email:
              type: string
            phone:
              type: string
            externalId:
              type: string
    V1CaptureResponse:
      type: object
      properties:
        id:
          type: string
          description: Echo of the client idempotency id
        kind:
          type: string
          enum:
            - woku
            - nps
        remoteId:
          type: string
          description: Server id of the created review or NPS
        status:
          type: string
          enum:
            - accepted
    ValidationError:
      type: object
      properties:
        statusCode:
          type: integer
          example: 400
        message:
          oneOf:
            - type: string
            - type: array
              items:
                type: string
        error:
          type: string
          example: Bad Request
    ForbiddenError:
      type: object
      properties:
        statusCode:
          type: integer
          example: 403
        message:
          type: string
          example: Authentication required
        error:
          type: string
          example: Forbidden
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: >-
        Company API key. Obtain this from your Woku dashboard under Settings >
        API Keys. The same key used for the v0 endpoints.
    PublishableKey:
      type: apiKey
      in: header
      name: x-woku-key
      description: >-
        Publishable capture key (pk_…), safe to embed in the public web widget.
        Accepted only on capture endpoints; scoped to capture (cannot create
        wokus, share, or read reports).

````