Positus EN
PositusFree trialPTES
  • WhatsApp Business API
  • WhatsApp Benchmark
  • API - Documentation
  • Code Samples
  • Webhook
  • Language
  • Português
  • Spanish
  • Sites
  • Website Positus
  • Status Page
  • Support
  • Brand guidelines
  • Robbu Group
Powered by GitBook
On this page
  • Positus Architecture - WhatsApp Business API
  • Postman file
  • messages
  • HSM
  • Contact
  • Location
  • Image
  • Document
  • Video
  • Audio
  • Sticker
  • Download Media
  • Mensagens Interativas - Lista
  • Mensagens Interativas - Botões

Was this helpful?

API - Documentation

Integrate now with the biggest communication platform in the world, WhatsApp Business API through Positus.

PreviousWhatsApp BenchmarkNextCode Samples

Last updated 3 years ago

Was this helpful?

Positus Architecture - WhatsApp Business API

SDK

Laravel / PHP

Youtube

PHP

Nuget .NET / .NET Core

Github para .NET

Postman file

messages

POST https://api.positus.global/v2/whatsapp/numbers/{{chave}}/messages

Utilize this route to send text messages via WhatsApp

Path Parameters

Name
Type
Description

chave

string

Unique code by WhatsApp number

Headers

Name
Type
Description

Content-Type

string

application/json

Authentication

string

Authentication using Bearer Token

Request Body

Name
Type
Description

object

{ "to": "+5511999999999", "type": "text", "text": { "body": "your-message-content" } }

{
    "messages": [
        {
            "id": "gBGHVRGZmZmZnwIJpWDiExk7olMZ"
        }
    ],
    "message": "The message was successfully sent"
}
{
    "errors": [
        {
            "code": ,
            "title": "",
            "details": ""
        }
    ],
    "message": ""
}

HSM

POST https://api.positus.global/v2/whatsapp/numbers/{{chave}}/messages

Utilize this route to send notification messages via WhatsApp HSM - Are message templates that are pre-approved by Facebook, can be text messages, media, or files.

Path Parameters

Name
Type
Description

chave

string

Unique code by WhatsApp number

Headers

Name
Type
Description

Authentication

string

Authentication using Bearer Token

Content-Type

string

application/json

Request Body

Name
Type
Description

Full

string

{ "to": "+551199999999", "type": "template", "template": { "namespace": "xxxxxxx", "language": { "policy": "deterministic", "code": "pt_BR" }, "name": "xxxxxx", "components": [ { "type": "header", "parameters": [ { "type": "image", "image": { "link": "https://dealers.rewebmkt.com/images/20190417084518-actros-3-1280.jpg" } } ] }, { "type": "body", "parameters": [ { "type": "text", "text": "Rafael" }, { "type": "text", "text": "Mercedes-Benz" }, { "type": "text", "text": "Actros" }, { "type": "text", "text": "Cardiesel - Belo Horizonte" }, { "type": "text", "text": "08/05/2020" } ] }, { "type": "button", "sub_type" : "url", "index": "0", "parameters": [ { "type": "text", "text": "fMYMyV8x" } ] } ] } }

Buttons

string

{ "to": "+5511999999999", "type": "template", "template": { "namespace": "dc730af3_d5a86", "language": { "policy": "deterministic", "code": "pt_BR" }, "name": "carteiro_botoes", "components": [ { "type": "body", "parameters": [ { "type": "text", "text": "Robbu" }, { "type": "text", "text": "Thiago Thamiel" } ] }, { "type": "button", "sub_type": "quick_reply", "index": "0" } ] } }

Text

object

{ "to": "+55119999999999", "type": "hsm", "hsm": { "namespace": "52_2bca4fad4c4a", "element_name": "fgv_3", "language": { "policy": "deterministic", "code": "pt_BR" }, "localizable_params": [ { "default": "Thiago" } ] } }

{
    "messages": [
        {
            "id": "gBGHVRGZmZmZnwIJpWDiExk7olMZ"
        }
    ],
    "message": "The message was successfully sent"
}
{
    "errors": [
        {
            "code": ,
            "title": "",
            "details": ""
        }
    ],
    "message": ""
}

Contact

POST https://api.positus.global/v2/whatsapp/numbers/{{chave}}/messages

Share contacts

Path Parameters

Name
Type
Description

chave

string

Unique code by WhatsApp number

Headers

Name
Type
Description

Authentication

string

Authentication using Bearer Token

Content-Type

string

application/json

Request Body

Name
Type
Description

object

{ "to": "+5511999999999", "type": "contacts", "contacts":[{ "addresses": [], "emails": [], "ims": [], "name": { "first_name": "Positus Provider", "formatted_name": "Positus Provider" }, "org": [], "phones": [{ "phone": "+55 11 2626-4234", "type": "CELL", "wa_id": "551126264234" }], "urls": [] }] }

