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

# Receive Transcription

> Xosum.am will send a POST request to this URL once a transcription is complete. This endpoint **does not require** any Authorization header. Use the `secret` field to verify the source.
Note: This is a callback URL provided by the user and is not part of the public Xosum.am API.


<Info>
  **You host this endpoint.** This page documents the request that **Xosum sends to you** — to a URL you provide and operate on your own infrastructure. The path `/your-webhook-url` is a placeholder for whatever publicly-reachable URL you configure in your account at [app.xosum.am](https://app.xosum.am). Xosum does not host this URL.
</Info>

When a transcription job finishes, Xosum sends a `POST` request to your configured webhook URL with the payload below. Your endpoint should:

1. **Verify the `secret` field** matches the `webhookSecret` configured in your Xosum account, and reject the request otherwise.
2. **Return `200 OK` quickly.** Acknowledge first, process asynchronously — Xosum does not retry indefinitely, so don't tie up the connection while you do downstream work.
3. **Be prepared for two content shapes in `transcription`.** The JSON envelope is identical regardless of recording type, but the text inside `transcription` differs:
   * For `type: single_voice`, the text is **plain** (no speaker labels).
   * For `type: phone_call`, the text is **diarized** with inline `Խոսնակ 1:` / `Խոսնակ 2:` speaker labels.

If you can't host a publicly reachable endpoint, use the polling option at [`GET /api/getTranscription`](/api-reference/endpoint/get-transcription) instead.


## OpenAPI

````yaml POST /your-webhook-url
openapi: 3.0.3
info:
  title: Xosum.am API
  description: >
    The Xosum.am API enables business customers to upload audio for
    transcription and receive results via webhook. All transcription results are
    also accessible via the web interface at
    [https://app.xosum.am](https://app.xosum.am).

    API access is exclusive to Business plan users. Authentication is handled
    via Bearer API keys.
  version: 1.0.0
servers:
  - url: https://app.xosum.am
    description: Production API server
security:
  - BearerAuth: []
paths:
  /your-webhook-url:
    post:
      summary: Webhook callback for transcription results
      description: >
        Xosum.am will send a POST request to this URL once a transcription is
        complete. This endpoint **does not require** any Authorization header.
        Use the `secret` field to verify the source.

        Note: This is a callback URL provided by the user and is not part of the
        public Xosum.am API.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WebhookTranscriptionPayload'
      responses:
        '200':
          description: Webhook received and acknowledged.
        '400':
          description: Bad request or invalid webhook secret.
components:
  schemas:
    WebhookTranscriptionPayload:
      type: object
      properties:
        event_type:
          type: string
          enum:
            - transcript_ready
          description: Event type for transcription completion.
        secret:
          type: string
          description: Webhook secret to validate authenticity.
        docId:
          type: string
          description: Transcription job ID.
        transcription:
          type: string
          description: >
            The transcript text. The JSON shape of this payload is identical
            regardless of recording type, but the content of this field differs:
            for `type: phone_call`, the text is diarized with inline `Խոսնակ 1:`
            / `Խոսնակ 2:` speaker labels; for `type: single_voice`, the text is
            plain with no labels.
        metadata:
          type: object
          description: Metadata passed during creation.
          example:
            phonenumber: '+37400000000'
            agent: King Ruzi
        title:
          type: string
          description: Short title automatically generated from the transcript.
        resolution:
          type: string
          description: A concise summary or resolution for the call.
        link:
          type: string
          format: uri
          description: Direct URL to the recording details inside Xosum.am.
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key

````