Make your first API call
Walk end to end through authenticating and calling an endpoint for the first time.
What you'll build
By the end of this tutorial you'll have sent one authenticated request to the platform API from your terminal and read back a real response. This confirms your credentials, your network access, and your request format all work — the foundation for anything else you automate, from syncing subscribers to triggering Broadcasts.
Before you begin
- An account with API access enabled and permission to create credentials (confirm the exact steps in your account).
- An API key (or client ID and secret) issued from your account's developer or integration settings. Treat it like a password.
- The base URL for your account's API region or environment.
- A command-line HTTP client such as
curl, or an API tool like Postman.
Steps
- Generate an API key. In your account settings, open the developer or API area and create a new key. Copy it somewhere safe now — many systems show the secret only once (confirm the exact steps in your account).
- Store the key as an environment variable so it never lands in your shell history or source control:
export API_KEY="paste-your-key-here"export API_BASE="https://api.example.com"
- Call a simple, read-only endpoint first. A "who am I" or account-info endpoint is the safest way to prove authentication without changing any data. Send the key in the
Authorizationheader:(Confirm the exact base path, version prefix, and header scheme for your account.)curl -s "$API_BASE/v1/account" \-H "Authorization: Bearer $API_KEY" - Read the response. A
200status with a JSON body means success. A401or403means the key is missing, wrong, or lacks permission; a404usually means the path is off.
Next steps
- Move from reading to writing — see Send a transactional email.
- Personalize what you send with personalization tags.
- Interpret delivery and engagement results in the metrics dictionary.
Canonical terms: Author, Edition, Folder (Project Folder), Broadcast. See the Glossary.