Authentication
To obtain an API key:
curl --location --request POST 'https://muapi.ai/api/v1/endpoint' \
--header "Content-Type: application/json" \
--header "x-api-key: {MUAPIAPP_API_KEY}" \
--data-raw '{"param1": "value1", "param2": "value2"}
import requests
import json
headers = {
"x-api-key": f"{MUAPIAPP_API_KEY}",
"Content-Type": "application/json"
}
payload = {
"param1": "value1",
"param2": "value2"
}
response = requests.post("https://api.muapi.ai/api/v1/endpoint", json=payload, headers=headers)
print(response.json())
const apiKey = process.env.MUAPIAPP_API_KEY;
const headers = {
'x-api-key': `${apiKey}`,
'Content-Type': 'application/json'
};
const payload = {
param1: 'value1',
param2: 'value2'
};
fetch('https://muapi.ai/api/v1/endpoint', {
method: 'POST',
headers: headers,
body: JSON.stringify(payload)
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));