π»API
An alternative to our SDK - for submitting custom attributes to new or existing customers.
Last updated
fetch('https://gateway.mava.app/api/identify', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'x-auth-token': 'YOUR_AUTH_TOKEN_HERE'
},
body: JSON.stringify({
emailAddress: '',
mavaCustomerId: '',
customAttributes: [
{
label: 'exampleLabel',
value: 'exampleValue'
}
]
})
})
.then(response => response.json())
.then(data => console.log(data))
.catch((error) => console.error('Error:', error));{
"type": "object",
"properties": {
"emailAddress": {
"type": "string"
},
"plaformUserId": {
"type": "string"
},
"mavaCustomerId": {
"type": "string"
},
"customAttributes": {
"type": "array",
"items": {
"type": "object",
"properties": {
"label": {
"type": "string"
},
"value": {
"type": "string"
}
},
"required": ["label", "value"]
}
}
}
}