agentmail 0.5.4 → 0.5.5
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 +2 -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 +2 -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 +308 -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.5",
|
|
47
|
+
"User-Agent": "agentmail/0.5.5",
|
|
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,7 @@ 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.
|
|
9
9
|
*/
|
|
10
|
-
metadata?: AgentMail.inboxes.
|
|
10
|
+
metadata?: AgentMail.inboxes.UpdateMetadata;
|
|
11
11
|
}
|
|
@@ -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>;
|
|
@@ -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;
|
|
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.optional(),
|
|
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);
|
|
@@ -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.5";
|
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.5",
|
|
10
|
+
"User-Agent": "agentmail/0.5.5",
|
|
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,7 @@ 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.
|
|
9
9
|
*/
|
|
10
|
-
metadata?: AgentMail.inboxes.
|
|
10
|
+
metadata?: AgentMail.inboxes.UpdateMetadata;
|
|
11
11
|
}
|
|
@@ -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>;
|
|
@@ -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;
|
|
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.optional(),
|
|
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);
|
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.5";
|
package/dist/esm/version.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const SDK_VERSION = "0.5.
|
|
1
|
+
export const SDK_VERSION = "0.5.5";
|
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,22 @@ 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
|
+
string values are each limited to 256 characters.
|
|
12453
|
+
title: Metadata
|
|
12351
12454
|
type_inboxes:Inbox:
|
|
12352
12455
|
type: object
|
|
12353
12456
|
properties:
|
|
@@ -12361,6 +12464,9 @@ components:
|
|
|
12361
12464
|
$ref: '#/components/schemas/type_inboxes:DisplayName'
|
|
12362
12465
|
client_id:
|
|
12363
12466
|
$ref: '#/components/schemas/type_inboxes:ClientId'
|
|
12467
|
+
metadata:
|
|
12468
|
+
$ref: '#/components/schemas/type_inboxes:Metadata'
|
|
12469
|
+
description: Custom metadata attached to the inbox.
|
|
12364
12470
|
updated_at:
|
|
12365
12471
|
type: string
|
|
12366
12472
|
format: date-time
|
|
@@ -12610,6 +12716,22 @@ components:
|
|
|
12610
12716
|
type: string
|
|
12611
12717
|
description: Client ID of inbox.
|
|
12612
12718
|
title: ClientId
|
|
12719
|
+
type_inboxes:MetadataValue:
|
|
12720
|
+
oneOf:
|
|
12721
|
+
- type: string
|
|
12722
|
+
- type: number
|
|
12723
|
+
format: double
|
|
12724
|
+
- type: boolean
|
|
12725
|
+
description: A metadata value. May be a string, number, or boolean.
|
|
12726
|
+
title: MetadataValue
|
|
12727
|
+
type_inboxes:Metadata:
|
|
12728
|
+
type: object
|
|
12729
|
+
additionalProperties:
|
|
12730
|
+
$ref: '#/components/schemas/type_inboxes:MetadataValue'
|
|
12731
|
+
description: |-
|
|
12732
|
+
Custom key-value pairs attached to the inbox. Up to 256 keys. Keys and
|
|
12733
|
+
string values are each limited to 256 characters.
|
|
12734
|
+
title: Metadata
|
|
12613
12735
|
type_inboxes:Inbox:
|
|
12614
12736
|
type: object
|
|
12615
12737
|
properties:
|
|
@@ -12623,6 +12745,9 @@ components:
|
|
|
12623
12745
|
$ref: '#/components/schemas/type_inboxes:DisplayName'
|
|
12624
12746
|
client_id:
|
|
12625
12747
|
$ref: '#/components/schemas/type_inboxes:ClientId'
|
|
12748
|
+
metadata:
|
|
12749
|
+
$ref: '#/components/schemas/type_inboxes:Metadata'
|
|
12750
|
+
description: Custom metadata attached to the inbox.
|
|
12626
12751
|
updated_at:
|
|
12627
12752
|
type: string
|
|
12628
12753
|
format: date-time
|
|
@@ -12868,6 +12993,22 @@ components:
|
|
|
12868
12993
|
type: string
|
|
12869
12994
|
description: Client ID of inbox.
|
|
12870
12995
|
title: ClientId
|
|
12996
|
+
type_inboxes:MetadataValue:
|
|
12997
|
+
oneOf:
|
|
12998
|
+
- type: string
|
|
12999
|
+
- type: number
|
|
13000
|
+
format: double
|
|
13001
|
+
- type: boolean
|
|
13002
|
+
description: A metadata value. May be a string, number, or boolean.
|
|
13003
|
+
title: MetadataValue
|
|
13004
|
+
type_inboxes:Metadata:
|
|
13005
|
+
type: object
|
|
13006
|
+
additionalProperties:
|
|
13007
|
+
$ref: '#/components/schemas/type_inboxes:MetadataValue'
|
|
13008
|
+
description: |-
|
|
13009
|
+
Custom key-value pairs attached to the inbox. Up to 256 keys. Keys and
|
|
13010
|
+
string values are each limited to 256 characters.
|
|
13011
|
+
title: Metadata
|
|
12871
13012
|
type_inboxes:CreateInboxRequest:
|
|
12872
13013
|
type: object
|
|
12873
13014
|
properties:
|
|
@@ -12883,6 +13024,9 @@ components:
|
|
|
12883
13024
|
$ref: '#/components/schemas/type_inboxes:DisplayName'
|
|
12884
13025
|
client_id:
|
|
12885
13026
|
$ref: '#/components/schemas/type_inboxes:ClientId'
|
|
13027
|
+
metadata:
|
|
13028
|
+
$ref: '#/components/schemas/type_inboxes:Metadata'
|
|
13029
|
+
description: Custom metadata to attach to the inbox.
|
|
12886
13030
|
title: CreateInboxRequest
|
|
12887
13031
|
type_pods:PodId:
|
|
12888
13032
|
type: string
|
|
@@ -12909,6 +13053,9 @@ components:
|
|
|
12909
13053
|
$ref: '#/components/schemas/type_inboxes:DisplayName'
|
|
12910
13054
|
client_id:
|
|
12911
13055
|
$ref: '#/components/schemas/type_inboxes:ClientId'
|
|
13056
|
+
metadata:
|
|
13057
|
+
$ref: '#/components/schemas/type_inboxes:Metadata'
|
|
13058
|
+
description: Custom metadata attached to the inbox.
|
|
12912
13059
|
updated_at:
|
|
12913
13060
|
type: string
|
|
12914
13061
|
format: date-time
|
|
@@ -13135,6 +13282,12 @@ paths:
|
|
|
13135
13282
|
application/json:
|
|
13136
13283
|
schema:
|
|
13137
13284
|
$ref: '#/components/schemas/type_inboxes:Inbox'
|
|
13285
|
+
'400':
|
|
13286
|
+
description: Error response with status 400
|
|
13287
|
+
content:
|
|
13288
|
+
application/json:
|
|
13289
|
+
schema:
|
|
13290
|
+
$ref: '#/components/schemas/type_:ValidationErrorResponse'
|
|
13138
13291
|
'404':
|
|
13139
13292
|
description: Error response with status 404
|
|
13140
13293
|
content:
|
|
@@ -13161,13 +13314,40 @@ components:
|
|
|
13161
13314
|
type: string
|
|
13162
13315
|
description: 'Display name: `Display Name <username@domain.com>`.'
|
|
13163
13316
|
title: DisplayName
|
|
13317
|
+
type_inboxes:MetadataValue:
|
|
13318
|
+
oneOf:
|
|
13319
|
+
- type: string
|
|
13320
|
+
- type: number
|
|
13321
|
+
format: double
|
|
13322
|
+
- type: boolean
|
|
13323
|
+
description: A metadata value. May be a string, number, or boolean.
|
|
13324
|
+
title: MetadataValue
|
|
13325
|
+
type_inboxes:Metadata:
|
|
13326
|
+
type: object
|
|
13327
|
+
additionalProperties:
|
|
13328
|
+
$ref: '#/components/schemas/type_inboxes:MetadataValue'
|
|
13329
|
+
description: |-
|
|
13330
|
+
Custom key-value pairs attached to the inbox. Up to 256 keys. Keys and
|
|
13331
|
+
string values are each limited to 256 characters.
|
|
13332
|
+
title: Metadata
|
|
13164
13333
|
type_inboxes:UpdateInboxRequest:
|
|
13165
13334
|
type: object
|
|
13166
13335
|
properties:
|
|
13167
13336
|
display_name:
|
|
13168
13337
|
$ref: '#/components/schemas/type_inboxes:DisplayName'
|
|
13169
|
-
|
|
13170
|
-
|
|
13338
|
+
metadata:
|
|
13339
|
+
$ref: '#/components/schemas/type_inboxes:Metadata'
|
|
13340
|
+
description: >-
|
|
13341
|
+
Metadata to merge into the inbox's existing metadata. Keys you
|
|
13342
|
+
include
|
|
13343
|
+
|
|
13344
|
+
are added or overwritten; keys you omit are left unchanged. To
|
|
13345
|
+
remove a
|
|
13346
|
+
|
|
13347
|
+
single key, send it with a null value. To clear all metadata, send
|
|
13348
|
+
|
|
13349
|
+
`metadata` as null. Provide at least one of `display_name` or
|
|
13350
|
+
`metadata`.
|
|
13171
13351
|
title: UpdateInboxRequest
|
|
13172
13352
|
type_pods:PodId:
|
|
13173
13353
|
type: string
|
|
@@ -13194,6 +13374,9 @@ components:
|
|
|
13194
13374
|
$ref: '#/components/schemas/type_inboxes:DisplayName'
|
|
13195
13375
|
client_id:
|
|
13196
13376
|
$ref: '#/components/schemas/type_inboxes:ClientId'
|
|
13377
|
+
metadata:
|
|
13378
|
+
$ref: '#/components/schemas/type_inboxes:Metadata'
|
|
13379
|
+
description: Custom metadata attached to the inbox.
|
|
13197
13380
|
updated_at:
|
|
13198
13381
|
type: string
|
|
13199
13382
|
format: date-time
|
|
@@ -13228,6 +13411,17 @@ components:
|
|
|
13228
13411
|
- name
|
|
13229
13412
|
- message
|
|
13230
13413
|
title: ErrorResponse
|
|
13414
|
+
type_:ValidationErrorResponse:
|
|
13415
|
+
type: object
|
|
13416
|
+
properties:
|
|
13417
|
+
name:
|
|
13418
|
+
$ref: '#/components/schemas/type_:ErrorName'
|
|
13419
|
+
errors:
|
|
13420
|
+
description: Validation errors.
|
|
13421
|
+
required:
|
|
13422
|
+
- name
|
|
13423
|
+
- errors
|
|
13424
|
+
title: ValidationErrorResponse
|
|
13231
13425
|
securitySchemes:
|
|
13232
13426
|
Bearer:
|
|
13233
13427
|
type: http
|
|
@@ -13244,9 +13438,7 @@ async function main() {
|
|
|
13244
13438
|
const client = new AgentMailClient({
|
|
13245
13439
|
apiKey: "YOUR_TOKEN_HERE",
|
|
13246
13440
|
});
|
|
13247
|
-
await client.inboxes.update("inbox_id", {
|
|
13248
|
-
displayName: "display_name",
|
|
13249
|
-
});
|
|
13441
|
+
await client.inboxes.update("inbox_id", {});
|
|
13250
13442
|
}
|
|
13251
13443
|
main();
|
|
13252
13444
|
|
|
@@ -13261,7 +13453,6 @@ client = AgentMail(
|
|
|
13261
13453
|
|
|
13262
13454
|
client.inboxes.update(
|
|
13263
13455
|
inbox_id="inbox_id",
|
|
13264
|
-
display_name="display_name",
|
|
13265
13456
|
)
|
|
13266
13457
|
|
|
13267
13458
|
```
|
|
@@ -13280,7 +13471,7 @@ func main() {
|
|
|
13280
13471
|
|
|
13281
13472
|
url := "https://api.agentmail.to/v0/inboxes/inbox_id"
|
|
13282
13473
|
|
|
13283
|
-
payload := strings.NewReader("{
|
|
13474
|
+
payload := strings.NewReader("{}")
|
|
13284
13475
|
|
|
13285
13476
|
req, _ := http.NewRequest("PATCH", url, payload)
|
|
13286
13477
|
|
|
@@ -13310,7 +13501,7 @@ http.use_ssl = true
|
|
|
13310
13501
|
request = Net::HTTP::Patch.new(url)
|
|
13311
13502
|
request["Authorization"] = 'Bearer <api_key>'
|
|
13312
13503
|
request["Content-Type"] = 'application/json'
|
|
13313
|
-
request.body = "{
|
|
13504
|
+
request.body = "{}"
|
|
13314
13505
|
|
|
13315
13506
|
response = http.request(request)
|
|
13316
13507
|
puts response.read_body
|
|
@@ -13323,7 +13514,7 @@ import com.mashape.unirest.http.Unirest;
|
|
|
13323
13514
|
HttpResponse<String> response = Unirest.patch("https://api.agentmail.to/v0/inboxes/inbox_id")
|
|
13324
13515
|
.header("Authorization", "Bearer <api_key>")
|
|
13325
13516
|
.header("Content-Type", "application/json")
|
|
13326
|
-
.body("{
|
|
13517
|
+
.body("{}")
|
|
13327
13518
|
.asString();
|
|
13328
13519
|
```
|
|
13329
13520
|
|
|
@@ -13334,9 +13525,7 @@ require_once('vendor/autoload.php');
|
|
|
13334
13525
|
$client = new \GuzzleHttp\Client();
|
|
13335
13526
|
|
|
13336
13527
|
$response = $client->request('PATCH', 'https://api.agentmail.to/v0/inboxes/inbox_id', [
|
|
13337
|
-
'body' => '{
|
|
13338
|
-
"display_name": "display_name"
|
|
13339
|
-
}',
|
|
13528
|
+
'body' => '{}',
|
|
13340
13529
|
'headers' => [
|
|
13341
13530
|
'Authorization' => 'Bearer <api_key>',
|
|
13342
13531
|
'Content-Type' => 'application/json',
|
|
@@ -13353,7 +13542,7 @@ var client = new RestClient("https://api.agentmail.to/v0/inboxes/inbox_id");
|
|
|
13353
13542
|
var request = new RestRequest(Method.PATCH);
|
|
13354
13543
|
request.AddHeader("Authorization", "Bearer <api_key>");
|
|
13355
13544
|
request.AddHeader("Content-Type", "application/json");
|
|
13356
|
-
request.AddParameter("application/json", "{
|
|
13545
|
+
request.AddParameter("application/json", "{}", ParameterType.RequestBody);
|
|
13357
13546
|
IRestResponse response = client.Execute(request);
|
|
13358
13547
|
```
|
|
13359
13548
|
|
|
@@ -13364,7 +13553,7 @@ let headers = [
|
|
|
13364
13553
|
"Authorization": "Bearer <api_key>",
|
|
13365
13554
|
"Content-Type": "application/json"
|
|
13366
13555
|
]
|
|
13367
|
-
let parameters = [
|
|
13556
|
+
let parameters = [] as [String : Any]
|
|
13368
13557
|
|
|
13369
13558
|
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
|
|
13370
13559
|
|
|
@@ -37807,6 +37996,22 @@ components:
|
|
|
37807
37996
|
type: string
|
|
37808
37997
|
description: Client ID of inbox.
|
|
37809
37998
|
title: ClientId
|
|
37999
|
+
type_inboxes:MetadataValue:
|
|
38000
|
+
oneOf:
|
|
38001
|
+
- type: string
|
|
38002
|
+
- type: number
|
|
38003
|
+
format: double
|
|
38004
|
+
- type: boolean
|
|
38005
|
+
description: A metadata value. May be a string, number, or boolean.
|
|
38006
|
+
title: MetadataValue
|
|
38007
|
+
type_inboxes:Metadata:
|
|
38008
|
+
type: object
|
|
38009
|
+
additionalProperties:
|
|
38010
|
+
$ref: '#/components/schemas/type_inboxes:MetadataValue'
|
|
38011
|
+
description: |-
|
|
38012
|
+
Custom key-value pairs attached to the inbox. Up to 256 keys. Keys and
|
|
38013
|
+
string values are each limited to 256 characters.
|
|
38014
|
+
title: Metadata
|
|
37810
38015
|
type_inboxes:Inbox:
|
|
37811
38016
|
type: object
|
|
37812
38017
|
properties:
|
|
@@ -37820,6 +38025,9 @@ components:
|
|
|
37820
38025
|
$ref: '#/components/schemas/type_inboxes:DisplayName'
|
|
37821
38026
|
client_id:
|
|
37822
38027
|
$ref: '#/components/schemas/type_inboxes:ClientId'
|
|
38028
|
+
metadata:
|
|
38029
|
+
$ref: '#/components/schemas/type_inboxes:Metadata'
|
|
38030
|
+
description: Custom metadata attached to the inbox.
|
|
37823
38031
|
updated_at:
|
|
37824
38032
|
type: string
|
|
37825
38033
|
format: date-time
|
|
@@ -38095,6 +38303,22 @@ components:
|
|
|
38095
38303
|
type: string
|
|
38096
38304
|
description: Client ID of inbox.
|
|
38097
38305
|
title: ClientId
|
|
38306
|
+
type_inboxes:MetadataValue:
|
|
38307
|
+
oneOf:
|
|
38308
|
+
- type: string
|
|
38309
|
+
- type: number
|
|
38310
|
+
format: double
|
|
38311
|
+
- type: boolean
|
|
38312
|
+
description: A metadata value. May be a string, number, or boolean.
|
|
38313
|
+
title: MetadataValue
|
|
38314
|
+
type_inboxes:Metadata:
|
|
38315
|
+
type: object
|
|
38316
|
+
additionalProperties:
|
|
38317
|
+
$ref: '#/components/schemas/type_inboxes:MetadataValue'
|
|
38318
|
+
description: |-
|
|
38319
|
+
Custom key-value pairs attached to the inbox. Up to 256 keys. Keys and
|
|
38320
|
+
string values are each limited to 256 characters.
|
|
38321
|
+
title: Metadata
|
|
38098
38322
|
type_inboxes:Inbox:
|
|
38099
38323
|
type: object
|
|
38100
38324
|
properties:
|
|
@@ -38108,6 +38332,9 @@ components:
|
|
|
38108
38332
|
$ref: '#/components/schemas/type_inboxes:DisplayName'
|
|
38109
38333
|
client_id:
|
|
38110
38334
|
$ref: '#/components/schemas/type_inboxes:ClientId'
|
|
38335
|
+
metadata:
|
|
38336
|
+
$ref: '#/components/schemas/type_inboxes:Metadata'
|
|
38337
|
+
description: Custom metadata attached to the inbox.
|
|
38111
38338
|
updated_at:
|
|
38112
38339
|
type: string
|
|
38113
38340
|
format: date-time
|
|
@@ -38363,6 +38590,22 @@ components:
|
|
|
38363
38590
|
type: string
|
|
38364
38591
|
description: Client ID of inbox.
|
|
38365
38592
|
title: ClientId
|
|
38593
|
+
type_inboxes:MetadataValue:
|
|
38594
|
+
oneOf:
|
|
38595
|
+
- type: string
|
|
38596
|
+
- type: number
|
|
38597
|
+
format: double
|
|
38598
|
+
- type: boolean
|
|
38599
|
+
description: A metadata value. May be a string, number, or boolean.
|
|
38600
|
+
title: MetadataValue
|
|
38601
|
+
type_inboxes:Metadata:
|
|
38602
|
+
type: object
|
|
38603
|
+
additionalProperties:
|
|
38604
|
+
$ref: '#/components/schemas/type_inboxes:MetadataValue'
|
|
38605
|
+
description: |-
|
|
38606
|
+
Custom key-value pairs attached to the inbox. Up to 256 keys. Keys and
|
|
38607
|
+
string values are each limited to 256 characters.
|
|
38608
|
+
title: Metadata
|
|
38366
38609
|
type_inboxes:CreateInboxRequest:
|
|
38367
38610
|
type: object
|
|
38368
38611
|
properties:
|
|
@@ -38378,6 +38621,9 @@ components:
|
|
|
38378
38621
|
$ref: '#/components/schemas/type_inboxes:DisplayName'
|
|
38379
38622
|
client_id:
|
|
38380
38623
|
$ref: '#/components/schemas/type_inboxes:ClientId'
|
|
38624
|
+
metadata:
|
|
38625
|
+
$ref: '#/components/schemas/type_inboxes:Metadata'
|
|
38626
|
+
description: Custom metadata to attach to the inbox.
|
|
38381
38627
|
title: CreateInboxRequest
|
|
38382
38628
|
type_inboxes:InboxId:
|
|
38383
38629
|
type: string
|
|
@@ -38400,6 +38646,9 @@ components:
|
|
|
38400
38646
|
$ref: '#/components/schemas/type_inboxes:DisplayName'
|
|
38401
38647
|
client_id:
|
|
38402
38648
|
$ref: '#/components/schemas/type_inboxes:ClientId'
|
|
38649
|
+
metadata:
|
|
38650
|
+
$ref: '#/components/schemas/type_inboxes:Metadata'
|
|
38651
|
+
description: Custom metadata attached to the inbox.
|
|
38403
38652
|
updated_at:
|
|
38404
38653
|
type: string
|
|
38405
38654
|
format: date-time
|
|
@@ -38670,13 +38919,40 @@ components:
|
|
|
38670
38919
|
type: string
|
|
38671
38920
|
description: 'Display name: `Display Name <username@domain.com>`.'
|
|
38672
38921
|
title: DisplayName
|
|
38922
|
+
type_inboxes:MetadataValue:
|
|
38923
|
+
oneOf:
|
|
38924
|
+
- type: string
|
|
38925
|
+
- type: number
|
|
38926
|
+
format: double
|
|
38927
|
+
- type: boolean
|
|
38928
|
+
description: A metadata value. May be a string, number, or boolean.
|
|
38929
|
+
title: MetadataValue
|
|
38930
|
+
type_inboxes:Metadata:
|
|
38931
|
+
type: object
|
|
38932
|
+
additionalProperties:
|
|
38933
|
+
$ref: '#/components/schemas/type_inboxes:MetadataValue'
|
|
38934
|
+
description: |-
|
|
38935
|
+
Custom key-value pairs attached to the inbox. Up to 256 keys. Keys and
|
|
38936
|
+
string values are each limited to 256 characters.
|
|
38937
|
+
title: Metadata
|
|
38673
38938
|
type_inboxes:UpdateInboxRequest:
|
|
38674
38939
|
type: object
|
|
38675
38940
|
properties:
|
|
38676
38941
|
display_name:
|
|
38677
38942
|
$ref: '#/components/schemas/type_inboxes:DisplayName'
|
|
38678
|
-
|
|
38679
|
-
|
|
38943
|
+
metadata:
|
|
38944
|
+
$ref: '#/components/schemas/type_inboxes:Metadata'
|
|
38945
|
+
description: >-
|
|
38946
|
+
Metadata to merge into the inbox's existing metadata. Keys you
|
|
38947
|
+
include
|
|
38948
|
+
|
|
38949
|
+
are added or overwritten; keys you omit are left unchanged. To
|
|
38950
|
+
remove a
|
|
38951
|
+
|
|
38952
|
+
single key, send it with a null value. To clear all metadata, send
|
|
38953
|
+
|
|
38954
|
+
`metadata` as null. Provide at least one of `display_name` or
|
|
38955
|
+
`metadata`.
|
|
38680
38956
|
title: UpdateInboxRequest
|
|
38681
38957
|
type_inboxes:Email:
|
|
38682
38958
|
type: string
|
|
@@ -38699,6 +38975,9 @@ components:
|
|
|
38699
38975
|
$ref: '#/components/schemas/type_inboxes:DisplayName'
|
|
38700
38976
|
client_id:
|
|
38701
38977
|
$ref: '#/components/schemas/type_inboxes:ClientId'
|
|
38978
|
+
metadata:
|
|
38979
|
+
$ref: '#/components/schemas/type_inboxes:Metadata'
|
|
38980
|
+
description: Custom metadata attached to the inbox.
|
|
38702
38981
|
updated_at:
|
|
38703
38982
|
type: string
|
|
38704
38983
|
format: date-time
|
|
@@ -38749,9 +39028,7 @@ async function main() {
|
|
|
38749
39028
|
const client = new AgentMailClient({
|
|
38750
39029
|
apiKey: "YOUR_TOKEN_HERE",
|
|
38751
39030
|
});
|
|
38752
|
-
await client.pods.inboxes.update("pod_id", "inbox_id", {
|
|
38753
|
-
displayName: "display_name",
|
|
38754
|
-
});
|
|
39031
|
+
await client.pods.inboxes.update("pod_id", "inbox_id", {});
|
|
38755
39032
|
}
|
|
38756
39033
|
main();
|
|
38757
39034
|
|
|
@@ -38767,7 +39044,6 @@ client = AgentMail(
|
|
|
38767
39044
|
client.pods.inboxes.update(
|
|
38768
39045
|
pod_id="pod_id",
|
|
38769
39046
|
inbox_id="inbox_id",
|
|
38770
|
-
display_name="display_name",
|
|
38771
39047
|
)
|
|
38772
39048
|
|
|
38773
39049
|
```
|
|
@@ -38786,7 +39062,7 @@ func main() {
|
|
|
38786
39062
|
|
|
38787
39063
|
url := "https://api.agentmail.to/v0/pods/pod_id/inboxes/inbox_id"
|
|
38788
39064
|
|
|
38789
|
-
payload := strings.NewReader("{
|
|
39065
|
+
payload := strings.NewReader("{}")
|
|
38790
39066
|
|
|
38791
39067
|
req, _ := http.NewRequest("PATCH", url, payload)
|
|
38792
39068
|
|
|
@@ -38816,7 +39092,7 @@ http.use_ssl = true
|
|
|
38816
39092
|
request = Net::HTTP::Patch.new(url)
|
|
38817
39093
|
request["Authorization"] = 'Bearer <api_key>'
|
|
38818
39094
|
request["Content-Type"] = 'application/json'
|
|
38819
|
-
request.body = "{
|
|
39095
|
+
request.body = "{}"
|
|
38820
39096
|
|
|
38821
39097
|
response = http.request(request)
|
|
38822
39098
|
puts response.read_body
|
|
@@ -38829,7 +39105,7 @@ import com.mashape.unirest.http.Unirest;
|
|
|
38829
39105
|
HttpResponse<String> response = Unirest.patch("https://api.agentmail.to/v0/pods/pod_id/inboxes/inbox_id")
|
|
38830
39106
|
.header("Authorization", "Bearer <api_key>")
|
|
38831
39107
|
.header("Content-Type", "application/json")
|
|
38832
|
-
.body("{
|
|
39108
|
+
.body("{}")
|
|
38833
39109
|
.asString();
|
|
38834
39110
|
```
|
|
38835
39111
|
|
|
@@ -38840,9 +39116,7 @@ require_once('vendor/autoload.php');
|
|
|
38840
39116
|
$client = new \GuzzleHttp\Client();
|
|
38841
39117
|
|
|
38842
39118
|
$response = $client->request('PATCH', 'https://api.agentmail.to/v0/pods/pod_id/inboxes/inbox_id', [
|
|
38843
|
-
'body' => '{
|
|
38844
|
-
"display_name": "display_name"
|
|
38845
|
-
}',
|
|
39119
|
+
'body' => '{}',
|
|
38846
39120
|
'headers' => [
|
|
38847
39121
|
'Authorization' => 'Bearer <api_key>',
|
|
38848
39122
|
'Content-Type' => 'application/json',
|
|
@@ -38859,7 +39133,7 @@ var client = new RestClient("https://api.agentmail.to/v0/pods/pod_id/inboxes/inb
|
|
|
38859
39133
|
var request = new RestRequest(Method.PATCH);
|
|
38860
39134
|
request.AddHeader("Authorization", "Bearer <api_key>");
|
|
38861
39135
|
request.AddHeader("Content-Type", "application/json");
|
|
38862
|
-
request.AddParameter("application/json", "{
|
|
39136
|
+
request.AddParameter("application/json", "{}", ParameterType.RequestBody);
|
|
38863
39137
|
IRestResponse response = client.Execute(request);
|
|
38864
39138
|
```
|
|
38865
39139
|
|
|
@@ -38870,7 +39144,7 @@ let headers = [
|
|
|
38870
39144
|
"Authorization": "Bearer <api_key>",
|
|
38871
39145
|
"Content-Type": "application/json"
|
|
38872
39146
|
]
|
|
38873
|
-
let parameters = [
|
|
39147
|
+
let parameters = [] as [String : Any]
|
|
38874
39148
|
|
|
38875
39149
|
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
|
|
38876
39150
|
|