{
    "messages": [
        {
            "id": "gBGHVRGZmZmZnwIJpWDiExk7olMZ"
        }
    ],
    "message": "The message was successfully sent"
}
{
    "errors": [
        {
            "code": ,
            "title": "",
            "details": ""
        }
    ],
    "message": ""
}

Location

POST https://api.positus.global/v2/whatsapp/numbers/{{chave}}/messages

Share location

Path Parameters

Name
Type
Description

chave

string

Unique code by WhatsApp numbers

Headers

Name
Type
Description

Authentication

string

Authentication using Bearer Token

Content-Type

string

application/json

Request Body

Name
Type
Description

object

{ "to": "+5511999999999", "type": "location", "location": { "longitude": -46.662787, "latitude": -23.553610, "name": "Robbu Brazil", "address": "Av. Angélica, 2530 - Bela Vista, São Paulo - SP, 01228-200" } }

{
    "messages": [
        {
            "id": "gBGHVRGZmZmZnwIJpWDiExk7olMZ"
        }
    ],
    "message": "The message was successfully sent"
}
{
    "errors": [
        {
            "code": ,
            "title": "",
            "details": ""
        }
    ],
    "message": ""
}

Image

POST https://api.positus.global/v2/whatsapp/numbers/{{chave}}/messages

Share images

Path Parameters

Name
Type
Description

MediaId

string

Unique code by WhatsApp number

Headers

Name
Type
Description

Authentication

string

Authentication using Bearer Token

Content-Type

string

application/json

Request Body

Name
Type
Description

object

