Authentication
The Marketing Edge API requires an authorization token to authorize requests. API tokens can only be generated by Administrator users within the Marketing Edge UI.
API tokens should be protected as you would protect any password. API tokens provide full access to your account, where any of the following actions can be performed:
- Manage Call Tracking Lines
- Access Reporting Details
- Manage Integrations
Additionally, a Subscription Key is also required which allows for customization of access to various APIs per API Token.
Creating a Subscription Key and Authorization Tokens
To create a Subscription Key and/or Authorization Tokens, use your Administrator account to login to the Ordering Portal.
Navigate to Settings -> API Access, where you can create and manage existing tokens.
Clicking the 'Create Key' button will generate and assign a Subscription Key to the account. Only one Subscription Key is required per account and will be shared across all Authorization Tokens created for the organization.
The Subscription Key allows for a global level of access management so should any/all of your tokens become compromised, deleting or regenerating the Subscription Key can be done via the options menu
Clicking the 'Create Token' button, will open a modal where an Authorization Token can be created.
When creating an API Token, you will have the option to grant access at two different levels.
Domain - Using your account hierarchy you may grant API access at one or more levels. To provide global access to your token, choose the highest level node of your account hierarchy. The API Token that is generated will be granted access to all sub-nodes
Advertiser - Users with Advertiser access will be granted read-only level access for all Numbers, Number Pools, Groups, Call Detail Reporting, Text Reporting for Groups assigned to the selected advertiser(s)
After clicking the Create button, an API token will be created. Using this token, you may begin submitting requests to the API.
curl -H "x-organization-token: {authorization_token}" \
-H "subscription-key: {subscription_key}" \
-X GET \
"https://edgeapi.marchex.io/marketingedge/v5/api/numbers"
Revoking Access
Through the API Access screen in the Marketing Edge UI, clicking the 'delete' will revoke all access for the token. Please note this action cannot be undone.
Updated over 2 years ago