Skip to main content
POST
/
webhooks
Create a new webhook
curl --request POST \
  --url https://api.lettermint.co/v1/webhooks \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "route_id": "<string>",
  "name": "<string>",
  "url": "<string>",
  "events": [
    "message.created"
  ],
  "enabled": true
}'
{
  "data": {
    "id": "<string>",
    "route_id": "<string>",
    "name": "<string>",
    "url": "<string>",
    "events": [
      "<string>"
    ],
    "enabled": true,
    "secret": "<string>",
    "last_called_at": "2023-11-07T05:31:56Z",
    "created_at": "2023-11-07T05:31:56Z",
    "updated_at": "2023-11-07T05:31:56Z"
  },
  "message": "Webhook created successfully. Please save the secret as it will not be shown again."
}

Authorizations

Authorization
string
header
required

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

Body

application/json

StoreWebhookData

route_id
string
required
name
string
required
Maximum length: 255
url
string<uri>
required
Maximum length: 500
events
enum<string>[]
required
Minimum length: 1
enabled
boolean | null
default:true

Response

data
object
required
message
enum<string>
required
Available options:
Webhook created successfully. Please save the secret as it will not be shown again.