POST
/
v1
/
webhooks
curl --request POST \
  --url https://api.malga.io/v1/webhooks \
  --header 'Content-Type: application/json' \
  --header 'X-Api-Key: <api-key>' \
  --header 'X-Client-Id: <api-key>' \
  --data '{
  "event": "transaction.authorized",
  "endpoint": "https://enuqkxq2lu8be0y.m.pipedream.net",
  "version": 1.1,
  "status": true
}'
{
  "id": "31c142ad-4c30-4964-ba24-2df0f2bbb745",
  "event": "transaction.authorized",
  "endpoint": "https://enuqkxq2lu8be0y.m.pipedream.net",
  "version": 1.1,
  "publicKey": "-----BEGIN PUBLIC KEY-----\nMCowBQYDK2VwAyEAnFQSIT7Mwg5QLeJLAwhAJx9wS+XsQvnyph/Lz7AJyQA=\n-----END PUBLIC KEY-----\n",
  "status": true,
  "clientId": "cc0b1e41-2936-45c5-947f-93995ffcdc00",
  "createdAt": "2021-07-06T21:03:36.590Z",
  "updatedAt": "2021-07-06T21:03:36.590Z"
}

Authorizations

X-Client-Id
string
headerrequired
X-Api-Key
string
headerrequired

Body

application/json
event
string
required

Evento que deseja receber notificações no seu webhook conforme descrito na seção Eventos suportados para notificação via webhooks. Deve ser criado um webhook para cada evento, podendo ser utilizado o wildcard * no lugar do evento para receber todos os eventos em um único webhook.

endpoint
string
required

URL do seu sistema que deverá receber as notificações de evento, o valor não pode se repetir em outro webhook.

version
number
default: 1.1required

Versão da api da Malga que seu webhook implementa

status
boolean
default: truerequired

Identifica se o webhooks está ativo ou não para receber notificações de evento da Malga

Response

201 - application/json
id
string

identificador do webhook

createdAt
string

data de criação

clientId
string

identificador do client

event
string

Tipo do evento que deseja receber notificações no seu webhook

endpoint
string

URL do seu sistema que deverá receber as notificações de evento

version
number
default: 1.1

Versão da api da Malga que seu webhook implementa

publicKey
string

Chave pública ed25519

status
boolean
default: true

Identifica se o webhooks está ativo ou não para receber notificações de evento da Malga