Skip to main content

Python Example

python example
import requests

api_key = 'XYZ'
headers = {"Authorization": "Bearer %s" % api_key}
body = {
"projectId": "project-name",
"title": "New subscription",
"summary": "A new user has subscribed to base plan",
"body": "foo@bar.com just subscribed to plan XYZ",
"tags": [
"new subscriber",
"welcome"
],
"groups": [
"first-group",
"second-group"
],
"roles": [
"admin",
"developers"
],
"users": [
"user1@example.com",
"user2@example.com"
],
"properties": [
{"key": "value"},
{"key2": "value2"}
],
"externalChannels": [
"channel-code",
"other-channel-code"
],

"icon": "🤪",
"link": "https://www.example.com",
"push": False
}

r = requests.post(url="https://api.everylog.io/api/v1/log-entries", json=body, headers=headers)