@isnap/sdk 2.3.1 → 2.4.0-next.43972422309.1
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/CHANGELOG.md +15 -0
- package/README.md +92 -7
- package/dist/chat-sdk/adapter.d.ts +175 -0
- package/dist/chat-sdk/adapter.d.ts.map +1 -0
- package/dist/chat-sdk/adapter.js +395 -0
- package/dist/chat-sdk/adapter.js.map +1 -0
- package/dist/chat-sdk/format.d.ts +12 -0
- package/dist/chat-sdk/format.d.ts.map +1 -0
- package/dist/chat-sdk/format.js +15 -0
- package/dist/chat-sdk/format.js.map +1 -0
- package/dist/chat-sdk/index.d.ts +14 -0
- package/dist/chat-sdk/index.d.ts.map +1 -0
- package/dist/chat-sdk/index.js +11 -0
- package/dist/chat-sdk/index.js.map +1 -0
- package/dist/chat-sdk/reactions.d.ts +10 -0
- package/dist/chat-sdk/reactions.d.ts.map +1 -0
- package/dist/chat-sdk/reactions.js +34 -0
- package/dist/chat-sdk/reactions.js.map +1 -0
- package/dist/chat-sdk/thread-id.d.ts +16 -0
- package/dist/chat-sdk/thread-id.d.ts.map +1 -0
- package/dist/chat-sdk/thread-id.js +20 -0
- package/dist/chat-sdk/thread-id.js.map +1 -0
- package/dist/client.d.ts +2 -0
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +3 -0
- package/dist/client.js.map +1 -1
- package/dist/generated/openapi.d.ts +1567 -96
- package/dist/index.d.ts +3 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/resources/chats.d.ts +3 -1
- package/dist/resources/chats.d.ts.map +1 -1
- package/dist/resources/chats.js +3 -1
- package/dist/resources/chats.js.map +1 -1
- package/dist/resources/fleet.d.ts +23 -0
- package/dist/resources/fleet.d.ts.map +1 -0
- package/dist/resources/fleet.js +20 -0
- package/dist/resources/fleet.js.map +1 -0
- package/dist/resources/lines.d.ts +32 -2
- package/dist/resources/lines.d.ts.map +1 -1
- package/dist/resources/lines.js +24 -0
- package/dist/resources/lines.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/dist/webhooks/types.d.ts +1 -1
- package/dist/webhooks/types.d.ts.map +1 -1
- package/dist/webhooks/types.js.map +1 -1
- package/examples/chat-sdk-bot.ts +91 -0
- package/package.json +18 -2
|
@@ -505,7 +505,7 @@ export interface paths {
|
|
|
505
505
|
};
|
|
506
506
|
/**
|
|
507
507
|
* List your active and reserved lines
|
|
508
|
-
* @description Returns the lines you own whose `status` is `active` or `reserved`, of every kind: rented, BYOD, shared and test lines, and dedicated pool lines. Accepts an API key. Lines that are `suspended`, `provisioning` or `cancelled` are not returned. Lines are ordered by `created_at`, oldest first, with full phone numbers. The whole list comes in one response: there is no pagination and no filter, and the API sets no limit on its length. A line-scoped key gets only the lines in its list. `fulfillment_status` is present on this operation only. Each line carries its full phone number: this is personal data. Its `metadata` can contain personal data too.
|
|
508
|
+
* @description Returns the lines you own whose `status` is `active` or `reserved`, of every kind: rented, BYOD, shared and test lines, and dedicated pool lines. Accepts an API key. Lines that are `suspended`, `provisioning` or `cancelled` are not returned. Lines are ordered by `created_at`, oldest first, with full phone numbers. The whole list comes in one response: there is no pagination and no filter, and the API sets no limit on its length. A line-scoped key gets only the lines in its list. `fulfillment_status` is present on this operation only. Each line carries `health_score`: the latest stored health score of the line, or `null` when none is stored yet. Each line carries its full phone number: this is personal data. Its `metadata` can contain personal data too.
|
|
509
509
|
*/
|
|
510
510
|
get: {
|
|
511
511
|
parameters: {
|
|
@@ -591,7 +591,7 @@ export interface paths {
|
|
|
591
591
|
};
|
|
592
592
|
/**
|
|
593
593
|
* Get a line
|
|
594
|
-
* @description Returns one rented or BYOD line, in any status. Needs no credential: any caller that has the id gets the line object, `metadata` and billing dates included, with `phone_number` masked. Send an API key of the account that owns the line to get the full number; a line-scoped key gets it for any line of its account. A credential that is invalid, or that belongs to another account, gets the masked number and never a `401`. Shared lines, test lines and dedicated pool lines return `404 not_found` here, even to their owner: read them with `GET /v1/lines/my`.
|
|
594
|
+
* @description Returns one rented or BYOD line, in any status. Needs no credential: any caller that has the id gets the line object, `metadata` and billing dates included, with `phone_number` masked. Send an API key of the account that owns the line to get the full number; a line-scoped key gets it for any line of its account. A credential that is invalid, or that belongs to another account, gets the masked number and never a `401`. Shared lines, test lines and dedicated pool lines return `404 not_found` here, even to their owner: read them with `GET /v1/lines/my`. The line carries `health_score` only for the account that owns it (for a line-scoped key, only for a line in its list): the latest stored health score of the line, or `null` when none is stored yet. Any other caller gets the line without the `health_score` key.
|
|
595
595
|
*/
|
|
596
596
|
get: {
|
|
597
597
|
parameters: {
|
|
@@ -2496,7 +2496,7 @@ export interface paths {
|
|
|
2496
2496
|
};
|
|
2497
2497
|
/**
|
|
2498
2498
|
* Get the sending limits of a line
|
|
2499
|
-
* @description Returns the five sending limits of a line you own with their counters, the reply-lane allowance, the time at which each full counter drops back under its limit,
|
|
2499
|
+
* @description Returns the five sending limits of a line you own with their counters, the reply-lane allowance, the priority allowance (`priority`), the time at which each full counter drops back under its limit, a flag per counter that is `true` from 80% of its limit, the stage of the line on its warm-up ramp (`warming`, which also says whether the ramp is paused while the health of the line is degraded) and the four sending limits that apply now (`effective_caps`). A new line sends less than an established one until it has accumulated enough active days. Accepts an API key. Every counter covers a rolling window: the last 60 seconds, the last 60 minutes or the last 24 hours. No counter resets at midnight. A held message counts when it is released, not when it is accepted.
|
|
2500
2500
|
*/
|
|
2501
2501
|
get: {
|
|
2502
2502
|
parameters: {
|
|
@@ -2784,6 +2784,201 @@ export interface paths {
|
|
|
2784
2784
|
patch?: never;
|
|
2785
2785
|
trace?: never;
|
|
2786
2786
|
};
|
|
2787
|
+
"/v1/lines/{id}/health-score": {
|
|
2788
|
+
parameters: {
|
|
2789
|
+
query?: never;
|
|
2790
|
+
header?: never;
|
|
2791
|
+
path?: never;
|
|
2792
|
+
cookie?: never;
|
|
2793
|
+
};
|
|
2794
|
+
/**
|
|
2795
|
+
* Get the hourly health scores of a line
|
|
2796
|
+
* @description Returns the stored hourly health scores of a line you own, of any kind, with `hour` at or after `since`, oldest first. Accepts an API key. `since` defaults to 24 hours ago and goes back at most 30 days, so a call returns at most 720 items. Each item is the `health_score` object (see "The `health_score` object") with the `hour` it stands for. A line with no stored score in the window returns an empty `items`, never an error. A score is a risk score: a higher number is worse.
|
|
2797
|
+
*/
|
|
2798
|
+
get: {
|
|
2799
|
+
parameters: {
|
|
2800
|
+
query?: {
|
|
2801
|
+
/** @description Inclusive lower bound on `hour`: an ISO 8601 timestamp with a UTC offset, for example `2026-11-13T00:00:00Z`. Defaults to 24 hours ago. A value that does not parse, or one earlier than 30 days ago, is refused with `400 validation_failed`; a value in the future returns an empty `items`. */
|
|
2802
|
+
since?: string;
|
|
2803
|
+
};
|
|
2804
|
+
header?: never;
|
|
2805
|
+
path: {
|
|
2806
|
+
/** @description Id of a line: `line_` followed by 25 letters or digits. */
|
|
2807
|
+
id: string;
|
|
2808
|
+
};
|
|
2809
|
+
cookie?: never;
|
|
2810
|
+
};
|
|
2811
|
+
requestBody?: never;
|
|
2812
|
+
responses: {
|
|
2813
|
+
/** @description The hourly health scores of the line. */
|
|
2814
|
+
200: {
|
|
2815
|
+
headers: {
|
|
2816
|
+
[name: string]: unknown;
|
|
2817
|
+
};
|
|
2818
|
+
content: {
|
|
2819
|
+
"application/json": components["schemas"]["LineHealthScoreHistoryEnvelope"];
|
|
2820
|
+
};
|
|
2821
|
+
};
|
|
2822
|
+
/** @description Invalid request. `validation_failed`: `since` is not an ISO 8601 timestamp with a UTC offset, or is earlier than 30 days ago. `error.issues` lists each problem. */
|
|
2823
|
+
400: {
|
|
2824
|
+
headers: {
|
|
2825
|
+
[name: string]: unknown;
|
|
2826
|
+
};
|
|
2827
|
+
content: {
|
|
2828
|
+
"application/json": components["schemas"]["ErrorEnvelope"];
|
|
2829
|
+
};
|
|
2830
|
+
};
|
|
2831
|
+
/** @description No valid credential. `error.code` is `unauthorized`. */
|
|
2832
|
+
401: {
|
|
2833
|
+
headers: {
|
|
2834
|
+
[name: string]: unknown;
|
|
2835
|
+
};
|
|
2836
|
+
content: {
|
|
2837
|
+
"application/json": components["schemas"]["ErrorEnvelope"];
|
|
2838
|
+
};
|
|
2839
|
+
};
|
|
2840
|
+
/** @description Refused. `forbidden`: the key is line-scoped and this line is outside its list. */
|
|
2841
|
+
403: {
|
|
2842
|
+
headers: {
|
|
2843
|
+
[name: string]: unknown;
|
|
2844
|
+
};
|
|
2845
|
+
content: {
|
|
2846
|
+
"application/json": components["schemas"]["ErrorEnvelope"];
|
|
2847
|
+
};
|
|
2848
|
+
};
|
|
2849
|
+
/** @description Not found. `not_found`: the line does not exist, or it is not yours. */
|
|
2850
|
+
404: {
|
|
2851
|
+
headers: {
|
|
2852
|
+
[name: string]: unknown;
|
|
2853
|
+
};
|
|
2854
|
+
content: {
|
|
2855
|
+
"application/json": components["schemas"]["ErrorEnvelope"];
|
|
2856
|
+
};
|
|
2857
|
+
};
|
|
2858
|
+
/** @description Too many requests. `error.code` is `rate_limit_exceeded` when more than 100 requests came in 60 seconds from the same account, for requests authenticated by an API key, or from the same network address, for any other request. An account can have a different limit. Wait `error.retry_after` seconds. */
|
|
2859
|
+
429: {
|
|
2860
|
+
headers: {
|
|
2861
|
+
[name: string]: unknown;
|
|
2862
|
+
};
|
|
2863
|
+
content: {
|
|
2864
|
+
"application/json": components["schemas"]["ErrorEnvelope"];
|
|
2865
|
+
};
|
|
2866
|
+
};
|
|
2867
|
+
/** @description Unexpected failure. `error.code` is `internal_error`. An operation that takes a JSON body also returns it when the body, sent as `application/json`, is not valid JSON. Quote `trace_id` when you report it to iSnap. */
|
|
2868
|
+
500: {
|
|
2869
|
+
headers: {
|
|
2870
|
+
[name: string]: unknown;
|
|
2871
|
+
};
|
|
2872
|
+
content: {
|
|
2873
|
+
"application/json": components["schemas"]["ErrorEnvelope"];
|
|
2874
|
+
};
|
|
2875
|
+
};
|
|
2876
|
+
};
|
|
2877
|
+
};
|
|
2878
|
+
put?: never;
|
|
2879
|
+
post?: never;
|
|
2880
|
+
delete?: never;
|
|
2881
|
+
options?: never;
|
|
2882
|
+
head?: never;
|
|
2883
|
+
patch?: never;
|
|
2884
|
+
trace?: never;
|
|
2885
|
+
};
|
|
2886
|
+
"/v1/lines/{id}/health-score/report": {
|
|
2887
|
+
parameters: {
|
|
2888
|
+
query?: never;
|
|
2889
|
+
header?: never;
|
|
2890
|
+
path?: never;
|
|
2891
|
+
cookie?: never;
|
|
2892
|
+
};
|
|
2893
|
+
/**
|
|
2894
|
+
* Get the health score report of a line
|
|
2895
|
+
* @description Returns, in plain language, why the latest health score of a line you own is what it is and what to do about it: the `score` and `band` as last computed, a `summary` sentence, and up to 3 `items`, the factors that add the most risk, largest first, each with an `explanation` and an `action`. Accepts an API key. Works for every line you own. On a BYOD line the factors include the ones about your own device; on any other line only the factors you can act on are listed, and the ones iSnap resolves say so. A line with no stored score yet, or with too little traffic to judge, returns `200` with `band` `unknown`, no `items` and `score` `null`. A `low` band with no item means no risk is observed.
|
|
2896
|
+
*/
|
|
2897
|
+
get: {
|
|
2898
|
+
parameters: {
|
|
2899
|
+
query?: never;
|
|
2900
|
+
header?: never;
|
|
2901
|
+
path: {
|
|
2902
|
+
/** @description Id of a line: `line_` followed by 25 letters or digits. */
|
|
2903
|
+
id: string;
|
|
2904
|
+
};
|
|
2905
|
+
cookie?: never;
|
|
2906
|
+
};
|
|
2907
|
+
requestBody?: never;
|
|
2908
|
+
responses: {
|
|
2909
|
+
/** @description The report of the latest health score of the line. */
|
|
2910
|
+
200: {
|
|
2911
|
+
headers: {
|
|
2912
|
+
[name: string]: unknown;
|
|
2913
|
+
};
|
|
2914
|
+
content: {
|
|
2915
|
+
"application/json": components["schemas"]["LineHealthReportEnvelope"];
|
|
2916
|
+
};
|
|
2917
|
+
};
|
|
2918
|
+
/** @description Invalid request. `error.code` is `validation_failed` when a parameter, a header or the body does not match its schema: `error.issues` then lists each problem. */
|
|
2919
|
+
400: {
|
|
2920
|
+
headers: {
|
|
2921
|
+
[name: string]: unknown;
|
|
2922
|
+
};
|
|
2923
|
+
content: {
|
|
2924
|
+
"application/json": components["schemas"]["ErrorEnvelope"];
|
|
2925
|
+
};
|
|
2926
|
+
};
|
|
2927
|
+
/** @description No valid credential. `error.code` is `unauthorized`. */
|
|
2928
|
+
401: {
|
|
2929
|
+
headers: {
|
|
2930
|
+
[name: string]: unknown;
|
|
2931
|
+
};
|
|
2932
|
+
content: {
|
|
2933
|
+
"application/json": components["schemas"]["ErrorEnvelope"];
|
|
2934
|
+
};
|
|
2935
|
+
};
|
|
2936
|
+
/** @description Refused. `forbidden`: the key is line-scoped and this line is outside its list. */
|
|
2937
|
+
403: {
|
|
2938
|
+
headers: {
|
|
2939
|
+
[name: string]: unknown;
|
|
2940
|
+
};
|
|
2941
|
+
content: {
|
|
2942
|
+
"application/json": components["schemas"]["ErrorEnvelope"];
|
|
2943
|
+
};
|
|
2944
|
+
};
|
|
2945
|
+
/** @description Not found. `not_found`: the line does not exist, or it is not yours. */
|
|
2946
|
+
404: {
|
|
2947
|
+
headers: {
|
|
2948
|
+
[name: string]: unknown;
|
|
2949
|
+
};
|
|
2950
|
+
content: {
|
|
2951
|
+
"application/json": components["schemas"]["ErrorEnvelope"];
|
|
2952
|
+
};
|
|
2953
|
+
};
|
|
2954
|
+
/** @description Too many requests. `error.code` is `rate_limit_exceeded` when more than 100 requests came in 60 seconds from the same account, for requests authenticated by an API key, or from the same network address, for any other request. An account can have a different limit. Wait `error.retry_after` seconds. */
|
|
2955
|
+
429: {
|
|
2956
|
+
headers: {
|
|
2957
|
+
[name: string]: unknown;
|
|
2958
|
+
};
|
|
2959
|
+
content: {
|
|
2960
|
+
"application/json": components["schemas"]["ErrorEnvelope"];
|
|
2961
|
+
};
|
|
2962
|
+
};
|
|
2963
|
+
/** @description Unexpected failure. `error.code` is `internal_error`. An operation that takes a JSON body also returns it when the body, sent as `application/json`, is not valid JSON. Quote `trace_id` when you report it to iSnap. */
|
|
2964
|
+
500: {
|
|
2965
|
+
headers: {
|
|
2966
|
+
[name: string]: unknown;
|
|
2967
|
+
};
|
|
2968
|
+
content: {
|
|
2969
|
+
"application/json": components["schemas"]["ErrorEnvelope"];
|
|
2970
|
+
};
|
|
2971
|
+
};
|
|
2972
|
+
};
|
|
2973
|
+
};
|
|
2974
|
+
put?: never;
|
|
2975
|
+
post?: never;
|
|
2976
|
+
delete?: never;
|
|
2977
|
+
options?: never;
|
|
2978
|
+
head?: never;
|
|
2979
|
+
patch?: never;
|
|
2980
|
+
trace?: never;
|
|
2981
|
+
};
|
|
2787
2982
|
"/v1/lines/{id}/config": {
|
|
2788
2983
|
parameters: {
|
|
2789
2984
|
query?: never;
|
|
@@ -2793,7 +2988,7 @@ export interface paths {
|
|
|
2793
2988
|
};
|
|
2794
2989
|
/**
|
|
2795
2990
|
* Get the configuration of a line
|
|
2796
|
-
* @description Returns the sending configuration of a line you own, of any kind. Accepts an API key. `config` holds the value in force for every key, `overridden_keys` lists the keys that have an override on this line, `default_activity_curve` is the sending curve the line has without an override, and `knobs` gives, for
|
|
2991
|
+
* @description Returns the sending configuration of a line you own, of any kind. Accepts an API key. `config` holds the value in force for every key, `overridden_keys` lists the keys that have an override on this line, `default_activity_curve` is the sending curve the line has without an override, and `knobs` gives, for nine limits, the value in force (`current`), the `default`, and the bounds `min` and `max`. A value above `default` is accepted only for the five message limits of a BYOD line, up to `max`: for the three reply limits and the priority limit, and for the five message limits of any other line, `PATCH /v1/lines/{id}/config` returns `403 cannot_increase_limit`. A value above `max` is refused first, on every line, with `422 limit_out_of_bounds` or `400 validation_failed`. Default values depend on whether the line is an iMessage line or an Android line, and iSnap can change them: read them here instead of storing them.
|
|
2797
2992
|
*/
|
|
2798
2993
|
get: {
|
|
2799
2994
|
parameters: {
|
|
@@ -5166,6 +5361,8 @@ export interface paths {
|
|
|
5166
5361
|
use_typing_indicator?: boolean;
|
|
5167
5362
|
/** @description `true` to let this message leave during the quiet hours of the line: the hours whose weight is 0 in the line's `activity_curve`, counted in the recipient's local time. Use it for a recipient of your own, such as an alert to your own phone number. The default is `false`. The message still waits for the sending limits of the line, for the spacing between messages and behind an earlier message to the same recipient that iSnap holds. No effect on a shared line. The response returns the value in effect. */
|
|
5168
5363
|
ignore_quiet_hours?: boolean;
|
|
5364
|
+
/** @description `true` to let this message skip the hourly sending limit of the line, within a small reserve per rolling 24 hours (`daily_priority_limit` in `GET /v1/lines/{id}/config`, 3 by default, `GET /v1/lines/{id}/quota` reports `priority`). The reserve is part of the line's daily limit, not added to it, and a message is counted against it only when the hourly limit would have held the message. The message still waits for the per-minute limit, for the spacing between messages, behind an earlier message to the same recipient that iSnap holds, and for `daily_new_contact_limit` and `daily_known_contact_limit`. When the reply lane already carries the message, the reply lane is used and the reserve is not. Once the reserve is spent, the message is held or refused like any other message, and a held message leaves before the messages of the line that are not priority. The default is `false`. The response returns the value in effect in `priority`. */
|
|
5365
|
+
priority?: boolean;
|
|
5169
5366
|
/** @description `true` to cancel the message if its recipient writes to the line before the message is with the line's device. iSnap then cancels it as `DELETE /v1/messages/{message_id}` does (status `cancelled`, one `message.cancelled` event) and never sends it. A message that the device already holds, or that was sent, is not cancelled. Use it for a follow-up that is pointless once the recipient has answered. Only a message created before the recipient's message was received is cancelled. The default is `false`. The response returns the value in effect. */
|
|
5170
5367
|
cancel_on_reply?: boolean;
|
|
5171
5368
|
/**
|
|
@@ -6177,38 +6374,44 @@ export interface paths {
|
|
|
6177
6374
|
patch?: never;
|
|
6178
6375
|
trace?: never;
|
|
6179
6376
|
};
|
|
6180
|
-
"/v1/webhooks/
|
|
6377
|
+
"/v1/webhooks/events/stream": {
|
|
6181
6378
|
parameters: {
|
|
6182
6379
|
query?: never;
|
|
6183
6380
|
header?: never;
|
|
6184
6381
|
path?: never;
|
|
6185
6382
|
cookie?: never;
|
|
6186
6383
|
};
|
|
6187
|
-
get?: never;
|
|
6188
|
-
put?: never;
|
|
6189
6384
|
/**
|
|
6190
|
-
*
|
|
6191
|
-
* @description
|
|
6385
|
+
* Stream the account's events live
|
|
6386
|
+
* @description Opens a server-sent events stream (`text/event-stream`) of the account's events as they occur. Accepts an API key. It is live only: it sends no event that occurred before it opened, and it ignores `Last-Event-ID`. Read the history with `GET /v1/webhooks/events`. The stream does not need a webhook subscription, and it is not affected by the state of one: every event of the account is sent, whether or not a subscription matches it or is suspended. An event is sent once it is committed, and an event that is not sent to a webhook for a kind of line, such as `line.degraded` for a rental line, is not sent here either.
|
|
6387
|
+
*
|
|
6388
|
+
* Each event is one frame: `id` is the `event_id`, `event` is the event type, and `data` is the event exactly as a webhook delivers it, `metadata` and `line_metadata` included. Order is not guaranteed, and an event can arrive twice: deduplicate on `event_id`. Three more frames carry no event. `heartbeat` is sent when the stream opens and then every 15 seconds by default; its `data` is `{"ts": <Unix milliseconds>}`. `reconnect_required` (`{"retry_after_ms": 1000}`) is sent when iSnap closes the stream: at its maximum lifetime, 30 minutes by default, and when iSnap restarts. Open a new stream. `key_revoked` (`{"code": "api_key_revoked", "ts": <Unix milliseconds>}`) is sent when the key was revoked or deleted, at most one heartbeat interval after it; iSnap then closes the stream, and reconnecting returns `401`.
|
|
6389
|
+
*
|
|
6390
|
+
* `event` and `line_id` filter the stream as they filter `GET /v1/webhooks/events`. A line-scoped key receives only the events tied to its lines: an event tied to no line is not sent to it, and a `line_id` outside its list yields no event. A change of the key's lines applies from the next heartbeat. An account holds at most 5 open streams by default: another returns `429 event_stream_limit_exceeded`, and closing a stream frees its place.
|
|
6391
|
+
*
|
|
6392
|
+
* Each frame carries a whole event, which can include message text, handles, contact names and attachment file names: this is personal data.
|
|
6192
6393
|
*/
|
|
6193
|
-
|
|
6394
|
+
get: {
|
|
6194
6395
|
parameters: {
|
|
6195
|
-
query?:
|
|
6196
|
-
|
|
6197
|
-
|
|
6198
|
-
/** @description
|
|
6199
|
-
|
|
6396
|
+
query?: {
|
|
6397
|
+
/** @description Keep the events of this type: an exact event type such as `message.received`, a family wildcard such as `line.*`, or `*`. Omitted: every event. */
|
|
6398
|
+
event?: components["schemas"]["WebhookEventName"] & unknown;
|
|
6399
|
+
/** @description Keep the events tied to this line. The events of a trial are tied to the line the trial runs on: pass its `pool_line_id` to keep them. Events tied to no line are excluded. An id that matches no line yields no event. */
|
|
6400
|
+
line_id?: string;
|
|
6200
6401
|
};
|
|
6402
|
+
header?: never;
|
|
6403
|
+
path?: never;
|
|
6201
6404
|
cookie?: never;
|
|
6202
6405
|
};
|
|
6203
6406
|
requestBody?: never;
|
|
6204
6407
|
responses: {
|
|
6205
|
-
/** @description
|
|
6408
|
+
/** @description A server-sent events stream. One frame per event, with the `event_id` as `id`, the event type as `event` and the event as `data`, and the frames `heartbeat`, `reconnect_required` and `key_revoked`. */
|
|
6206
6409
|
200: {
|
|
6207
6410
|
headers: {
|
|
6208
6411
|
[name: string]: unknown;
|
|
6209
6412
|
};
|
|
6210
6413
|
content: {
|
|
6211
|
-
"
|
|
6414
|
+
"text/event-stream": string;
|
|
6212
6415
|
};
|
|
6213
6416
|
};
|
|
6214
6417
|
/** @description Invalid request. `error.code` is `validation_failed` when a parameter, a header or the body does not match its schema: `error.issues` then lists each problem. */
|
|
@@ -6229,16 +6432,7 @@ export interface paths {
|
|
|
6229
6432
|
"application/json": components["schemas"]["ErrorEnvelope"];
|
|
6230
6433
|
};
|
|
6231
6434
|
};
|
|
6232
|
-
/** @description
|
|
6233
|
-
404: {
|
|
6234
|
-
headers: {
|
|
6235
|
-
[name: string]: unknown;
|
|
6236
|
-
};
|
|
6237
|
-
content: {
|
|
6238
|
-
"application/json": components["schemas"]["ErrorEnvelope"];
|
|
6239
|
-
};
|
|
6240
|
-
};
|
|
6241
|
-
/** @description Too many requests. `error.code` is `rate_limit_exceeded` when more than 100 requests came in 60 seconds from the same account, for requests authenticated by an API key, or from the same network address, for any other request. An account can have a different limit. Wait `error.retry_after` seconds. */
|
|
6435
|
+
/** @description Too many requests. `error.code` is `rate_limit_exceeded` when more than 100 requests came in 60 seconds from the same account, for requests authenticated by an API key, or from the same network address, for any other request. An account can have a different limit. Wait `error.retry_after` seconds. It is `event_stream_limit_exceeded` when the account already has its maximum number of open event streams: close one, then open this one again. */
|
|
6242
6436
|
429: {
|
|
6243
6437
|
headers: {
|
|
6244
6438
|
[name: string]: unknown;
|
|
@@ -6258,39 +6452,30 @@ export interface paths {
|
|
|
6258
6452
|
};
|
|
6259
6453
|
};
|
|
6260
6454
|
};
|
|
6455
|
+
put?: never;
|
|
6456
|
+
post?: never;
|
|
6261
6457
|
delete?: never;
|
|
6262
6458
|
options?: never;
|
|
6263
6459
|
head?: never;
|
|
6264
6460
|
patch?: never;
|
|
6265
6461
|
trace?: never;
|
|
6266
6462
|
};
|
|
6267
|
-
"/v1/webhooks/{id}/
|
|
6463
|
+
"/v1/webhooks/{id}/rotate-secret": {
|
|
6268
6464
|
parameters: {
|
|
6269
6465
|
query?: never;
|
|
6270
6466
|
header?: never;
|
|
6271
6467
|
path?: never;
|
|
6272
6468
|
cookie?: never;
|
|
6273
6469
|
};
|
|
6470
|
+
get?: never;
|
|
6471
|
+
put?: never;
|
|
6274
6472
|
/**
|
|
6275
|
-
*
|
|
6276
|
-
* @description
|
|
6473
|
+
* Rotate a signing secret
|
|
6474
|
+
* @description Replaces the signing secret of a webhook subscription and returns the new one, in this response only. Accepts an API key. The rotation takes effect immediately: every request sent after the call is signed with the new secret only, including the retries of deliveries created before it, replays and `webhook.test` requests. iSnap never signs with the previous secret after the rotation and never sends two signatures: `old_secret_expires_at` has no effect on what is sent. A request signed before the call can still be in transit: accept both secrets on your side until `old_secret_expires_at`. Rotating a secret sends no event.
|
|
6277
6475
|
*/
|
|
6278
|
-
|
|
6476
|
+
post: {
|
|
6279
6477
|
parameters: {
|
|
6280
|
-
query?:
|
|
6281
|
-
/** @description Number of deliveries per page, from 1 to 100. Default: 20. */
|
|
6282
|
-
limit?: number;
|
|
6283
|
-
/** @description The `next_cursor` of the previous page. Omit it for the first page. Send the same filters on every page. */
|
|
6284
|
-
cursor?: string;
|
|
6285
|
-
/** @description Keep the deliveries in this status: `pending`, `success` or `failed`. */
|
|
6286
|
-
status?: "pending" | "success" | "failed";
|
|
6287
|
-
/** @description Keep the deliveries of this exact event type, for example `message.received`. Wildcards are not interpreted. At most 100 characters. */
|
|
6288
|
-
event?: string;
|
|
6289
|
-
/** @description Keep the deliveries created at or after this timestamp: ISO 8601 in UTC ending in `Z`. A UTC offset such as `+02:00` returns `400 validation_failed`. */
|
|
6290
|
-
since?: string;
|
|
6291
|
-
/** @description Keep the deliveries created at or before this timestamp: ISO 8601 in UTC ending in `Z`. A UTC offset such as `+02:00` returns `400 validation_failed`. */
|
|
6292
|
-
until?: string;
|
|
6293
|
-
};
|
|
6478
|
+
query?: never;
|
|
6294
6479
|
header?: never;
|
|
6295
6480
|
path: {
|
|
6296
6481
|
/** @description Id of the webhook subscription, as returned in `id` by `POST /v1/webhooks`: `wh_` followed by 25 letters or digits. */
|
|
@@ -6300,16 +6485,16 @@ export interface paths {
|
|
|
6300
6485
|
};
|
|
6301
6486
|
requestBody?: never;
|
|
6302
6487
|
responses: {
|
|
6303
|
-
/** @description
|
|
6488
|
+
/** @description The new signing secret. */
|
|
6304
6489
|
200: {
|
|
6305
6490
|
headers: {
|
|
6306
6491
|
[name: string]: unknown;
|
|
6307
6492
|
};
|
|
6308
6493
|
content: {
|
|
6309
|
-
"application/json": components["schemas"]["
|
|
6494
|
+
"application/json": components["schemas"]["WebhookRotateSecretEnvelope"];
|
|
6310
6495
|
};
|
|
6311
6496
|
};
|
|
6312
|
-
/** @description Invalid request. `error.code` is `validation_failed` when a parameter, a header or the body does not match its schema: `error.issues` then lists each problem.
|
|
6497
|
+
/** @description Invalid request. `error.code` is `validation_failed` when a parameter, a header or the body does not match its schema: `error.issues` then lists each problem. */
|
|
6313
6498
|
400: {
|
|
6314
6499
|
headers: {
|
|
6315
6500
|
[name: string]: unknown;
|
|
@@ -6356,27 +6541,125 @@ export interface paths {
|
|
|
6356
6541
|
};
|
|
6357
6542
|
};
|
|
6358
6543
|
};
|
|
6359
|
-
put?: never;
|
|
6360
|
-
post?: never;
|
|
6361
6544
|
delete?: never;
|
|
6362
6545
|
options?: never;
|
|
6363
6546
|
head?: never;
|
|
6364
6547
|
patch?: never;
|
|
6365
6548
|
trace?: never;
|
|
6366
6549
|
};
|
|
6367
|
-
"/v1/webhooks/{id}/deliveries
|
|
6550
|
+
"/v1/webhooks/{id}/deliveries": {
|
|
6368
6551
|
parameters: {
|
|
6369
6552
|
query?: never;
|
|
6370
6553
|
header?: never;
|
|
6371
6554
|
path?: never;
|
|
6372
6555
|
cookie?: never;
|
|
6373
6556
|
};
|
|
6374
|
-
get?: never;
|
|
6375
|
-
put?: never;
|
|
6376
6557
|
/**
|
|
6377
|
-
*
|
|
6378
|
-
* @description
|
|
6379
|
-
|
|
6558
|
+
* List the deliveries of a webhook subscription
|
|
6559
|
+
* @description Lists the deliveries of a webhook subscription, newest first. Accepts an API key; a line-scoped key reads the deliveries of every line. A delivery is one event sent to one subscription. There is one record per delivery, updated at each attempt: it shows the latest attempt, not a history of attempts. A delivery whose attempts fail is `pending` between two attempts, with the `response_status` of its latest attempt and a `next_retry_at`. When every attempt of its retry schedule fails, it becomes `failed` at the 7th, which starts at least 14 hours 36 minutes 30 seconds after the first: a query with `status=failed` does not return the deliveries that are still being retried. Only a delivery in status `success` or `failed` can be replayed. A record is deleted at least 72 hours after its creation, whatever its status. The API does not bound the delay. A `webhook.test` request creates no record. Filter with `status`, `event`, `since` and `until`. The cursor does not carry the filters: send the same filters on every page. Stop when `has_more` is `false`: `next_cursor` is then `null`. `request_body_snippet` contains the beginning of an event, which can include message text and handles: this is personal data.
|
|
6560
|
+
*/
|
|
6561
|
+
get: {
|
|
6562
|
+
parameters: {
|
|
6563
|
+
query?: {
|
|
6564
|
+
/** @description Number of deliveries per page, from 1 to 100. Default: 20. */
|
|
6565
|
+
limit?: number;
|
|
6566
|
+
/** @description The `next_cursor` of the previous page. Omit it for the first page. Send the same filters on every page. */
|
|
6567
|
+
cursor?: string;
|
|
6568
|
+
/** @description Keep the deliveries in this status: `pending`, `success` or `failed`. */
|
|
6569
|
+
status?: "pending" | "success" | "failed";
|
|
6570
|
+
/** @description Keep the deliveries of this exact event type, for example `message.received`. Wildcards are not interpreted. At most 100 characters. */
|
|
6571
|
+
event?: string;
|
|
6572
|
+
/** @description Keep the deliveries created at or after this timestamp: ISO 8601 in UTC ending in `Z`. A UTC offset such as `+02:00` returns `400 validation_failed`. */
|
|
6573
|
+
since?: string;
|
|
6574
|
+
/** @description Keep the deliveries created at or before this timestamp: ISO 8601 in UTC ending in `Z`. A UTC offset such as `+02:00` returns `400 validation_failed`. */
|
|
6575
|
+
until?: string;
|
|
6576
|
+
};
|
|
6577
|
+
header?: never;
|
|
6578
|
+
path: {
|
|
6579
|
+
/** @description Id of the webhook subscription, as returned in `id` by `POST /v1/webhooks`: `wh_` followed by 25 letters or digits. */
|
|
6580
|
+
id: string;
|
|
6581
|
+
};
|
|
6582
|
+
cookie?: never;
|
|
6583
|
+
};
|
|
6584
|
+
requestBody?: never;
|
|
6585
|
+
responses: {
|
|
6586
|
+
/** @description One page of deliveries. */
|
|
6587
|
+
200: {
|
|
6588
|
+
headers: {
|
|
6589
|
+
[name: string]: unknown;
|
|
6590
|
+
};
|
|
6591
|
+
content: {
|
|
6592
|
+
"application/json": components["schemas"]["WebhookDeliveryListEnvelope"];
|
|
6593
|
+
};
|
|
6594
|
+
};
|
|
6595
|
+
/** @description Invalid request. `error.code` is `validation_failed` when a parameter, a header or the body does not match its schema: `error.issues` then lists each problem. It is `invalid_cursor` when `cursor` cannot be read. */
|
|
6596
|
+
400: {
|
|
6597
|
+
headers: {
|
|
6598
|
+
[name: string]: unknown;
|
|
6599
|
+
};
|
|
6600
|
+
content: {
|
|
6601
|
+
"application/json": components["schemas"]["ErrorEnvelope"];
|
|
6602
|
+
};
|
|
6603
|
+
};
|
|
6604
|
+
/** @description No valid credential. `error.code` is `unauthorized`. */
|
|
6605
|
+
401: {
|
|
6606
|
+
headers: {
|
|
6607
|
+
[name: string]: unknown;
|
|
6608
|
+
};
|
|
6609
|
+
content: {
|
|
6610
|
+
"application/json": components["schemas"]["ErrorEnvelope"];
|
|
6611
|
+
};
|
|
6612
|
+
};
|
|
6613
|
+
/** @description Not found. `error.code` is `not_found`: the account has no webhook subscription with this id. */
|
|
6614
|
+
404: {
|
|
6615
|
+
headers: {
|
|
6616
|
+
[name: string]: unknown;
|
|
6617
|
+
};
|
|
6618
|
+
content: {
|
|
6619
|
+
"application/json": components["schemas"]["ErrorEnvelope"];
|
|
6620
|
+
};
|
|
6621
|
+
};
|
|
6622
|
+
/** @description Too many requests. `error.code` is `rate_limit_exceeded` when more than 100 requests came in 60 seconds from the same account, for requests authenticated by an API key, or from the same network address, for any other request. An account can have a different limit. Wait `error.retry_after` seconds. */
|
|
6623
|
+
429: {
|
|
6624
|
+
headers: {
|
|
6625
|
+
[name: string]: unknown;
|
|
6626
|
+
};
|
|
6627
|
+
content: {
|
|
6628
|
+
"application/json": components["schemas"]["ErrorEnvelope"];
|
|
6629
|
+
};
|
|
6630
|
+
};
|
|
6631
|
+
/** @description Unexpected failure. `error.code` is `internal_error`. An operation that takes a JSON body also returns it when the body, sent as `application/json`, is not valid JSON. Quote `trace_id` when you report it to iSnap. */
|
|
6632
|
+
500: {
|
|
6633
|
+
headers: {
|
|
6634
|
+
[name: string]: unknown;
|
|
6635
|
+
};
|
|
6636
|
+
content: {
|
|
6637
|
+
"application/json": components["schemas"]["ErrorEnvelope"];
|
|
6638
|
+
};
|
|
6639
|
+
};
|
|
6640
|
+
};
|
|
6641
|
+
};
|
|
6642
|
+
put?: never;
|
|
6643
|
+
post?: never;
|
|
6644
|
+
delete?: never;
|
|
6645
|
+
options?: never;
|
|
6646
|
+
head?: never;
|
|
6647
|
+
patch?: never;
|
|
6648
|
+
trace?: never;
|
|
6649
|
+
};
|
|
6650
|
+
"/v1/webhooks/{id}/deliveries/{delivery_id}/replay": {
|
|
6651
|
+
parameters: {
|
|
6652
|
+
query?: never;
|
|
6653
|
+
header?: never;
|
|
6654
|
+
path?: never;
|
|
6655
|
+
cookie?: never;
|
|
6656
|
+
};
|
|
6657
|
+
get?: never;
|
|
6658
|
+
put?: never;
|
|
6659
|
+
/**
|
|
6660
|
+
* Replay a delivery
|
|
6661
|
+
* @description Creates a new delivery of the event of a finished delivery, sent to the current URL of the webhook subscription, signed with its current signing secret, on the same schedule of attempts. Accepts an API key. The original delivery must be in status `success` or `failed`: a `pending` delivery returns `422 delivery_not_terminal`. The new delivery has its own id, `replay_of` set to the original, the same `event_id` and the same content: a receiver that deduplicates on `event_id` sees a duplicate. A delivery can be replayed while its record exists, which is at least 72 hours after its creation; once the record is deleted, the operation returns `404 not_found`. There is no limit on the number of replays of a delivery.
|
|
6662
|
+
*
|
|
6380
6663
|
* The replay is accepted whatever the state of the subscription: for an inactive subscription the new delivery ends `failed` without a request, and for a suspended one it waits until the subscription resumes, then ends `failed` if it was created more than 24 hours earlier. When the replay uses all its attempts, `failure_count` rises by 1. Returns `503 replay_enqueue_failed` when iSnap cannot queue the replay: the new delivery then exists with status `failed`, and the call can be repeated.
|
|
6381
6664
|
*/
|
|
6382
6665
|
post: {
|
|
@@ -6928,6 +7211,8 @@ export interface paths {
|
|
|
6928
7211
|
since?: string;
|
|
6929
7212
|
/** @description Inclusive upper bound on `last_message_at`: an ISO 8601 timestamp with a UTC offset, for example `2026-01-15T15:00:00Z`. */
|
|
6930
7213
|
until?: string;
|
|
7214
|
+
/** @description Only the chats whose `health.status` is one of these statuses: a comma-separated list of `healthy`, `at_risk`, `critical` and `opted_out`. A chat whose `health` is `null`, a group or a chat of a trial line, is never returned. Any other value returns `400 validation_failed`. Omit it, or leave it blank, for no filter. */
|
|
7215
|
+
health?: string;
|
|
6931
7216
|
};
|
|
6932
7217
|
header?: never;
|
|
6933
7218
|
path?: never;
|
|
@@ -8226,7 +8511,7 @@ export interface paths {
|
|
|
8226
8511
|
put?: never;
|
|
8227
8512
|
/**
|
|
8228
8513
|
* Rent a hosted macOS session
|
|
8229
|
-
* @description Rents one hosted macOS session from the
|
|
8514
|
+
* @description Rents one hosted macOS session from the hosted pool of iSnap. Wholesale partners only: any other account is refused with `403 not_a_wholesale_partner`, and no other operation that an API key can call rents a session. Accepts an API key. A line-scoped key is not limited to its list on this operation. A hosted macOS session is a macOS user account on a Mac that iSnap hosts, signed in to no Apple ID when you receive it. It is not a line: it has no number and sends nothing. It runs the bridge app of a BYOD line. A session is rented once from the pool: one that was released is not offered again. The rental starts immediately and `anniversary_at` is set to the time of the call: the session is billed every month on that day of the month, at that time of day, in UTC; in a shorter month, on its last day.
|
|
8230
8515
|
*
|
|
8231
8516
|
* Returns `409 no_macos_session_in_stock` when no session is free. Nothing is recorded in that case; iSnap can assign a session to your account later, which `macos_session.rented` announces, and that assignment is not linked to the refused call. Send an `Idempotency-Key` header: without one, every call rents another billable session, a retry included.
|
|
8232
8517
|
*
|
|
@@ -8671,8 +8956,758 @@ export interface paths {
|
|
|
8671
8956
|
"application/json": components["schemas"]["ErrorEnvelope"];
|
|
8672
8957
|
};
|
|
8673
8958
|
};
|
|
8674
|
-
/** @description Unexpected failure. `error.code` is `internal_error`. An operation that takes a JSON body also returns it when the body, sent as `application/json`, is not valid JSON. Quote `trace_id` when you report it to iSnap. */
|
|
8675
|
-
500: {
|
|
8959
|
+
/** @description Unexpected failure. `error.code` is `internal_error`. An operation that takes a JSON body also returns it when the body, sent as `application/json`, is not valid JSON. Quote `trace_id` when you report it to iSnap. */
|
|
8960
|
+
500: {
|
|
8961
|
+
headers: {
|
|
8962
|
+
[name: string]: unknown;
|
|
8963
|
+
};
|
|
8964
|
+
content: {
|
|
8965
|
+
"application/json": components["schemas"]["ErrorEnvelope"];
|
|
8966
|
+
};
|
|
8967
|
+
};
|
|
8968
|
+
};
|
|
8969
|
+
};
|
|
8970
|
+
trace?: never;
|
|
8971
|
+
};
|
|
8972
|
+
"/v1/apps": {
|
|
8973
|
+
parameters: {
|
|
8974
|
+
query?: never;
|
|
8975
|
+
header?: never;
|
|
8976
|
+
path?: never;
|
|
8977
|
+
cookie?: never;
|
|
8978
|
+
};
|
|
8979
|
+
/**
|
|
8980
|
+
* Get the bridge app downloads
|
|
8981
|
+
* @description Returns, for macOS and for Android, the download link and the published version of the bridge app that a BYOD device runs: the bridge app for macOS on a Mac, the bridge app for Android on an Android phone. Needs no credential. `POST /v1/byod/pair` returns the same links in `download_urls`. Compare `version` with the version a device runs to know whether an update is published.
|
|
8982
|
+
*/
|
|
8983
|
+
get: {
|
|
8984
|
+
parameters: {
|
|
8985
|
+
query?: never;
|
|
8986
|
+
header?: never;
|
|
8987
|
+
path?: never;
|
|
8988
|
+
cookie?: never;
|
|
8989
|
+
};
|
|
8990
|
+
requestBody?: never;
|
|
8991
|
+
responses: {
|
|
8992
|
+
/** @description The download link and the published version for each platform. */
|
|
8993
|
+
200: {
|
|
8994
|
+
headers: {
|
|
8995
|
+
[name: string]: unknown;
|
|
8996
|
+
};
|
|
8997
|
+
content: {
|
|
8998
|
+
"application/json": components["schemas"]["AppManifestEnvelope"];
|
|
8999
|
+
};
|
|
9000
|
+
};
|
|
9001
|
+
/** @description Invalid request. `error.code` is `validation_failed` when a parameter, a header or the body does not match its schema: `error.issues` then lists each problem. */
|
|
9002
|
+
400: {
|
|
9003
|
+
headers: {
|
|
9004
|
+
[name: string]: unknown;
|
|
9005
|
+
};
|
|
9006
|
+
content: {
|
|
9007
|
+
"application/json": components["schemas"]["ErrorEnvelope"];
|
|
9008
|
+
};
|
|
9009
|
+
};
|
|
9010
|
+
/** @description Too many requests. `error.code` is `rate_limit_exceeded` when more than 100 requests came in 60 seconds from the same account, for requests authenticated by an API key, or from the same network address, for any other request. An account can have a different limit. Wait `error.retry_after` seconds. */
|
|
9011
|
+
429: {
|
|
9012
|
+
headers: {
|
|
9013
|
+
[name: string]: unknown;
|
|
9014
|
+
};
|
|
9015
|
+
content: {
|
|
9016
|
+
"application/json": components["schemas"]["ErrorEnvelope"];
|
|
9017
|
+
};
|
|
9018
|
+
};
|
|
9019
|
+
/** @description Unexpected failure. `error.code` is `internal_error`. An operation that takes a JSON body also returns it when the body, sent as `application/json`, is not valid JSON. Quote `trace_id` when you report it to iSnap. */
|
|
9020
|
+
500: {
|
|
9021
|
+
headers: {
|
|
9022
|
+
[name: string]: unknown;
|
|
9023
|
+
};
|
|
9024
|
+
content: {
|
|
9025
|
+
"application/json": components["schemas"]["ErrorEnvelope"];
|
|
9026
|
+
};
|
|
9027
|
+
};
|
|
9028
|
+
};
|
|
9029
|
+
};
|
|
9030
|
+
put?: never;
|
|
9031
|
+
post?: never;
|
|
9032
|
+
delete?: never;
|
|
9033
|
+
options?: never;
|
|
9034
|
+
head?: never;
|
|
9035
|
+
patch?: never;
|
|
9036
|
+
trace?: never;
|
|
9037
|
+
};
|
|
9038
|
+
"/v1/fleet/health": {
|
|
9039
|
+
parameters: {
|
|
9040
|
+
query?: never;
|
|
9041
|
+
header?: never;
|
|
9042
|
+
path?: never;
|
|
9043
|
+
cookie?: never;
|
|
9044
|
+
};
|
|
9045
|
+
/**
|
|
9046
|
+
* Get the fleet health report
|
|
9047
|
+
* @description Returns the latest daily two-way rate report of the iSnap fleet (`two-way-rate/1`): the share of the people each line texted first who wrote back, as figures for the whole fleet and one anonymous row per rated line. No row names a line, a phone number, a customer or an area code, and the rows come in an order that carries nothing: it changes each day and is the same on every read of one day. `as_of` is `null` and `lines` is empty until the first report is published. Needs no credential. The API keeps the answer for 5 minutes: read it again after 5 minutes.
|
|
9048
|
+
*/
|
|
9049
|
+
get: {
|
|
9050
|
+
parameters: {
|
|
9051
|
+
query?: never;
|
|
9052
|
+
header?: never;
|
|
9053
|
+
path?: never;
|
|
9054
|
+
cookie?: never;
|
|
9055
|
+
};
|
|
9056
|
+
requestBody?: never;
|
|
9057
|
+
responses: {
|
|
9058
|
+
/** @description The latest fleet health report. */
|
|
9059
|
+
200: {
|
|
9060
|
+
headers: {
|
|
9061
|
+
[name: string]: unknown;
|
|
9062
|
+
};
|
|
9063
|
+
content: {
|
|
9064
|
+
"application/json": components["schemas"]["FleetHealthEnvelope"];
|
|
9065
|
+
};
|
|
9066
|
+
};
|
|
9067
|
+
/** @description Invalid request. `error.code` is `validation_failed` when a parameter, a header or the body does not match its schema: `error.issues` then lists each problem. */
|
|
9068
|
+
400: {
|
|
9069
|
+
headers: {
|
|
9070
|
+
[name: string]: unknown;
|
|
9071
|
+
};
|
|
9072
|
+
content: {
|
|
9073
|
+
"application/json": components["schemas"]["ErrorEnvelope"];
|
|
9074
|
+
};
|
|
9075
|
+
};
|
|
9076
|
+
/** @description Too many requests. `error.code` is `rate_limit_exceeded` when more than 100 requests came in 60 seconds from the same account, for requests authenticated by an API key, or from the same network address, for any other request. An account can have a different limit. Wait `error.retry_after` seconds. */
|
|
9077
|
+
429: {
|
|
9078
|
+
headers: {
|
|
9079
|
+
[name: string]: unknown;
|
|
9080
|
+
};
|
|
9081
|
+
content: {
|
|
9082
|
+
"application/json": components["schemas"]["ErrorEnvelope"];
|
|
9083
|
+
};
|
|
9084
|
+
};
|
|
9085
|
+
/** @description Unexpected failure. `error.code` is `internal_error`. An operation that takes a JSON body also returns it when the body, sent as `application/json`, is not valid JSON. Quote `trace_id` when you report it to iSnap. */
|
|
9086
|
+
500: {
|
|
9087
|
+
headers: {
|
|
9088
|
+
[name: string]: unknown;
|
|
9089
|
+
};
|
|
9090
|
+
content: {
|
|
9091
|
+
"application/json": components["schemas"]["ErrorEnvelope"];
|
|
9092
|
+
};
|
|
9093
|
+
};
|
|
9094
|
+
};
|
|
9095
|
+
};
|
|
9096
|
+
put?: never;
|
|
9097
|
+
post?: never;
|
|
9098
|
+
delete?: never;
|
|
9099
|
+
options?: never;
|
|
9100
|
+
head?: never;
|
|
9101
|
+
patch?: never;
|
|
9102
|
+
trace?: never;
|
|
9103
|
+
};
|
|
9104
|
+
"/v1/pools": {
|
|
9105
|
+
parameters: {
|
|
9106
|
+
query?: never;
|
|
9107
|
+
header?: never;
|
|
9108
|
+
path?: never;
|
|
9109
|
+
cookie?: never;
|
|
9110
|
+
};
|
|
9111
|
+
/**
|
|
9112
|
+
* List pools
|
|
9113
|
+
* @description Lists the pools of your account, oldest first, with the ids of their member lines. Accepts an API key. The list is not paged. A key limited to lines sees and changes only the pools whose members are all in its list; any other pool returns `404 not_found`.
|
|
9114
|
+
*/
|
|
9115
|
+
get: {
|
|
9116
|
+
parameters: {
|
|
9117
|
+
query?: never;
|
|
9118
|
+
header?: never;
|
|
9119
|
+
path?: never;
|
|
9120
|
+
cookie?: never;
|
|
9121
|
+
};
|
|
9122
|
+
requestBody?: never;
|
|
9123
|
+
responses: {
|
|
9124
|
+
/** @description The pools of the account. */
|
|
9125
|
+
200: {
|
|
9126
|
+
headers: {
|
|
9127
|
+
[name: string]: unknown;
|
|
9128
|
+
};
|
|
9129
|
+
content: {
|
|
9130
|
+
"application/json": components["schemas"]["PoolListEnvelope"];
|
|
9131
|
+
};
|
|
9132
|
+
};
|
|
9133
|
+
/** @description Invalid request. `error.code` is `validation_failed` when a parameter, a header or the body does not match its schema: `error.issues` then lists each problem. */
|
|
9134
|
+
400: {
|
|
9135
|
+
headers: {
|
|
9136
|
+
[name: string]: unknown;
|
|
9137
|
+
};
|
|
9138
|
+
content: {
|
|
9139
|
+
"application/json": components["schemas"]["ErrorEnvelope"];
|
|
9140
|
+
};
|
|
9141
|
+
};
|
|
9142
|
+
/** @description No valid credential. `error.code` is `unauthorized`. */
|
|
9143
|
+
401: {
|
|
9144
|
+
headers: {
|
|
9145
|
+
[name: string]: unknown;
|
|
9146
|
+
};
|
|
9147
|
+
content: {
|
|
9148
|
+
"application/json": components["schemas"]["ErrorEnvelope"];
|
|
9149
|
+
};
|
|
9150
|
+
};
|
|
9151
|
+
/** @description Too many requests. `error.code` is `rate_limit_exceeded` when more than 100 requests came in 60 seconds from the same account, for requests authenticated by an API key, or from the same network address, for any other request. An account can have a different limit. Wait `error.retry_after` seconds. */
|
|
9152
|
+
429: {
|
|
9153
|
+
headers: {
|
|
9154
|
+
[name: string]: unknown;
|
|
9155
|
+
};
|
|
9156
|
+
content: {
|
|
9157
|
+
"application/json": components["schemas"]["ErrorEnvelope"];
|
|
9158
|
+
};
|
|
9159
|
+
};
|
|
9160
|
+
/** @description Unexpected failure. `error.code` is `internal_error`. An operation that takes a JSON body also returns it when the body, sent as `application/json`, is not valid JSON. Quote `trace_id` when you report it to iSnap. */
|
|
9161
|
+
500: {
|
|
9162
|
+
headers: {
|
|
9163
|
+
[name: string]: unknown;
|
|
9164
|
+
};
|
|
9165
|
+
content: {
|
|
9166
|
+
"application/json": components["schemas"]["ErrorEnvelope"];
|
|
9167
|
+
};
|
|
9168
|
+
};
|
|
9169
|
+
};
|
|
9170
|
+
};
|
|
9171
|
+
put?: never;
|
|
9172
|
+
/**
|
|
9173
|
+
* Create a pool
|
|
9174
|
+
* @description Creates a pool: a named set of your dedicated lines. Accepts an API key. Only an account that holds at least 2 dedicated lines can create a pool, and add a member to one: a dedicated line is a rental line (outbound or inbound) that is not cancelled. Any other account gets `403 pool_requires_dedicated_lines`.
|
|
9175
|
+
*
|
|
9176
|
+
* A pool holds outbound lines or inbound lines, never both. A line belongs to one pool only. `line_ids` is optional; every line it names must be a dedicated line of your account, or nothing is stored. `strategy` accepts `quota` only. A key limited to lines must send `line_ids`, all from its own list. The call sends no event.
|
|
9177
|
+
*/
|
|
9178
|
+
post: {
|
|
9179
|
+
parameters: {
|
|
9180
|
+
query?: never;
|
|
9181
|
+
header?: never;
|
|
9182
|
+
path?: never;
|
|
9183
|
+
cookie?: never;
|
|
9184
|
+
};
|
|
9185
|
+
requestBody: {
|
|
9186
|
+
content: {
|
|
9187
|
+
"application/json": components["schemas"]["CreatePool"];
|
|
9188
|
+
};
|
|
9189
|
+
};
|
|
9190
|
+
responses: {
|
|
9191
|
+
/** @description The pool, created. */
|
|
9192
|
+
201: {
|
|
9193
|
+
headers: {
|
|
9194
|
+
[name: string]: unknown;
|
|
9195
|
+
};
|
|
9196
|
+
content: {
|
|
9197
|
+
"application/json": components["schemas"]["PoolEnvelope"];
|
|
9198
|
+
};
|
|
9199
|
+
};
|
|
9200
|
+
/** @description Invalid request. `error.code` is `validation_failed` when a parameter, a header or the body does not match its schema: `error.issues` then lists each problem. */
|
|
9201
|
+
400: {
|
|
9202
|
+
headers: {
|
|
9203
|
+
[name: string]: unknown;
|
|
9204
|
+
};
|
|
9205
|
+
content: {
|
|
9206
|
+
"application/json": components["schemas"]["ErrorEnvelope"];
|
|
9207
|
+
};
|
|
9208
|
+
};
|
|
9209
|
+
/** @description No valid credential. `error.code` is `unauthorized`. */
|
|
9210
|
+
401: {
|
|
9211
|
+
headers: {
|
|
9212
|
+
[name: string]: unknown;
|
|
9213
|
+
};
|
|
9214
|
+
content: {
|
|
9215
|
+
"application/json": components["schemas"]["ErrorEnvelope"];
|
|
9216
|
+
};
|
|
9217
|
+
};
|
|
9218
|
+
/** @description Refused. `error.code` is `pool_requires_dedicated_lines` when the account holds fewer than 2 dedicated lines. It is `forbidden` when a POST, PATCH or DELETE request carries neither an API key in its `Authorization` header nor the header `X-Requested-With: XMLHttpRequest`, or when a key limited to lines names a line outside its list (or creates a pool without `line_ids`). */
|
|
9219
|
+
403: {
|
|
9220
|
+
headers: {
|
|
9221
|
+
[name: string]: unknown;
|
|
9222
|
+
};
|
|
9223
|
+
content: {
|
|
9224
|
+
"application/json": components["schemas"]["ErrorEnvelope"];
|
|
9225
|
+
};
|
|
9226
|
+
};
|
|
9227
|
+
/** @description Not found. `error.code` is `not_found`: the account has no pool with this id, or no line with the given id. A pool or a line of another account returns the same response, and so does a pool that a key limited to lines cannot see. */
|
|
9228
|
+
404: {
|
|
9229
|
+
headers: {
|
|
9230
|
+
[name: string]: unknown;
|
|
9231
|
+
};
|
|
9232
|
+
content: {
|
|
9233
|
+
"application/json": components["schemas"]["ErrorEnvelope"];
|
|
9234
|
+
};
|
|
9235
|
+
};
|
|
9236
|
+
/** @description Conflict. `error.code` is `line_already_pooled` when a line is in a pool already, and `pool_name_taken` when another pool of the account has this name. */
|
|
9237
|
+
409: {
|
|
9238
|
+
headers: {
|
|
9239
|
+
[name: string]: unknown;
|
|
9240
|
+
};
|
|
9241
|
+
content: {
|
|
9242
|
+
"application/json": components["schemas"]["ErrorEnvelope"];
|
|
9243
|
+
};
|
|
9244
|
+
};
|
|
9245
|
+
/** @description The request breaks a rule of this operation. `error.code` is `line_not_poolable` when a line is not a dedicated line (a shared, BYOD or pool line, or a cancelled line), and `pool_direction_mismatch` when the lines mix outbound and inbound lines. */
|
|
9246
|
+
422: {
|
|
9247
|
+
headers: {
|
|
9248
|
+
[name: string]: unknown;
|
|
9249
|
+
};
|
|
9250
|
+
content: {
|
|
9251
|
+
"application/json": components["schemas"]["ErrorEnvelope"];
|
|
9252
|
+
};
|
|
9253
|
+
};
|
|
9254
|
+
/** @description Too many requests. `error.code` is `rate_limit_exceeded` when more than 100 requests came in 60 seconds from the same account, for requests authenticated by an API key, or from the same network address, for any other request. An account can have a different limit. Wait `error.retry_after` seconds. */
|
|
9255
|
+
429: {
|
|
9256
|
+
headers: {
|
|
9257
|
+
[name: string]: unknown;
|
|
9258
|
+
};
|
|
9259
|
+
content: {
|
|
9260
|
+
"application/json": components["schemas"]["ErrorEnvelope"];
|
|
9261
|
+
};
|
|
9262
|
+
};
|
|
9263
|
+
/** @description Unexpected failure. `error.code` is `internal_error`. An operation that takes a JSON body also returns it when the body, sent as `application/json`, is not valid JSON. Quote `trace_id` when you report it to iSnap. */
|
|
9264
|
+
500: {
|
|
9265
|
+
headers: {
|
|
9266
|
+
[name: string]: unknown;
|
|
9267
|
+
};
|
|
9268
|
+
content: {
|
|
9269
|
+
"application/json": components["schemas"]["ErrorEnvelope"];
|
|
9270
|
+
};
|
|
9271
|
+
};
|
|
9272
|
+
};
|
|
9273
|
+
};
|
|
9274
|
+
delete?: never;
|
|
9275
|
+
options?: never;
|
|
9276
|
+
head?: never;
|
|
9277
|
+
patch?: never;
|
|
9278
|
+
trace?: never;
|
|
9279
|
+
};
|
|
9280
|
+
"/v1/pools/{id}": {
|
|
9281
|
+
parameters: {
|
|
9282
|
+
query?: never;
|
|
9283
|
+
header?: never;
|
|
9284
|
+
path?: never;
|
|
9285
|
+
cookie?: never;
|
|
9286
|
+
};
|
|
9287
|
+
/**
|
|
9288
|
+
* Get a pool
|
|
9289
|
+
* @description Returns a pool with each member line: its `line_id`, `phone_number`, `status` and `inbound_only`, and its room for new contacts today, read from the live quota of the line. Accepts an API key. A key limited to lines sees and changes only the pools whose members are all in its list; any other pool returns `404 not_found`. Returns `503 quota_state_unavailable` when the quota cannot be read: retry shortly.
|
|
9290
|
+
*/
|
|
9291
|
+
get: {
|
|
9292
|
+
parameters: {
|
|
9293
|
+
query?: never;
|
|
9294
|
+
header?: never;
|
|
9295
|
+
path: {
|
|
9296
|
+
/** @description Id of the pool: `pool_` followed by 25 letters or digits. */
|
|
9297
|
+
id: string;
|
|
9298
|
+
};
|
|
9299
|
+
cookie?: never;
|
|
9300
|
+
};
|
|
9301
|
+
requestBody?: never;
|
|
9302
|
+
responses: {
|
|
9303
|
+
/** @description The pool and its members. */
|
|
9304
|
+
200: {
|
|
9305
|
+
headers: {
|
|
9306
|
+
[name: string]: unknown;
|
|
9307
|
+
};
|
|
9308
|
+
content: {
|
|
9309
|
+
"application/json": components["schemas"]["PoolDetailEnvelope"];
|
|
9310
|
+
};
|
|
9311
|
+
};
|
|
9312
|
+
/** @description Invalid request. `error.code` is `validation_failed` when a parameter, a header or the body does not match its schema: `error.issues` then lists each problem. */
|
|
9313
|
+
400: {
|
|
9314
|
+
headers: {
|
|
9315
|
+
[name: string]: unknown;
|
|
9316
|
+
};
|
|
9317
|
+
content: {
|
|
9318
|
+
"application/json": components["schemas"]["ErrorEnvelope"];
|
|
9319
|
+
};
|
|
9320
|
+
};
|
|
9321
|
+
/** @description No valid credential. `error.code` is `unauthorized`. */
|
|
9322
|
+
401: {
|
|
9323
|
+
headers: {
|
|
9324
|
+
[name: string]: unknown;
|
|
9325
|
+
};
|
|
9326
|
+
content: {
|
|
9327
|
+
"application/json": components["schemas"]["ErrorEnvelope"];
|
|
9328
|
+
};
|
|
9329
|
+
};
|
|
9330
|
+
/** @description Not found. `error.code` is `not_found`: the account has no pool with this id, or no line with the given id. A pool or a line of another account returns the same response, and so does a pool that a key limited to lines cannot see. */
|
|
9331
|
+
404: {
|
|
9332
|
+
headers: {
|
|
9333
|
+
[name: string]: unknown;
|
|
9334
|
+
};
|
|
9335
|
+
content: {
|
|
9336
|
+
"application/json": components["schemas"]["ErrorEnvelope"];
|
|
9337
|
+
};
|
|
9338
|
+
};
|
|
9339
|
+
/** @description Too many requests. `error.code` is `rate_limit_exceeded` when more than 100 requests came in 60 seconds from the same account, for requests authenticated by an API key, or from the same network address, for any other request. An account can have a different limit. Wait `error.retry_after` seconds. */
|
|
9340
|
+
429: {
|
|
9341
|
+
headers: {
|
|
9342
|
+
[name: string]: unknown;
|
|
9343
|
+
};
|
|
9344
|
+
content: {
|
|
9345
|
+
"application/json": components["schemas"]["ErrorEnvelope"];
|
|
9346
|
+
};
|
|
9347
|
+
};
|
|
9348
|
+
/** @description Unexpected failure. `error.code` is `internal_error`. An operation that takes a JSON body also returns it when the body, sent as `application/json`, is not valid JSON. Quote `trace_id` when you report it to iSnap. */
|
|
9349
|
+
500: {
|
|
9350
|
+
headers: {
|
|
9351
|
+
[name: string]: unknown;
|
|
9352
|
+
};
|
|
9353
|
+
content: {
|
|
9354
|
+
"application/json": components["schemas"]["ErrorEnvelope"];
|
|
9355
|
+
};
|
|
9356
|
+
};
|
|
9357
|
+
/** @description Unavailable. `error.code` is `quota_state_unavailable` when the quota of the lines cannot be read: retry shortly. */
|
|
9358
|
+
503: {
|
|
9359
|
+
headers: {
|
|
9360
|
+
[name: string]: unknown;
|
|
9361
|
+
};
|
|
9362
|
+
content: {
|
|
9363
|
+
"application/json": components["schemas"]["ErrorEnvelope"];
|
|
9364
|
+
};
|
|
9365
|
+
};
|
|
9366
|
+
};
|
|
9367
|
+
};
|
|
9368
|
+
put?: never;
|
|
9369
|
+
post?: never;
|
|
9370
|
+
/**
|
|
9371
|
+
* Delete a pool
|
|
9372
|
+
* @description Deletes a pool and the contact stickiness it holds. The lines stay, and are in no pool. Accepts an API key. Returns `204` with no body. A key limited to lines sees and changes only the pools whose members are all in its list; any other pool returns `404 not_found`.
|
|
9373
|
+
*/
|
|
9374
|
+
delete: {
|
|
9375
|
+
parameters: {
|
|
9376
|
+
query?: never;
|
|
9377
|
+
header?: never;
|
|
9378
|
+
path: {
|
|
9379
|
+
/** @description Id of the pool: `pool_` followed by 25 letters or digits. */
|
|
9380
|
+
id: string;
|
|
9381
|
+
};
|
|
9382
|
+
cookie?: never;
|
|
9383
|
+
};
|
|
9384
|
+
requestBody?: never;
|
|
9385
|
+
responses: {
|
|
9386
|
+
/** @description The pool is deleted. No body. */
|
|
9387
|
+
204: {
|
|
9388
|
+
headers: {
|
|
9389
|
+
[name: string]: unknown;
|
|
9390
|
+
};
|
|
9391
|
+
content?: never;
|
|
9392
|
+
};
|
|
9393
|
+
/** @description Invalid request. `error.code` is `validation_failed` when a parameter, a header or the body does not match its schema: `error.issues` then lists each problem. */
|
|
9394
|
+
400: {
|
|
9395
|
+
headers: {
|
|
9396
|
+
[name: string]: unknown;
|
|
9397
|
+
};
|
|
9398
|
+
content: {
|
|
9399
|
+
"application/json": components["schemas"]["ErrorEnvelope"];
|
|
9400
|
+
};
|
|
9401
|
+
};
|
|
9402
|
+
/** @description No valid credential. `error.code` is `unauthorized`. */
|
|
9403
|
+
401: {
|
|
9404
|
+
headers: {
|
|
9405
|
+
[name: string]: unknown;
|
|
9406
|
+
};
|
|
9407
|
+
content: {
|
|
9408
|
+
"application/json": components["schemas"]["ErrorEnvelope"];
|
|
9409
|
+
};
|
|
9410
|
+
};
|
|
9411
|
+
/** @description Refused. `error.code` is `forbidden` when a POST, PATCH or DELETE request carries neither an API key in its `Authorization` header nor the header `X-Requested-With: XMLHttpRequest`. */
|
|
9412
|
+
403: {
|
|
9413
|
+
headers: {
|
|
9414
|
+
[name: string]: unknown;
|
|
9415
|
+
};
|
|
9416
|
+
content: {
|
|
9417
|
+
"application/json": components["schemas"]["ErrorEnvelope"];
|
|
9418
|
+
};
|
|
9419
|
+
};
|
|
9420
|
+
/** @description Not found. `error.code` is `not_found`: the account has no pool with this id, or no line with the given id. A pool or a line of another account returns the same response, and so does a pool that a key limited to lines cannot see. */
|
|
9421
|
+
404: {
|
|
9422
|
+
headers: {
|
|
9423
|
+
[name: string]: unknown;
|
|
9424
|
+
};
|
|
9425
|
+
content: {
|
|
9426
|
+
"application/json": components["schemas"]["ErrorEnvelope"];
|
|
9427
|
+
};
|
|
9428
|
+
};
|
|
9429
|
+
/** @description Too many requests. `error.code` is `rate_limit_exceeded` when more than 100 requests came in 60 seconds from the same account, for requests authenticated by an API key, or from the same network address, for any other request. An account can have a different limit. Wait `error.retry_after` seconds. */
|
|
9430
|
+
429: {
|
|
9431
|
+
headers: {
|
|
9432
|
+
[name: string]: unknown;
|
|
9433
|
+
};
|
|
9434
|
+
content: {
|
|
9435
|
+
"application/json": components["schemas"]["ErrorEnvelope"];
|
|
9436
|
+
};
|
|
9437
|
+
};
|
|
9438
|
+
/** @description Unexpected failure. `error.code` is `internal_error`. An operation that takes a JSON body also returns it when the body, sent as `application/json`, is not valid JSON. Quote `trace_id` when you report it to iSnap. */
|
|
9439
|
+
500: {
|
|
9440
|
+
headers: {
|
|
9441
|
+
[name: string]: unknown;
|
|
9442
|
+
};
|
|
9443
|
+
content: {
|
|
9444
|
+
"application/json": components["schemas"]["ErrorEnvelope"];
|
|
9445
|
+
};
|
|
9446
|
+
};
|
|
9447
|
+
};
|
|
9448
|
+
};
|
|
9449
|
+
options?: never;
|
|
9450
|
+
head?: never;
|
|
9451
|
+
/**
|
|
9452
|
+
* Rename a pool or change its strategy
|
|
9453
|
+
* @description Changes the `name` or the `strategy` of a pool; send at least one. `strategy` accepts `quota` only: any other value returns `400 validation_failed` and the pool is unchanged. Accepts an API key. A key limited to lines sees and changes only the pools whose members are all in its list; any other pool returns `404 not_found`.
|
|
9454
|
+
*/
|
|
9455
|
+
patch: {
|
|
9456
|
+
parameters: {
|
|
9457
|
+
query?: never;
|
|
9458
|
+
header?: never;
|
|
9459
|
+
path: {
|
|
9460
|
+
/** @description Id of the pool: `pool_` followed by 25 letters or digits. */
|
|
9461
|
+
id: string;
|
|
9462
|
+
};
|
|
9463
|
+
cookie?: never;
|
|
9464
|
+
};
|
|
9465
|
+
requestBody: {
|
|
9466
|
+
content: {
|
|
9467
|
+
"application/json": components["schemas"]["PatchPool"];
|
|
9468
|
+
};
|
|
9469
|
+
};
|
|
9470
|
+
responses: {
|
|
9471
|
+
/** @description The pool, changed. */
|
|
9472
|
+
200: {
|
|
9473
|
+
headers: {
|
|
9474
|
+
[name: string]: unknown;
|
|
9475
|
+
};
|
|
9476
|
+
content: {
|
|
9477
|
+
"application/json": components["schemas"]["PoolEnvelope"];
|
|
9478
|
+
};
|
|
9479
|
+
};
|
|
9480
|
+
/** @description Invalid request. `error.code` is `validation_failed` when a parameter, a header or the body does not match its schema: `error.issues` then lists each problem. */
|
|
9481
|
+
400: {
|
|
9482
|
+
headers: {
|
|
9483
|
+
[name: string]: unknown;
|
|
9484
|
+
};
|
|
9485
|
+
content: {
|
|
9486
|
+
"application/json": components["schemas"]["ErrorEnvelope"];
|
|
9487
|
+
};
|
|
9488
|
+
};
|
|
9489
|
+
/** @description No valid credential. `error.code` is `unauthorized`. */
|
|
9490
|
+
401: {
|
|
9491
|
+
headers: {
|
|
9492
|
+
[name: string]: unknown;
|
|
9493
|
+
};
|
|
9494
|
+
content: {
|
|
9495
|
+
"application/json": components["schemas"]["ErrorEnvelope"];
|
|
9496
|
+
};
|
|
9497
|
+
};
|
|
9498
|
+
/** @description Refused. `error.code` is `forbidden` when a POST, PATCH or DELETE request carries neither an API key in its `Authorization` header nor the header `X-Requested-With: XMLHttpRequest`. */
|
|
9499
|
+
403: {
|
|
9500
|
+
headers: {
|
|
9501
|
+
[name: string]: unknown;
|
|
9502
|
+
};
|
|
9503
|
+
content: {
|
|
9504
|
+
"application/json": components["schemas"]["ErrorEnvelope"];
|
|
9505
|
+
};
|
|
9506
|
+
};
|
|
9507
|
+
/** @description Not found. `error.code` is `not_found`: the account has no pool with this id, or no line with the given id. A pool or a line of another account returns the same response, and so does a pool that a key limited to lines cannot see. */
|
|
9508
|
+
404: {
|
|
9509
|
+
headers: {
|
|
9510
|
+
[name: string]: unknown;
|
|
9511
|
+
};
|
|
9512
|
+
content: {
|
|
9513
|
+
"application/json": components["schemas"]["ErrorEnvelope"];
|
|
9514
|
+
};
|
|
9515
|
+
};
|
|
9516
|
+
/** @description Conflict. `error.code` is `pool_name_taken`: another pool of the account has this name. */
|
|
9517
|
+
409: {
|
|
9518
|
+
headers: {
|
|
9519
|
+
[name: string]: unknown;
|
|
9520
|
+
};
|
|
9521
|
+
content: {
|
|
9522
|
+
"application/json": components["schemas"]["ErrorEnvelope"];
|
|
9523
|
+
};
|
|
9524
|
+
};
|
|
9525
|
+
/** @description Too many requests. `error.code` is `rate_limit_exceeded` when more than 100 requests came in 60 seconds from the same account, for requests authenticated by an API key, or from the same network address, for any other request. An account can have a different limit. Wait `error.retry_after` seconds. */
|
|
9526
|
+
429: {
|
|
9527
|
+
headers: {
|
|
9528
|
+
[name: string]: unknown;
|
|
9529
|
+
};
|
|
9530
|
+
content: {
|
|
9531
|
+
"application/json": components["schemas"]["ErrorEnvelope"];
|
|
9532
|
+
};
|
|
9533
|
+
};
|
|
9534
|
+
/** @description Unexpected failure. `error.code` is `internal_error`. An operation that takes a JSON body also returns it when the body, sent as `application/json`, is not valid JSON. Quote `trace_id` when you report it to iSnap. */
|
|
9535
|
+
500: {
|
|
9536
|
+
headers: {
|
|
9537
|
+
[name: string]: unknown;
|
|
9538
|
+
};
|
|
9539
|
+
content: {
|
|
9540
|
+
"application/json": components["schemas"]["ErrorEnvelope"];
|
|
9541
|
+
};
|
|
9542
|
+
};
|
|
9543
|
+
};
|
|
9544
|
+
};
|
|
9545
|
+
trace?: never;
|
|
9546
|
+
};
|
|
9547
|
+
"/v1/pools/{id}/members": {
|
|
9548
|
+
parameters: {
|
|
9549
|
+
query?: never;
|
|
9550
|
+
header?: never;
|
|
9551
|
+
path?: never;
|
|
9552
|
+
cookie?: never;
|
|
9553
|
+
};
|
|
9554
|
+
get?: never;
|
|
9555
|
+
put?: never;
|
|
9556
|
+
/**
|
|
9557
|
+
* Add a line to a pool
|
|
9558
|
+
* @description Adds one of your dedicated lines to a pool. Accepts an API key. The account must hold at least 2 dedicated lines, or the call returns `403 pool_requires_dedicated_lines`. A line in a pool already returns `409 line_already_pooled`; a shared, BYOD or pool line, or a cancelled line, returns `422 line_not_poolable`; a line whose direction differs from the pool's members returns `422 pool_direction_mismatch`. Nothing is stored in these cases. A key limited to lines sees and changes only the pools whose members are all in its list; any other pool returns `404 not_found`. A key limited to lines can add only a line from its own list: another line of your account returns `403 forbidden`.
|
|
9559
|
+
*/
|
|
9560
|
+
post: {
|
|
9561
|
+
parameters: {
|
|
9562
|
+
query?: never;
|
|
9563
|
+
header?: never;
|
|
9564
|
+
path: {
|
|
9565
|
+
/** @description Id of the pool: `pool_` followed by 25 letters or digits. */
|
|
9566
|
+
id: string;
|
|
9567
|
+
};
|
|
9568
|
+
cookie?: never;
|
|
9569
|
+
};
|
|
9570
|
+
requestBody: {
|
|
9571
|
+
content: {
|
|
9572
|
+
"application/json": components["schemas"]["AddPoolMember"];
|
|
9573
|
+
};
|
|
9574
|
+
};
|
|
9575
|
+
responses: {
|
|
9576
|
+
/** @description The pool, with the line added. */
|
|
9577
|
+
201: {
|
|
9578
|
+
headers: {
|
|
9579
|
+
[name: string]: unknown;
|
|
9580
|
+
};
|
|
9581
|
+
content: {
|
|
9582
|
+
"application/json": components["schemas"]["PoolEnvelope"];
|
|
9583
|
+
};
|
|
9584
|
+
};
|
|
9585
|
+
/** @description Invalid request. `error.code` is `validation_failed` when a parameter, a header or the body does not match its schema: `error.issues` then lists each problem. */
|
|
9586
|
+
400: {
|
|
9587
|
+
headers: {
|
|
9588
|
+
[name: string]: unknown;
|
|
9589
|
+
};
|
|
9590
|
+
content: {
|
|
9591
|
+
"application/json": components["schemas"]["ErrorEnvelope"];
|
|
9592
|
+
};
|
|
9593
|
+
};
|
|
9594
|
+
/** @description No valid credential. `error.code` is `unauthorized`. */
|
|
9595
|
+
401: {
|
|
9596
|
+
headers: {
|
|
9597
|
+
[name: string]: unknown;
|
|
9598
|
+
};
|
|
9599
|
+
content: {
|
|
9600
|
+
"application/json": components["schemas"]["ErrorEnvelope"];
|
|
9601
|
+
};
|
|
9602
|
+
};
|
|
9603
|
+
/** @description Refused. `error.code` is `pool_requires_dedicated_lines` when the account holds fewer than 2 dedicated lines. It is `forbidden` when a POST, PATCH or DELETE request carries neither an API key in its `Authorization` header nor the header `X-Requested-With: XMLHttpRequest`, or when a key limited to lines names a line outside its list (or creates a pool without `line_ids`). */
|
|
9604
|
+
403: {
|
|
9605
|
+
headers: {
|
|
9606
|
+
[name: string]: unknown;
|
|
9607
|
+
};
|
|
9608
|
+
content: {
|
|
9609
|
+
"application/json": components["schemas"]["ErrorEnvelope"];
|
|
9610
|
+
};
|
|
9611
|
+
};
|
|
9612
|
+
/** @description Not found. `error.code` is `not_found`: the account has no pool with this id, or no line with the given id. A pool or a line of another account returns the same response, and so does a pool that a key limited to lines cannot see. */
|
|
9613
|
+
404: {
|
|
9614
|
+
headers: {
|
|
9615
|
+
[name: string]: unknown;
|
|
9616
|
+
};
|
|
9617
|
+
content: {
|
|
9618
|
+
"application/json": components["schemas"]["ErrorEnvelope"];
|
|
9619
|
+
};
|
|
9620
|
+
};
|
|
9621
|
+
/** @description Conflict. `error.code` is `line_already_pooled`: the line is in a pool already. */
|
|
9622
|
+
409: {
|
|
9623
|
+
headers: {
|
|
9624
|
+
[name: string]: unknown;
|
|
9625
|
+
};
|
|
9626
|
+
content: {
|
|
9627
|
+
"application/json": components["schemas"]["ErrorEnvelope"];
|
|
9628
|
+
};
|
|
9629
|
+
};
|
|
9630
|
+
/** @description The request breaks a rule of this operation. `error.code` is `line_not_poolable` or `pool_direction_mismatch`. */
|
|
9631
|
+
422: {
|
|
9632
|
+
headers: {
|
|
9633
|
+
[name: string]: unknown;
|
|
9634
|
+
};
|
|
9635
|
+
content: {
|
|
9636
|
+
"application/json": components["schemas"]["ErrorEnvelope"];
|
|
9637
|
+
};
|
|
9638
|
+
};
|
|
9639
|
+
/** @description Too many requests. `error.code` is `rate_limit_exceeded` when more than 100 requests came in 60 seconds from the same account, for requests authenticated by an API key, or from the same network address, for any other request. An account can have a different limit. Wait `error.retry_after` seconds. */
|
|
9640
|
+
429: {
|
|
9641
|
+
headers: {
|
|
9642
|
+
[name: string]: unknown;
|
|
9643
|
+
};
|
|
9644
|
+
content: {
|
|
9645
|
+
"application/json": components["schemas"]["ErrorEnvelope"];
|
|
9646
|
+
};
|
|
9647
|
+
};
|
|
9648
|
+
/** @description Unexpected failure. `error.code` is `internal_error`. An operation that takes a JSON body also returns it when the body, sent as `application/json`, is not valid JSON. Quote `trace_id` when you report it to iSnap. */
|
|
9649
|
+
500: {
|
|
9650
|
+
headers: {
|
|
9651
|
+
[name: string]: unknown;
|
|
9652
|
+
};
|
|
9653
|
+
content: {
|
|
9654
|
+
"application/json": components["schemas"]["ErrorEnvelope"];
|
|
9655
|
+
};
|
|
9656
|
+
};
|
|
9657
|
+
};
|
|
9658
|
+
};
|
|
9659
|
+
delete?: never;
|
|
9660
|
+
options?: never;
|
|
9661
|
+
head?: never;
|
|
9662
|
+
patch?: never;
|
|
9663
|
+
trace?: never;
|
|
9664
|
+
};
|
|
9665
|
+
"/v1/pools/{id}/members/{line_id}": {
|
|
9666
|
+
parameters: {
|
|
9667
|
+
query?: never;
|
|
9668
|
+
header?: never;
|
|
9669
|
+
path?: never;
|
|
9670
|
+
cookie?: never;
|
|
9671
|
+
};
|
|
9672
|
+
get?: never;
|
|
9673
|
+
put?: never;
|
|
9674
|
+
post?: never;
|
|
9675
|
+
/**
|
|
9676
|
+
* Remove a line from a pool
|
|
9677
|
+
* @description Removes a line from a pool and forgets the contacts the pool had tied to it: they are picked again on their next send through the pool. The line stays yours, and is in no pool. Accepts an API key. Returns `204` with no body. A line that is not a member of the pool returns `404 not_found`. A key limited to lines sees and changes only the pools whose members are all in its list; any other pool returns `404 not_found`.
|
|
9678
|
+
*/
|
|
9679
|
+
delete: {
|
|
9680
|
+
parameters: {
|
|
9681
|
+
query?: never;
|
|
9682
|
+
header?: never;
|
|
9683
|
+
path: {
|
|
9684
|
+
/** @description Id of the pool: `pool_` followed by 25 letters or digits. */
|
|
9685
|
+
id: string;
|
|
9686
|
+
/** @description Id of a line: `line_` followed by 25 letters or digits. */
|
|
9687
|
+
line_id: string;
|
|
9688
|
+
};
|
|
9689
|
+
cookie?: never;
|
|
9690
|
+
};
|
|
9691
|
+
requestBody?: never;
|
|
9692
|
+
responses: {
|
|
9693
|
+
/** @description The line is out of the pool. No body. */
|
|
9694
|
+
204: {
|
|
9695
|
+
headers: {
|
|
9696
|
+
[name: string]: unknown;
|
|
9697
|
+
};
|
|
9698
|
+
content?: never;
|
|
9699
|
+
};
|
|
9700
|
+
/** @description Invalid request. `error.code` is `validation_failed` when a parameter, a header or the body does not match its schema: `error.issues` then lists each problem. */
|
|
9701
|
+
400: {
|
|
9702
|
+
headers: {
|
|
9703
|
+
[name: string]: unknown;
|
|
9704
|
+
};
|
|
9705
|
+
content: {
|
|
9706
|
+
"application/json": components["schemas"]["ErrorEnvelope"];
|
|
9707
|
+
};
|
|
9708
|
+
};
|
|
9709
|
+
/** @description No valid credential. `error.code` is `unauthorized`. */
|
|
9710
|
+
401: {
|
|
8676
9711
|
headers: {
|
|
8677
9712
|
[name: string]: unknown;
|
|
8678
9713
|
};
|
|
@@ -8680,41 +9715,17 @@ export interface paths {
|
|
|
8680
9715
|
"application/json": components["schemas"]["ErrorEnvelope"];
|
|
8681
9716
|
};
|
|
8682
9717
|
};
|
|
8683
|
-
|
|
8684
|
-
|
|
8685
|
-
trace?: never;
|
|
8686
|
-
};
|
|
8687
|
-
"/v1/apps": {
|
|
8688
|
-
parameters: {
|
|
8689
|
-
query?: never;
|
|
8690
|
-
header?: never;
|
|
8691
|
-
path?: never;
|
|
8692
|
-
cookie?: never;
|
|
8693
|
-
};
|
|
8694
|
-
/**
|
|
8695
|
-
* Get the bridge app downloads
|
|
8696
|
-
* @description Returns, for macOS and for Android, the download link and the published version of the bridge app that a BYOD device runs: the bridge app for macOS on a Mac, the bridge app for Android on an Android phone. Needs no credential. `POST /v1/byod/pair` returns the same links in `download_urls`. Compare `version` with the version a device runs to know whether an update is published.
|
|
8697
|
-
*/
|
|
8698
|
-
get: {
|
|
8699
|
-
parameters: {
|
|
8700
|
-
query?: never;
|
|
8701
|
-
header?: never;
|
|
8702
|
-
path?: never;
|
|
8703
|
-
cookie?: never;
|
|
8704
|
-
};
|
|
8705
|
-
requestBody?: never;
|
|
8706
|
-
responses: {
|
|
8707
|
-
/** @description The download link and the published version for each platform. */
|
|
8708
|
-
200: {
|
|
9718
|
+
/** @description Refused. `error.code` is `forbidden` when a POST, PATCH or DELETE request carries neither an API key in its `Authorization` header nor the header `X-Requested-With: XMLHttpRequest`. */
|
|
9719
|
+
403: {
|
|
8709
9720
|
headers: {
|
|
8710
9721
|
[name: string]: unknown;
|
|
8711
9722
|
};
|
|
8712
9723
|
content: {
|
|
8713
|
-
"application/json": components["schemas"]["
|
|
9724
|
+
"application/json": components["schemas"]["ErrorEnvelope"];
|
|
8714
9725
|
};
|
|
8715
9726
|
};
|
|
8716
|
-
/** @description
|
|
8717
|
-
|
|
9727
|
+
/** @description Not found. `error.code` is `not_found`: the account has no pool with this id, or no line with the given id. A pool or a line of another account returns the same response, and so does a pool that a key limited to lines cannot see. */
|
|
9728
|
+
404: {
|
|
8718
9729
|
headers: {
|
|
8719
9730
|
[name: string]: unknown;
|
|
8720
9731
|
};
|
|
@@ -8742,9 +9753,6 @@ export interface paths {
|
|
|
8742
9753
|
};
|
|
8743
9754
|
};
|
|
8744
9755
|
};
|
|
8745
|
-
put?: never;
|
|
8746
|
-
post?: never;
|
|
8747
|
-
delete?: never;
|
|
8748
9756
|
options?: never;
|
|
8749
9757
|
head?: never;
|
|
8750
9758
|
patch?: never;
|
|
@@ -8983,6 +9991,51 @@ export interface paths {
|
|
|
8983
9991
|
export type webhooks = Record<string, never>;
|
|
8984
9992
|
export interface components {
|
|
8985
9993
|
schemas: {
|
|
9994
|
+
/** @description The health score of a line: a risk score and its band, with the factors that raise it. `null` where it is served means no score is computed for the line yet. */
|
|
9995
|
+
LineHealthScore: {
|
|
9996
|
+
/**
|
|
9997
|
+
* @description The risk score, from 0 (no risk observed) to 100 (most at risk). A higher number is worse. `null` exactly when `band` is `unknown`.
|
|
9998
|
+
* @example 24
|
|
9999
|
+
*/
|
|
10000
|
+
score: number | null;
|
|
10001
|
+
/**
|
|
10002
|
+
* @description The band of the score: `low` (0 to 29), `medium` (30 to 59), `high` (60 to 100), or `unknown` when the line has too little data to be scored.
|
|
10003
|
+
* @example low
|
|
10004
|
+
* @enum {string}
|
|
10005
|
+
*/
|
|
10006
|
+
band: "low" | "medium" | "high" | "unknown";
|
|
10007
|
+
/**
|
|
10008
|
+
* @description The version of the scoring that produced the score.
|
|
10009
|
+
* @example 1
|
|
10010
|
+
*/
|
|
10011
|
+
version: number;
|
|
10012
|
+
/**
|
|
10013
|
+
* Format: date-time
|
|
10014
|
+
* @description When the score was computed, ISO 8601 UTC. Use it to judge how fresh the score is.
|
|
10015
|
+
* @example 2026-11-14T10:00:12.000Z
|
|
10016
|
+
*/
|
|
10017
|
+
computed_at: string;
|
|
10018
|
+
/** @description Up to 3 factors that raise the score, largest contribution first. Empty when no factor adds to the score. */
|
|
10019
|
+
top_factors: components["schemas"]["LineHealthScoreFactor"][];
|
|
10020
|
+
};
|
|
10021
|
+
/** @description One factor behind a line health score. */
|
|
10022
|
+
LineHealthScoreFactor: {
|
|
10023
|
+
/**
|
|
10024
|
+
* @description The factor id. An open list: ignore the ids you do not know. The ids a customer can receive are listed in the API contract.
|
|
10025
|
+
* @example delivery_outcome
|
|
10026
|
+
*/
|
|
10027
|
+
id: string;
|
|
10028
|
+
/**
|
|
10029
|
+
* @description A short English name for the factor, fit to show to an end user.
|
|
10030
|
+
* @example Failed sends
|
|
10031
|
+
*/
|
|
10032
|
+
label: string;
|
|
10033
|
+
/**
|
|
10034
|
+
* @description How many points of the score the factor adds. Always above 0 in `top_factors`.
|
|
10035
|
+
* @example 12.5
|
|
10036
|
+
*/
|
|
10037
|
+
contribution: number;
|
|
10038
|
+
};
|
|
8986
10039
|
/** @description The health of the API. This body is returned as is, without the standard envelope. */
|
|
8987
10040
|
HealthResponse: {
|
|
8988
10041
|
/**
|
|
@@ -9053,7 +10106,7 @@ export interface components {
|
|
|
9053
10106
|
/** @description Id of the request that produced this response: `req_` followed by 25 letters or digits. */
|
|
9054
10107
|
request_id: string;
|
|
9055
10108
|
};
|
|
9056
|
-
/** @description A line. `billing_tier`, `byod`, `shared`, `test_line` and `inbound_only` tell the kinds of line apart: a rented line (two-way or inbound-only), a BYOD line, a shared line, a test line. */
|
|
10109
|
+
/** @description A line. `billing_tier`, `byod`, `shared`, `test_line` and `inbound_only` tell the kinds of line apart: a rented line (two-way or inbound-only), a BYOD line, a shared line, a test line. `health_score` is present only on `GET /v1/lines/my` and on `GET /v1/lines/{id}` when the caller owns the line (for a line-scoped key, a line in its list), and absent on every other operation and webhook that returns a line. It is `null` when no score is stored for the line yet. */
|
|
9057
10110
|
Line: {
|
|
9058
10111
|
/** @description Id of a line: `line_` followed by 25 letters or digits. */
|
|
9059
10112
|
id: string;
|
|
@@ -9118,6 +10171,7 @@ export interface components {
|
|
|
9118
10171
|
shared: boolean;
|
|
9119
10172
|
/** @description Present only on `GET /v1/lines/my`. `open` while an order for this line is still being fulfilled, `null` otherwise. */
|
|
9120
10173
|
fulfillment_status?: string | null;
|
|
10174
|
+
health_score?: components["schemas"]["LineHealthScore"] & unknown;
|
|
9121
10175
|
};
|
|
9122
10176
|
/** @description A hosted macOS session that the account rents. */
|
|
9123
10177
|
MacosSession: {
|
|
@@ -9374,7 +10428,19 @@ export interface components {
|
|
|
9374
10428
|
daily_known_frees_at: string | null;
|
|
9375
10429
|
/** @description Timestamp at which `daily_replies_used` drops back under its limit (ISO 8601, UTC). `null` when the counter is under its limit, when the limit is 0, or when the time is not known: read `null` as no known wait. */
|
|
9376
10430
|
daily_reply_frees_at: string | null;
|
|
10431
|
+
priority: components["schemas"]["PriorityMeter"];
|
|
9377
10432
|
buckets_warning: components["schemas"]["BucketsWarning"];
|
|
10433
|
+
warming: components["schemas"]["WarmingProgress"];
|
|
10434
|
+
effective_caps: components["schemas"]["EffectiveCaps"];
|
|
10435
|
+
};
|
|
10436
|
+
/** @description The priority allowance of the line: a message sent with `priority: true` can pass the hourly limit while `remaining` is above 0. */
|
|
10437
|
+
PriorityMeter: {
|
|
10438
|
+
/** @description Priority allowance: the number of messages sent with `priority: true` per rolling 24 hours that can pass the hourly limit. The allowance is part of `daily_total_message_limit`, not added to it. 0 means priority is off for the line. */
|
|
10439
|
+
limit: number;
|
|
10440
|
+
/** @description Messages that used the priority allowance to pass the hourly limit in the last 24 hours. A priority message sent under every limit does not use it. */
|
|
10441
|
+
used: number;
|
|
10442
|
+
/** @description `limit` minus `used`, never below 0. */
|
|
10443
|
+
remaining: number;
|
|
9378
10444
|
};
|
|
9379
10445
|
/** @description One flag per sending limit: `true` from 80% of the limit. A flag is `false` when its limit is 0. */
|
|
9380
10446
|
BucketsWarning: {
|
|
@@ -9389,6 +10455,36 @@ export interface components {
|
|
|
9389
10455
|
/** @description `true` when `minute_messages_used` is at 80% of `minute_message_limit` or more. */
|
|
9390
10456
|
minute_at_80_percent: boolean;
|
|
9391
10457
|
};
|
|
10458
|
+
/** @description Where the line is on its warm-up ramp. Stages count active days, not calendar days: a line that sits idle does not warm up, and the ramp pauses while the health of the line is degraded. */
|
|
10459
|
+
WarmingProgress: {
|
|
10460
|
+
/**
|
|
10461
|
+
* @description The stage of the line: `new`, `ramping_1`, `ramping_2`, `ramping_3` or `warm`. A new line sends less than an established one and moves up a stage as it accumulates active days. `not_applicable` on a shared line, which has no ramp of its own.
|
|
10462
|
+
* @enum {string}
|
|
10463
|
+
*/
|
|
10464
|
+
stage: "new" | "ramping_1" | "ramping_2" | "ramping_3" | "warm" | "not_applicable";
|
|
10465
|
+
/** @description Active days the line has accumulated. An active day is a day, in the line timezone, on which the line sent at least one message that the device confirmed. A day without a send does not count. */
|
|
10466
|
+
active_days: number;
|
|
10467
|
+
/** @description Active days still needed to reach `warm`. 0 once the line is `warm`. `null` when `stage` is `not_applicable`. */
|
|
10468
|
+
active_days_until_warm: number | null;
|
|
10469
|
+
/** @description `true` while the ramp is paused because the health of the line is degraded: `active_days` does not grow until `band` is back to `low`. `false` when the line is not degraded, has no health score yet, or when `stage` is `not_applicable`. */
|
|
10470
|
+
held: boolean;
|
|
10471
|
+
/**
|
|
10472
|
+
* @description The health band of the line that decides `held`: `low`, `medium` or `high`. `null` when the line has no health score yet, or when `stage` is `not_applicable`.
|
|
10473
|
+
* @enum {string|null}
|
|
10474
|
+
*/
|
|
10475
|
+
band: "low" | "medium" | "high" | null;
|
|
10476
|
+
};
|
|
10477
|
+
/** @description The four sending limits that apply to the line now: the limits of its stage and any limit you lowered, whichever is lower. Each equals the matching `*_limit` field of this object. */
|
|
10478
|
+
EffectiveCaps: {
|
|
10479
|
+
/** @description Distinct new contacts the line can message per rolling 24 hours. Equals `daily_new_contact_limit`. */
|
|
10480
|
+
daily_new: number;
|
|
10481
|
+
/** @description Messages the line can send per rolling 24 hours. Equals `daily_total_message_limit`. */
|
|
10482
|
+
daily_total: number;
|
|
10483
|
+
/** @description Messages the line can send per rolling 60 minutes. Equals `hourly_message_limit`. */
|
|
10484
|
+
hourly: number;
|
|
10485
|
+
/** @description Messages the line can send per rolling 60 seconds. Equals `minute_message_limit`. */
|
|
10486
|
+
minute: number;
|
|
10487
|
+
};
|
|
9392
10488
|
QueueEnvelope: {
|
|
9393
10489
|
/**
|
|
9394
10490
|
* @description Always `true` on a success response.
|
|
@@ -9531,6 +10627,77 @@ export interface components {
|
|
|
9531
10627
|
/** @description The reason codes of the warnings the device currently raises, each a setting of the Mac that the customer can change: `messages_spam_filter_on` means Filter spam is on in Messages, so iMessages from new contacts can be held back. An open list: ignore the values you do not know. `[]` means no warning among the checks the device reports. `null` means not measured: the line has no active device session, the device is not reporting (it has not reported since it was paired, or for 5 minutes or more), it has sent no diagnostics, or the line is suspended or cancelled. `null` is never "no warning". */
|
|
9532
10628
|
warnings: string[] | null;
|
|
9533
10629
|
};
|
|
10630
|
+
LineHealthScoreHistoryEnvelope: {
|
|
10631
|
+
/**
|
|
10632
|
+
* @description Always `true` on a success response.
|
|
10633
|
+
* @enum {boolean}
|
|
10634
|
+
*/
|
|
10635
|
+
success: true;
|
|
10636
|
+
data: components["schemas"]["LineHealthScoreHistory"];
|
|
10637
|
+
/** @description Trace id of the request that produced this response: 32 lowercase hexadecimal characters. Quote it when you report a problem to iSnap. */
|
|
10638
|
+
trace_id: string;
|
|
10639
|
+
/** @description Id of the request that produced this response: `req_` followed by 25 letters or digits. */
|
|
10640
|
+
request_id: string;
|
|
10641
|
+
};
|
|
10642
|
+
/** @description The hourly health scores of a line. */
|
|
10643
|
+
LineHealthScoreHistory: {
|
|
10644
|
+
/** @description Id of a line: `line_` followed by 25 letters or digits. */
|
|
10645
|
+
line_id: string;
|
|
10646
|
+
/** @description The stored hourly scores with `hour` at or after `since`, oldest first. At most 720 items. Empty when the line has no stored score in the window. */
|
|
10647
|
+
items: components["schemas"]["LineHealthScoreHistoryItem"][];
|
|
10648
|
+
};
|
|
10649
|
+
/** @description The health score of a line for one clock hour. */
|
|
10650
|
+
LineHealthScoreHistoryItem: components["schemas"]["LineHealthScore"] & {
|
|
10651
|
+
/**
|
|
10652
|
+
* Format: date-time
|
|
10653
|
+
* @description The clock hour the score stands for, ISO 8601 UTC, on the hour. `computed_at` says when the score was computed.
|
|
10654
|
+
* @example 2026-11-14T10:00:00.000Z
|
|
10655
|
+
*/
|
|
10656
|
+
hour: string;
|
|
10657
|
+
};
|
|
10658
|
+
LineHealthReportEnvelope: {
|
|
10659
|
+
/**
|
|
10660
|
+
* @description Always `true` on a success response.
|
|
10661
|
+
* @enum {boolean}
|
|
10662
|
+
*/
|
|
10663
|
+
success: true;
|
|
10664
|
+
data: components["schemas"]["LineHealthReport"];
|
|
10665
|
+
/** @description Trace id of the request that produced this response: 32 lowercase hexadecimal characters. Quote it when you report a problem to iSnap. */
|
|
10666
|
+
trace_id: string;
|
|
10667
|
+
/** @description Id of the request that produced this response: `req_` followed by 25 letters or digits. */
|
|
10668
|
+
request_id: string;
|
|
10669
|
+
};
|
|
10670
|
+
/** @description Why the latest health score of a line is what it is, and what to do about it. */
|
|
10671
|
+
LineHealthReport: {
|
|
10672
|
+
/** @description Id of a line: `line_` followed by 25 letters or digits. */
|
|
10673
|
+
line_id: string;
|
|
10674
|
+
/** @description The version of the scoring that produced the stored score. `null` when the line has no stored score yet. */
|
|
10675
|
+
version: number | null;
|
|
10676
|
+
/** @description When the stored score was computed (ISO 8601, UTC). `null` when the line has no stored score yet. */
|
|
10677
|
+
computed_at: string | null;
|
|
10678
|
+
/** @description The score, from 0 (no risk observed) to 100 (most at risk): a higher number is worse. `null` when `band` is `unknown`. */
|
|
10679
|
+
score: number | null;
|
|
10680
|
+
/**
|
|
10681
|
+
* @description `low` (0 to 29): no action needed. `medium` (30 to 59): worth watching. `high` (60 to 100): the line is at risk. `unknown`: not enough traffic to judge.
|
|
10682
|
+
* @enum {string}
|
|
10683
|
+
*/
|
|
10684
|
+
band: "low" | "medium" | "high" | "unknown";
|
|
10685
|
+
/** @description One sentence that reads the band. */
|
|
10686
|
+
summary: string;
|
|
10687
|
+
/** @description The factors that add the most risk, largest first, at most 3, each with what to do. Empty when `band` is `unknown` or when no factor adds risk. */
|
|
10688
|
+
items: components["schemas"]["LineHealthReportItem"][];
|
|
10689
|
+
};
|
|
10690
|
+
LineHealthReportItem: {
|
|
10691
|
+
/**
|
|
10692
|
+
* @description The factor that adds risk. An open list: ignore the values you do not know. `delivery_outcome`: sends that fail. `first_contact_reply_rate`: few first messages get a reply. `reply_rate_drop`: the reply rate fell below its earlier level. `inbound_outbound_balance`: few messages received for the messages sent. `burstiness`: sends are not spread like the activity of the line. `quota_headroom`: the sending limits are almost used. `apple_id_flag`: the Apple ID of the line is flagged. `suspected_dead`, `phone_drift`, `private_api_attention`, `open_incidents` and `line_proof`: device factors, listed on a BYOD line only.
|
|
10693
|
+
* @enum {string}
|
|
10694
|
+
*/
|
|
10695
|
+
factor_id: "delivery_outcome" | "first_contact_reply_rate" | "reply_rate_drop" | "inbound_outbound_balance" | "burstiness" | "quota_headroom" | "apple_id_flag" | "suspected_dead" | "phone_drift" | "private_api_attention" | "open_incidents" | "line_proof";
|
|
10696
|
+
/** @description What the factor means for this line, in a sentence. */
|
|
10697
|
+
explanation: string;
|
|
10698
|
+
/** @description What to do about it. On a line that is not a BYOD line, a factor that iSnap resolves says so. */
|
|
10699
|
+
action: string;
|
|
10700
|
+
};
|
|
9534
10701
|
LineConfigEnvelope: {
|
|
9535
10702
|
/**
|
|
9536
10703
|
* @description Always `true` on a success response.
|
|
@@ -9590,6 +10757,8 @@ export interface components {
|
|
|
9590
10757
|
reply_max_per_inbound: number;
|
|
9591
10758
|
/** @description Reply-lane allowance: the number of replies per rolling 24 hours that can pass a sending limit through the reply lane. 0 means the reply lane is off. */
|
|
9592
10759
|
daily_reply_limit: number;
|
|
10760
|
+
/** @description Priority allowance: the number of messages sent with `priority: true` per rolling 24 hours that can pass the hourly limit. It is part of `daily_total_message_limit`, not added to it. 0 means priority is off. */
|
|
10761
|
+
daily_priority_limit: number;
|
|
9593
10762
|
/** @description IANA time zone of the line. Without an override, iSnap derives it from the North American area code of the line, else from its country when that country has a single time zone; otherwise it is `Europe/London` for a `+44` number and `America/Chicago` for any other number. */
|
|
9594
10763
|
timezone: string;
|
|
9595
10764
|
/** @description The sending hours in force on the line, as a list of hours with a weight: the override of the line where it has one, `default_activity_curve` otherwise. Never empty. An hour with weight 0, or with no entry, is a quiet hour. */
|
|
@@ -9600,7 +10769,7 @@ export interface components {
|
|
|
9600
10769
|
weight: number;
|
|
9601
10770
|
}[];
|
|
9602
10771
|
};
|
|
9603
|
-
/** @description The
|
|
10772
|
+
/** @description The nine limits that have a default and bounds: the five message limits, the three reply limits and the priority limit. Each has its value in force, its default and its bounds `min` and `max`. A value above `default` is accepted only for the five message limits of a BYOD line, up to `max`. */
|
|
9604
10773
|
LineConfigKnobs: {
|
|
9605
10774
|
daily_new_contact_limit: components["schemas"]["LineConfigKnobBounds"];
|
|
9606
10775
|
daily_known_contact_limit: components["schemas"]["LineConfigKnobBounds"];
|
|
@@ -9610,6 +10779,7 @@ export interface components {
|
|
|
9610
10779
|
reply_window_hours: components["schemas"]["LineConfigKnobBounds"];
|
|
9611
10780
|
reply_max_per_inbound: components["schemas"]["LineConfigKnobBounds"];
|
|
9612
10781
|
daily_reply_limit: components["schemas"]["LineConfigKnobBounds"];
|
|
10782
|
+
daily_priority_limit: components["schemas"]["LineConfigKnobBounds"];
|
|
9613
10783
|
};
|
|
9614
10784
|
/** @description One limit of the line: the value in force, its default, and its bounds. A value above the default is accepted only for the five message limits of a BYOD line. */
|
|
9615
10785
|
LineConfigKnobBounds: {
|
|
@@ -9619,7 +10789,7 @@ export interface components {
|
|
|
9619
10789
|
default: number;
|
|
9620
10790
|
/** @description The smallest value the API accepts for this key. */
|
|
9621
10791
|
min: number;
|
|
9622
|
-
/** @description The upper bound of this key. A value above `default` is accepted, up to `max`, only on a BYOD line and only for `daily_new_contact_limit`, `daily_known_contact_limit`, `daily_total_message_limit`, `hourly_message_limit` and `minute_message_limit`. On any other line, and for the three reply limits on every line, a value above `default` returns `403 cannot_increase_limit`. A value above `max` is refused first, on every line, with `422 limit_out_of_bounds` or `400 validation_failed`. */
|
|
10792
|
+
/** @description The upper bound of this key. A value above `default` is accepted, up to `max`, only on a BYOD line and only for `daily_new_contact_limit`, `daily_known_contact_limit`, `daily_total_message_limit`, `hourly_message_limit` and `minute_message_limit`. On any other line, and for the three reply limits and `daily_priority_limit` on every line, a value above `default` returns `403 cannot_increase_limit`. A value above `max` is refused first, on every line, with `422 limit_out_of_bounds` or `400 validation_failed`. */
|
|
9623
10793
|
max: number;
|
|
9624
10794
|
};
|
|
9625
10795
|
/** @description The keys to override on this line. Send a key with its default value to remove its override. `null` and unknown keys return `400 validation_failed`. */
|
|
@@ -9653,6 +10823,8 @@ export interface components {
|
|
|
9653
10823
|
reply_max_per_inbound?: number;
|
|
9654
10824
|
/** @description Reply-lane allowance: the number of replies per rolling 24 hours that can pass a sending limit through the reply lane. 0 turns the reply lane off. Accepted values: 0 to 1,000. It can only be lowered below the default (`403 cannot_increase_limit`). */
|
|
9655
10825
|
daily_reply_limit?: number;
|
|
10826
|
+
/** @description Priority allowance: the number of messages sent with `priority: true` per rolling 24 hours that can pass the hourly limit. It is part of `daily_total_message_limit`, not added to it. 0 turns priority off. Accepted values: 0 to 50. It can only be lowered below the default (`403 cannot_increase_limit`), on a BYOD line too. */
|
|
10827
|
+
daily_priority_limit?: number;
|
|
9656
10828
|
/** @description IANA time zone name of the line, for example `America/New_York` (`400 validation_failed` otherwise). iSnap reads quiet hours in it for a recipient whose own time zone it does not know. Once set, it can be replaced but not removed. */
|
|
9657
10829
|
timezone?: string;
|
|
9658
10830
|
/** @description The sending hours of the line, as a list of hours with a weight. An hour with weight 0, or with no entry, is a quiet hour: a message accepted then is held until the next hour that has a weight. Messages held by a 24-hour sending limit are placed in the hours in proportion to their weights. It needs at least one entry, no hour twice, and a total weight above 0 (`422 invalid_activity_curve` otherwise). A curve the same as `default_activity_curve` (returned by `GET /v1/lines/{id}/config`) removes the override instead of setting one. Two curves are the same when every hour from 0 to 23 has the same weight in both, an hour with no entry counting as 0: the order of the entries does not matter, and a curve that lists only its weighted hours is the same as the 24-hour curve with 0 everywhere else. */
|
|
@@ -9700,6 +10872,8 @@ export interface components {
|
|
|
9700
10872
|
/** @description Estimated time of the hand-over of the line: the time the build starts plus 72 hours. Set once, when the build starts, and never revised. `null` while the pre-order is `draft` or `awaiting_payment`, and on a pre-order canceled before its build started. */
|
|
9701
10873
|
estimated_fulfillment: string | null;
|
|
9702
10874
|
device_status?: components["schemas"]["DeviceFulfillmentStatus"];
|
|
10875
|
+
/** @description The four build steps of the pre-order, always in the order `number_secured`, `phone_prepared`, `account_prepared`, `connected`, each with the time it was completed or `null` until it is done. Present on every pre-order response. A `draft`, an `awaiting_payment` and a `cancelled` pre-order show four steps with `completed_at: null`. */
|
|
10876
|
+
progress?: components["schemas"]["PreOrderProgressStep"][];
|
|
9703
10877
|
/** @description Timestamp of creation, ISO 8601 in UTC. */
|
|
9704
10878
|
created_at: string;
|
|
9705
10879
|
/** @description Timestamp of the last change of the pre-order, ISO 8601 in UTC. */
|
|
@@ -9724,6 +10898,16 @@ export interface components {
|
|
|
9724
10898
|
* @enum {string|null}
|
|
9725
10899
|
*/
|
|
9726
10900
|
DeviceFulfillmentStatus: "awaiting_hardware" | "received" | "setup_in_progress" | "ready" | "deployed" | null;
|
|
10901
|
+
/** @description One build step of a pre-order and the time it was completed. */
|
|
10902
|
+
PreOrderProgressStep: {
|
|
10903
|
+
/**
|
|
10904
|
+
* @description The step: `number_secured` (the number of the line is secured), `phone_prepared` (the phone of the line is prepared), `account_prepared` (the accounts the line needs are prepared) or `connected` (the line is connected and handed over).
|
|
10905
|
+
* @enum {string}
|
|
10906
|
+
*/
|
|
10907
|
+
step: "number_secured" | "phone_prepared" | "account_prepared" | "connected";
|
|
10908
|
+
/** @description When the step was completed, ISO 8601 in UTC. `null` until the step is done. */
|
|
10909
|
+
completed_at: string | null;
|
|
10910
|
+
};
|
|
9727
10911
|
PreOrderList: {
|
|
9728
10912
|
/**
|
|
9729
10913
|
* @description Always `true` on a success response.
|
|
@@ -10160,6 +11344,8 @@ export interface components {
|
|
|
10160
11344
|
schedule_reason: string | null;
|
|
10161
11345
|
/** @description `true` when the message is in the reply lane: it answers a contact who wrote to the line in the last 24 hours, within the limits of the reply lane. Such a message is not held by the hourly limit, by the three 24-hour limits or by quiet hours. Set when the message is accepted. A held message enters the reply lane when its contact writes to the line while it waits, whatever held it, oldest first and within the same limits: the value then changes from `false` to `true`, once and never back, and the message is released without waiting for its `scheduled_for`, still after the earlier messages to the same recipient and within the per-minute limit and the spacing of the line. */
|
|
10162
11346
|
reply_lane: boolean;
|
|
11347
|
+
/** @description `true` when the message was sent with `priority: true`, the priority reserve of the line is on (`daily_priority_limit` above 0) and the reply lane does not carry the message. Such a message is not held by the hourly limit while the reserve has room, and a held one leaves before the messages that are not priority. `false` otherwise, on an inbound message and on a message typed on the device of the line. Set when the message is accepted. A held message that enters the reply lane while it waits changes from `true` to `false`, once and never back. */
|
|
11348
|
+
priority: boolean;
|
|
10163
11349
|
/** @description `true` when the message was sent with `ignore_quiet_hours: true` on a line that is not a shared line: quiet hours do not hold it. `false` otherwise, on a shared line, on an inbound message and on a message typed on the device of the line. Set when the message is accepted and never changed after that. */
|
|
10164
11350
|
ignore_quiet_hours: boolean;
|
|
10165
11351
|
/** @description `true` when the message was sent with `cancel_on_reply: true`: iSnap cancels it if its recipient writes to the line before the message is with the line's device. `false` otherwise, on an inbound message and on a message typed on the device of the line. Set when the message is accepted and never changed after that. */
|
|
@@ -10215,7 +11401,7 @@ export interface components {
|
|
|
10215
11401
|
read_at: string | null;
|
|
10216
11402
|
/** @description When the message became `failed`. `null` otherwise. When the device of an iMessage line reports a failure after `sent`, `failed_at` holds the time of the send, not the time of the failure. */
|
|
10217
11403
|
failed_at: string | null;
|
|
10218
|
-
/** @description `null` unless the message is `failed`. When iSnap failed the message itself: `carrier_unavailable` (the message waited 48 hours without reaching a device), `no_terminal_ack` (the line's device took the message and never reported an outcome)
|
|
11404
|
+
/** @description `null` unless the message is `failed`. When iSnap failed the message itself: `carrier_unavailable` (the message waited 48 hours without reaching a device), `no_terminal_ack` (the line's device took the message and never reported an outcome), `carrier_terminated` (the line was terminated while the message was waiting) or `line_offline_stale` (the line stopped reporting and the message waited too long to be sent). `null` when the line's device reported the failure: read `error_message`. */
|
|
10219
11405
|
error_code: string | null;
|
|
10220
11406
|
/** @description `null` unless the message is `failed`. A text that describes the failure. When the line's device reported the failure, it is the text the device gave, or `null` when it gave none. */
|
|
10221
11407
|
error_message: string | null;
|
|
@@ -10395,7 +11581,7 @@ export interface components {
|
|
|
10395
11581
|
* @description An exact event type such as `message.received`, a family wildcard such as `line.*`, or `*` for every event. A wildcard for a family that does not exist is accepted and matches nothing. `webhook.test` is never delivered through an event filter: iSnap sends it only to a suspended webhook subscription, to check whether its URL responds again.
|
|
10396
11582
|
* @enum {string}
|
|
10397
11583
|
*/
|
|
10398
|
-
WebhookEventName: "message.queued" | "message.sent" | "message.delivered" | "message.read" | "message.failed" | "message.received" | "message.scheduled" | "message.cancelled" | "message.fallback_triggered" | "reaction.added" | "reaction.received" | "reaction.removed" | "line.connected" | "line.disconnected" | "line.offline" | "line.degraded" | "line.apple_id_flagged" | "line.quota_warning" | "line.quota_exceeded" | "line.capability_changed" | "line.terminated" | "line.variant_changed" | "line.variant_scheduled" | "line.variant_unscheduled" | "typing_indicator.started" | "typing_indicator.stopped" | "trial.linked" | "trial.dormant" | "trial.reactivated" | "trial.bind_conflict" | "trial.revoked" | "binding.released" | "pre_order.fulfilled" | "pre_order.cancelled" | "macos_session.rented" | "macos_session.released" | "webhook.test" | "*" | "message.*" | "reaction.*" | "line.*" | "typing_indicator.*" | "trial.*" | "binding.*" | "pre_order.*" | "macos_session.*" | "webhook.*";
|
|
11584
|
+
WebhookEventName: "message.queued" | "message.sent" | "message.delivered" | "message.read" | "message.failed" | "message.received" | "message.scheduled" | "message.cancelled" | "message.fallback_triggered" | "reaction.added" | "reaction.received" | "reaction.removed" | "line.connected" | "line.disconnected" | "line.offline" | "line.degraded" | "line.apple_id_flagged" | "line.quota_warning" | "line.quota_exceeded" | "line.capability_changed" | "line.terminated" | "line.variant_changed" | "line.variant_scheduled" | "line.variant_unscheduled" | "line.phone_number_changed" | "typing_indicator.started" | "typing_indicator.stopped" | "trial.linked" | "trial.dormant" | "trial.reactivated" | "trial.bind_conflict" | "trial.revoked" | "binding.released" | "pre_order.fulfilled" | "pre_order.cancelled" | "macos_session.rented" | "macos_session.released" | "webhook.test" | "*" | "message.*" | "reaction.*" | "line.*" | "typing_indicator.*" | "trial.*" | "binding.*" | "pre_order.*" | "macos_session.*" | "webhook.*";
|
|
10399
11585
|
/** @description The webhook subscriptions of the account. */
|
|
10400
11586
|
WebhookList: {
|
|
10401
11587
|
/** @description Every webhook subscription of the account, newest first. */
|
|
@@ -10811,11 +11997,36 @@ export interface components {
|
|
|
10811
11997
|
message_count: number;
|
|
10812
11998
|
/** @description Number of inbound messages received in the chat since it was created. Marking the chat as read does not reset it. */
|
|
10813
11999
|
unread_count: number;
|
|
12000
|
+
health: components["schemas"]["ChatHealth"];
|
|
10814
12001
|
/** @description When iSnap created the chat: at the first message in either direction. */
|
|
10815
12002
|
created_at: string;
|
|
10816
12003
|
/** @description When the chat last changed. */
|
|
10817
12004
|
updated_at: string;
|
|
10818
12005
|
};
|
|
12006
|
+
/** @description The health of the chat. `null` on a group (`is_group` is `true`) and on a chat of a trial line. */
|
|
12007
|
+
ChatHealth: {
|
|
12008
|
+
/**
|
|
12009
|
+
* @description `opted_out` when the contact sent a stop keyword, whatever the streak. Otherwise `critical` from 4 consecutive messages you sent with no reply, `at_risk` from 2, and `healthy` below that.
|
|
12010
|
+
* @enum {string}
|
|
12011
|
+
*/
|
|
12012
|
+
status: "healthy" | "at_risk" | "critical" | "opted_out";
|
|
12013
|
+
/**
|
|
12014
|
+
* @description `opt_out_keyword` on `opted_out`, `no_reply_streak` on `at_risk` and `critical`, `null` on `healthy`.
|
|
12015
|
+
* @enum {string|null}
|
|
12016
|
+
*/
|
|
12017
|
+
reason: "opt_out_keyword" | "no_reply_streak" | null;
|
|
12018
|
+
/**
|
|
12019
|
+
* @description The version of the rule that produced the status. Always `chat-health/1`.
|
|
12020
|
+
* @enum {string}
|
|
12021
|
+
*/
|
|
12022
|
+
rule: "chat-health/1";
|
|
12023
|
+
/** @description Number of consecutive messages sent in the chat since the last message received from the contact. 0 when the contact wrote last. */
|
|
12024
|
+
unanswered_outbound: number;
|
|
12025
|
+
/** @description Time of the last message received from the contact, as an ISO 8601 timestamp. `null` when none was recorded. */
|
|
12026
|
+
last_inbound_at: string | null;
|
|
12027
|
+
/** @description Time of the last message sent to the contact, as an ISO 8601 timestamp. `null` when none was recorded. */
|
|
12028
|
+
last_outbound_at: string | null;
|
|
12029
|
+
} | null;
|
|
10819
12030
|
ChatEnvelope: {
|
|
10820
12031
|
/**
|
|
10821
12032
|
* @description Always `true` on a success response.
|
|
@@ -11311,6 +12522,266 @@ export interface components {
|
|
|
11311
12522
|
*/
|
|
11312
12523
|
available: boolean;
|
|
11313
12524
|
};
|
|
12525
|
+
FleetHealthEnvelope: {
|
|
12526
|
+
/**
|
|
12527
|
+
* @description Always `true` on a success response.
|
|
12528
|
+
* @enum {boolean}
|
|
12529
|
+
*/
|
|
12530
|
+
success: true;
|
|
12531
|
+
data: components["schemas"]["FleetHealthReport"];
|
|
12532
|
+
/** @description Trace id of the request that produced this response: 32 lowercase hexadecimal characters. Quote it when you report a problem to iSnap. */
|
|
12533
|
+
trace_id: string;
|
|
12534
|
+
/** @description Id of the request that produced this response: `req_` followed by 25 letters or digits. */
|
|
12535
|
+
request_id: string;
|
|
12536
|
+
};
|
|
12537
|
+
/** @description The two-way rate of the iSnap fleet on one UTC day, as figures with no line, number or customer in them. */
|
|
12538
|
+
FleetHealthReport: {
|
|
12539
|
+
/**
|
|
12540
|
+
* @description The definition this report follows.
|
|
12541
|
+
* @example two-way-rate/1
|
|
12542
|
+
* @enum {string}
|
|
12543
|
+
*/
|
|
12544
|
+
standard: "two-way-rate/1";
|
|
12545
|
+
/**
|
|
12546
|
+
* @description The UTC day (`YYYY-MM-DD`) of the report. `null` until the first report is published.
|
|
12547
|
+
* @example 2026-11-12
|
|
12548
|
+
*/
|
|
12549
|
+
as_of: string | null;
|
|
12550
|
+
/**
|
|
12551
|
+
* @description The length of the window the rates cover, in days.
|
|
12552
|
+
* @example 30
|
|
12553
|
+
*/
|
|
12554
|
+
window_days: number;
|
|
12555
|
+
/**
|
|
12556
|
+
* @description The days of the window the figures cover. From 0 to `window_days`.
|
|
12557
|
+
* @example 30
|
|
12558
|
+
*/
|
|
12559
|
+
coverage_days: number;
|
|
12560
|
+
/**
|
|
12561
|
+
* @description The fewest people a line must have contacted in the window to be rated.
|
|
12562
|
+
* @example 20
|
|
12563
|
+
*/
|
|
12564
|
+
min_contacted: number;
|
|
12565
|
+
/**
|
|
12566
|
+
* @description A rated line whose two-way rate is below this value counts as one-way.
|
|
12567
|
+
* @example 0.2
|
|
12568
|
+
*/
|
|
12569
|
+
one_way_below: number;
|
|
12570
|
+
/** @description The rated lines, in no meaningful order. */
|
|
12571
|
+
lines: components["schemas"]["FleetHealthLine"][];
|
|
12572
|
+
/**
|
|
12573
|
+
* @description The lines below `min_contacted`, not listed in `lines`.
|
|
12574
|
+
* @example 12
|
|
12575
|
+
*/
|
|
12576
|
+
unrated: number;
|
|
12577
|
+
/**
|
|
12578
|
+
* @description The lines left out of the fleet figures.
|
|
12579
|
+
* @example 3
|
|
12580
|
+
*/
|
|
12581
|
+
excluded: number;
|
|
12582
|
+
/**
|
|
12583
|
+
* @description The median two-way rate of the day, `null` when there is none.
|
|
12584
|
+
* @example 0.7
|
|
12585
|
+
*/
|
|
12586
|
+
daily_median: number | null;
|
|
12587
|
+
summary: components["schemas"]["FleetHealthSummary"];
|
|
12588
|
+
};
|
|
12589
|
+
/** @description One rated line of the fleet. A row names no line: it carries its kind and its counts only. */
|
|
12590
|
+
FleetHealthLine: {
|
|
12591
|
+
/**
|
|
12592
|
+
* @description The kind of line: `rented`, `byop` or `shared`.
|
|
12593
|
+
* @example rented
|
|
12594
|
+
* @enum {string}
|
|
12595
|
+
*/
|
|
12596
|
+
kind: "rented" | "byop" | "shared";
|
|
12597
|
+
/**
|
|
12598
|
+
* @description The people this line texted first in the window.
|
|
12599
|
+
* @example 42
|
|
12600
|
+
*/
|
|
12601
|
+
contacted: number;
|
|
12602
|
+
/**
|
|
12603
|
+
* @description The people among `contacted` who wrote back. At most `contacted`.
|
|
12604
|
+
* @example 30
|
|
12605
|
+
*/
|
|
12606
|
+
answered: number;
|
|
12607
|
+
/**
|
|
12608
|
+
* @description The messages this line sent in the window.
|
|
12609
|
+
* @example 310
|
|
12610
|
+
*/
|
|
12611
|
+
sent: number;
|
|
12612
|
+
/**
|
|
12613
|
+
* @description The messages this line received in the window.
|
|
12614
|
+
* @example 280
|
|
12615
|
+
*/
|
|
12616
|
+
received: number;
|
|
12617
|
+
};
|
|
12618
|
+
/** @description The figures of the whole rated fleet. */
|
|
12619
|
+
FleetHealthSummary: {
|
|
12620
|
+
/**
|
|
12621
|
+
* @description The number of rated lines: the length of `lines`.
|
|
12622
|
+
* @example 120
|
|
12623
|
+
*/
|
|
12624
|
+
rated: number;
|
|
12625
|
+
/**
|
|
12626
|
+
* @description The median two-way rate of the rated lines, `null` when no line is rated.
|
|
12627
|
+
* @example 0.71
|
|
12628
|
+
*/
|
|
12629
|
+
median: number | null;
|
|
12630
|
+
/**
|
|
12631
|
+
* @description The two-way rate below which the lowest tenth of the rated lines fall, `null` when no line is rated.
|
|
12632
|
+
* @example 0.34
|
|
12633
|
+
*/
|
|
12634
|
+
lowest_tenth: number | null;
|
|
12635
|
+
/**
|
|
12636
|
+
* @description The number of rated lines whose rate is below `one_way_below`.
|
|
12637
|
+
* @example 4
|
|
12638
|
+
*/
|
|
12639
|
+
one_way: number;
|
|
12640
|
+
/**
|
|
12641
|
+
* @description The answers coming back per 100 contacts, `null` when no line is rated.
|
|
12642
|
+
* @example 68.5
|
|
12643
|
+
*/
|
|
12644
|
+
back_per_100: number | null;
|
|
12645
|
+
};
|
|
12646
|
+
PoolEnvelope: {
|
|
12647
|
+
/**
|
|
12648
|
+
* @description Always `true` on a success response.
|
|
12649
|
+
* @enum {boolean}
|
|
12650
|
+
*/
|
|
12651
|
+
success: true;
|
|
12652
|
+
data: components["schemas"]["Pool"];
|
|
12653
|
+
/** @description Trace id of the request that produced this response: 32 lowercase hexadecimal characters. Quote it when you report a problem to iSnap. */
|
|
12654
|
+
trace_id: string;
|
|
12655
|
+
/** @description Id of the request that produced this response: `req_` followed by 25 letters or digits. */
|
|
12656
|
+
request_id: string;
|
|
12657
|
+
};
|
|
12658
|
+
/** @description A pool of the dedicated lines of an account. */
|
|
12659
|
+
Pool: {
|
|
12660
|
+
/**
|
|
12661
|
+
* @description Id of the pool: `pool_` followed by 25 letters or digits.
|
|
12662
|
+
* @example pool_7Kd2Nq8Rb4Xw1Ty6Ue9Ao3Ph5
|
|
12663
|
+
*/
|
|
12664
|
+
id: string;
|
|
12665
|
+
/**
|
|
12666
|
+
* @description Name of the pool.
|
|
12667
|
+
* @example Sales
|
|
12668
|
+
*/
|
|
12669
|
+
name: string;
|
|
12670
|
+
/**
|
|
12671
|
+
* @description Strategy of the pool.
|
|
12672
|
+
* @enum {string}
|
|
12673
|
+
*/
|
|
12674
|
+
strategy: "quota";
|
|
12675
|
+
/** @description The direction rule shared by every member: `true` for inbound lines, `false` for outbound lines. A pool never mixes the two. `null` while the pool has no member. */
|
|
12676
|
+
inbound_only: boolean | null;
|
|
12677
|
+
/** @description Ids of the member lines, oldest member first. */
|
|
12678
|
+
line_ids: string[];
|
|
12679
|
+
/**
|
|
12680
|
+
* Format: date-time
|
|
12681
|
+
* @description When the pool was created.
|
|
12682
|
+
*/
|
|
12683
|
+
created_at: string;
|
|
12684
|
+
/**
|
|
12685
|
+
* Format: date-time
|
|
12686
|
+
* @description When the pool was last changed.
|
|
12687
|
+
*/
|
|
12688
|
+
updated_at: string;
|
|
12689
|
+
};
|
|
12690
|
+
/** @description A pool to create. */
|
|
12691
|
+
CreatePool: {
|
|
12692
|
+
/**
|
|
12693
|
+
* @description Name of the pool, 1 to 80 characters once trimmed. Two pools of one account never share a name.
|
|
12694
|
+
* @example Sales
|
|
12695
|
+
*/
|
|
12696
|
+
name: string;
|
|
12697
|
+
/** @description Lines to put in the pool, at most 100, each one a dedicated line of the account that is in no pool. Optional: without it the pool is created empty. A key limited to lines must send it, with lines from its own list. */
|
|
12698
|
+
line_ids?: string[];
|
|
12699
|
+
/**
|
|
12700
|
+
* @description How a send addressed to the pool picks a member line. `quota` is the only value accepted today: any other value returns `400 validation_failed` and nothing is stored.
|
|
12701
|
+
* @enum {string}
|
|
12702
|
+
*/
|
|
12703
|
+
strategy?: "quota";
|
|
12704
|
+
};
|
|
12705
|
+
PoolListEnvelope: {
|
|
12706
|
+
/**
|
|
12707
|
+
* @description Always `true` on a success response.
|
|
12708
|
+
* @enum {boolean}
|
|
12709
|
+
*/
|
|
12710
|
+
success: true;
|
|
12711
|
+
data: components["schemas"]["PoolList"];
|
|
12712
|
+
/** @description Trace id of the request that produced this response: 32 lowercase hexadecimal characters. Quote it when you report a problem to iSnap. */
|
|
12713
|
+
trace_id: string;
|
|
12714
|
+
/** @description Id of the request that produced this response: `req_` followed by 25 letters or digits. */
|
|
12715
|
+
request_id: string;
|
|
12716
|
+
};
|
|
12717
|
+
/** @description The pools of the account, oldest first. */
|
|
12718
|
+
PoolList: {
|
|
12719
|
+
items: components["schemas"]["Pool"][];
|
|
12720
|
+
};
|
|
12721
|
+
PoolDetailEnvelope: {
|
|
12722
|
+
/**
|
|
12723
|
+
* @description Always `true` on a success response.
|
|
12724
|
+
* @enum {boolean}
|
|
12725
|
+
*/
|
|
12726
|
+
success: true;
|
|
12727
|
+
data: components["schemas"]["PoolDetail"];
|
|
12728
|
+
/** @description Trace id of the request that produced this response: 32 lowercase hexadecimal characters. Quote it when you report a problem to iSnap. */
|
|
12729
|
+
trace_id: string;
|
|
12730
|
+
/** @description Id of the request that produced this response: `req_` followed by 25 letters or digits. */
|
|
12731
|
+
request_id: string;
|
|
12732
|
+
};
|
|
12733
|
+
/** @description A pool with the state of each of its member lines. */
|
|
12734
|
+
PoolDetail: components["schemas"]["Pool"] & {
|
|
12735
|
+
/** @description The member lines, oldest member first, with the live state of each. */
|
|
12736
|
+
members: components["schemas"]["PoolMember"][];
|
|
12737
|
+
};
|
|
12738
|
+
/** @description A line of a pool, with its state and its remaining room for new contacts. */
|
|
12739
|
+
PoolMember: {
|
|
12740
|
+
/**
|
|
12741
|
+
* @description Id of a line: `line_` followed by 25 letters or digits.
|
|
12742
|
+
* @example line_8Zq2m3KpTn0vXw4yB6cD9eFgH
|
|
12743
|
+
*/
|
|
12744
|
+
line_id: string;
|
|
12745
|
+
/**
|
|
12746
|
+
* @description Number of the line. `null` while the line has no number yet.
|
|
12747
|
+
* @example +14155550100
|
|
12748
|
+
*/
|
|
12749
|
+
phone_number: string | null;
|
|
12750
|
+
/**
|
|
12751
|
+
* @description Status of the line, as `GET /v1/lines/{id}` returns it.
|
|
12752
|
+
* @example active
|
|
12753
|
+
*/
|
|
12754
|
+
status: string;
|
|
12755
|
+
/** @description `true` for an inbound line, which waits for a contact to write first and is then unrestricted; `false` for an outbound line. */
|
|
12756
|
+
inbound_only: boolean;
|
|
12757
|
+
/** @description New contacts the line may message in 24 hours, read from its effective limits. */
|
|
12758
|
+
daily_new_contact_limit: number;
|
|
12759
|
+
/** @description New contacts the line messaged in the last 24 hours. */
|
|
12760
|
+
daily_new_contacts_used: number;
|
|
12761
|
+
/** @description New contacts the line can still message today: the limit minus the contacts used, never below 0. */
|
|
12762
|
+
daily_new_contact_headroom: number;
|
|
12763
|
+
};
|
|
12764
|
+
/** @description The fields of a pool to change. */
|
|
12765
|
+
PatchPool: {
|
|
12766
|
+
/**
|
|
12767
|
+
* @description Name of the pool, 1 to 80 characters once trimmed. Two pools of one account never share a name.
|
|
12768
|
+
* @example Sales
|
|
12769
|
+
*/
|
|
12770
|
+
name?: string;
|
|
12771
|
+
/**
|
|
12772
|
+
* @description How a send addressed to the pool picks a member line. `quota` is the only value accepted today: any other value returns `400 validation_failed` and nothing is stored.
|
|
12773
|
+
* @enum {string}
|
|
12774
|
+
*/
|
|
12775
|
+
strategy?: "quota";
|
|
12776
|
+
};
|
|
12777
|
+
/** @description The line to add to the pool. */
|
|
12778
|
+
AddPoolMember: {
|
|
12779
|
+
/**
|
|
12780
|
+
* @description Id of a line: `line_` followed by 25 letters or digits.
|
|
12781
|
+
* @example line_8Zq2m3KpTn0vXw4yB6cD9eFgH
|
|
12782
|
+
*/
|
|
12783
|
+
line_id: string;
|
|
12784
|
+
};
|
|
11314
12785
|
/** @description The text was received by the sandbox number. */
|
|
11315
12786
|
SandboxInboundAccepted: {
|
|
11316
12787
|
/** @description Id of the received text, as the number reported it. */
|