HTTP REST API
You can use Logtail even if there's no official library for your programming language by sending your logs to our HTTP API. It's simple to get started.
post
https://in.logtail.com
/
Log an event or an array of events

Example: Single event

cURL (JSON)
cURL (MessagePack)
1
curl -X POST https://in.logtail.com \
2
-H "Authorization: Bearer YOUR_LOGTAIL_SOURCE_TOKEN" \
3
-H "Content-Type: application/json" \
4
-d '{"message":"logtail is ready","nested":{"values":123}}'
Copied!
1
curl -X POST https://in.logtail.com \
2
-H "Authorization: Bearer YOUR_LOGTAIL_SOURCE_TOKEN" \
3
-H "Content-Type: application/msgpack" \
4
-d "\x82\xA7message\xB0logtail is ready\xA6nested\x81\xA6values{"
Copied!

Example: Multiple events

cURL (JSON)
cURL (MessagePack)
1
curl -X POST https://in.logtail.com \
2
-H "Authorization: Bearer YOUR_LOGTAIL_SOURCE_TOKEN" \
3
-H "Content-Type: application/json" \
4
-d '[{"message":"A"},{"message":"B"}]'
Copied!
1
curl -X POST https://in.logtail.com \
2
-H "Authorization: Bearer YOUR_LOGTAIL_SOURCE_TOKEN" \
3
-H "Content-Type: application/json" \
4
-d "\x92\x81\xA7message\xA1A\x81\xA7message\xA1B"
Copied!
Last modified 3mo ago