Autumn's V2 API is live in beta. We recommend using this version.
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({customer_id: '<string>', program_id: '<string>'})
};
fetch('https://api.useautumn.com/v1/referrals/code', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"code": "<string>",
"customer_id": "<string>",
"created_at": 123
}const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({customer_id: '<string>', program_id: '<string>'})
};
fetch('https://api.useautumn.com/v1/referrals/code', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"code": "<string>",
"customer_id": "<string>",
"created_at": 123
}This endpoint creates or retrieves a unique referral code for a customer within a specific referral program.Documentation Index
Fetch the complete documentation index at: https://docs-v1.useautumn.com/llms.txt
Use this file to discover all available pages before exploring further.
program_id parameter refers to the referral program ID that you define when creating a referral program in the Autumn dashboard. Each program can have different rewards and rules.Bearer authentication header of the form Bearer <token>, where <token> is your auth token.