Calling the API
Call the AffilStack REST API with the customer's access token. Everything is scoped to that customer's account and to the permissions they allowed.
curl https://developer.affilstack.com/api/v1/offers \
-H "Authorization: Bearer afat_…" \
-H "Accept: application/json"
Endpoints apps can use
GET /api/v1/me—profile:readGET /api/v1/offers,GET /api/v1/offers/{id}—offers:readPOST /api/v1/offers—offers:write(starts product research; uses the customer's API wallet like any API call)GET /api/v1/generations,GET /api/v1/generations/{id}—content:readGET /api/v1/crm-contacts,GET /api/v1/crm-contacts/{id}—crm:readPOST /api/v1/crm-contacts,POST /api/v1/crm-contacts/bulk,PATCH /api/v1/crm-contacts/{id}—crm:writeGET /api/v1/referrals/summary—referrals:read
The full request and response formats are in the OpenAPI specification. Other endpoints (admin, the browser extension, Zapier subscriptions) aren't available to apps.
Errors
401— the token is missing, expired, revoked, or the customer no longer has your app. Refresh the token; if that fails, ask the customer to connect again.403withrequired_scope— the customer didn't give your app that permission.429— rate limited. Limits follow the customer's plan; back off and retry.
Idempotency
Send an Idempotency-Key header on POST /offers and POST /crm-contacts so a retried request isn't applied twice.