openapi: 3.0.0
info:
  title: "Pushfy API Documentation"
  description: |
    Complete API for sending SMS and voice messages via HTTP, providing reliable and scalable resources for client communication.
  version: 3.2.0
  x-logo:
    url: 'https://portal.pushfy.com/pushfy.png'
    backgroundColor: '#FFFFFF'
    altText: 'Pushfy'
  license:
    name: "MIT"
    url: "https://opensource.org/licenses/MIT"

servers:
  - url: https://portal.pushfy.com
    description: "HTTP API Server"

paths:
  # ============================================================
  # POST Endpoints
  # ============================================================
  /webapi:
    post:
      summary: "Send SMS or Voice Call"
      tags:
        - SMS
        - Voice
      description: |
        Sends messages to one or more recipients. Supports personalized content and multiple recipients.

        - **SMS:** provide `text`.
        - **Voice call:** first create the audio with `POST /audio`, then send here with `audio` set to
          the audio **name** (the `nome` used on upload). When `audio` is present, the message is dispatched
          as a voice call (the recorded audio is played to the recipient); `text` is optional in that case.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                messages:
                  type: array
                  items:
                    type: object
                    properties:
                      destinations:
                        type: array
                        items:
                          type: object
                          properties:
                            to:
                              type: string
                              description: "Recipient's number in international format."
                              example: '5511999999999'
                      from:
                        type: string
                        description: "Message origin (name or number)."
                        example: 'pushSMS'
                      text:
                        type: string
                        description: "Message content (SMS). Optional when sending a voice call."
                        example: 'This is a sample message.'
                      audio:
                        type: string
                        description: "Audio NAME (created via POST /audio) to send a VOICE CALL instead of SMS. Omit for SMS."
                        example: 'my-audio'
                      ext_id:
                        type: string
                        description: "External ID for message tracking."
                        example: 'YourID12345'
      responses:
        '200':
          description: "Messages successfully accepted and queued for delivery."
          content:
            application/json:
              schema:
                type: object
                properties:
                  accepted:
                    type: integer
                    description: "Number of messages accepted by the API."
                    example: 2
                  queued:
                    type: integer
                    description: "Number of messages successfully queued for delivery."
                    example: 2
        '400':
          description: "Failed to send the message due to incorrect parameters."
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: "Error details."
                    example: "Invalid recipient number."

  /audio:
    post:
      summary: "Create Audio"
      tags:
        - Voice
      description: |
        Creates a new audio file for use in voice messages.
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                nome:
                  type: string
                  description: "Audio name."
                audio:
                  type: string
                  format: binary
                  description: "Audio file for upload."
      responses:
        '200':
          description: "Audio successfully created."
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    description: "Creation status."
                    example: "success"
                  audio_id:
                    type: string
                    description: "ID of the created audio."
                    example: 'audio123'
        '400':
          description: "Failed to create the audio."
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: "Error details."
                    example: "Invalid file format."

  /contact:
    post:
      summary: "Add Contact to Campaign"
      tags:
        - SMS
      description: |
        Adds a contact to an existing campaign for targeted communication.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                messages:
                  type: array
                  items:
                    type: object
                    properties:
                      destinations:
                        type: array
                        items:
                          type: object
                          properties:
                            to:
                              type: string
                              description: "Recipient's number in international format."
                              example: '119434305592'
                      from:
                        type: string
                        description: "Message origin (name or number)."
                        example: 'pushCampaign'
                      campaignID:
                        type: string
                        description: "Campaign ID."
                        example: 'campaign123'
                      text:
                        type: string
                        description: "Message content."
                        example: 'Welcome to our campaign.'
                      ext_id:
                        type: string
                        description: "External ID for tracking."
                        example: 'YourID12345'
      responses:
        '200':
          description: "Contact successfully added to the campaign."
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    description: "Process status."
                    example: "success"
                  campaign_id:
                    type: string
                    description: "Campaign ID."
                    example: 'campaign123'
        '400':
          description: "Failed to add contact to the campaign."
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: "Error details."
                    example: "Campaign ID not found."

  # ============================================================
  # GET Endpoints
  # ============================================================
  /getstatus:
    get:
      summary: "Check SMS Status"
      tags:
        - Reports
      description: |
        Returns the current status of a previously sent message.
      parameters:
        - in: query
          name: ext_id
          schema:
            type: string
          required: true
          description: "External message ID."
      responses:
        '200':
          description: "Status successfully retrieved."
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    description: "Message status."
                    example: "delivered"
        '400':
          description: "Failed to retrieve the status."
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: "Error details."
                    example: "Message ID not found."

  /getdate:
    get:
      summary: Get message status by date
      tags:
        - Reports
      description: |
        Returns the status of SMS and Voice messages sent on a specific date.
        The date must be provided in YYYY-MM-DD format.
      security:
        - bearerAuth: []
        - basicAuth: []
      parameters:
        - name: date
          in: query
          required: true
          schema:
            type: string
            format: date
            example: 2025-01-01
          description: Date of the query in YYYY-MM-DD format
      responses:
        "200":
          description: Successfully retrieved message list
          content:
            application/json:
              schema:
                type: array
                maxItems: 1000
                items:
                  type: object
                  properties:
                    phone:
                      type: string
                      example: "5511999999999"
                    status:
                      type: string
                      example: "Delivered"
                      description: |
                        Possible values:
                        Sent, Delivered, Expired, Undelivered,
                        Releasing, Invalid, Blocked, Duplicate,
                        Rejected, Characters Exceeded, Waiting
                    date:
                      type: string
                      example: "2025-01-01 14:33:21"
                    date_dlr:
                      type: string
                      example: "2025-01-01 14:33:31"
                    ext_id:
                      type: string
                      example: "ABC123456"
                    brand:
                      type: string
                      example: "Yourname"
        "400":
          description: Missing or invalid parameter
          content:
            text/plain:
              schema:
                type: string
              examples:
                missingDate:
                  value: date parameter is missing
                invalidFormat:
                  value: invalid date format (YYYY-MM-DD required)
                invalidValue:
                  value: invalid date value
        "401":
          description: Unauthorized
          content:
            text/plain:
              schema:
                type: string
              example: Unauthorized
        "404":
          description: Messages not found
          content:
            text/plain:
              schema:
                type: string
              example: Messages not found
        "503":
          description: Maximum connection limit reached
          content:
            text/plain:
              schema:
                type: string
              example: The maximum number of connections has been reached. Please try again later.
  /rcscampaign:
    post:
      tags:
        - RCS
      summary: Sends leads to RCS Campaign and logs execution
      description: >
        Endpoint used to insert leads into a campaign previously created and configured
        within the Pushfy platform. It receives a list of RCS messages, validates authentication
        via Bearer token or Basic Auth, validates the campaign cid, and stores the messages
        with full request logging.

      security:
        - bearerAuth: []

      parameters:
        - name: cid
          in: query
          required: true
          schema:
            type: integer
          description: Campaign ID (required and must belong to the authenticated user)

      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - messages
              properties:
                messages:
                  type: array
                  items:
                    type: object
                    required:
                      - destinations
                    properties:
                      ext_id:
                        type: string
                        nullable: true
                      text:
                        type: string
                      audio:
                        type: string
                      destinations:
                        type: array
                        items:
                          type: object
                          required:
                            - to
                          properties:
                            to:
                              type: string
                              description: Destination phone number

      responses:
        "200":
          description: Messages processed successfully
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      type: integer
                    phone:
                      type: string
                    date:
                      type: string
                    ext_id:
                      type: string
                      nullable: true
                    cid:
                      type: integer

        "400":
          description: Invalid request (invalid JSON, missing cid, or invalid payload)
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string

        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: unauthorized

        "403":
          description: Campaign does not belong to user or is invalid
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: invalid_campaign

        "500":
          description: Internal server error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: insert_error

  /rcs:
    post:
      summary: Send RCS messages without prior campaign configuration
      description: |
        This endpoint allows sending RCS messages without creating a campaign beforehand.
        It automatically creates (if not exists) a generic RCS campaign.
      tags:
        - RCS
      security:
        - bearerAuth: []
        - apiKeyAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - messages
              properties:
                messages:
                  type: array
                  maxItems: 5000
                  items:
                    type: object
                    required:
                      - to
                      - text
                    properties:
                      id:
                        type: string
                        maxLength: 64
                        description: Optional external ID for idempotency
                        example: "abc123"
                      to:
                        type: string
                        description: Destination phone (digits only)
                        example: "5531999999999"
                      title:
                        type: string
                        maxLength: 200
                        example: "Hello"
                      text:
                        type: string
                        maxLength: 2700
                        example: "Your promotion has arrived"
                      url:
                        type: string
                        maxLength: 2000
                        example: "https://example.com"
                      cta:
                        type: string
                        maxLength: 50
                        example: "View offer"
                      image:
                        type: string
                        description: External image URL (jpg/png)
                        example: "https://cdn.example.com/image.jpg"
                      image_data:
                        type: string
                        description: Base64 image (jpg/png), optional data URI prefix allowed
                        example: "data:image/png;base64,iVBORw0KGgoAAAANS..."
      responses:
        "200":
          description: Messages processed successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    example: ok
                  campaign_id:
                    type: integer
                    example: 12345
                  received:
                    type: integer
                    example: 10
                  inserted:
                    type: integer
                    example: 8
                  duplicate:
                    type: integer
                    example: 2
                  rejected:
                    type: array
                    items:
                      type: object
                      properties:
                        index:
                          type: integer
                          example: 1
                        error:
                          type: string
                          example: invalid_phone
                  images_uploaded:
                    type: integer
                    example: 3
                  images_reused:
                    type: integer
                    example: 5
        "400":
          description: Invalid request
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: invalid_payload
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: unauthorized
        "405":
          description: Method not allowed
        "413":
          description: Payload too large
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: payload_too_large
        "500":
          description: Internal error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: error
  /apircsnativo:
    post:
      tags:
        - RCS
      summary: Receive RCS (native)
      description: >
        Native RCS ingestion endpoint. Receives a list of RCS messages and queues them
        for delivery. Authentication accepts a **Bearer token**, an **X-API-TOKEN** header,
        or **Basic Auth** (login + password).


        Each message can be provided in one of two forms, detected automatically:


        **Form A — flat `text`:** the whole RCS is packed into the `text` field following the
        pattern `TITLE <image_url> BODY <link_url> CTA`. The parser splits it by the URLs it
        finds: the first URL is treated as the image, the last as the destination link, the text
        before the first URL as the title, the text between URLs as the body, and the text after
        the last URL as the CTA label.


        **Form B — separate fields:** the message already carries `title`, `image`, `text`,
        `url` and `cta` as individual fields (Portuguese aliases are accepted — see each field).
        Form B is used whenever any of `title`, `image`, `url` or `cta` is present; otherwise the
        endpoint falls back to Form A.


        The authenticated user must already have a campaign named `API RCS`; otherwise the request is rejected with `rcs_campaign_not_found`.
        Requests are deduplicated by content per recipient (`INSERT IGNORE`).

      security:
        - bearerAuth: []
        - apiKeyAuth: []
        - basicAuth: []

      parameters:
        - name: type
          in: query
          required: false
          schema:
            type: string
            enum: [rcs]
          description: >
            Optional. This endpoint always operates in RCS mode; the parameter is accepted
            for compatibility and may also be sent as `"type": "rcs"` in the body.
        - name: campaignID
          in: query
          required: false
          schema:
            type: integer
          description: >
            Optional campaign override. Ignored for RCS traffic, which is always routed to the
            user's `API RCS` campaign.

      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - messages
              properties:
                type:
                  type: string
                  enum: [rcs]
                  description: Optional. Marks the payload as RCS (already the default).
                messages:
                  type: array
                  maxItems: 100000
                  items:
                    type: object
                    required:
                      - destinations
                    properties:
                      ext_id:
                        type: string
                        nullable: true
                        description: External ID for message tracking (returned in the response).
                        example: "YourID12345"
                      destinations:
                        type: array
                        items:
                          type: object
                          required:
                            - to
                          properties:
                            to:
                              type: string
                              description: Recipient phone number in international format.
                              example: "5511999999999"
                      text:
                        type: string
                        description: >
                          Form A: full flat RCS (`TITLE <image_url> BODY <link_url> CTA`).
                          Form B: message body only. Aliases: `texto`, `body`, `mensagem`.
                        example: "Your promotion has arrived"
                      title:
                        type: string
                        description: "Form B title. Alias: `titulo`."
                        example: "Hello"
                      image:
                        type: string
                        description: >
                          Form B image URL (jpg/png). Aliases: `imagem`, `image_url`,
                          `link_imagem`, `img`.
                        example: "https://cdn.example.com/image.jpg"
                      url:
                        type: string
                        description: >
                          Form B destination link (opened by the CTA). Aliases: `link`,
                          `link_destino`, `destino`.
                        example: "https://example.com"
                      cta:
                        type: string
                        description: >
                          Form B call-to-action button label. Aliases: `botao`, `button`,
                          `label`.
                        example: "View offer"
            examples:
              formB_separateFields:
                summary: Form B — separate fields
                value:
                  messages:
                    - ext_id: "YourID12345"
                      destinations:
                        - to: "5511999999999"
                      title: "Hello"
                      image: "https://cdn.example.com/image.jpg"
                      text: "Your promotion has arrived"
                      url: "https://example.com"
                      cta: "View offer"
              formA_flatText:
                summary: Form A — flat text
                value:
                  messages:
                    - ext_id: "YourID12345"
                      destinations:
                        - to: "5511999999999"
                      text: "Hello https://cdn.example.com/image.jpg Your promotion has arrived https://example.com View offer"

      responses:
        "200":
          description: Messages accepted and queued for delivery.
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      type: integer
                      description: Internal message ID.
                      example: 987654
                    phone:
                      type: string
                      example: "5511999999999"
                    date:
                      type: string
                      example: "2026-07-02 14:33:21"
                    ext_id:
                      type: string
                      nullable: true
                      example: "YourID12345"
        "400":
          description: >
            Invalid request. Possible `error` values: `invalid_json`, `invalid_payload`,
            `empty`, `max_100k`, `rcs_campaign_not_found`.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: rcs_campaign_not_found
                  detail:
                    type: string
                    nullable: true
                    example: "Nenhuma campanha 'API RCS' encontrada para este usuario."
        "401":
          description: Unauthorized (no valid token / basic credentials).
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: unauthorized
        "403":
          description: Client IP not in the user's whitelist.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: ip_not_allowed
        "500":
          description: Internal error while inserting messages.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: insert_error

  /reportbydate:
    get:
      summary: Report by date
      tags:
        - Reports
      description: Retorna relatórios de mensagens filtradas por data, evento, paginação e status de entrega.
      security:
        - bearerAuth: []
      parameters:
        - name: date
          in: query
          required: false
          schema:
            type: string
            example: "2026-04-27"
          description: Data única (YYYY-MM-DD). Se informado, filtra o dia inteiro.

        - name: start
          in: query
          required: false
          schema:
            type: string
            example: "2026-04-27 00:00:00"
          description: Data/hora inicial do filtro (YYYY-MM-DD ou YYYY-MM-DD HH:MM:SS)

        - name: end
          in: query
          required: false
          schema:
            type: string
            example: "2026-04-27 23:59:59"
          description: Data/hora final do filtro (YYYY-MM-DD ou YYYY-MM-DD HH:MM:SS)

        - name: event
          in: query
          required: false
          schema:
            type: string
            enum:
              - Sent
              - Delivered
              - Expired
              - Undelivered
              - Releasing
              - Invalid
              - Blocked
              - No credits
              - Rejected
              - Duplicate
              - Characters Exceeded
          description: Filtra pelo tipo de evento (status normalizado)

        - name: date_dlr
          in: query
          required: false
          schema:
            type: string
            example: "2026-04-27 10:00:00"
          description: Filtra registros com date_dlr maior que o valor informado

        - name: limit
          in: query
          required: false
          schema:
            type: integer
            default: 1000
            maximum: 5000
          description: Limite de registros retornados (máximo 5000)

        - name: offset
          in: query
          required: false
          schema:
            type: integer
            default: 0
          description: Offset da paginação

      responses:
        "200":
          description: Lista de mensagens
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      type: string
                    timestamp:
                      type: string
                    date_dlr:
                      type: string
                    event:
                      type: string
                    recipient:
                      type: string
                    label:
                      type: string
                    message:
                      type: string
                    channel:
                      type: string
                      enum: [SMS, VOICE, RCS, WHATSAPP]
                    status_code:
                      type: integer
                    cost:
                      type: string

        "400":
          description: Parâmetros inválidos

        "401":
          description: Token inválido ou não autorizado

        "404":
          description: Nenhuma mensagem encontrada

        "500":
          description: Erro interno do servidor
  /strikeapi:
    get:
      summary: "Get blocked numbers"
      tags:
        - Reports
      description: |
        Returns a list of blocked phone numbers for the authenticated user.
        Data is filtered by user  and includes block reason and undelivered message statistics.
      security:
        - bearerAuth: []
        - basicAuth: []
      responses:
        "200":
          description: Successfully retrieved blocked numbers
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    phone_number:
                      type: string
                      example: "5511999999999"
                    block_reason:
                      type: string
                      example: "Bloqueio automático de entregabilidade"
                    undelivered_total:
                      type: integer
                      example: 12
                    blocked_at:
                      type: string
                      example: "2026-04-27 10:33:21"
        "401":
          description: Unauthorized
        "404":
          description: No blocked numbers found
        "503":
          description: Maximum connection limit reached

  /optoutapi:
    get:
      summary: "List opt-outs"
      tags:
        - Opt-out
      description: |
        Returns the numbers that opted out on the authenticated account
        (customers who replied PARAR, CANCELAR, SAIR, PARE, REMOVER or a
        variant to an SMS or RCS). Always scoped to the token's own account.

        The platform already blocks new SMS/RCS to these numbers — use this
        endpoint to sync your own CRM / suppression list.

        Note: when no record matches, the API answers 404 with a plain-text
        body ("No opt-out numbers found"). Treat it as an empty list.
      parameters:
        - name: date
          in: query
          required: false
          schema:
            type: string
            format: date
            example: "2026-07-29"
          description: "Filter a single day (YYYY-MM-DD)."
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            minimum: 1
            maximum: 1000
            default: 1000
          description: "Records per page (capped at 1000)."
        - name: offset
          in: query
          required: false
          schema:
            type: integer
            minimum: 0
            default: 0
          description: "Pagination offset. Step by `limit` until the response is empty."
      responses:
        '200':
          description: "Opt-out list (most recent first)."
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    phone_number:
                      type: string
                      description: "Number that opted out, with country code."
                      example: "5511999999999"
                    optout_via:
                      type: string
                      description: "How it was requested (includes the keyword replied)."
                      example: "OPT-OUT (resposta \"PARAR\")"
                    opted_out_at:
                      type: string
                      description: "Opt-out timestamp, Brasilia time (YYYY-MM-DD HH:MM:SS)."
                      example: "2026-07-29 23:41:44"
        '400':
          description: "Invalid date format. Use YYYY-MM-DD."
        '401':
          description: "Missing or invalid token."
        '404':
          description: "No opt-out numbers found (plain-text body; treat as empty list)."
        '503':
          description: "Concurrent request limit reached."

  /balance:
    get:
      summary: "Check balance (all channels)"
      tags:
        - Balance
      description: |
        Returns the balance for every channel on the authenticated account.

        `saldo` (string) is the SMS balance, kept for backward compatibility.
        Use `channels` for the per-channel value. RCS Conversation is counted
        in remaining conversations (24h windows).
      responses:
        '200':
          description: "Balance successfully retrieved."
          content:
            application/json:
              schema:
                type: object
                properties:
                  saldo:
                    type: string
                    description: "SMS balance, formatted (legacy field)."
                    example: "637.782"
                  channels:
                    type: object
                    description: "Final balance per channel."
                    properties:
                      sms:
                        type: integer
                        example: 637782
                      voz:
                        type: integer
                        example: 303400
                      whatsapp:
                        type: integer
                        example: 0
                      rcs:
                        type: integer
                        description: "RCS Single."
                        example: 0
                      rcs_basic:
                        type: integer
                        example: 0
                      rcs_conversation:
                        type: integer
                        description: "Remaining conversations (24h windows)."
                        example: 0
        '401':
          description: "Authentication failed."
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: "Error details."
                    example: "Invalid authentication."

  /balancetvoz:
    get:
      summary: "Check Voice Call Balance"
      tags:
        - Balance
      description: |
        Returns the available voice call balance for the authenticated user.
      responses:
        '200':
          description: "Voice call balance successfully retrieved."
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    description: "Request status."
                    example: "success"
                  balance:
                    type: integer
                    description: "Available voice call balance."
                    example: 300
        '401':
          description: "Authentication failed."
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: "Error details."
                    example: "Invalid authentication."

