cURL Examples

Quick examples for testing Flux APIs with cURL.

Basic GET Request

curl -X GET \
  'https://useflux.site/api/v2/gateway/abc123/posts/1' \
  -H 'x-flux-payment-tx: 0x1234...' \
  -H 'x-flux-signature: 0x5678...'

POST Request with Body

curl -X POST \
  'https://useflux.site/api/v2/gateway/abc123/posts' \
  -H 'x-flux-payment-tx: 0x1234...' \
  -H 'x-flux-signature: 0x5678...' \
  -H 'Content-Type: application/json' \
  -d '{
    "title": "My Post",
    "body": "Post content",
    "userId": 1
  }'

With Path Parameters

With Query Parameters

Complete Example with Payment

Error Handling

Last updated