> ## 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.

# Send a registered e-mail



## OpenAPI

````yaml /openapi/escrybe.en.yaml post /api/email/v1/post
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/email/v1/post:
    post:
      tags:
        - Registered E-mail
      summary: Send a registered e-mail
      operationId: sendEmail
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/SendEmailRequest'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/SendEmailRequest'
          application/json:
            schema:
              $ref: '#/components/schemas/SendEmailRequest'
      responses:
        '200':
          description: E-mail accepted
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/EmailEnvelope'
                  - properties:
                      data:
                        type: object
                        properties:
                          job_id:
                            type: string
                          proccess_payment_result:
                            type: object
        '400':
          $ref: '#/components/responses/EmailBadRequest'
        '401':
          $ref: '#/components/responses/EmailUnauthorized'
        '503':
          $ref: '#/components/responses/EmailMaintenance'
      security: []
components:
  schemas:
    SendEmailRequest:
      type: object
      required:
        - userSecurityToken
        - name
        - email
        - subject
      properties:
        userSecurityToken:
          type: string
          description: Your account security token.
        name:
          type: string
          description: Recipient name.
        email:
          type: string
          format: email
        subject:
          type: string
        msg:
          type: string
          description: HTML body. Required if no attachment.
        attachment:
          type: string
          format: binary
          description: >-
            Max 20 MB. Common document/image types allowed (PDF, Office, images,
            text, ZIP). Password-protected PDFs are rejected. Requires
            multipart/form-data.
        name_sender:
          type: string
          description: Falls back to your profile.
        reply_to:
          type: string
          format: email
          description: >-
            Falls back to your profile's default reply-to address, then to your
            account e-mail. Invalid addresses are rejected with 400.
        tag:
          type: string
        test:
          type: integer
          enum:
            - 0
            - 1
        paymentMethod:
          type: string
          enum:
            - escrybe_credits
            - invoice
            - team
          default: escrybe_credits
          description: '`invoice` requires a plan that allows invoicing.'
        team_member_id:
          type: integer
          description: Required when paymentMethod=team.
    EmailEnvelope:
      type: object
      description: Same standard envelope as the letters endpoints.
      properties:
        status:
          type: integer
          example: 200
        status_message:
          type: string
        data:
          oneOf:
            - type: object
            - type: string
            - type: 'null'
  responses:
    EmailBadRequest:
      description: Invalid or incomplete request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/EmailEnvelope'
          example:
            status: 400
            status_message: Requisição incompleta
            data: null
    EmailUnauthorized:
      description: Invalid token
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/EmailEnvelope'
          example:
            status: 401
            status_message: Token inválido
            data: null
    EmailMaintenance:
      description: Server under maintenance
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/EmailEnvelope'
  securitySchemes:
    securityTokenQuery:
      type: apiKey
      in: query
      name: userSecurityToken
      description: >-
        Your account security token, sent as the `userSecurityToken` query or
        form parameter.

````