components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >
        Send your API token in the `Authorization` header:
        `Authorization: Bearer <token>` (the keyword `Token` is also accepted).
    apiKeyAuth:
      type: apiKey
      in: header
      name: X-API-TOKEN
      description: "Send your API token in the `X-API-TOKEN` header."
    basicAuth:
      type: http
      scheme: basic
      description: "HTTP Basic Auth using your Pushfy login and password."

# ---- CRM & Integrations (menu groups) ----
tags:
- description: Send SMS messages.
  name: SMS
- description: Send RCS (single, basic and native).
  name: RCS
- description: Voice calls and audio.
  name: Voice
- description: Delivery status and reports.
  name: Reports
- description: Account balance.
  name: Balance
- description: 'Turn **Generic / Webhook** events into SMS, RCS, Voice or Push messages.


    **Step 1 — In Pushfy:** open **Settings → CRM Integrations → New integration**, pick **Generic / Webhook**, choose the channel (SMS/RCS/Voice/Push), write the message (use `{{field}}` placeholders), optionally set a signing secret, then **copy the webhook URL** (`https://portal.pushfy.com/v2/gw?r=/v1/hook/<your_token>`).


    **Step 2 — In Generic / Webhook:** make any system POST the canonical JSON `{ "canal":"sms", "destinos":["5511999998888"], "texto":"Hi {{name}}" }` to the URL. Works with Make, Zapier or your own backend.


    **Authentication:** optional `X-Gateway-Signature` (HMAC-SHA256 of the body with your signing secret).


    Every integration has its own token, is idempotent, and consumes your normal balance. See the full guide in the official docs repository (github.com/PushfyCpaaS/Pushfy).'
  name: Generic / Webhook
  x-traitTag: true
