Quickstart

Create an app, get a token, send your first lead.

1. Create an app

Sign in at beta.zahrex.com, open your organization, go to Platform, then Developers, and create an app. Copy the client ID and the client secret. The secret is shown once; store it in an environment variable on your server.

2. Get an access token

Exchange the client ID and secret for a short-lived token.

curl -X POST https://api.zahrex.com/v1/oauth/token \
  -u "$ZAHREX_CLIENT_ID:$ZAHREX_CLIENT_SECRET" \
  -d "grant_type=client_credentials"

The response contains an access_token. Export it as ZAHREX_ACCESS_TOKEN.

3. Send your first lead

curl -X POST https://api.zahrex.com/v1/events \
  -H "Authorization: Bearer $ZAHREX_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "id": "evt_0001",
  "type": "lead.created",
  "data": {
    "name": "Sara Example",
    "phone": "+212600000000",
    "email": "sara@example.com",
    "source": "pricing_page",
    "stage": "signed_up"
  }
}'

See Events for every event type and its fields.

4. See it in Zahrex

Open the Leads page of the same organization. The lead you just sent appears there.

Next: Authentication, Webhooks.

Smarter sales automation,
powered by AI.

Find products, build stores, launch campaigns, confirm orders, ship and get paid, from one connected platform.

Stay in touch!