agentmail 0.5.4 → 0.5.6
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/BaseClient.js +2 -2
- package/dist/cjs/api/resources/inboxes/types/Metadata.d.ts +2 -1
- package/dist/cjs/api/resources/inboxes/types/UpdateInboxRequest.d.ts +4 -2
- package/dist/cjs/api/resources/inboxes/types/UpdateMetadata.d.ts +8 -0
- package/dist/cjs/api/resources/inboxes/types/UpdateMetadata.js +3 -0
- package/dist/cjs/api/resources/inboxes/types/index.d.ts +1 -0
- package/dist/cjs/api/resources/inboxes/types/index.js +1 -0
- package/dist/cjs/serialization/resources/inboxes/types/UpdateInboxRequest.d.ts +2 -2
- package/dist/cjs/serialization/resources/inboxes/types/UpdateInboxRequest.js +2 -2
- package/dist/cjs/serialization/resources/inboxes/types/UpdateMetadata.d.ts +8 -0
- package/dist/cjs/serialization/resources/inboxes/types/UpdateMetadata.js +40 -0
- package/dist/cjs/serialization/resources/inboxes/types/index.d.ts +1 -0
- package/dist/cjs/serialization/resources/inboxes/types/index.js +1 -0
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/BaseClient.mjs +2 -2
- package/dist/esm/api/resources/inboxes/types/Metadata.d.mts +2 -1
- package/dist/esm/api/resources/inboxes/types/UpdateInboxRequest.d.mts +4 -2
- package/dist/esm/api/resources/inboxes/types/UpdateMetadata.d.mts +8 -0
- package/dist/esm/api/resources/inboxes/types/UpdateMetadata.mjs +2 -0
- package/dist/esm/api/resources/inboxes/types/index.d.mts +1 -0
- package/dist/esm/api/resources/inboxes/types/index.mjs +1 -0
- package/dist/esm/serialization/resources/inboxes/types/UpdateInboxRequest.d.mts +2 -2
- package/dist/esm/serialization/resources/inboxes/types/UpdateInboxRequest.mjs +2 -2
- package/dist/esm/serialization/resources/inboxes/types/UpdateMetadata.d.mts +8 -0
- package/dist/esm/serialization/resources/inboxes/types/UpdateMetadata.mjs +4 -0
- package/dist/esm/serialization/resources/inboxes/types/index.d.mts +1 -0
- package/dist/esm/serialization/resources/inboxes/types/index.mjs +1 -0
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/dist/llms-full.txt +377 -34
- package/package.json +1 -1
package/dist/cjs/BaseClient.js
CHANGED
|
@@ -43,8 +43,8 @@ function normalizeClientOptions(options) {
|
|
|
43
43
|
const headers = (0, headers_js_1.mergeHeaders)({
|
|
44
44
|
"X-Fern-Language": "JavaScript",
|
|
45
45
|
"X-Fern-SDK-Name": "agentmail",
|
|
46
|
-
"X-Fern-SDK-Version": "0.5.
|
|
47
|
-
"User-Agent": "agentmail/0.5.
|
|
46
|
+
"X-Fern-SDK-Version": "0.5.6",
|
|
47
|
+
"User-Agent": "agentmail/0.5.6",
|
|
48
48
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
49
49
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
50
50
|
}, options === null || options === void 0 ? void 0 : options.headers);
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type * as AgentMail from "../../../index.js";
|
|
2
2
|
/**
|
|
3
3
|
* Custom key-value pairs attached to the inbox. Up to 256 keys. Keys and
|
|
4
|
-
* string values are each limited to 256 characters.
|
|
4
|
+
* string values are each limited to 256 characters. When updating metadata,
|
|
5
|
+
* send a key with a null value to remove that key.
|
|
5
6
|
*/
|
|
6
7
|
export type Metadata = Record<string, AgentMail.inboxes.MetadataValue>;
|
|
@@ -5,7 +5,9 @@ export interface UpdateInboxRequest {
|
|
|
5
5
|
* Metadata to merge into the inbox's existing metadata. Keys you include
|
|
6
6
|
* are added or overwritten; keys you omit are left unchanged. To remove a
|
|
7
7
|
* single key, send it with a null value. To clear all metadata, send
|
|
8
|
-
* `metadata` as null.
|
|
8
|
+
* `metadata` as null. Sending an empty object is rejected; use null to
|
|
9
|
+
* clear. Each update must include at least one of `display_name` or
|
|
10
|
+
* `metadata`.
|
|
9
11
|
*/
|
|
10
|
-
metadata?: AgentMail.inboxes.
|
|
12
|
+
metadata?: AgentMail.inboxes.UpdateMetadata | null;
|
|
11
13
|
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type * as AgentMail from "../../../index.js";
|
|
2
|
+
/**
|
|
3
|
+
* Custom key-value pairs to merge into the inbox's existing metadata. A
|
|
4
|
+
* value may be a string, number, boolean, or null. Setting a key to null
|
|
5
|
+
* removes it. Up to 256 keys; keys and string values are each limited to
|
|
6
|
+
* 256 characters.
|
|
7
|
+
*/
|
|
8
|
+
export type UpdateMetadata = Record<string, AgentMail.inboxes.MetadataValue | null>;
|
|
@@ -24,3 +24,4 @@ __exportStar(require("./ListInboxesResponse.js"), exports);
|
|
|
24
24
|
__exportStar(require("./Metadata.js"), exports);
|
|
25
25
|
__exportStar(require("./MetadataValue.js"), exports);
|
|
26
26
|
__exportStar(require("./UpdateInboxRequest.js"), exports);
|
|
27
|
+
__exportStar(require("./UpdateMetadata.js"), exports);
|
|
@@ -2,11 +2,11 @@ import type * as AgentMail from "../../../../api/index.js";
|
|
|
2
2
|
import * as core from "../../../../core/index.js";
|
|
3
3
|
import type * as serializers from "../../../index.js";
|
|
4
4
|
import { DisplayName } from "./DisplayName.js";
|
|
5
|
-
import {
|
|
5
|
+
import { UpdateMetadata } from "./UpdateMetadata.js";
|
|
6
6
|
export declare const UpdateInboxRequest: core.serialization.ObjectSchema<serializers.inboxes.UpdateInboxRequest.Raw, AgentMail.inboxes.UpdateInboxRequest>;
|
|
7
7
|
export declare namespace UpdateInboxRequest {
|
|
8
8
|
interface Raw {
|
|
9
9
|
display_name?: DisplayName.Raw | null;
|
|
10
|
-
metadata?:
|
|
10
|
+
metadata?: (UpdateMetadata.Raw | null | undefined) | null;
|
|
11
11
|
}
|
|
12
12
|
}
|
|
@@ -37,8 +37,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
37
37
|
exports.UpdateInboxRequest = void 0;
|
|
38
38
|
const core = __importStar(require("../../../../core/index.js"));
|
|
39
39
|
const DisplayName_js_1 = require("./DisplayName.js");
|
|
40
|
-
const
|
|
40
|
+
const UpdateMetadata_js_1 = require("./UpdateMetadata.js");
|
|
41
41
|
exports.UpdateInboxRequest = core.serialization.object({
|
|
42
42
|
displayName: core.serialization.property("display_name", DisplayName_js_1.DisplayName.optional()),
|
|
43
|
-
metadata:
|
|
43
|
+
metadata: UpdateMetadata_js_1.UpdateMetadata.optionalNullable(),
|
|
44
44
|
});
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type * as AgentMail from "../../../../api/index.js";
|
|
2
|
+
import * as core from "../../../../core/index.js";
|
|
3
|
+
import type * as serializers from "../../../index.js";
|
|
4
|
+
import { MetadataValue } from "./MetadataValue.js";
|
|
5
|
+
export declare const UpdateMetadata: core.serialization.Schema<serializers.inboxes.UpdateMetadata.Raw, AgentMail.inboxes.UpdateMetadata>;
|
|
6
|
+
export declare namespace UpdateMetadata {
|
|
7
|
+
type Raw = Record<string, MetadataValue.Raw | null>;
|
|
8
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
4
|
+
if (k2 === undefined) k2 = k;
|
|
5
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
6
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
7
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
8
|
+
}
|
|
9
|
+
Object.defineProperty(o, k2, desc);
|
|
10
|
+
}) : (function(o, m, k, k2) {
|
|
11
|
+
if (k2 === undefined) k2 = k;
|
|
12
|
+
o[k2] = m[k];
|
|
13
|
+
}));
|
|
14
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
15
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
16
|
+
}) : function(o, v) {
|
|
17
|
+
o["default"] = v;
|
|
18
|
+
});
|
|
19
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
20
|
+
var ownKeys = function(o) {
|
|
21
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
22
|
+
var ar = [];
|
|
23
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
24
|
+
return ar;
|
|
25
|
+
};
|
|
26
|
+
return ownKeys(o);
|
|
27
|
+
};
|
|
28
|
+
return function (mod) {
|
|
29
|
+
if (mod && mod.__esModule) return mod;
|
|
30
|
+
var result = {};
|
|
31
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
32
|
+
__setModuleDefault(result, mod);
|
|
33
|
+
return result;
|
|
34
|
+
};
|
|
35
|
+
})();
|
|
36
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
37
|
+
exports.UpdateMetadata = void 0;
|
|
38
|
+
const core = __importStar(require("../../../../core/index.js"));
|
|
39
|
+
const MetadataValue_js_1 = require("./MetadataValue.js");
|
|
40
|
+
exports.UpdateMetadata = core.serialization.record(core.serialization.string(), MetadataValue_js_1.MetadataValue.nullable());
|
|
@@ -24,3 +24,4 @@ __exportStar(require("./ListInboxesResponse.js"), exports);
|
|
|
24
24
|
__exportStar(require("./Metadata.js"), exports);
|
|
25
25
|
__exportStar(require("./MetadataValue.js"), exports);
|
|
26
26
|
__exportStar(require("./UpdateInboxRequest.js"), exports);
|
|
27
|
+
__exportStar(require("./UpdateMetadata.js"), exports);
|
package/dist/cjs/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "0.5.
|
|
1
|
+
export declare const SDK_VERSION = "0.5.6";
|
package/dist/cjs/version.js
CHANGED
package/dist/esm/BaseClient.mjs
CHANGED
|
@@ -6,8 +6,8 @@ export function normalizeClientOptions(options) {
|
|
|
6
6
|
const headers = mergeHeaders({
|
|
7
7
|
"X-Fern-Language": "JavaScript",
|
|
8
8
|
"X-Fern-SDK-Name": "agentmail",
|
|
9
|
-
"X-Fern-SDK-Version": "0.5.
|
|
10
|
-
"User-Agent": "agentmail/0.5.
|
|
9
|
+
"X-Fern-SDK-Version": "0.5.6",
|
|
10
|
+
"User-Agent": "agentmail/0.5.6",
|
|
11
11
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
12
12
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
13
13
|
}, options === null || options === void 0 ? void 0 : options.headers);
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type * as AgentMail from "../../../index.mjs";
|
|
2
2
|
/**
|
|
3
3
|
* Custom key-value pairs attached to the inbox. Up to 256 keys. Keys and
|
|
4
|
-
* string values are each limited to 256 characters.
|
|
4
|
+
* string values are each limited to 256 characters. When updating metadata,
|
|
5
|
+
* send a key with a null value to remove that key.
|
|
5
6
|
*/
|
|
6
7
|
export type Metadata = Record<string, AgentMail.inboxes.MetadataValue>;
|
|
@@ -5,7 +5,9 @@ export interface UpdateInboxRequest {
|
|
|
5
5
|
* Metadata to merge into the inbox's existing metadata. Keys you include
|
|
6
6
|
* are added or overwritten; keys you omit are left unchanged. To remove a
|
|
7
7
|
* single key, send it with a null value. To clear all metadata, send
|
|
8
|
-
* `metadata` as null.
|
|
8
|
+
* `metadata` as null. Sending an empty object is rejected; use null to
|
|
9
|
+
* clear. Each update must include at least one of `display_name` or
|
|
10
|
+
* `metadata`.
|
|
9
11
|
*/
|
|
10
|
-
metadata?: AgentMail.inboxes.
|
|
12
|
+
metadata?: AgentMail.inboxes.UpdateMetadata | null;
|
|
11
13
|
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type * as AgentMail from "../../../index.mjs";
|
|
2
|
+
/**
|
|
3
|
+
* Custom key-value pairs to merge into the inbox's existing metadata. A
|
|
4
|
+
* value may be a string, number, boolean, or null. Setting a key to null
|
|
5
|
+
* removes it. Up to 256 keys; keys and string values are each limited to
|
|
6
|
+
* 256 characters.
|
|
7
|
+
*/
|
|
8
|
+
export type UpdateMetadata = Record<string, AgentMail.inboxes.MetadataValue | null>;
|
|
@@ -2,11 +2,11 @@ import type * as AgentMail from "../../../../api/index.mjs";
|
|
|
2
2
|
import * as core from "../../../../core/index.mjs";
|
|
3
3
|
import type * as serializers from "../../../index.mjs";
|
|
4
4
|
import { DisplayName } from "./DisplayName.mjs";
|
|
5
|
-
import {
|
|
5
|
+
import { UpdateMetadata } from "./UpdateMetadata.mjs";
|
|
6
6
|
export declare const UpdateInboxRequest: core.serialization.ObjectSchema<serializers.inboxes.UpdateInboxRequest.Raw, AgentMail.inboxes.UpdateInboxRequest>;
|
|
7
7
|
export declare namespace UpdateInboxRequest {
|
|
8
8
|
interface Raw {
|
|
9
9
|
display_name?: DisplayName.Raw | null;
|
|
10
|
-
metadata?:
|
|
10
|
+
metadata?: (UpdateMetadata.Raw | null | undefined) | null;
|
|
11
11
|
}
|
|
12
12
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
// This file was auto-generated by Fern from our API Definition.
|
|
2
2
|
import * as core from "../../../../core/index.mjs";
|
|
3
3
|
import { DisplayName } from "./DisplayName.mjs";
|
|
4
|
-
import {
|
|
4
|
+
import { UpdateMetadata } from "./UpdateMetadata.mjs";
|
|
5
5
|
export const UpdateInboxRequest = core.serialization.object({
|
|
6
6
|
displayName: core.serialization.property("display_name", DisplayName.optional()),
|
|
7
|
-
metadata:
|
|
7
|
+
metadata: UpdateMetadata.optionalNullable(),
|
|
8
8
|
});
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type * as AgentMail from "../../../../api/index.mjs";
|
|
2
|
+
import * as core from "../../../../core/index.mjs";
|
|
3
|
+
import type * as serializers from "../../../index.mjs";
|
|
4
|
+
import { MetadataValue } from "./MetadataValue.mjs";
|
|
5
|
+
export declare const UpdateMetadata: core.serialization.Schema<serializers.inboxes.UpdateMetadata.Raw, AgentMail.inboxes.UpdateMetadata>;
|
|
6
|
+
export declare namespace UpdateMetadata {
|
|
7
|
+
type Raw = Record<string, MetadataValue.Raw | null>;
|
|
8
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
import * as core from "../../../../core/index.mjs";
|
|
3
|
+
import { MetadataValue } from "./MetadataValue.mjs";
|
|
4
|
+
export const UpdateMetadata = core.serialization.record(core.serialization.string(), MetadataValue.nullable());
|
package/dist/esm/version.d.mts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "0.5.
|
|
1
|
+
export declare const SDK_VERSION = "0.5.6";
|
package/dist/esm/version.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const SDK_VERSION = "0.5.
|
|
1
|
+
export const SDK_VERSION = "0.5.6";
|
package/dist/llms-full.txt
CHANGED
|
@@ -538,6 +538,89 @@ don't provide them, AgentMail will generate a unique address for you using our
|
|
|
538
538
|
default domain. Check out our [guide on managing
|
|
539
539
|
domains](/guides/domains/managing-domains) to learn more.
|
|
540
540
|
|
|
541
|
+
## Metadata
|
|
542
|
+
|
|
543
|
+
Attach your own key-value data to any `Inbox` with the `metadata` field. Use it to link an inbox to records in your own system: a user ID, an agent name, or feature flags. Metadata is returned on every inbox response.
|
|
544
|
+
|
|
545
|
+
Values may be a string, number, or boolean. An `Inbox` can hold up to 256 keys, and each key and string value is limited to 256 characters.
|
|
546
|
+
|
|
547
|
+
```python title="Python"
|
|
548
|
+
# Attach metadata when creating an inbox; values may be a string, int, float, or boolean
|
|
549
|
+
inbox = client.inboxes.create(
|
|
550
|
+
username="support-agent",
|
|
551
|
+
metadata={
|
|
552
|
+
"tenant_id": "acme", # string
|
|
553
|
+
"seat_count": 5, # int
|
|
554
|
+
"monthly_spend": 19.99, # float
|
|
555
|
+
"active": True, # boolean
|
|
556
|
+
},
|
|
557
|
+
)
|
|
558
|
+
|
|
559
|
+
# Read it back from any inbox response
|
|
560
|
+
print(inbox.metadata)
|
|
561
|
+
```
|
|
562
|
+
|
|
563
|
+
```typescript title="TypeScript"
|
|
564
|
+
// Attach metadata when creating an inbox; values may be a string, int, float, or boolean
|
|
565
|
+
const inbox = await client.inboxes.create({
|
|
566
|
+
username: "support-agent",
|
|
567
|
+
metadata: {
|
|
568
|
+
tenant_id: "acme", // string
|
|
569
|
+
seat_count: 5, // int
|
|
570
|
+
monthly_spend: 19.99, // float
|
|
571
|
+
active: true, // boolean
|
|
572
|
+
},
|
|
573
|
+
});
|
|
574
|
+
|
|
575
|
+
// Read it back from any inbox response
|
|
576
|
+
console.log(inbox.metadata);
|
|
577
|
+
```
|
|
578
|
+
|
|
579
|
+
### Updating metadata
|
|
580
|
+
|
|
581
|
+
Updates **merge** into the inbox's existing metadata — keys you include are added or overwritten, and keys you omit are preserved.
|
|
582
|
+
|
|
583
|
+
To remove a single key, send it with a `null` value. To clear all metadata at
|
|
584
|
+
once, send `metadata` as `null`. Every update must include either
|
|
585
|
+
`display_name` or `metadata`.
|
|
586
|
+
|
|
587
|
+
```python title="Python"
|
|
588
|
+
# Add or overwrite keys; the keys you omit stay unchanged
|
|
589
|
+
client.inboxes.update(
|
|
590
|
+
inbox_id="support-agent@agentmail.to",
|
|
591
|
+
metadata={"tier": "enterprise"},
|
|
592
|
+
)
|
|
593
|
+
|
|
594
|
+
# Remove a single key
|
|
595
|
+
client.inboxes.update(
|
|
596
|
+
inbox_id="support-agent@agentmail.to",
|
|
597
|
+
metadata={"tier": None},
|
|
598
|
+
)
|
|
599
|
+
|
|
600
|
+
# Clear all metadata
|
|
601
|
+
client.inboxes.update(
|
|
602
|
+
inbox_id="support-agent@agentmail.to",
|
|
603
|
+
metadata=None,
|
|
604
|
+
)
|
|
605
|
+
```
|
|
606
|
+
|
|
607
|
+
```typescript title="TypeScript"
|
|
608
|
+
// Add or overwrite keys; the keys you omit stay unchanged
|
|
609
|
+
await client.inboxes.update("support-agent@agentmail.to", {
|
|
610
|
+
metadata: { tier: "enterprise" },
|
|
611
|
+
});
|
|
612
|
+
|
|
613
|
+
// Remove a single key
|
|
614
|
+
await client.inboxes.update("support-agent@agentmail.to", {
|
|
615
|
+
metadata: { tier: null },
|
|
616
|
+
});
|
|
617
|
+
|
|
618
|
+
// Clear all metadata
|
|
619
|
+
await client.inboxes.update("support-agent@agentmail.to", {
|
|
620
|
+
metadata: null,
|
|
621
|
+
});
|
|
622
|
+
```
|
|
623
|
+
|
|
541
624
|
## Inbox-scoped API keys
|
|
542
625
|
|
|
543
626
|
You can create API keys that are restricted to a single inbox. An inbox-scoped key can only access that inbox's threads, messages, and drafts. This is useful when you want to give an agent or integration the minimum access it needs.
|
|
@@ -575,10 +658,10 @@ AgentMail Inboxes — copy into Cursor/Claude.
|
|
|
575
658
|
Setup: pip install agentmail python-dotenv. Set AGENTMAIL_API_KEY in .env.
|
|
576
659
|
|
|
577
660
|
API reference:
|
|
578
|
-
- inboxes.create(username?, domain?, display_name?, client_id?) — client_id for idempotent retries
|
|
661
|
+
- inboxes.create(username?, domain?, display_name?, client_id?, metadata?) — client_id for idempotent retries; metadata is custom key-value data
|
|
579
662
|
- inboxes.get(inbox_id)
|
|
580
663
|
- inboxes.list(limit?, page_token?)
|
|
581
|
-
- inboxes.update(inbox_id, display_name)
|
|
664
|
+
- inboxes.update(inbox_id, display_name?, metadata?) — at least one field required; metadata is merged, not replaced
|
|
582
665
|
- inboxes.delete(inbox_id)
|
|
583
666
|
- inboxes.api_keys.create(inbox_id, name) — inbox-scoped key
|
|
584
667
|
- inboxes.api_keys.list(inbox_id)
|
|
@@ -609,10 +692,10 @@ print(f"Total: {all_inboxes.count}")
|
|
|
609
692
|
* Setup: npm install agentmail dotenv. Set AGENTMAIL_API_KEY in .env.
|
|
610
693
|
*
|
|
611
694
|
* API reference:
|
|
612
|
-
* - inboxes.create({ username?, domain?, displayName?, clientId? })
|
|
695
|
+
* - inboxes.create({ username?, domain?, displayName?, clientId?, metadata? }) — metadata is custom key-value data
|
|
613
696
|
* - inboxes.get(inboxId)
|
|
614
697
|
* - inboxes.list({ limit?, pageToken? })
|
|
615
|
-
* - inboxes.update(inboxId, { displayName })
|
|
698
|
+
* - inboxes.update(inboxId, { displayName?, metadata? }) — at least one field required
|
|
616
699
|
* - inboxes.delete(inboxId)
|
|
617
700
|
* - inboxes.apiKeys.create(inboxId, { name }) — inbox-scoped key
|
|
618
701
|
* - inboxes.apiKeys.list(inboxId)
|
|
@@ -11998,7 +12081,7 @@ Verify an agent organization using the 6-digit OTP sent to the human's email dur
|
|
|
11998
12081
|
|
|
11999
12082
|
On success, the organization is upgraded from `agent_unverified` to `agent_verified`, the send allowlist is removed, and free plan entitlements are applied.
|
|
12000
12083
|
|
|
12001
|
-
The OTP expires after 24 hours and allows a maximum of 10 attempts.
|
|
12084
|
+
The OTP expires after 24 hours and allows a maximum of 10 attempts. If you run into any difficulties receiving the OTP code, you can also create an account on [console.agentmail.to](https://console.agentmail.to) using the human email address you provided to verify your account.
|
|
12002
12085
|
|
|
12003
12086
|
**CLI:**
|
|
12004
12087
|
```bash
|
|
@@ -12029,7 +12112,11 @@ paths:
|
|
|
12029
12112
|
entitlements are applied.
|
|
12030
12113
|
|
|
12031
12114
|
|
|
12032
|
-
The OTP expires after 24 hours and allows a maximum of 10 attempts.
|
|
12115
|
+
The OTP expires after 24 hours and allows a maximum of 10 attempts. If
|
|
12116
|
+
you run into any difficulties receiving the OTP code, you can also
|
|
12117
|
+
create an account on
|
|
12118
|
+
[console.agentmail.to](https://console.agentmail.to) using the human
|
|
12119
|
+
email address you provided to verify your account.
|
|
12033
12120
|
|
|
12034
12121
|
|
|
12035
12122
|
**CLI:**
|
|
@@ -12348,6 +12435,26 @@ components:
|
|
|
12348
12435
|
type: string
|
|
12349
12436
|
description: Client ID of inbox.
|
|
12350
12437
|
title: ClientId
|
|
12438
|
+
type_inboxes:MetadataValue:
|
|
12439
|
+
oneOf:
|
|
12440
|
+
- type: string
|
|
12441
|
+
- type: number
|
|
12442
|
+
format: double
|
|
12443
|
+
- type: boolean
|
|
12444
|
+
description: A metadata value. May be a string, number, or boolean.
|
|
12445
|
+
title: MetadataValue
|
|
12446
|
+
type_inboxes:Metadata:
|
|
12447
|
+
type: object
|
|
12448
|
+
additionalProperties:
|
|
12449
|
+
$ref: '#/components/schemas/type_inboxes:MetadataValue'
|
|
12450
|
+
description: >-
|
|
12451
|
+
Custom key-value pairs attached to the inbox. Up to 256 keys. Keys and
|
|
12452
|
+
|
|
12453
|
+
string values are each limited to 256 characters. When updating
|
|
12454
|
+
metadata,
|
|
12455
|
+
|
|
12456
|
+
send a key with a null value to remove that key.
|
|
12457
|
+
title: Metadata
|
|
12351
12458
|
type_inboxes:Inbox:
|
|
12352
12459
|
type: object
|
|
12353
12460
|
properties:
|
|
@@ -12361,6 +12468,9 @@ components:
|
|
|
12361
12468
|
$ref: '#/components/schemas/type_inboxes:DisplayName'
|
|
12362
12469
|
client_id:
|
|
12363
12470
|
$ref: '#/components/schemas/type_inboxes:ClientId'
|
|
12471
|
+
metadata:
|
|
12472
|
+
$ref: '#/components/schemas/type_inboxes:Metadata'
|
|
12473
|
+
description: Custom metadata attached to the inbox.
|
|
12364
12474
|
updated_at:
|
|
12365
12475
|
type: string
|
|
12366
12476
|
format: date-time
|
|
@@ -12610,6 +12720,26 @@ components:
|
|
|
12610
12720
|
type: string
|
|
12611
12721
|
description: Client ID of inbox.
|
|
12612
12722
|
title: ClientId
|
|
12723
|
+
type_inboxes:MetadataValue:
|
|
12724
|
+
oneOf:
|
|
12725
|
+
- type: string
|
|
12726
|
+
- type: number
|
|
12727
|
+
format: double
|
|
12728
|
+
- type: boolean
|
|
12729
|
+
description: A metadata value. May be a string, number, or boolean.
|
|
12730
|
+
title: MetadataValue
|
|
12731
|
+
type_inboxes:Metadata:
|
|
12732
|
+
type: object
|
|
12733
|
+
additionalProperties:
|
|
12734
|
+
$ref: '#/components/schemas/type_inboxes:MetadataValue'
|
|
12735
|
+
description: >-
|
|
12736
|
+
Custom key-value pairs attached to the inbox. Up to 256 keys. Keys and
|
|
12737
|
+
|
|
12738
|
+
string values are each limited to 256 characters. When updating
|
|
12739
|
+
metadata,
|
|
12740
|
+
|
|
12741
|
+
send a key with a null value to remove that key.
|
|
12742
|
+
title: Metadata
|
|
12613
12743
|
type_inboxes:Inbox:
|
|
12614
12744
|
type: object
|
|
12615
12745
|
properties:
|
|
@@ -12623,6 +12753,9 @@ components:
|
|
|
12623
12753
|
$ref: '#/components/schemas/type_inboxes:DisplayName'
|
|
12624
12754
|
client_id:
|
|
12625
12755
|
$ref: '#/components/schemas/type_inboxes:ClientId'
|
|
12756
|
+
metadata:
|
|
12757
|
+
$ref: '#/components/schemas/type_inboxes:Metadata'
|
|
12758
|
+
description: Custom metadata attached to the inbox.
|
|
12626
12759
|
updated_at:
|
|
12627
12760
|
type: string
|
|
12628
12761
|
format: date-time
|
|
@@ -12868,6 +13001,26 @@ components:
|
|
|
12868
13001
|
type: string
|
|
12869
13002
|
description: Client ID of inbox.
|
|
12870
13003
|
title: ClientId
|
|
13004
|
+
type_inboxes:MetadataValue:
|
|
13005
|
+
oneOf:
|
|
13006
|
+
- type: string
|
|
13007
|
+
- type: number
|
|
13008
|
+
format: double
|
|
13009
|
+
- type: boolean
|
|
13010
|
+
description: A metadata value. May be a string, number, or boolean.
|
|
13011
|
+
title: MetadataValue
|
|
13012
|
+
type_inboxes:Metadata:
|
|
13013
|
+
type: object
|
|
13014
|
+
additionalProperties:
|
|
13015
|
+
$ref: '#/components/schemas/type_inboxes:MetadataValue'
|
|
13016
|
+
description: >-
|
|
13017
|
+
Custom key-value pairs attached to the inbox. Up to 256 keys. Keys and
|
|
13018
|
+
|
|
13019
|
+
string values are each limited to 256 characters. When updating
|
|
13020
|
+
metadata,
|
|
13021
|
+
|
|
13022
|
+
send a key with a null value to remove that key.
|
|
13023
|
+
title: Metadata
|
|
12871
13024
|
type_inboxes:CreateInboxRequest:
|
|
12872
13025
|
type: object
|
|
12873
13026
|
properties:
|
|
@@ -12883,6 +13036,9 @@ components:
|
|
|
12883
13036
|
$ref: '#/components/schemas/type_inboxes:DisplayName'
|
|
12884
13037
|
client_id:
|
|
12885
13038
|
$ref: '#/components/schemas/type_inboxes:ClientId'
|
|
13039
|
+
metadata:
|
|
13040
|
+
$ref: '#/components/schemas/type_inboxes:Metadata'
|
|
13041
|
+
description: Custom metadata to attach to the inbox.
|
|
12886
13042
|
title: CreateInboxRequest
|
|
12887
13043
|
type_pods:PodId:
|
|
12888
13044
|
type: string
|
|
@@ -12909,6 +13065,9 @@ components:
|
|
|
12909
13065
|
$ref: '#/components/schemas/type_inboxes:DisplayName'
|
|
12910
13066
|
client_id:
|
|
12911
13067
|
$ref: '#/components/schemas/type_inboxes:ClientId'
|
|
13068
|
+
metadata:
|
|
13069
|
+
$ref: '#/components/schemas/type_inboxes:Metadata'
|
|
13070
|
+
description: Custom metadata attached to the inbox.
|
|
12912
13071
|
updated_at:
|
|
12913
13072
|
type: string
|
|
12914
13073
|
format: date-time
|
|
@@ -13135,6 +13294,12 @@ paths:
|
|
|
13135
13294
|
application/json:
|
|
13136
13295
|
schema:
|
|
13137
13296
|
$ref: '#/components/schemas/type_inboxes:Inbox'
|
|
13297
|
+
'400':
|
|
13298
|
+
description: Error response with status 400
|
|
13299
|
+
content:
|
|
13300
|
+
application/json:
|
|
13301
|
+
schema:
|
|
13302
|
+
$ref: '#/components/schemas/type_:ValidationErrorResponse'
|
|
13138
13303
|
'404':
|
|
13139
13304
|
description: Error response with status 404
|
|
13140
13305
|
content:
|
|
@@ -13142,6 +13307,9 @@ paths:
|
|
|
13142
13307
|
schema:
|
|
13143
13308
|
$ref: '#/components/schemas/type_:ErrorResponse'
|
|
13144
13309
|
requestBody:
|
|
13310
|
+
description: >-
|
|
13311
|
+
Expects an object; provide at least one of `display_name` or
|
|
13312
|
+
`metadata`.
|
|
13145
13313
|
content:
|
|
13146
13314
|
application/json:
|
|
13147
13315
|
schema:
|
|
@@ -13161,13 +13329,49 @@ components:
|
|
|
13161
13329
|
type: string
|
|
13162
13330
|
description: 'Display name: `Display Name <username@domain.com>`.'
|
|
13163
13331
|
title: DisplayName
|
|
13332
|
+
type_inboxes:MetadataValue:
|
|
13333
|
+
oneOf:
|
|
13334
|
+
- type: string
|
|
13335
|
+
- type: number
|
|
13336
|
+
format: double
|
|
13337
|
+
- type: boolean
|
|
13338
|
+
description: A metadata value. May be a string, number, or boolean.
|
|
13339
|
+
title: MetadataValue
|
|
13340
|
+
type_inboxes:UpdateMetadata:
|
|
13341
|
+
type: object
|
|
13342
|
+
additionalProperties:
|
|
13343
|
+
oneOf:
|
|
13344
|
+
- $ref: '#/components/schemas/type_inboxes:MetadataValue'
|
|
13345
|
+
- type: 'null'
|
|
13346
|
+
description: |-
|
|
13347
|
+
Custom key-value pairs to merge into the inbox's existing metadata. A
|
|
13348
|
+
value may be a string, number, boolean, or null. Setting a key to null
|
|
13349
|
+
removes it. Up to 256 keys; keys and string values are each limited to
|
|
13350
|
+
256 characters.
|
|
13351
|
+
title: UpdateMetadata
|
|
13164
13352
|
type_inboxes:UpdateInboxRequest:
|
|
13165
13353
|
type: object
|
|
13166
13354
|
properties:
|
|
13167
13355
|
display_name:
|
|
13168
13356
|
$ref: '#/components/schemas/type_inboxes:DisplayName'
|
|
13169
|
-
|
|
13170
|
-
|
|
13357
|
+
metadata:
|
|
13358
|
+
oneOf:
|
|
13359
|
+
- $ref: '#/components/schemas/type_inboxes:UpdateMetadata'
|
|
13360
|
+
- type: 'null'
|
|
13361
|
+
description: >-
|
|
13362
|
+
Metadata to merge into the inbox's existing metadata. Keys you
|
|
13363
|
+
include
|
|
13364
|
+
|
|
13365
|
+
are added or overwritten; keys you omit are left unchanged. To
|
|
13366
|
+
remove a
|
|
13367
|
+
|
|
13368
|
+
single key, send it with a null value. To clear all metadata, send
|
|
13369
|
+
|
|
13370
|
+
`metadata` as null. Sending an empty object is rejected; use null to
|
|
13371
|
+
|
|
13372
|
+
clear. Each update must include at least one of `display_name` or
|
|
13373
|
+
|
|
13374
|
+
`metadata`.
|
|
13171
13375
|
title: UpdateInboxRequest
|
|
13172
13376
|
type_pods:PodId:
|
|
13173
13377
|
type: string
|
|
@@ -13181,6 +13385,18 @@ components:
|
|
|
13181
13385
|
type: string
|
|
13182
13386
|
description: Client ID of inbox.
|
|
13183
13387
|
title: ClientId
|
|
13388
|
+
type_inboxes:Metadata:
|
|
13389
|
+
type: object
|
|
13390
|
+
additionalProperties:
|
|
13391
|
+
$ref: '#/components/schemas/type_inboxes:MetadataValue'
|
|
13392
|
+
description: >-
|
|
13393
|
+
Custom key-value pairs attached to the inbox. Up to 256 keys. Keys and
|
|
13394
|
+
|
|
13395
|
+
string values are each limited to 256 characters. When updating
|
|
13396
|
+
metadata,
|
|
13397
|
+
|
|
13398
|
+
send a key with a null value to remove that key.
|
|
13399
|
+
title: Metadata
|
|
13184
13400
|
type_inboxes:Inbox:
|
|
13185
13401
|
type: object
|
|
13186
13402
|
properties:
|
|
@@ -13194,6 +13410,9 @@ components:
|
|
|
13194
13410
|
$ref: '#/components/schemas/type_inboxes:DisplayName'
|
|
13195
13411
|
client_id:
|
|
13196
13412
|
$ref: '#/components/schemas/type_inboxes:ClientId'
|
|
13413
|
+
metadata:
|
|
13414
|
+
$ref: '#/components/schemas/type_inboxes:Metadata'
|
|
13415
|
+
description: Custom metadata attached to the inbox.
|
|
13197
13416
|
updated_at:
|
|
13198
13417
|
type: string
|
|
13199
13418
|
format: date-time
|
|
@@ -13228,6 +13447,17 @@ components:
|
|
|
13228
13447
|
- name
|
|
13229
13448
|
- message
|
|
13230
13449
|
title: ErrorResponse
|
|
13450
|
+
type_:ValidationErrorResponse:
|
|
13451
|
+
type: object
|
|
13452
|
+
properties:
|
|
13453
|
+
name:
|
|
13454
|
+
$ref: '#/components/schemas/type_:ErrorName'
|
|
13455
|
+
errors:
|
|
13456
|
+
description: Validation errors.
|
|
13457
|
+
required:
|
|
13458
|
+
- name
|
|
13459
|
+
- errors
|
|
13460
|
+
title: ValidationErrorResponse
|
|
13231
13461
|
securitySchemes:
|
|
13232
13462
|
Bearer:
|
|
13233
13463
|
type: http
|
|
@@ -13244,9 +13474,7 @@ async function main() {
|
|
|
13244
13474
|
const client = new AgentMailClient({
|
|
13245
13475
|
apiKey: "YOUR_TOKEN_HERE",
|
|
13246
13476
|
});
|
|
13247
|
-
await client.inboxes.update("inbox_id", {
|
|
13248
|
-
displayName: "display_name",
|
|
13249
|
-
});
|
|
13477
|
+
await client.inboxes.update("inbox_id", {});
|
|
13250
13478
|
}
|
|
13251
13479
|
main();
|
|
13252
13480
|
|
|
@@ -13261,7 +13489,6 @@ client = AgentMail(
|
|
|
13261
13489
|
|
|
13262
13490
|
client.inboxes.update(
|
|
13263
13491
|
inbox_id="inbox_id",
|
|
13264
|
-
display_name="display_name",
|
|
13265
13492
|
)
|
|
13266
13493
|
|
|
13267
13494
|
```
|
|
@@ -13280,7 +13507,7 @@ func main() {
|
|
|
13280
13507
|
|
|
13281
13508
|
url := "https://api.agentmail.to/v0/inboxes/inbox_id"
|
|
13282
13509
|
|
|
13283
|
-
payload := strings.NewReader("{
|
|
13510
|
+
payload := strings.NewReader("{}")
|
|
13284
13511
|
|
|
13285
13512
|
req, _ := http.NewRequest("PATCH", url, payload)
|
|
13286
13513
|
|
|
@@ -13310,7 +13537,7 @@ http.use_ssl = true
|
|
|
13310
13537
|
request = Net::HTTP::Patch.new(url)
|
|
13311
13538
|
request["Authorization"] = 'Bearer <api_key>'
|
|
13312
13539
|
request["Content-Type"] = 'application/json'
|
|
13313
|
-
request.body = "{
|
|
13540
|
+
request.body = "{}"
|
|
13314
13541
|
|
|
13315
13542
|
response = http.request(request)
|
|
13316
13543
|
puts response.read_body
|
|
@@ -13323,7 +13550,7 @@ import com.mashape.unirest.http.Unirest;
|
|
|
13323
13550
|
HttpResponse<String> response = Unirest.patch("https://api.agentmail.to/v0/inboxes/inbox_id")
|
|
13324
13551
|
.header("Authorization", "Bearer <api_key>")
|
|
13325
13552
|
.header("Content-Type", "application/json")
|
|
13326
|
-
.body("{
|
|
13553
|
+
.body("{}")
|
|
13327
13554
|
.asString();
|
|
13328
13555
|
```
|
|
13329
13556
|
|
|
@@ -13334,9 +13561,7 @@ require_once('vendor/autoload.php');
|
|
|
13334
13561
|
$client = new \GuzzleHttp\Client();
|
|
13335
13562
|
|
|
13336
13563
|
$response = $client->request('PATCH', 'https://api.agentmail.to/v0/inboxes/inbox_id', [
|
|
13337
|
-
'body' => '{
|
|
13338
|
-
"display_name": "display_name"
|
|
13339
|
-
}',
|
|
13564
|
+
'body' => '{}',
|
|
13340
13565
|
'headers' => [
|
|
13341
13566
|
'Authorization' => 'Bearer <api_key>',
|
|
13342
13567
|
'Content-Type' => 'application/json',
|
|
@@ -13353,7 +13578,7 @@ var client = new RestClient("https://api.agentmail.to/v0/inboxes/inbox_id");
|
|
|
13353
13578
|
var request = new RestRequest(Method.PATCH);
|
|
13354
13579
|
request.AddHeader("Authorization", "Bearer <api_key>");
|
|
13355
13580
|
request.AddHeader("Content-Type", "application/json");
|
|
13356
|
-
request.AddParameter("application/json", "{
|
|
13581
|
+
request.AddParameter("application/json", "{}", ParameterType.RequestBody);
|
|
13357
13582
|
IRestResponse response = client.Execute(request);
|
|
13358
13583
|
```
|
|
13359
13584
|
|
|
@@ -13364,7 +13589,7 @@ let headers = [
|
|
|
13364
13589
|
"Authorization": "Bearer <api_key>",
|
|
13365
13590
|
"Content-Type": "application/json"
|
|
13366
13591
|
]
|
|
13367
|
-
let parameters = [
|
|
13592
|
+
let parameters = [] as [String : Any]
|
|
13368
13593
|
|
|
13369
13594
|
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
|
|
13370
13595
|
|
|
@@ -37807,6 +38032,26 @@ components:
|
|
|
37807
38032
|
type: string
|
|
37808
38033
|
description: Client ID of inbox.
|
|
37809
38034
|
title: ClientId
|
|
38035
|
+
type_inboxes:MetadataValue:
|
|
38036
|
+
oneOf:
|
|
38037
|
+
- type: string
|
|
38038
|
+
- type: number
|
|
38039
|
+
format: double
|
|
38040
|
+
- type: boolean
|
|
38041
|
+
description: A metadata value. May be a string, number, or boolean.
|
|
38042
|
+
title: MetadataValue
|
|
38043
|
+
type_inboxes:Metadata:
|
|
38044
|
+
type: object
|
|
38045
|
+
additionalProperties:
|
|
38046
|
+
$ref: '#/components/schemas/type_inboxes:MetadataValue'
|
|
38047
|
+
description: >-
|
|
38048
|
+
Custom key-value pairs attached to the inbox. Up to 256 keys. Keys and
|
|
38049
|
+
|
|
38050
|
+
string values are each limited to 256 characters. When updating
|
|
38051
|
+
metadata,
|
|
38052
|
+
|
|
38053
|
+
send a key with a null value to remove that key.
|
|
38054
|
+
title: Metadata
|
|
37810
38055
|
type_inboxes:Inbox:
|
|
37811
38056
|
type: object
|
|
37812
38057
|
properties:
|
|
@@ -37820,6 +38065,9 @@ components:
|
|
|
37820
38065
|
$ref: '#/components/schemas/type_inboxes:DisplayName'
|
|
37821
38066
|
client_id:
|
|
37822
38067
|
$ref: '#/components/schemas/type_inboxes:ClientId'
|
|
38068
|
+
metadata:
|
|
38069
|
+
$ref: '#/components/schemas/type_inboxes:Metadata'
|
|
38070
|
+
description: Custom metadata attached to the inbox.
|
|
37823
38071
|
updated_at:
|
|
37824
38072
|
type: string
|
|
37825
38073
|
format: date-time
|
|
@@ -38095,6 +38343,26 @@ components:
|
|
|
38095
38343
|
type: string
|
|
38096
38344
|
description: Client ID of inbox.
|
|
38097
38345
|
title: ClientId
|
|
38346
|
+
type_inboxes:MetadataValue:
|
|
38347
|
+
oneOf:
|
|
38348
|
+
- type: string
|
|
38349
|
+
- type: number
|
|
38350
|
+
format: double
|
|
38351
|
+
- type: boolean
|
|
38352
|
+
description: A metadata value. May be a string, number, or boolean.
|
|
38353
|
+
title: MetadataValue
|
|
38354
|
+
type_inboxes:Metadata:
|
|
38355
|
+
type: object
|
|
38356
|
+
additionalProperties:
|
|
38357
|
+
$ref: '#/components/schemas/type_inboxes:MetadataValue'
|
|
38358
|
+
description: >-
|
|
38359
|
+
Custom key-value pairs attached to the inbox. Up to 256 keys. Keys and
|
|
38360
|
+
|
|
38361
|
+
string values are each limited to 256 characters. When updating
|
|
38362
|
+
metadata,
|
|
38363
|
+
|
|
38364
|
+
send a key with a null value to remove that key.
|
|
38365
|
+
title: Metadata
|
|
38098
38366
|
type_inboxes:Inbox:
|
|
38099
38367
|
type: object
|
|
38100
38368
|
properties:
|
|
@@ -38108,6 +38376,9 @@ components:
|
|
|
38108
38376
|
$ref: '#/components/schemas/type_inboxes:DisplayName'
|
|
38109
38377
|
client_id:
|
|
38110
38378
|
$ref: '#/components/schemas/type_inboxes:ClientId'
|
|
38379
|
+
metadata:
|
|
38380
|
+
$ref: '#/components/schemas/type_inboxes:Metadata'
|
|
38381
|
+
description: Custom metadata attached to the inbox.
|
|
38111
38382
|
updated_at:
|
|
38112
38383
|
type: string
|
|
38113
38384
|
format: date-time
|
|
@@ -38363,6 +38634,26 @@ components:
|
|
|
38363
38634
|
type: string
|
|
38364
38635
|
description: Client ID of inbox.
|
|
38365
38636
|
title: ClientId
|
|
38637
|
+
type_inboxes:MetadataValue:
|
|
38638
|
+
oneOf:
|
|
38639
|
+
- type: string
|
|
38640
|
+
- type: number
|
|
38641
|
+
format: double
|
|
38642
|
+
- type: boolean
|
|
38643
|
+
description: A metadata value. May be a string, number, or boolean.
|
|
38644
|
+
title: MetadataValue
|
|
38645
|
+
type_inboxes:Metadata:
|
|
38646
|
+
type: object
|
|
38647
|
+
additionalProperties:
|
|
38648
|
+
$ref: '#/components/schemas/type_inboxes:MetadataValue'
|
|
38649
|
+
description: >-
|
|
38650
|
+
Custom key-value pairs attached to the inbox. Up to 256 keys. Keys and
|
|
38651
|
+
|
|
38652
|
+
string values are each limited to 256 characters. When updating
|
|
38653
|
+
metadata,
|
|
38654
|
+
|
|
38655
|
+
send a key with a null value to remove that key.
|
|
38656
|
+
title: Metadata
|
|
38366
38657
|
type_inboxes:CreateInboxRequest:
|
|
38367
38658
|
type: object
|
|
38368
38659
|
properties:
|
|
@@ -38378,6 +38669,9 @@ components:
|
|
|
38378
38669
|
$ref: '#/components/schemas/type_inboxes:DisplayName'
|
|
38379
38670
|
client_id:
|
|
38380
38671
|
$ref: '#/components/schemas/type_inboxes:ClientId'
|
|
38672
|
+
metadata:
|
|
38673
|
+
$ref: '#/components/schemas/type_inboxes:Metadata'
|
|
38674
|
+
description: Custom metadata to attach to the inbox.
|
|
38381
38675
|
title: CreateInboxRequest
|
|
38382
38676
|
type_inboxes:InboxId:
|
|
38383
38677
|
type: string
|
|
@@ -38400,6 +38694,9 @@ components:
|
|
|
38400
38694
|
$ref: '#/components/schemas/type_inboxes:DisplayName'
|
|
38401
38695
|
client_id:
|
|
38402
38696
|
$ref: '#/components/schemas/type_inboxes:ClientId'
|
|
38697
|
+
metadata:
|
|
38698
|
+
$ref: '#/components/schemas/type_inboxes:Metadata'
|
|
38699
|
+
description: Custom metadata attached to the inbox.
|
|
38403
38700
|
updated_at:
|
|
38404
38701
|
type: string
|
|
38405
38702
|
format: date-time
|
|
@@ -38670,13 +38967,49 @@ components:
|
|
|
38670
38967
|
type: string
|
|
38671
38968
|
description: 'Display name: `Display Name <username@domain.com>`.'
|
|
38672
38969
|
title: DisplayName
|
|
38970
|
+
type_inboxes:MetadataValue:
|
|
38971
|
+
oneOf:
|
|
38972
|
+
- type: string
|
|
38973
|
+
- type: number
|
|
38974
|
+
format: double
|
|
38975
|
+
- type: boolean
|
|
38976
|
+
description: A metadata value. May be a string, number, or boolean.
|
|
38977
|
+
title: MetadataValue
|
|
38978
|
+
type_inboxes:UpdateMetadata:
|
|
38979
|
+
type: object
|
|
38980
|
+
additionalProperties:
|
|
38981
|
+
oneOf:
|
|
38982
|
+
- $ref: '#/components/schemas/type_inboxes:MetadataValue'
|
|
38983
|
+
- type: 'null'
|
|
38984
|
+
description: |-
|
|
38985
|
+
Custom key-value pairs to merge into the inbox's existing metadata. A
|
|
38986
|
+
value may be a string, number, boolean, or null. Setting a key to null
|
|
38987
|
+
removes it. Up to 256 keys; keys and string values are each limited to
|
|
38988
|
+
256 characters.
|
|
38989
|
+
title: UpdateMetadata
|
|
38673
38990
|
type_inboxes:UpdateInboxRequest:
|
|
38674
38991
|
type: object
|
|
38675
38992
|
properties:
|
|
38676
38993
|
display_name:
|
|
38677
38994
|
$ref: '#/components/schemas/type_inboxes:DisplayName'
|
|
38678
|
-
|
|
38679
|
-
|
|
38995
|
+
metadata:
|
|
38996
|
+
oneOf:
|
|
38997
|
+
- $ref: '#/components/schemas/type_inboxes:UpdateMetadata'
|
|
38998
|
+
- type: 'null'
|
|
38999
|
+
description: >-
|
|
39000
|
+
Metadata to merge into the inbox's existing metadata. Keys you
|
|
39001
|
+
include
|
|
39002
|
+
|
|
39003
|
+
are added or overwritten; keys you omit are left unchanged. To
|
|
39004
|
+
remove a
|
|
39005
|
+
|
|
39006
|
+
single key, send it with a null value. To clear all metadata, send
|
|
39007
|
+
|
|
39008
|
+
`metadata` as null. Sending an empty object is rejected; use null to
|
|
39009
|
+
|
|
39010
|
+
clear. Each update must include at least one of `display_name` or
|
|
39011
|
+
|
|
39012
|
+
`metadata`.
|
|
38680
39013
|
title: UpdateInboxRequest
|
|
38681
39014
|
type_inboxes:Email:
|
|
38682
39015
|
type: string
|
|
@@ -38686,6 +39019,18 @@ components:
|
|
|
38686
39019
|
type: string
|
|
38687
39020
|
description: Client ID of inbox.
|
|
38688
39021
|
title: ClientId
|
|
39022
|
+
type_inboxes:Metadata:
|
|
39023
|
+
type: object
|
|
39024
|
+
additionalProperties:
|
|
39025
|
+
$ref: '#/components/schemas/type_inboxes:MetadataValue'
|
|
39026
|
+
description: >-
|
|
39027
|
+
Custom key-value pairs attached to the inbox. Up to 256 keys. Keys and
|
|
39028
|
+
|
|
39029
|
+
string values are each limited to 256 characters. When updating
|
|
39030
|
+
metadata,
|
|
39031
|
+
|
|
39032
|
+
send a key with a null value to remove that key.
|
|
39033
|
+
title: Metadata
|
|
38689
39034
|
type_inboxes:Inbox:
|
|
38690
39035
|
type: object
|
|
38691
39036
|
properties:
|
|
@@ -38699,6 +39044,9 @@ components:
|
|
|
38699
39044
|
$ref: '#/components/schemas/type_inboxes:DisplayName'
|
|
38700
39045
|
client_id:
|
|
38701
39046
|
$ref: '#/components/schemas/type_inboxes:ClientId'
|
|
39047
|
+
metadata:
|
|
39048
|
+
$ref: '#/components/schemas/type_inboxes:Metadata'
|
|
39049
|
+
description: Custom metadata attached to the inbox.
|
|
38702
39050
|
updated_at:
|
|
38703
39051
|
type: string
|
|
38704
39052
|
format: date-time
|
|
@@ -38749,9 +39097,7 @@ async function main() {
|
|
|
38749
39097
|
const client = new AgentMailClient({
|
|
38750
39098
|
apiKey: "YOUR_TOKEN_HERE",
|
|
38751
39099
|
});
|
|
38752
|
-
await client.pods.inboxes.update("pod_id", "inbox_id", {
|
|
38753
|
-
displayName: "display_name",
|
|
38754
|
-
});
|
|
39100
|
+
await client.pods.inboxes.update("pod_id", "inbox_id", {});
|
|
38755
39101
|
}
|
|
38756
39102
|
main();
|
|
38757
39103
|
|
|
@@ -38767,7 +39113,6 @@ client = AgentMail(
|
|
|
38767
39113
|
client.pods.inboxes.update(
|
|
38768
39114
|
pod_id="pod_id",
|
|
38769
39115
|
inbox_id="inbox_id",
|
|
38770
|
-
display_name="display_name",
|
|
38771
39116
|
)
|
|
38772
39117
|
|
|
38773
39118
|
```
|
|
@@ -38786,7 +39131,7 @@ func main() {
|
|
|
38786
39131
|
|
|
38787
39132
|
url := "https://api.agentmail.to/v0/pods/pod_id/inboxes/inbox_id"
|
|
38788
39133
|
|
|
38789
|
-
payload := strings.NewReader("{
|
|
39134
|
+
payload := strings.NewReader("{}")
|
|
38790
39135
|
|
|
38791
39136
|
req, _ := http.NewRequest("PATCH", url, payload)
|
|
38792
39137
|
|
|
@@ -38816,7 +39161,7 @@ http.use_ssl = true
|
|
|
38816
39161
|
request = Net::HTTP::Patch.new(url)
|
|
38817
39162
|
request["Authorization"] = 'Bearer <api_key>'
|
|
38818
39163
|
request["Content-Type"] = 'application/json'
|
|
38819
|
-
request.body = "{
|
|
39164
|
+
request.body = "{}"
|
|
38820
39165
|
|
|
38821
39166
|
response = http.request(request)
|
|
38822
39167
|
puts response.read_body
|
|
@@ -38829,7 +39174,7 @@ import com.mashape.unirest.http.Unirest;
|
|
|
38829
39174
|
HttpResponse<String> response = Unirest.patch("https://api.agentmail.to/v0/pods/pod_id/inboxes/inbox_id")
|
|
38830
39175
|
.header("Authorization", "Bearer <api_key>")
|
|
38831
39176
|
.header("Content-Type", "application/json")
|
|
38832
|
-
.body("{
|
|
39177
|
+
.body("{}")
|
|
38833
39178
|
.asString();
|
|
38834
39179
|
```
|
|
38835
39180
|
|
|
@@ -38840,9 +39185,7 @@ require_once('vendor/autoload.php');
|
|
|
38840
39185
|
$client = new \GuzzleHttp\Client();
|
|
38841
39186
|
|
|
38842
39187
|
$response = $client->request('PATCH', 'https://api.agentmail.to/v0/pods/pod_id/inboxes/inbox_id', [
|
|
38843
|
-
'body' => '{
|
|
38844
|
-
"display_name": "display_name"
|
|
38845
|
-
}',
|
|
39188
|
+
'body' => '{}',
|
|
38846
39189
|
'headers' => [
|
|
38847
39190
|
'Authorization' => 'Bearer <api_key>',
|
|
38848
39191
|
'Content-Type' => 'application/json',
|
|
@@ -38859,7 +39202,7 @@ var client = new RestClient("https://api.agentmail.to/v0/pods/pod_id/inboxes/inb
|
|
|
38859
39202
|
var request = new RestRequest(Method.PATCH);
|
|
38860
39203
|
request.AddHeader("Authorization", "Bearer <api_key>");
|
|
38861
39204
|
request.AddHeader("Content-Type", "application/json");
|
|
38862
|
-
request.AddParameter("application/json", "{
|
|
39205
|
+
request.AddParameter("application/json", "{}", ParameterType.RequestBody);
|
|
38863
39206
|
IRestResponse response = client.Execute(request);
|
|
38864
39207
|
```
|
|
38865
39208
|
|
|
@@ -38870,7 +39213,7 @@ let headers = [
|
|
|
38870
39213
|
"Authorization": "Bearer <api_key>",
|
|
38871
39214
|
"Content-Type": "application/json"
|
|
38872
39215
|
]
|
|
38873
|
-
let parameters = [
|
|
39216
|
+
let parameters = [] as [String : Any]
|
|
38874
39217
|
|
|
38875
39218
|
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
|
|
38876
39219
|
|