- description: 'Turn **n8n** events into SMS, RCS, Voice or Push messages.


    **Step 1 — In Pushfy:** open **Settings → CRM Integrations → New integration**, pick **n8n**, choose the channel (SMS/RCS/Voice/Push), write the message (use `{{field}}` placeholders), optionally set a signing secret, then **copy the webhook URL** (`https://portal.pushfy.com/v2/gw?r=/v1/hook/<your_token>`).


    **Step 2 — In n8n:** add an **HTTP Request** node (POST) pointing to the URL, with a JSON body built from previous nodes (e.g. `{{ $json.phone }}`).


    **Authentication:** optional `X-Gateway-Signature` HMAC (compute it in a Crypto/Function node).


    Every integration has its own token, is idempotent, and consumes your normal balance. See the full guide in the official docs repository (github.com/PushfyCpaaS/Pushfy).'
  name: n8n
  x-traitTag: true
- description: 'Turn **HubSpot** events into SMS, RCS, Voice or Push messages.


    **Step 1 — In Pushfy:** open **Settings → CRM Integrations → New integration**, pick **HubSpot**, choose the channel (SMS/RCS/Voice/Push), write the message (use `{{field}}` placeholders), optionally set a signing secret, then **copy the webhook URL** (`https://portal.pushfy.com/v2/gw?r=/v1/hook/<your_token>`).


    **Step 2 — In HubSpot:** create a **Workflow** with a *Send a webhook* action (POST) pointing to the URL; include a phone property.


    **Authentication:** `X-HubSpot-Signature` v1 — set your app Client Secret as the signing secret.


    Every integration has its own token, is idempotent, and consumes your normal balance. See the full guide in the official docs repository (github.com/PushfyCpaaS/Pushfy).'
  name: HubSpot
  x-traitTag: true
