POST
/
instance
/
create
curl --request POST \
  --url https://api.l2msg.com/whatsapp/instance/create \
  --header 'Content-Type: application/json' \
  --header 'apikey: <api-key>' \
  --data '{
  "instanceName": "<string>",
  "qrcode": true,
  "number": "<string>",
  "rejectCall": true,
  "msgCall": "<string>",
  "groupsIgnore": true,
  "alwaysOnline": true,
  "readMessages": true,
  "readStatus": true,
  "syncFullHistory": true,
  "webhook": {
    "url": "<string>",
    "byEvents": true,
    "base64": true,
    "headers": {
      "autorization": "<string>",
      "Content-Type": "<string>"
    },
    "events": [
      "APPLICATION_STARTUP"
    ]
  }
}'
{
  "instance": {
    "instanceName": "teste-docs",
    "instanceId": "af6c5b7c-ee27-4f94-9ea8-192393746ddd",
    "webhook_wa_business": null,
    "access_token_wa_business": "",
    "status": "created"
  },
  "hash": {
    "apikey": "123456"
  },
  "settings": {
    "reject_call": false,
    "msg_call": "",
    "groups_ignore": true,
    "always_online": false,
    "read_messages": false,
    "read_status": false,
    "sync_full_history": false
  }
}

Authorizations

apikey
string
header
required

Your authorization key header

Body

application/json
instanceName
string
required

instance (Instance name)

qrcode
boolean

Create QR Code automatically after creation

number
string

559999999999 (Instance owner number with Country Code)

rejectCall
boolean

Reject WhatsApp calls automatically

msgCall
string

Message to be sent when a call is rejected automatically

groupsIgnore
boolean

Ignore group messages

alwaysOnline
boolean

Keep WhatsApp always online

readMessages
boolean

Send read receipts to received messages

readStatus
boolean

Show sent messages read status

syncFullHistory
boolean

Syncronize full WhatsApp history

webhook
object

Webhook

Response

201
application/json
Created
instance
object
hash
object
settings
object