Unable to try out Send API from docs

Hello Team. I’m new to Courier so please be gentle.

Reading the docs, I am experimenting with send API from the docs API explorer.
I tried setting the auth key and all the json message content, yet the requests fails with a constant error.

My message looks something like:

{
  "message": {
    "routing": {
      "method": "single",
      "channels": [
        "email"
      ]
    },
    "channels": {
      "email": {
        "providers": [
          "gmail"
        ],
        "metadata": {
          "utm": {}
        }
      }
    },
    "providers": {},
    "metadata": {
      "tags": [],
      "utm": {}
    },
    "timeout": {
      "channel": {},
      "provider": {}
    },
    "delay": {},
    "to": {
      "email": "test@test.com"
    },
    "content": {
      "title": "Hello World",
      "body": "Test content"
    }
  }
}

Ref : POST /send | Courier Docs

Any idea what am I missing? What could be the error behind preparing message?

Hey there @ayushagarwal :wave:

Thanks for reaching out! No need to worry, we all start from scratch - we don’t judge here :smile:

May I ask you a question? Are you using an email template to send this particular notification or are you only using the send API?

Thanks!

1 Like

Hey @rodrigo ! Thanks for the quick response.

I’m using only the send API. No templates so far!

My initial hunch is there is some bug with the API Explorer. If I curl the command on my terminal, the API is successfully hit :no_mouth:

You could be onto something here @ayushagarwal.

To be honest with you, I don’t really use the API explorer since I use an API client like Insomnia. Thanks for bringing this up to our attention though!

Even if our team doesn’t use the explorer, we should have it working for our users no matter what.

Agree @rodrigo ! Is there way to raise bug report?

I just re-staged everything and can confirm that the curl from API explorer results in the above error (Refer screenshot attached) where as executing the same from terminal results in success status.

1 Like

No need to trouble yourself with that @ayushagarwal - I can take care of it from here :smile:

Thanks again for bringing this up to us!

1 Like