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

# Download certified-timestamp attestation bundle

> Returns a ZIP with the certified-timestamp attestation files (payload, SHA-256, RFC 3161 `.tsr` token and manifest) for each phase of a message. Provide either `message_id` or the public `code` (visual id).




## OpenAPI

````yaml /openapi/escrybe.en.yaml get /api/whatsapp/v1/download_attestation_bundle
openapi: 3.1.0
info:
  title: Escrybe API
  version: 1.0.0
  description: >
    REST API for the Escrybe platform — send physical letters, registered
    letters, telegrams and e-Carta through Brazilian Correios, dispatch legally
    registered e-mails, and send WhatsApp messages with certified timestamps.


    ## Authentication

    Every account has a personal **`securityToken`** (find it in the panel under
    *Account → API*). Three products use it differently:


    | Product | Scheme | How | |---------|--------|-----| | Letters / Telegram /
    e-Carta, Registered E-mail, Receipts | API token | Send `userSecurityToken`
    as a query/body parameter, or `securityToken` as a header | | WhatsApp |
    HTTP Basic | `Authorization: Basic base64(email:securityToken)` |


    > The letter and e-mail **read** routes (`get`, `balance`, `download`, >
    `delete`) take the token as the first URL **path** segment — e.g. >
    `/api/v2/get/{securityToken}/{job_id}`.


    ## Response envelopes

    Most endpoints reply with the standard envelope `{"status": <http code>,
    "status_message": "...", "data": ...}` — this covers Letters/Telegram,
    Registered E-mail, and the WhatsApp message and sender endpoints. The
    WhatsApp **template** endpoints (and template sync) use `{"code": <http
    code>, "status": "success|error", "message": "...", "data": ...,
    "request_id": "..."}`; the logo endpoint uses the same shape without
    `request_id`. See the schema of each endpoint.


    A request that is accepted returns an HTTP `200` with a success payload;
    validation problems return `400`, bad credentials `401`, and forbidden
    access `403`. Unsupported HTTP methods return `405`, repeated failed
    authentication attempts return `429`, and the letter and e-mail endpoints
    return `503` during maintenance windows.
  contact:
    name: Escrybe Support
    url: https://escrybe.com.br
servers:
  - url: https://app.escrybe.com.br
    description: Production
  - url: https://homolog.escrybe.com.br
    description: Staging
security:
  - securityTokenQuery: []
tags:
  - name: Letters & Telegram
    description: Create and manage letter, telegram and e-Carta orders (Correios).
  - name: Account & Favorites
    description: Account balance, saved contacts and sender logo.
  - name: Registered E-mail
    description: Send and track legally registered e-mails.
  - name: WhatsApp Messages
    description: Send WhatsApp messages and download certified-timestamp attestations.
  - name: WhatsApp Senders
    description: Manage WhatsApp Business numbers (senders).
  - name: WhatsApp Templates
    description: Create, sync and manage WhatsApp message templates.
  - name: Receipts
    description: Download legal receipts for any order.
paths:
  /api/whatsapp/v1/download_attestation_bundle:
    get:
      tags:
        - WhatsApp Messages
      summary: Download certified-timestamp attestation bundle
      description: >
        Returns a ZIP with the certified-timestamp attestation files (payload,
        SHA-256, RFC 3161 `.tsr` token and manifest) for each phase of a
        message. Provide either `message_id` or the public `code` (visual id).
      operationId: downloadAttestationBundle
      parameters:
        - name: message_id
          in: query
          schema:
            type: integer
        - name: code
          in: query
          schema:
            type: string
      responses:
        '200':
          description: ZIP file
          content:
            application/zip:
              schema:
                type: string
                format: binary
        '400':
          description: Missing message_id/code (plain-text error, not JSON)
          content:
            text/plain:
              schema:
                type: string
        '401':
          description: Unauthorized (plain-text error, not JSON)
          content:
            text/plain:
              schema:
                type: string
        '403':
          description: Message does not belong to you (plain-text error, not JSON)
          content:
            text/plain:
              schema:
                type: string
        '404':
          description: Message or timestamps not found (plain-text error, not JSON)
          content:
            text/plain:
              schema:
                type: string
        '500':
          description: Bundle generation failure (plain-text error, not JSON)
          content:
            text/plain:
              schema:
                type: string
      security:
        - basicAuth: []
components:
  securitySchemes:
    securityTokenQuery:
      type: apiKey
      in: query
      name: userSecurityToken
      description: >-
        Your account security token, sent as the `userSecurityToken` query or
        form parameter.
    basicAuth:
      type: http
      scheme: basic
      description: >-
        HTTP Basic where username is your account e-mail and password is your
        security token.

````