Quick Start — Your first request in 5 minutes

1. Get credentials

In the CRM, open Settings › Service Accounts (administrators only), create a Service Account with the permissions your integration needs and copy the Client ID and Client Secret.

2. Authenticate

Exchange the credentials for an access token:

cURL
curl -X POST https://magnetcustomer.net/realms/platform/protocol/openid-connect/token \
  -H "Content-Type: application/x-www-form-urlencoded" \
  -d "grant_type=client_credentials" \
  -d "client_id=YOUR_CLIENT_ID" \
  -d "client_secret=YOUR_CLIENT_SECRET"

Response:

Response
{
  "access_token": "eyJhbGciOiJSUzI1NiIs...",
  "expires_in": 900,
  "token_type": "Bearer"
}

3. Make your first request

cURL
curl "https://sua-conta.platform-api.magnetcustomer.com/api/contacts?page=1&limit=5" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN"

4. Next steps