UNPKG

fcx-minddale-js

Version:

JavaScript client SDK for the headless micro CRM, Minddale.

12 lines (10 loc) 395 B
const axios = require('axios'); const CONSTANT = require('./constants'); const common = require('./common'); async function publishContact(contact, apiKey, endpoint=CONSTANT.CONTACT_ENDPOINT, baseUrl=CONSTANT.API_BASE_URL) { const response = await axios.post(`${baseUrl}${endpoint}`, contact, common.getHeaders(apiKey)); return response.data; } module.exports = { publishContact };