I can upload small drafts OK using the metadata endpoint (https://www.googleapis.com/gmail/v1/users/me/drafts), e.g.:
{\"message\":{\"raw\":\"TUlNRS1WZXJzaW9
You need to use the /upload "media upload" path to upload anything over a few MB. The URL and POST format are slightly different:
You'd do:
--part_boundary
Content-Type: application/json; charset=UTF-8
{
}
--part_boundary
Content-Type: message/rfc822
From: script@example.org
To: user@example.com
Subject: test
body here
--part_boundary--
See this for more info (which then links to this).