Generate new API Key
POST
https://api.smtpd.dev/api/v1/account/api_key
IMPORTANT: The generated secret will be visible only once. After the key has been created, you will only be able to see the name of the key.
API Keys are automatically revoked after 90 days of inactivity.
Path Parameters
Request Body
The permission role for the API key. Supports the following roles;
iac
, standard
, read_only
, send_only
{
"ID": "ad75ae9c-f133-11eb-ab65-0a58a9feaca0",
"Name": "PROD - Datadog",
"Key": "ty5davhlalixzn7+2+4l9yemuxdprs8m2ue45vtxsot/zjngii1ptlrzxleceojvxos423om1zsu0apx6wmira==/1w2fsrgv7mayczileqw5svnduj3",
"Secret": "lloIT4+/3636UvGI2dTm20DH/V9cdFpzHNcET142I32sKVmZV95xnYkVD7CZT7XhoHnQmYS7n/EE7DQmZMv7eoa+k+E/HVXXbjqmB3OFMccSJxboO17wiokvZGgr7Hsdw3LAwrWeYtdAHwzpFB/73JCg7mJ5Ln5ntzfKB1v10dY=/1w2FsQmMFMtP4h1x8lMjhoEwYv8"
}
Get all API Keys
GET
https://api.smtpd.dev/api/v1/account/api_key
Path Parameters
[
{
"id": "055e24ae-f132-11eb-a5ac-0a58a9feac2b",
"account_id": "35132685-7dcf-4b2a-8c88-88ccf4848925",
"name": "Staging - AWS",
"key": "oqzedt51ibrwg5u2tgoanah1eulilowfj3+hcjlydywquze647c8jvyrqvx5ykeivttzo3ulxaa2a3/gecc08w==/1w2eqx3nkawstmkzct7zk7c5uyw",
"is_active": true,
"last_accessed_at_utc": 1827618270,
"created_at_utc": 1627618270,
"modified_at_utc": 1627618270
},
{
"id": "ad75aea0-f133-11eb-ab65-0a58a9feaca0",
"account_id": "35132685-7dcf-4b2a-8c88-88ccf4848925",
"name": "PROD - Datadog",
"key": "ty5davhlalixzn7+2+4l9yemuxdprs8m2ue45vtxsot/zjngii1ptlrzxleceojvxos423om1zsu0apx6wmira==/1w2fsrgv7mayczileqw5svnduj3",
"is_active": true,
"last_accessed_at_utc": 1827618270,
"created_at_utc": 1627642982,
"modified_at_utc": 1627642982
}
]
Get an API Key by ID
GET
https://api.smtpd.dev/api/v1/account/api_key/:id
{
"id": "055e24ae-f132-11eb-a5ac-0a58a9feec2b",
"account_id": "35132685-7dcf-4b2a-8c88-88ccf4848925",
"name": "Staging - AWS",
"key": "oqzedt51ibrwg5u2tgoanah1eulilowfj3+hcjlydywquze647c8jvyrqvx5ykeivttzo3ulxaa2a3/gecc08w==/1w2eqx3nkawstmkzct7zk7c5uyw",
"is_active": true,
"last_accessed_at_utc": 1827618270,
"created_at_utc": 1627618270,
"modified_at_utc": 1627618270
}
Get API Key sessions by ID
GET
https://api.smtpd.dev/api/v1/account/api_key/:id/sessions
[
{
"id": "3430b8f0-b04b-48c9-824e-dae631f3ecd8",
"account_id": "34132685-7dcf-4b2a-8c88-48ccff847925",
"ip_address": "22.2.3.28",
"raw_user_agent": "",
"user_agent_family": "",
"user_agent_version": "",
"user_agent_major_version": "",
"os_family": "",
"os_version": "",
"device_family": "Other",
"device_brand": "",
"device_type": "Unknown",
"country": "United States",
"country_iso_code": "US",
"is_active": true,
"created_at_utc": 1657870731,
"modified_at_utc": 1657870731
}
]
Revoke an API key
PUT
https://api.smtpd.dev/api/v1/account/api_key/:id/revoke
Path Parameters
Last updated