Email inbox apivita
Here is an example of an API for accessing an email inbox, specifically for Apivita:
API Endpoint: https://api.apivita.com/email/inbox
Method: GET
Authentication: Bearer YOUR_API_KEY
(replace YOUR_API_KEY
with your actual Apivita API key)
Request Headers:
Content-Type: application/json
Authorization: Bearer YOUR_API_KEY
Request Parameters:
limit
: The number of emails to retrieve (default: 10)offset
: The starting point for the email list (default: 0)query
: A search query to filter emails (optional)
Response:
emails
: An array of email objects, each containing the following properties:id
: The email IDsubject
: The email subjectfrom
: The email senderto
: The email recipientbody
: The email bodydate
: The email date
total
: The total number of emails in the inbox
Example Response:
{
"emails": [
{
"id": "1234567890",
"subject": "Hello from Apivita",
"from": "[email protected]",
"to": "[email protected]",
"body": "Hello Jane, this is a test email.",
"date": "2023-02-20T14:30:00Z"
},
{
"id": "2345678901",
"subject": "Re: Hello from Apivita",
"from": "[email protected]",
"to": "[email protected]",
"body": "Hi John, thanks for the email!",
"date": "2023-02-21T10:15:00Z"
}
],
"total": 2
}
Error Handling:
401 Unauthorized
: Invalid API key or authentication failed404 Not Found
: Inbox not found or no emails available500 Internal Server Error
: Server error or API endpoint not available
Please note that this is just an example API and may not reflect the actual API provided by Apivita. You should consult the official Apivita documentation for the actual API endpoint, method, and parameters.