- description: 'Turn **Salesforce** events into SMS, RCS, Voice or Push messages.


    **Step 1 — In Pushfy:** open **Settings → CRM Integrations → New integration**, pick **Salesforce**, choose the channel (SMS/RCS/Voice/Push), write the message (use `{{field}}` placeholders), optionally set a signing secret, then **copy the webhook URL** (`https://portal.pushfy.com/v2/gw?r=/v1/hook/<your_token>`).


    **Step 2 — In Salesforce:** create a **Flow** with an HTTP Callout / Named Credential that POSTs the record fields to the URL.


    **Authentication:** optional `X-Gateway-Signature` HMAC.


    Every integration has its own token, is idempotent, and consumes your normal balance. See the full guide in the official docs repository (github.com/PushfyCpaaS/Pushfy).'
  name: Salesforce
  x-traitTag: true
- description: 'Turn **ActiveCampaign** events into SMS, RCS, Voice or Push messages.


    **Step 1 — In Pushfy:** open **Settings → CRM Integrations → New integration**, pick **ActiveCampaign**, choose the channel (SMS/RCS/Voice/Push), write the message (use `{{field}}` placeholders), optionally set a signing secret, then **copy the webhook URL** (`https://portal.pushfy.com/v2/gw?r=/v1/hook/<your_token>`).


    **Step 2 — In ActiveCampaign:** add a **Webhook** (Settings → Developer, or a Webhook action in an Automation) posting the contact fields.


    **Authentication:** optional `X-Gateway-Signature` HMAC.


    Every integration has its own token, is idempotent, and consumes your normal balance. See the full guide in the official docs repository (github.com/PushfyCpaaS/Pushfy).'
  name: ActiveCampaign
  x-traitTag: true
