agentmail 0.0.69 → 0.0.70
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/Client.d.ts +3 -0
- package/dist/cjs/Client.js +17 -12
- package/dist/cjs/api/resources/apiKeys/client/Client.d.ts +65 -0
- package/dist/cjs/api/resources/apiKeys/client/Client.js +292 -0
- package/dist/cjs/api/resources/apiKeys/client/index.d.ts +2 -0
- package/dist/cjs/api/resources/apiKeys/client/index.js +17 -0
- package/dist/cjs/api/resources/apiKeys/client/requests/ListApiKeysRequest.d.ts +12 -0
- package/dist/cjs/api/resources/apiKeys/client/requests/ListApiKeysRequest.js +5 -0
- package/dist/cjs/api/resources/apiKeys/client/requests/index.d.ts +1 -0
- package/dist/cjs/api/resources/apiKeys/client/requests/index.js +2 -0
- package/dist/cjs/api/resources/apiKeys/index.d.ts +2 -0
- package/dist/cjs/api/resources/apiKeys/index.js +18 -0
- package/dist/cjs/api/resources/apiKeys/types/ApiKey.d.ts +12 -0
- package/dist/cjs/api/resources/apiKeys/types/ApiKey.js +5 -0
- package/dist/cjs/api/resources/apiKeys/types/ApiKeyId.d.ts +7 -0
- package/dist/cjs/api/resources/apiKeys/types/ApiKeyId.js +5 -0
- package/dist/cjs/api/resources/apiKeys/types/CreateApiKeyRequest.d.ts +7 -0
- package/dist/cjs/api/resources/apiKeys/types/CreateApiKeyRequest.js +5 -0
- package/dist/cjs/api/resources/apiKeys/types/CreateApiKeyResponse.d.ts +12 -0
- package/dist/cjs/api/resources/apiKeys/types/CreateApiKeyResponse.js +5 -0
- package/dist/cjs/api/resources/apiKeys/types/CreatedAt.d.ts +7 -0
- package/dist/cjs/api/resources/apiKeys/types/CreatedAt.js +5 -0
- package/dist/cjs/api/resources/apiKeys/types/ListApiKeysResponse.d.ts +10 -0
- package/dist/cjs/api/resources/apiKeys/types/ListApiKeysResponse.js +5 -0
- package/dist/cjs/api/resources/apiKeys/types/Name.d.ts +7 -0
- package/dist/cjs/api/resources/apiKeys/types/Name.js +5 -0
- package/dist/cjs/api/resources/apiKeys/types/Prefix.d.ts +7 -0
- package/dist/cjs/api/resources/apiKeys/types/Prefix.js +5 -0
- package/dist/cjs/api/resources/apiKeys/types/index.d.ts +8 -0
- package/dist/cjs/api/resources/apiKeys/types/index.js +24 -0
- package/dist/cjs/api/resources/index.d.ts +3 -0
- package/dist/cjs/api/resources/index.js +4 -1
- package/dist/cjs/serialization/resources/apiKeys/index.d.ts +1 -0
- package/dist/cjs/serialization/resources/apiKeys/index.js +17 -0
- package/dist/cjs/serialization/resources/apiKeys/types/ApiKey.d.ts +20 -0
- package/dist/cjs/serialization/resources/apiKeys/types/ApiKey.js +51 -0
- package/dist/cjs/serialization/resources/apiKeys/types/ApiKeyId.d.ts +10 -0
- package/dist/cjs/serialization/resources/apiKeys/types/ApiKeyId.js +41 -0
- package/dist/cjs/serialization/resources/apiKeys/types/CreateApiKeyRequest.d.ts +13 -0
- package/dist/cjs/serialization/resources/apiKeys/types/CreateApiKeyRequest.js +44 -0
- package/dist/cjs/serialization/resources/apiKeys/types/CreateApiKeyResponse.d.ts +20 -0
- package/dist/cjs/serialization/resources/apiKeys/types/CreateApiKeyResponse.js +51 -0
- package/dist/cjs/serialization/resources/apiKeys/types/CreatedAt.d.ts +10 -0
- package/dist/cjs/serialization/resources/apiKeys/types/CreatedAt.js +41 -0
- package/dist/cjs/serialization/resources/apiKeys/types/ListApiKeysResponse.d.ts +17 -0
- package/dist/cjs/serialization/resources/apiKeys/types/ListApiKeysResponse.js +48 -0
- package/dist/cjs/serialization/resources/apiKeys/types/Name.d.ts +10 -0
- package/dist/cjs/serialization/resources/apiKeys/types/Name.js +41 -0
- package/dist/cjs/serialization/resources/apiKeys/types/Prefix.d.ts +10 -0
- package/dist/cjs/serialization/resources/apiKeys/types/Prefix.js +41 -0
- package/dist/cjs/serialization/resources/apiKeys/types/index.d.ts +8 -0
- package/dist/cjs/serialization/resources/apiKeys/types/index.js +24 -0
- package/dist/cjs/serialization/resources/index.d.ts +2 -0
- package/dist/cjs/serialization/resources/index.js +3 -1
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/llms-full.txt +478 -157
- package/dist/llms.txt +5 -2
- package/package.json +1 -1
- package/reference.md +157 -0
|
@@ -36,11 +36,13 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
36
36
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
37
37
|
};
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.threads = exports.metrics = exports.messages = exports.events = exports.drafts = exports.domains = exports.attachments = exports.webhooks = exports.inboxes = exports.websockets = void 0;
|
|
39
|
+
exports.threads = exports.metrics = exports.messages = exports.events = exports.drafts = exports.domains = exports.attachments = exports.apiKeys = exports.webhooks = exports.inboxes = exports.websockets = void 0;
|
|
40
40
|
exports.websockets = __importStar(require("./websockets/index.js"));
|
|
41
41
|
__exportStar(require("./websockets/client/socket/index.js"), exports);
|
|
42
42
|
exports.inboxes = __importStar(require("./inboxes/index.js"));
|
|
43
43
|
exports.webhooks = __importStar(require("./webhooks/index.js"));
|
|
44
|
+
exports.apiKeys = __importStar(require("./apiKeys/index.js"));
|
|
45
|
+
__exportStar(require("./apiKeys/types/index.js"), exports);
|
|
44
46
|
exports.attachments = __importStar(require("./attachments/index.js"));
|
|
45
47
|
__exportStar(require("./attachments/types/index.js"), exports);
|
|
46
48
|
exports.domains = __importStar(require("./domains/index.js"));
|
package/dist/cjs/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "0.0.
|
|
1
|
+
export declare const SDK_VERSION = "0.0.70";
|
package/dist/cjs/version.js
CHANGED
package/dist/llms-full.txt
CHANGED
|
@@ -306,7 +306,7 @@ Unlike traditional email providers that are designed for human scale, AgentMail
|
|
|
306
306
|
|
|
307
307
|
As the diagram below illustrates, your `organization` is the top-level container that holds all your resources. You can provision many `Inboxes` within your `organization`, each with its own `Threads`, `Messages`, and `Attachments`, allowing you to manage a large fleet of agents seamlessly.
|
|
308
308
|
|
|
309
|
-
<img src="file:
|
|
309
|
+
<img src="file:a563cc9a-3012-411b-b20a-82d8382138a3" alt="AgentMail Organizational Hierarchy" />
|
|
310
310
|
|
|
311
311
|
<Steps>
|
|
312
312
|
<Step title="Organization">
|
|
@@ -731,7 +731,7 @@ Here is an example of a well-structured and styled HTML header:
|
|
|
731
731
|
</CodeBlocks>
|
|
732
732
|
|
|
733
733
|
<Frame caption="Look how pretty this message looks!">
|
|
734
|
-
<img src="file:
|
|
734
|
+
<img src="file:440704fb-ef72-42d0-8792-0e77aad18848" alt="rendered css" />
|
|
735
735
|
</Frame>
|
|
736
736
|
|
|
737
737
|
## Receiving `Messages`
|
|
@@ -1468,7 +1468,7 @@ Configuring your domain is a three-step process: add the domain via API, copy th
|
|
|
1468
1468
|
* **Value:** Can directly copy paste the `value` from the API response (e.g., `{random_letters_numbers}.dkim.amazonses.com`).
|
|
1469
1469
|
|
|
1470
1470
|
<Frame caption="Example of adding a CNAME record in Route 53. Notice that AWS already appends the root domain (agentmail.cc) to the end of the name value!">
|
|
1471
|
-
<img src="file:
|
|
1471
|
+
<img src="file:dd85c110-e239-4efe-9e72-addac8cfed15" alt="AWS Route 53 Record Configuration" />
|
|
1472
1472
|
</Frame>
|
|
1473
1473
|
|
|
1474
1474
|
* **TXT (DMARC/SPF):**
|
|
@@ -2017,7 +2017,7 @@ How you send your emails is just as important as what you send. If you're sendin
|
|
|
2017
2017
|
more natural to email providers. AgentMail's ability to create inboxes at
|
|
2018
2018
|
scale makes this strategy easy to implement.
|
|
2019
2019
|
|
|
2020
|
-
<img src="file:
|
|
2020
|
+
<img src="file:3a9cc940-f3f7-4bd0-8aeb-5cc750559949" alt="Diagram comparing one inbox sending 1000 emails vs. five inboxes sending 200 each." />
|
|
2021
2021
|
</Step>
|
|
2022
2022
|
|
|
2023
2023
|
<Step title="Protect Your Reputation with Multiple Domains">
|
|
@@ -7502,159 +7502,6 @@ client.drafts.get(
|
|
|
7502
7502
|
|
|
7503
7503
|
```
|
|
7504
7504
|
|
|
7505
|
-
# List Metrics
|
|
7506
|
-
|
|
7507
|
-
GET https://api.agentmail.to/v0/metrics
|
|
7508
|
-
|
|
7509
|
-
Reference: https://docs.agentmail.to/api-reference/metrics/list
|
|
7510
|
-
|
|
7511
|
-
## OpenAPI Specification
|
|
7512
|
-
|
|
7513
|
-
```yaml
|
|
7514
|
-
openapi: 3.1.1
|
|
7515
|
-
info:
|
|
7516
|
-
title: List Metrics
|
|
7517
|
-
version: endpoint_metrics.list
|
|
7518
|
-
paths:
|
|
7519
|
-
/v0/metrics:
|
|
7520
|
-
get:
|
|
7521
|
-
operationId: list
|
|
7522
|
-
summary: List Metrics
|
|
7523
|
-
tags:
|
|
7524
|
-
- - subpackage_metrics
|
|
7525
|
-
parameters:
|
|
7526
|
-
- name: event_types
|
|
7527
|
-
in: query
|
|
7528
|
-
required: false
|
|
7529
|
-
schema:
|
|
7530
|
-
$ref: '#/components/schemas/type_metrics:MetricEventTypes'
|
|
7531
|
-
- name: start_timestamp
|
|
7532
|
-
in: query
|
|
7533
|
-
required: true
|
|
7534
|
-
schema:
|
|
7535
|
-
$ref: '#/components/schemas/type_metrics:MetricStartTimestamp'
|
|
7536
|
-
- name: end_timestamp
|
|
7537
|
-
in: query
|
|
7538
|
-
required: true
|
|
7539
|
-
schema:
|
|
7540
|
-
$ref: '#/components/schemas/type_metrics:MetricEndTimestamp'
|
|
7541
|
-
- name: Authorization
|
|
7542
|
-
in: header
|
|
7543
|
-
description: >-
|
|
7544
|
-
Bearer authentication of the form `Bearer <token>`, where token is
|
|
7545
|
-
your auth token.
|
|
7546
|
-
required: true
|
|
7547
|
-
schema:
|
|
7548
|
-
type: string
|
|
7549
|
-
responses:
|
|
7550
|
-
'200':
|
|
7551
|
-
description: Response with status 200
|
|
7552
|
-
content:
|
|
7553
|
-
application/json:
|
|
7554
|
-
schema:
|
|
7555
|
-
$ref: '#/components/schemas/type_metrics:ListMetricsResponse'
|
|
7556
|
-
'404':
|
|
7557
|
-
description: Error response with status 404
|
|
7558
|
-
content: {}
|
|
7559
|
-
components:
|
|
7560
|
-
schemas:
|
|
7561
|
-
type_metrics:MetricEventType:
|
|
7562
|
-
type: string
|
|
7563
|
-
enum:
|
|
7564
|
-
- value: message.sent
|
|
7565
|
-
- value: message.delivered
|
|
7566
|
-
- value: message.bounced
|
|
7567
|
-
- value: message.delayed
|
|
7568
|
-
- value: message.rejected
|
|
7569
|
-
- value: message.complained
|
|
7570
|
-
- value: message.received
|
|
7571
|
-
type_metrics:MetricEventTypes:
|
|
7572
|
-
type: array
|
|
7573
|
-
items:
|
|
7574
|
-
$ref: '#/components/schemas/type_metrics:MetricEventType'
|
|
7575
|
-
type_metrics:MetricStartTimestamp:
|
|
7576
|
-
type: string
|
|
7577
|
-
format: date-time
|
|
7578
|
-
type_metrics:MetricEndTimestamp:
|
|
7579
|
-
type: string
|
|
7580
|
-
format: date-time
|
|
7581
|
-
type_metrics:MetricTimestamp:
|
|
7582
|
-
type: string
|
|
7583
|
-
format: date-time
|
|
7584
|
-
type_metrics:MessageMetrics:
|
|
7585
|
-
type: object
|
|
7586
|
-
properties:
|
|
7587
|
-
sent:
|
|
7588
|
-
type: array
|
|
7589
|
-
items:
|
|
7590
|
-
$ref: '#/components/schemas/type_metrics:MetricTimestamp'
|
|
7591
|
-
delivered:
|
|
7592
|
-
type: array
|
|
7593
|
-
items:
|
|
7594
|
-
$ref: '#/components/schemas/type_metrics:MetricTimestamp'
|
|
7595
|
-
bounced:
|
|
7596
|
-
type: array
|
|
7597
|
-
items:
|
|
7598
|
-
$ref: '#/components/schemas/type_metrics:MetricTimestamp'
|
|
7599
|
-
delayed:
|
|
7600
|
-
type: array
|
|
7601
|
-
items:
|
|
7602
|
-
$ref: '#/components/schemas/type_metrics:MetricTimestamp'
|
|
7603
|
-
rejected:
|
|
7604
|
-
type: array
|
|
7605
|
-
items:
|
|
7606
|
-
$ref: '#/components/schemas/type_metrics:MetricTimestamp'
|
|
7607
|
-
complained:
|
|
7608
|
-
type: array
|
|
7609
|
-
items:
|
|
7610
|
-
$ref: '#/components/schemas/type_metrics:MetricTimestamp'
|
|
7611
|
-
received:
|
|
7612
|
-
type: array
|
|
7613
|
-
items:
|
|
7614
|
-
$ref: '#/components/schemas/type_metrics:MetricTimestamp'
|
|
7615
|
-
type_metrics:ListMetricsResponse:
|
|
7616
|
-
type: object
|
|
7617
|
-
properties:
|
|
7618
|
-
message:
|
|
7619
|
-
$ref: '#/components/schemas/type_metrics:MessageMetrics'
|
|
7620
|
-
|
|
7621
|
-
```
|
|
7622
|
-
|
|
7623
|
-
## SDK Code Examples
|
|
7624
|
-
|
|
7625
|
-
```typescript
|
|
7626
|
-
import { AgentMailClient } from "agentmail";
|
|
7627
|
-
|
|
7628
|
-
async function main() {
|
|
7629
|
-
const client = new AgentMailClient({
|
|
7630
|
-
environment: "https://api.agentmail.to",
|
|
7631
|
-
apiKey: "YOUR_TOKEN_HERE",
|
|
7632
|
-
});
|
|
7633
|
-
await client.metrics.list({
|
|
7634
|
-
startTimestamp: new Date("2024-01-15T09:30:00Z"),
|
|
7635
|
-
endTimestamp: new Date("2024-01-15T09:30:00Z"),
|
|
7636
|
-
});
|
|
7637
|
-
}
|
|
7638
|
-
main();
|
|
7639
|
-
|
|
7640
|
-
```
|
|
7641
|
-
|
|
7642
|
-
```python
|
|
7643
|
-
from agentmail import AgentMail
|
|
7644
|
-
from datetime import datetime
|
|
7645
|
-
|
|
7646
|
-
client = AgentMail(
|
|
7647
|
-
base_url="https://api.agentmail.to",
|
|
7648
|
-
api_key="YOUR_TOKEN_HERE"
|
|
7649
|
-
)
|
|
7650
|
-
|
|
7651
|
-
client.metrics.list(
|
|
7652
|
-
start_timestamp=datetime.fromisoformat("2024-01-15T09:30:00Z"),
|
|
7653
|
-
end_timestamp=datetime.fromisoformat("2024-01-15T09:30:00Z")
|
|
7654
|
-
)
|
|
7655
|
-
|
|
7656
|
-
```
|
|
7657
|
-
|
|
7658
7505
|
# List Domains
|
|
7659
7506
|
|
|
7660
7507
|
GET https://api.agentmail.to/v0/domains
|
|
@@ -8681,6 +8528,480 @@ client.webhooks.delete(
|
|
|
8681
8528
|
|
|
8682
8529
|
```
|
|
8683
8530
|
|
|
8531
|
+
# List Metrics
|
|
8532
|
+
|
|
8533
|
+
GET https://api.agentmail.to/v0/metrics
|
|
8534
|
+
|
|
8535
|
+
Reference: https://docs.agentmail.to/api-reference/metrics/list
|
|
8536
|
+
|
|
8537
|
+
## OpenAPI Specification
|
|
8538
|
+
|
|
8539
|
+
```yaml
|
|
8540
|
+
openapi: 3.1.1
|
|
8541
|
+
info:
|
|
8542
|
+
title: List Metrics
|
|
8543
|
+
version: endpoint_metrics.list
|
|
8544
|
+
paths:
|
|
8545
|
+
/v0/metrics:
|
|
8546
|
+
get:
|
|
8547
|
+
operationId: list
|
|
8548
|
+
summary: List Metrics
|
|
8549
|
+
tags:
|
|
8550
|
+
- - subpackage_metrics
|
|
8551
|
+
parameters:
|
|
8552
|
+
- name: event_types
|
|
8553
|
+
in: query
|
|
8554
|
+
required: false
|
|
8555
|
+
schema:
|
|
8556
|
+
$ref: '#/components/schemas/type_metrics:MetricEventTypes'
|
|
8557
|
+
- name: start_timestamp
|
|
8558
|
+
in: query
|
|
8559
|
+
required: true
|
|
8560
|
+
schema:
|
|
8561
|
+
$ref: '#/components/schemas/type_metrics:MetricStartTimestamp'
|
|
8562
|
+
- name: end_timestamp
|
|
8563
|
+
in: query
|
|
8564
|
+
required: true
|
|
8565
|
+
schema:
|
|
8566
|
+
$ref: '#/components/schemas/type_metrics:MetricEndTimestamp'
|
|
8567
|
+
- name: Authorization
|
|
8568
|
+
in: header
|
|
8569
|
+
description: >-
|
|
8570
|
+
Bearer authentication of the form `Bearer <token>`, where token is
|
|
8571
|
+
your auth token.
|
|
8572
|
+
required: true
|
|
8573
|
+
schema:
|
|
8574
|
+
type: string
|
|
8575
|
+
responses:
|
|
8576
|
+
'200':
|
|
8577
|
+
description: Response with status 200
|
|
8578
|
+
content:
|
|
8579
|
+
application/json:
|
|
8580
|
+
schema:
|
|
8581
|
+
$ref: '#/components/schemas/type_metrics:ListMetricsResponse'
|
|
8582
|
+
'404':
|
|
8583
|
+
description: Error response with status 404
|
|
8584
|
+
content: {}
|
|
8585
|
+
components:
|
|
8586
|
+
schemas:
|
|
8587
|
+
type_metrics:MetricEventType:
|
|
8588
|
+
type: string
|
|
8589
|
+
enum:
|
|
8590
|
+
- value: message.sent
|
|
8591
|
+
- value: message.delivered
|
|
8592
|
+
- value: message.bounced
|
|
8593
|
+
- value: message.delayed
|
|
8594
|
+
- value: message.rejected
|
|
8595
|
+
- value: message.complained
|
|
8596
|
+
- value: message.received
|
|
8597
|
+
type_metrics:MetricEventTypes:
|
|
8598
|
+
type: array
|
|
8599
|
+
items:
|
|
8600
|
+
$ref: '#/components/schemas/type_metrics:MetricEventType'
|
|
8601
|
+
type_metrics:MetricStartTimestamp:
|
|
8602
|
+
type: string
|
|
8603
|
+
format: date-time
|
|
8604
|
+
type_metrics:MetricEndTimestamp:
|
|
8605
|
+
type: string
|
|
8606
|
+
format: date-time
|
|
8607
|
+
type_metrics:MetricTimestamp:
|
|
8608
|
+
type: string
|
|
8609
|
+
format: date-time
|
|
8610
|
+
type_metrics:MessageMetrics:
|
|
8611
|
+
type: object
|
|
8612
|
+
properties:
|
|
8613
|
+
sent:
|
|
8614
|
+
type: array
|
|
8615
|
+
items:
|
|
8616
|
+
$ref: '#/components/schemas/type_metrics:MetricTimestamp'
|
|
8617
|
+
delivered:
|
|
8618
|
+
type: array
|
|
8619
|
+
items:
|
|
8620
|
+
$ref: '#/components/schemas/type_metrics:MetricTimestamp'
|
|
8621
|
+
bounced:
|
|
8622
|
+
type: array
|
|
8623
|
+
items:
|
|
8624
|
+
$ref: '#/components/schemas/type_metrics:MetricTimestamp'
|
|
8625
|
+
delayed:
|
|
8626
|
+
type: array
|
|
8627
|
+
items:
|
|
8628
|
+
$ref: '#/components/schemas/type_metrics:MetricTimestamp'
|
|
8629
|
+
rejected:
|
|
8630
|
+
type: array
|
|
8631
|
+
items:
|
|
8632
|
+
$ref: '#/components/schemas/type_metrics:MetricTimestamp'
|
|
8633
|
+
complained:
|
|
8634
|
+
type: array
|
|
8635
|
+
items:
|
|
8636
|
+
$ref: '#/components/schemas/type_metrics:MetricTimestamp'
|
|
8637
|
+
received:
|
|
8638
|
+
type: array
|
|
8639
|
+
items:
|
|
8640
|
+
$ref: '#/components/schemas/type_metrics:MetricTimestamp'
|
|
8641
|
+
type_metrics:ListMetricsResponse:
|
|
8642
|
+
type: object
|
|
8643
|
+
properties:
|
|
8644
|
+
message:
|
|
8645
|
+
$ref: '#/components/schemas/type_metrics:MessageMetrics'
|
|
8646
|
+
|
|
8647
|
+
```
|
|
8648
|
+
|
|
8649
|
+
## SDK Code Examples
|
|
8650
|
+
|
|
8651
|
+
```typescript
|
|
8652
|
+
import { AgentMailClient } from "agentmail";
|
|
8653
|
+
|
|
8654
|
+
async function main() {
|
|
8655
|
+
const client = new AgentMailClient({
|
|
8656
|
+
environment: "https://api.agentmail.to",
|
|
8657
|
+
apiKey: "YOUR_TOKEN_HERE",
|
|
8658
|
+
});
|
|
8659
|
+
await client.metrics.list({
|
|
8660
|
+
startTimestamp: new Date("2024-01-15T09:30:00Z"),
|
|
8661
|
+
endTimestamp: new Date("2024-01-15T09:30:00Z"),
|
|
8662
|
+
});
|
|
8663
|
+
}
|
|
8664
|
+
main();
|
|
8665
|
+
|
|
8666
|
+
```
|
|
8667
|
+
|
|
8668
|
+
```python
|
|
8669
|
+
from agentmail import AgentMail
|
|
8670
|
+
from datetime import datetime
|
|
8671
|
+
|
|
8672
|
+
client = AgentMail(
|
|
8673
|
+
base_url="https://api.agentmail.to",
|
|
8674
|
+
api_key="YOUR_TOKEN_HERE"
|
|
8675
|
+
)
|
|
8676
|
+
|
|
8677
|
+
client.metrics.list(
|
|
8678
|
+
start_timestamp=datetime.fromisoformat("2024-01-15T09:30:00Z"),
|
|
8679
|
+
end_timestamp=datetime.fromisoformat("2024-01-15T09:30:00Z")
|
|
8680
|
+
)
|
|
8681
|
+
|
|
8682
|
+
```
|
|
8683
|
+
|
|
8684
|
+
# List API Keys
|
|
8685
|
+
|
|
8686
|
+
GET https://api.agentmail.to/v0/api-keys
|
|
8687
|
+
|
|
8688
|
+
Reference: https://docs.agentmail.to/api-reference/api-keys/list
|
|
8689
|
+
|
|
8690
|
+
## OpenAPI Specification
|
|
8691
|
+
|
|
8692
|
+
```yaml
|
|
8693
|
+
openapi: 3.1.1
|
|
8694
|
+
info:
|
|
8695
|
+
title: List API Keys
|
|
8696
|
+
version: endpoint_api-keys.list
|
|
8697
|
+
paths:
|
|
8698
|
+
/v0/api-keys:
|
|
8699
|
+
get:
|
|
8700
|
+
operationId: list
|
|
8701
|
+
summary: List API Keys
|
|
8702
|
+
tags:
|
|
8703
|
+
- - subpackage_api-keys
|
|
8704
|
+
parameters:
|
|
8705
|
+
- name: limit
|
|
8706
|
+
in: query
|
|
8707
|
+
required: false
|
|
8708
|
+
schema:
|
|
8709
|
+
$ref: '#/components/schemas/type_:Limit'
|
|
8710
|
+
- name: page_token
|
|
8711
|
+
in: query
|
|
8712
|
+
required: false
|
|
8713
|
+
schema:
|
|
8714
|
+
$ref: '#/components/schemas/type_:PageToken'
|
|
8715
|
+
- name: Authorization
|
|
8716
|
+
in: header
|
|
8717
|
+
description: >-
|
|
8718
|
+
Bearer authentication of the form `Bearer <token>`, where token is
|
|
8719
|
+
your auth token.
|
|
8720
|
+
required: true
|
|
8721
|
+
schema:
|
|
8722
|
+
type: string
|
|
8723
|
+
responses:
|
|
8724
|
+
'200':
|
|
8725
|
+
description: Response with status 200
|
|
8726
|
+
content:
|
|
8727
|
+
application/json:
|
|
8728
|
+
schema:
|
|
8729
|
+
$ref: '#/components/schemas/type_api-keys:ListApiKeysResponse'
|
|
8730
|
+
components:
|
|
8731
|
+
schemas:
|
|
8732
|
+
type_:Limit:
|
|
8733
|
+
type: integer
|
|
8734
|
+
type_:PageToken:
|
|
8735
|
+
type: string
|
|
8736
|
+
type_:Count:
|
|
8737
|
+
type: integer
|
|
8738
|
+
type_api-keys:ApiKeyId:
|
|
8739
|
+
type: string
|
|
8740
|
+
type_api-keys:Prefix:
|
|
8741
|
+
type: string
|
|
8742
|
+
type_api-keys:Name:
|
|
8743
|
+
type: string
|
|
8744
|
+
type_api-keys:CreatedAt:
|
|
8745
|
+
type: string
|
|
8746
|
+
format: date-time
|
|
8747
|
+
type_api-keys:ApiKey:
|
|
8748
|
+
type: object
|
|
8749
|
+
properties:
|
|
8750
|
+
api_key_id:
|
|
8751
|
+
$ref: '#/components/schemas/type_api-keys:ApiKeyId'
|
|
8752
|
+
prefix:
|
|
8753
|
+
$ref: '#/components/schemas/type_api-keys:Prefix'
|
|
8754
|
+
name:
|
|
8755
|
+
$ref: '#/components/schemas/type_api-keys:Name'
|
|
8756
|
+
used_at:
|
|
8757
|
+
type: string
|
|
8758
|
+
format: date-time
|
|
8759
|
+
created_at:
|
|
8760
|
+
$ref: '#/components/schemas/type_api-keys:CreatedAt'
|
|
8761
|
+
required:
|
|
8762
|
+
- api_key_id
|
|
8763
|
+
- prefix
|
|
8764
|
+
- name
|
|
8765
|
+
- created_at
|
|
8766
|
+
type_api-keys:ListApiKeysResponse:
|
|
8767
|
+
type: object
|
|
8768
|
+
properties:
|
|
8769
|
+
count:
|
|
8770
|
+
$ref: '#/components/schemas/type_:Count'
|
|
8771
|
+
next_page_token:
|
|
8772
|
+
$ref: '#/components/schemas/type_:PageToken'
|
|
8773
|
+
api_keys:
|
|
8774
|
+
type: array
|
|
8775
|
+
items:
|
|
8776
|
+
$ref: '#/components/schemas/type_api-keys:ApiKey'
|
|
8777
|
+
required:
|
|
8778
|
+
- count
|
|
8779
|
+
- api_keys
|
|
8780
|
+
|
|
8781
|
+
```
|
|
8782
|
+
|
|
8783
|
+
## SDK Code Examples
|
|
8784
|
+
|
|
8785
|
+
```typescript
|
|
8786
|
+
import { AgentMailClient } from "agentmail";
|
|
8787
|
+
|
|
8788
|
+
async function main() {
|
|
8789
|
+
const client = new AgentMailClient({
|
|
8790
|
+
environment: "https://api.agentmail.to",
|
|
8791
|
+
apiKey: "YOUR_TOKEN_HERE",
|
|
8792
|
+
});
|
|
8793
|
+
await client.apiKeys.list({});
|
|
8794
|
+
}
|
|
8795
|
+
main();
|
|
8796
|
+
|
|
8797
|
+
```
|
|
8798
|
+
|
|
8799
|
+
```python
|
|
8800
|
+
from agentmail import AgentMail
|
|
8801
|
+
|
|
8802
|
+
client = AgentMail(
|
|
8803
|
+
base_url="https://api.agentmail.to",
|
|
8804
|
+
api_key="YOUR_TOKEN_HERE"
|
|
8805
|
+
)
|
|
8806
|
+
|
|
8807
|
+
client.api_keys.list()
|
|
8808
|
+
|
|
8809
|
+
```
|
|
8810
|
+
|
|
8811
|
+
# Create API Key
|
|
8812
|
+
|
|
8813
|
+
POST https://api.agentmail.to/v0/api-keys
|
|
8814
|
+
Content-Type: application/json
|
|
8815
|
+
|
|
8816
|
+
Reference: https://docs.agentmail.to/api-reference/api-keys/create
|
|
8817
|
+
|
|
8818
|
+
## OpenAPI Specification
|
|
8819
|
+
|
|
8820
|
+
```yaml
|
|
8821
|
+
openapi: 3.1.1
|
|
8822
|
+
info:
|
|
8823
|
+
title: Create API Key
|
|
8824
|
+
version: endpoint_api-keys.create
|
|
8825
|
+
paths:
|
|
8826
|
+
/v0/api-keys:
|
|
8827
|
+
post:
|
|
8828
|
+
operationId: create
|
|
8829
|
+
summary: Create API Key
|
|
8830
|
+
tags:
|
|
8831
|
+
- - subpackage_api-keys
|
|
8832
|
+
parameters:
|
|
8833
|
+
- name: Authorization
|
|
8834
|
+
in: header
|
|
8835
|
+
description: >-
|
|
8836
|
+
Bearer authentication of the form `Bearer <token>`, where token is
|
|
8837
|
+
your auth token.
|
|
8838
|
+
required: true
|
|
8839
|
+
schema:
|
|
8840
|
+
type: string
|
|
8841
|
+
responses:
|
|
8842
|
+
'200':
|
|
8843
|
+
description: Response with status 200
|
|
8844
|
+
content:
|
|
8845
|
+
application/json:
|
|
8846
|
+
schema:
|
|
8847
|
+
$ref: '#/components/schemas/type_api-keys:CreateApiKeyResponse'
|
|
8848
|
+
'400':
|
|
8849
|
+
description: Error response with status 400
|
|
8850
|
+
content: {}
|
|
8851
|
+
requestBody:
|
|
8852
|
+
content:
|
|
8853
|
+
application/json:
|
|
8854
|
+
schema:
|
|
8855
|
+
$ref: '#/components/schemas/type_api-keys:CreateApiKeyRequest'
|
|
8856
|
+
components:
|
|
8857
|
+
schemas:
|
|
8858
|
+
type_api-keys:Name:
|
|
8859
|
+
type: string
|
|
8860
|
+
type_api-keys:CreateApiKeyRequest:
|
|
8861
|
+
type: object
|
|
8862
|
+
properties:
|
|
8863
|
+
name:
|
|
8864
|
+
$ref: '#/components/schemas/type_api-keys:Name'
|
|
8865
|
+
required:
|
|
8866
|
+
- name
|
|
8867
|
+
type_api-keys:ApiKeyId:
|
|
8868
|
+
type: string
|
|
8869
|
+
type_api-keys:Prefix:
|
|
8870
|
+
type: string
|
|
8871
|
+
type_api-keys:CreatedAt:
|
|
8872
|
+
type: string
|
|
8873
|
+
format: date-time
|
|
8874
|
+
type_api-keys:CreateApiKeyResponse:
|
|
8875
|
+
type: object
|
|
8876
|
+
properties:
|
|
8877
|
+
api_key_id:
|
|
8878
|
+
$ref: '#/components/schemas/type_api-keys:ApiKeyId'
|
|
8879
|
+
api_key:
|
|
8880
|
+
type: string
|
|
8881
|
+
prefix:
|
|
8882
|
+
$ref: '#/components/schemas/type_api-keys:Prefix'
|
|
8883
|
+
name:
|
|
8884
|
+
$ref: '#/components/schemas/type_api-keys:Name'
|
|
8885
|
+
created_at:
|
|
8886
|
+
$ref: '#/components/schemas/type_api-keys:CreatedAt'
|
|
8887
|
+
required:
|
|
8888
|
+
- api_key_id
|
|
8889
|
+
- api_key
|
|
8890
|
+
- prefix
|
|
8891
|
+
- name
|
|
8892
|
+
- created_at
|
|
8893
|
+
|
|
8894
|
+
```
|
|
8895
|
+
|
|
8896
|
+
## SDK Code Examples
|
|
8897
|
+
|
|
8898
|
+
```typescript
|
|
8899
|
+
import { AgentMailClient } from "agentmail";
|
|
8900
|
+
|
|
8901
|
+
async function main() {
|
|
8902
|
+
const client = new AgentMailClient({
|
|
8903
|
+
environment: "https://api.agentmail.to",
|
|
8904
|
+
apiKey: "YOUR_TOKEN_HERE",
|
|
8905
|
+
});
|
|
8906
|
+
await client.apiKeys.create({
|
|
8907
|
+
name: "name",
|
|
8908
|
+
});
|
|
8909
|
+
}
|
|
8910
|
+
main();
|
|
8911
|
+
|
|
8912
|
+
```
|
|
8913
|
+
|
|
8914
|
+
```python
|
|
8915
|
+
from agentmail import AgentMail
|
|
8916
|
+
|
|
8917
|
+
client = AgentMail(
|
|
8918
|
+
base_url="https://api.agentmail.to",
|
|
8919
|
+
api_key="YOUR_TOKEN_HERE"
|
|
8920
|
+
)
|
|
8921
|
+
|
|
8922
|
+
client.api_keys.create(
|
|
8923
|
+
name="name"
|
|
8924
|
+
)
|
|
8925
|
+
|
|
8926
|
+
```
|
|
8927
|
+
|
|
8928
|
+
# Delete API Key
|
|
8929
|
+
|
|
8930
|
+
DELETE https://api.agentmail.to/v0/api-keys/{api_key}
|
|
8931
|
+
|
|
8932
|
+
Reference: https://docs.agentmail.to/api-reference/api-keys/delete
|
|
8933
|
+
|
|
8934
|
+
## OpenAPI Specification
|
|
8935
|
+
|
|
8936
|
+
```yaml
|
|
8937
|
+
openapi: 3.1.1
|
|
8938
|
+
info:
|
|
8939
|
+
title: Delete API Key
|
|
8940
|
+
version: endpoint_api-keys.delete
|
|
8941
|
+
paths:
|
|
8942
|
+
/v0/api-keys/{api_key}:
|
|
8943
|
+
delete:
|
|
8944
|
+
operationId: delete
|
|
8945
|
+
summary: Delete API Key
|
|
8946
|
+
tags:
|
|
8947
|
+
- - subpackage_api-keys
|
|
8948
|
+
parameters:
|
|
8949
|
+
- name: api_key
|
|
8950
|
+
in: path
|
|
8951
|
+
required: true
|
|
8952
|
+
schema:
|
|
8953
|
+
$ref: '#/components/schemas/type_api-keys:ApiKeyId'
|
|
8954
|
+
- name: Authorization
|
|
8955
|
+
in: header
|
|
8956
|
+
description: >-
|
|
8957
|
+
Bearer authentication of the form `Bearer <token>`, where token is
|
|
8958
|
+
your auth token.
|
|
8959
|
+
required: true
|
|
8960
|
+
schema:
|
|
8961
|
+
type: string
|
|
8962
|
+
responses:
|
|
8963
|
+
'200':
|
|
8964
|
+
description: Successful response
|
|
8965
|
+
'404':
|
|
8966
|
+
description: Error response with status 404
|
|
8967
|
+
content: {}
|
|
8968
|
+
components:
|
|
8969
|
+
schemas:
|
|
8970
|
+
type_api-keys:ApiKeyId:
|
|
8971
|
+
type: string
|
|
8972
|
+
|
|
8973
|
+
```
|
|
8974
|
+
|
|
8975
|
+
## SDK Code Examples
|
|
8976
|
+
|
|
8977
|
+
```typescript
|
|
8978
|
+
import { AgentMailClient } from "agentmail";
|
|
8979
|
+
|
|
8980
|
+
async function main() {
|
|
8981
|
+
const client = new AgentMailClient({
|
|
8982
|
+
environment: "https://api.agentmail.to",
|
|
8983
|
+
apiKey: "YOUR_TOKEN_HERE",
|
|
8984
|
+
});
|
|
8985
|
+
await client.apiKeys.delete("api_key");
|
|
8986
|
+
}
|
|
8987
|
+
main();
|
|
8988
|
+
|
|
8989
|
+
```
|
|
8990
|
+
|
|
8991
|
+
```python
|
|
8992
|
+
from agentmail import AgentMail
|
|
8993
|
+
|
|
8994
|
+
client = AgentMail(
|
|
8995
|
+
base_url="https://api.agentmail.to",
|
|
8996
|
+
api_key="YOUR_TOKEN_HERE"
|
|
8997
|
+
)
|
|
8998
|
+
|
|
8999
|
+
client.api_keys.delete(
|
|
9000
|
+
api_key="api_key"
|
|
9001
|
+
)
|
|
9002
|
+
|
|
9003
|
+
```
|
|
9004
|
+
|
|
8684
9005
|
# August 13, 2025
|
|
8685
9006
|
|
|
8686
9007
|
## Summary
|