Authentication to the Mailcoach API is done by using a Bearer token
, you can create a new token in your account.
User endpoint
You can use the user endpoint to get the details of the currently logged in user.
$ MAILCOACH_TOKEN="your API token"
$ curl https://[[your-mailcoach-instance-url]]/api/user \
-H "Authorization: Bearer $MAILCOACH_TOKEN" \
-H 'Accept: application/json' \
-H 'Content-Type: application/json'
As a result, you get the details of the user that this token belongs to
{
"data": {
"id": 1,
"email": "john@doe.com",
"created_at": "2020-08-06T12:08:25.000000Z",
"updated_at": "2020-08-06T12:08:25.000000Z"
}
}