import requests


def createPost(url, data):
    """
    Internal call for the API
    
    Parameters
    ----------
    url : str
        the url of the api endpoint
    data : dict
        the json data as a dictionary object
    """
    resp = requests.post(url, json = data)
    if resp.status_code != 201:
        print(resp.text)
    return resp