POST
/
v1
/
subscriptions
curl --request POST \
  --url https://api.base39.io/v1/subscriptions \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "name": "Loan created webhook",
  "events": [
    {
      "eventType": "loan.created"
    }
  ],
  "notification": {
    "url": "https://api.example.com/webhooks",
    "headers": {
      "Authorization": "key-12345"
    }
  }
}'
{
  "id": "subs_5f92f01728e009f403d8502e",
  "name": "Loan created webhook",
  "events": [
    {
      "eventType": "loan.created"
    }
  ],
  "notification": {
    "url": "https://api.example.com/webhooks",
    "headers": {
      "Authorization": "key-12345"
    }
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

Idempotency-Key
string

Chave única de idempotência para evitar duplicação de requisições.

Body

application/json

Criar uma assinatura

Response

201 - application/json

Retorna o objeto Subscription se a criação for bem-sucedida. Retorna um erro se os parâmetros de criação forem inválidos.

Este objeto representa uma assinatura.