- description: 'Turn **Pipedrive** events into SMS, RCS, Voice or Push messages.


    **Step 1 — In Pushfy:** open **Settings → CRM Integrations → New integration**, pick **Pipedrive**, choose the channel (SMS/RCS/Voice/Push), write the message (use `{{field}}` placeholders), optionally set a signing secret, then **copy the webhook URL** (`https://portal.pushfy.com/v2/gw?r=/v1/hook/<your_token>`).


    **Step 2 — In Pipedrive:** add a **Webhook** (Company Settings → Webhooks) for the event you want; Pushfy reads the phone from `current.phone`.


    **Authentication:** HTTP Basic Auth (set `basic_user`/`basic_pass`) or optional HMAC.


    Every integration has its own token, is idempotent, and consumes your normal balance. See the full guide in the official docs repository (github.com/PushfyCpaaS/Pushfy).'
  name: Pipedrive
  x-traitTag: true
- description: 'Turn **RD Station** events into SMS, RCS, Voice or Push messages.


    **Step 1 — In Pushfy:** open **Settings → CRM Integrations → New integration**, pick **RD Station**, choose the channel (SMS/RCS/Voice/Push), write the message (use `{{field}}` placeholders), optionally set a signing secret, then **copy the webhook URL** (`https://portal.pushfy.com/v2/gw?r=/v1/hook/<your_token>`).


    **Step 2 — In RD Station:** send the lead to a **Webhook** (Integrations → Webhook, or an automation flow).


    **Authentication:** optional `token` in the payload or `X-Gateway-Signature` HMAC.


    Every integration has its own token, is idempotent, and consumes your normal balance. See the full guide in the official docs repository (github.com/PushfyCpaaS/Pushfy).'
  name: RD Station
  x-traitTag: true
