XHR Post Requests III Wont work, no errors

Hi everyone,

Ive just finished Post Requests in Introduction to JavaScript (https://www.codecademy.com/courses/introduction-to-javascript/lessons/requests-i/exercises/xhr-post-requests-iii)

My problem is the example project does not seem to work, i have went through all the steps successfully, but when i enter the URL that we need to shorten, nothing happens.
Would it be a problem with my rebrandly API Key?

// Information to reach API
const apiKey = '<my api key>';
const url = 'https://api.rebrandly.com/v1/links';

// AJAX functions
const shortenUrl = () => {
    const urlToShorten = inputField.value;
    const data = JSON.stringify({destination:urlToShorten});
    const xhr = new XMLHttpRequest;
    xhr.responseType = 'json';

    xhr.onreadystatechange = () => {
      if (xhr.readyState === XMLHttpRequest.DONE) {
    xhr.setRequestHeader('Content-type', 'application/json');
    xhr.setRequestHeader('apikey', apiKey);