{ "to": "+5511999999999", "type": "image", "image": { "link": "https://picsum.photos/200", "caption": "your-document-caption" }

{
    "messages": [
        {
            "id": "gBGHVRGZmZmZnwIJpWDiExk7olMZ"
        }
    ],
    "message": "The message was successfully sent"
}
{
    "errors": [
        {
            "code": ,
            "title": "",
            "details": ""
        }
    ],
    "message": ""
}

Document

POST https://api.positus.global/v2/whatsapp/numbers/{{chave}}/messages

Share images

Path Parameters

Name
Type
Description

chave

string

Unique code by WhatsApp number

Headers

Name
Type
Description

Authentication

string

Authentication using Bearer Token

Content-Type

string

application/json

Request Body

Name
Type
Description

object

{ "to": "+5511941489395", "type": "document", "document": { "link": "http://www.pdf995.com/samples/pdf.pdf", "caption": "your-document-caption" }

{
    "messages": [
        {
            "id": "gBGHVRGZmZmZnwIJpWDiExk7olMZ"
        }
    ],
    "message": "The message was successfully sent"
}
{
    "errors": [
        {
            "code": ,
            "title": "",
            "details": ""
        }
    ],
    "message": ""
}

Video

POST https://api.positus.global/v2/whatsapp/numbers/{{chave}}/messages

Share videos

Path Parameters

Name
Type
Description

chave

string

Unique code by WhatsApp number

Headers

Name
Type
Description

Authentication

string

Authentication using Bearer Token

Content-Type

string

application/json

Request Body

Name
Type
Description

object

{ "to": "+5511999999999", "type": "video", "video": { "link": "https://sample-videos.com/video123/mp4/720/big_buck_bunny_720p_1mb.mp4", "caption": "your-document-caption" }

{
    "messages": [
        {
            "id": "gBGHVRGZmZmZnwIJpWDiExk7olMZ"
        }
    ],
    "message": "The message was successfully sent"
}
{
    "errors": [
        {
            "code": ,
            "title": "",
            "details": ""
        }
    ],
    "message": ""
}

Audio

POST https://api.positus.global/v2/whatsapp/numbers/{{chave}}/messages

Share audio

Path Parameters

Name
Type
Description

chave

string

Unique code by WhatsApp number

Headers

Name
Type
Description

Authentication

string

Authentication using Bearer Token

Content-Type

string

application/json

Request Body

Name
Type
Description

object

{ "to": "+5511999999999", "type": "audio", "audio": { "link": "https://sample-videos.com/audio/mp3/crowd-cheering.mp3" }

{
    "messages": [
        {
            "id": "gBGHVRGZmZmZnwIJpWDiExk7olMZ"
        }
    ],
    "message": "The message was successfully sent"
}
{
    "errors": [
        {
            "code": ,
            "title": "",
            "details": ""
        }
    ],
    "message": ""
}

Sticker

POST https://api.positus.global/v2/whatsapp/numbers/{{chave}}/messages

Share stickers. Sticker format must be exactly 512x512

Path Parameters

Name
Type
Description

chave

string

Unique code by WhatsApp number

Headers

Name
Type
Description

Authentication

string

Authentication using Bearer Token

Content-Type

string

application/json

Request Body

Name
Type
Description

object

{ "to": "+5511999999999", "type": "sticker", "sticker": { "link": "https://studio.posit.us/api/samples/sticker.webp" }

{
    "messages": [
        {
            "id": "gBGHVRGZmZmZnwIJpWDiExk7olMZ"
        }
    ],
    "message": "The message was successfully sent"
}
{
    "errors": [
        {
            "code": ,
            "title": "",
            "details": ""
        }
    ],
    "message": ""
}

Download Media

GET https://api.positus.global/v2/whatsapp/numbers/{{chave}}/media/{{messages.type.id}}

Download media

Path Parameters

Name
Type
Description

chave

string

Unique code by WhatsApp number

Headers

Name
Type
Description

Authentication

string

Authentication using Bearer Token

Content-Type

string

application/json

{
    "messages": [
        {
            "id": "gBGHVRGZmZmZnwIJpWDiExk7olMZ"
        }
    ],
    "message": "The message was successfully sent"
}
{
    "errors": [
        {
            "code": ,
            "title": "",
            "details": ""
        }
    ],
    "message": ""
}

Mensagens Interativas - Lista

POST https://api.positus.global/v2/whatsapp/numbers/{{chave}}/messages

List Messages: Messages including a menu of up to 10 options. This type of message offers a simpler and more consistent way for users to make a selection when interacting with a company. List button or reply messages cannot be used as notifications. Currently, they can only be sent within 24 hours of the last message sent by the user. If you try to send a message outside the 24-hour window, you will receive an error message.

Path Parameters

Name
Type
Description

Chave

string

Código único por número de WhatsApp

Headers

Name
Type
Description

Authentication

string

Autenticação usando Bearer Token

Content-Type

string

application/json

Request Body

Name
Type
Description

string

{"to":"+5511999999999","type":"interactive","interactive":{"type":"list","header":{"type":"text","text":"CryptoBank"},"body":{"text":"Olá senhor Thiago Thamiel, me chamo Francisco Dabus estou falando referente ao Banco CryptoBank e você já pode regular sua pendência financeira por aqui. Veja as opções que preparamos para você!\n\n💼 Contrato: 82782361236213\n🗓️ Vencimento: 01/01/2021\n💰 Valor Atualizado: 232,83"},"footer":{"text":"Demonstração Robbu"},"action":{"button":"Opções de pagamento","sections":[{"title":"Atualização","rows":[{"id":"7","title":"Vencimento Hoje","description":"💰 R$ 201,23 - Parcelas 17 até 19 de 24"},{"id":"1","title":"Vencimento Amanha","description":"💰 R$ 219,32 - Parcelas 17 até 19 de 24"}]},{"title":"Quitação","rows":[{"id":"3","title":"Vencimento Hoje","description":"💰 R$ 1.323,21 - Todas as parcelas restantes"},{"id":"4","title":"Vencimento Amanha","description":"💰 R$ 1.382,34 - Todas as parcelas restantes"}]}]}}}

Mensagens Interativas - Botões

POST https://api.positus.global/v2/whatsapp/numbers/{{chave}}/messages

Reply buttons: Messages including up to 3 options - each option is a button. This type of message offers a faster way for users to make a selection from a menu when interacting with a company. Response buttons have the same user experience as interactive button models. List button or reply messages cannot be used as notifications. Currently, they can only be sent within 24 hours of the last message sent by the user. If you try to send a message outside the 24-hour window, you will receive an error message.

Path Parameters

Name
Type
Description

Chave

string

Código único por número de WhatsApp

Headers

Name
Type
Description

Authentication

string

Autenticação usando Bearer Token

Content-Type

string

application/json

Request Body

Name
Type
Description

string

{"to":"+5511999999999","type":"interactive","recipient_type":"individual","interactive":{"type":"button","header":{"type":"text","text":"1 mês grátis"},"body":{"text":"Ótima escolha, agora você já pode ativar o seu número e realizar testes por 1 mês sem compromisso."},"footer":{"text":"https://posit.us"},"action":{"buttons":[{"type":"reply","reply":{"id":"unique-postback-id-1","title":"Criar conta grátis"}},{"type":"reply","reply":{"id":"unique-postback-id-2","title":"Falar com atendente"}}]}}}

Production Environment: Your token will be generated and provided by Positus, it will give access to all your WhatsApp Business API numbers. MediaId will be provided after activation of each WhatsApp Business API number. Sandbox (Development environment): You can generate your token directly at .

Postman is a tool that aims to test RESTful services (Web APIs) by sending HTTP requests and analyzing their feedback.

Complete documentation:

Complete documentation:

http://studio.posit.us/
Download Postman App
https://developers.facebook.com/docs/whatsapp/guides/interactive-messages
https://developers.facebook.com/docs/whatsapp/guides/interactive-messages
https://github.com/positusapps/positus-api-laravel-client
https://github.com/positusapps/positus-api-php-client
Youtube
https://www.nuget.org/packages/positus-api-csharp-client/
YouTube
https://github.com/positusapps/positus-api-csharp-client
32KB
Positus API (October 2020).postman_collection.json
API for production
9KB
Positus API Sandbox (November 2020).postman_collection.json
API for development SandBox