Authentication
Authenticate API requests with your Account ID and API Key.
All API requests use Basic HTTP Authentication, with your Account ID as the username and your API Key as the password. You can find both values in the My Profile section of your Oktopost account.
Requests run with the same permissions as the user the credentials belong to. If that user can't perform an action, the API returns 403 Forbidden. If the user can't access a specific resource, the API returns 404 Not Found.
Base URL
API access is available over HTTPS only.
The base URL depends on the data center that hosts your account.
US data center:
https://api.oktopost.com/v2EU data center:
https://eu-api.oktopost.com/v2Verifying Authentication
Use the Me endpoint to verify your credentials and retrieve details about your account:
curl -X GET "https://api.oktopost.com/v2/me" \
-u ACCOUNT_ID:API_KEYResponse:
{
"Result": true,
"User": {
"Id": "00A000000000000",
"Name": "John Smith",
"Email": "john@example.com",
"LastLogin": "2020-10-27 08:27:30"
},
"Account": {
"Id": "001000000000001",
"Name": "Acme"
}
}Call this endpoint when your integration starts up to validate the setup before making other requests.