- description: 'Turn **Bitrix24** events into SMS, RCS, Voice or Push messages.


    **Step 1 — In Pushfy:** open **Settings → CRM Integrations → New integration**, pick **Bitrix24**, choose the channel (SMS/RCS/Voice/Push), write the message (use `{{field}}` placeholders), optionally set a signing secret, then **copy the webhook URL** (`https://portal.pushfy.com/v2/gw?r=/v1/hook/<your_token>`).


    **Step 2 — In Bitrix24:** create an **Outbound webhook** for the event; include a phone field so it isn''t ID-only.


    **Authentication:** the Bitrix `application_token` (set it on the integration).


    Every integration has its own token, is idempotent, and consumes your normal balance. See the full guide in the official docs repository (github.com/PushfyCpaaS/Pushfy).'
  name: Bitrix24
  x-traitTag: true
- description: 'Turn **Zoho CRM** events into SMS, RCS, Voice or Push messages.


    **Step 1 — In Pushfy:** open **Settings → CRM Integrations → New integration**, pick **Zoho CRM**, choose the channel (SMS/RCS/Voice/Push), write the message (use `{{field}}` placeholders), optionally set a signing secret, then **copy the webhook URL** (`https://portal.pushfy.com/v2/gw?r=/v1/hook/<your_token>`).


    **Step 2 — In Zoho CRM:** create a **Workflow Rule → Webhook** mapping the phone and name fields.


    **Authentication:** optional `X-Gateway-Signature` HMAC or a `token`.


    Every integration has its own token, is idempotent, and consumes your normal balance. See the full guide in the official docs repository (github.com/PushfyCpaaS/Pushfy).'
  name: Zoho CRM
  x-traitTag: true
- description: 'Turn **Monday.com** events into SMS, RCS, Voice or Push messages.


    **Step 1 — In Pushfy:** open **Settings → CRM Integrations → New integration**, pick **Monday.com**, choose the channel (SMS/RCS/Voice/Push), write the message (use `{{field}}` placeholders), optionally set a signing secret, then **copy the webhook URL** (`https://portal.pushfy.com/v2/gw?r=/v1/hook/<your_token>`).


    **Step 2 — In Monday.com:** add the **Webhooks** integration on the board; set the phone column id as `phone_column`.


    **Authentication:** JWT (HS256) in the `Authorization` header — set your Monday signing secret. The setup challenge is answered automatically.


    Every integration has its own token, is idempotent, and consumes your normal balance. See the full guide in the official docs repository (github.com/PushfyCpaaS/Pushfy).'
  name: Monday.com
  x-traitTag: true
x-tagGroups:
- name: Messaging API
  tags:
  - SMS
  - RCS
  - Voice
  - Reports
  - Balance
- name: CRM & Integrations
  tags:
  - Generic / Webhook
  - n8n
  - HubSpot
  - Salesforce
  - ActiveCampaign
  - Pipedrive
  - RD Station
  - Bitrix24
  - Zoho CRM
  - Monday.com
