{
  "components": {
    "examples": {},
    "headers": {},
    "parameters": {},
    "requestBodies": {},
    "responses": {},
    "schemas": {
      "Capacity": {
        "description": "What the organization holds in its open billing period, where it went, and what it may still spend.",
        "properties": {
          "capacity": {
            "description": "The operations of the period: what the plan, the packs and the adjustments give, and what was spent. One message received is one operation.",
            "properties": {
              "available": {
                "description": "The operations left in the period. Null when the volume is unlimited.",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "overage": {
                "description": "The messages received past what the period holds, billed as pay as you go within the spending cap.",
                "type": "integer"
              },
              "prepaid": {
                "description": "The operations the period holds, spent or not: the volume of the plan and the valid credits. Null when the volume is unlimited.",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "sources": {
                "description": "Each credit that has not expired, the one due first first. Overage billed as pay as you go is never a source.",
                "items": {
                  "properties": {
                    "expiresOn": {
                      "description": "The first day the credit no longer counts (YYYY-MM-DD, UTC).",
                      "format": "date",
                      "type": "string"
                    },
                    "frozen": {
                      "description": "True when the end of the subscription holds the credit: it counts again when the subscription resumes.",
                      "type": "boolean"
                    },
                    "operations": {
                      "description": "The operations the credit holds. Negative for an adjustment that takes operations back.",
                      "type": "integer"
                    },
                    "origin": {
                      "description": "plan_grant: the volume of the plan for the open period; pack: a pack bought; adjustment: operations granted or taken back.",
                      "enum": [
                        "plan_grant",
                        "pack",
                        "adjustment"
                      ],
                      "type": "string"
                    },
                    "remaining": {
                      "description": "The operations left: operations minus used. A frozen credit keeps them.",
                      "type": "integer"
                    },
                    "used": {
                      "description": "The operations already drawn from the credit.",
                      "type": "integer"
                    }
                  },
                  "required": [
                    "origin",
                    "operations",
                    "used",
                    "remaining",
                    "expiresOn",
                    "frozen"
                  ],
                  "type": "object"
                },
                "type": "array"
              },
              "used": {
                "description": "The operations of the period drawn on what it holds.",
                "type": "integer"
              }
            },
            "required": [
              "prepaid",
              "used",
              "available",
              "overage",
              "sources"
            ],
            "type": "object"
          },
          "held": {
            "description": "True while no subscription runs, cut for non-payment or ended: the packs are held, not lost, and count again when a subscription resumes.",
            "type": "boolean"
          },
          "outcomes": {
            "description": "How the messages of the period ended. A refused message names its cause, so a gap in a flow can be explained.",
            "properties": {
              "received": {
                "description": "The messages received and kept, the overage included. Each one is one operation.",
                "type": "integer"
              },
              "refusedCapacity": {
                "description": "Refused because the period held no more operations and the plan bills no overage (`PLAN_QUOTA_EXCEEDED`).",
                "type": "integer"
              },
              "refusedDailyWindow": {
                "description": "Refused by the daily limit of the overage, which keeps one day from spending the whole cap; it clears the next day (`DAILY_SPIKE_CAP`).",
                "type": "integer"
              },
              "refusedInboxCeiling": {
                "description": "Refused by a ceiling set on an inbox or on a workspace (`INBOX_QUOTA_EXCEEDED`, `WORKSPACE_QUOTA_EXCEEDED`).",
                "type": "integer"
              },
              "refusedOverageCap": {
                "description": "Refused at the spending cap (`OVERAGE_CAP_REACHED`).",
                "type": "integer"
              },
              "refusedSuspended": {
                "description": "Refused because the account is cut for an unpaid subscription (`SUBSCRIPTION_SUSPENDED`).",
                "type": "integer"
              }
            },
            "required": [
              "received",
              "refusedCapacity",
              "refusedOverageCap",
              "refusedDailyWindow",
              "refusedInboxCeiling",
              "refusedSuspended"
            ],
            "type": "object"
          },
          "payments": {
            "description": "What can be bought to hold more. A pack is bought in the Facteur app, never with a key.",
            "properties": {
              "packs": {
                "description": "The packs of operations on sale, the smallest first.",
                "items": {
                  "properties": {
                    "priceMinor": {
                      "description": "In cents without tax: the price of the pack.",
                      "type": "integer"
                    },
                    "size": {
                      "description": "The operations the pack gives.",
                      "type": "integer"
                    }
                  },
                  "required": [
                    "size",
                    "priceMinor"
                  ],
                  "type": "object"
                },
                "type": "array"
              }
            },
            "required": [
              "packs"
            ],
            "type": "object"
          },
          "period": {
            "description": "The billing period now open. It runs from one anniversary of the subscription to the next, so it is not the calendar month unless the account was opened on the first.",
            "properties": {
              "dayOfPeriod": {
                "description": "The day of the period today is, 1 on its first day.",
                "type": "integer"
              },
              "endsOn": {
                "description": "The day the next period opens and the volume of the plan starts again (YYYY-MM-DD, UTC).",
                "format": "date",
                "type": "string"
              },
              "key": {
                "description": "The first day of the period, which names it (YYYY-MM-DD, UTC).",
                "format": "date",
                "type": "string"
              },
              "lengthDays": {
                "description": "The days of the period.",
                "type": "integer"
              }
            },
            "required": [
              "key",
              "endsOn",
              "lengthDays",
              "dayOfPeriod"
            ],
            "type": "object"
          },
          "projection": {
            "description": "When the operations of the period run out at the current pace: the figure the consumption screen and the alert both read.",
            "properties": {
              "exhaustsOn": {
                "description": "The day (YYYY-MM-DD, UTC) the capacity runs out at the current pace, or null when there is nothing honest to say: under three days observed, nothing consumed, no capacity, a capacity already spent, or a date past the period.",
                "format": "date",
                "type": [
                  "string",
                  "null"
                ]
              },
              "headroomDays": {
                "description": "The days of the period left once the capacity is gone, or null without a projection.",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "perDay": {
                "description": "The operations used per day observed so far, or null under three days observed or when nothing was used.",
                "type": [
                  "integer",
                  "null"
                ]
              }
            },
            "required": [
              "exhaustsOn",
              "headroomDays",
              "perDay"
            ],
            "type": "object"
          },
          "spendCap": {
            "description": "What the organization allows itself to be billed past what the period holds, in cents without tax. Null on a plan with no pay as you go, where a message past the capacity is refused.",
            "properties": {
              "bridled": {
                "description": "True until the first payment has cleared: the ceiling is then the default.",
                "type": "boolean"
              },
              "ceilingMinor": {
                "description": "The highest cap that may be set.",
                "type": "integer"
              },
              "defaultMinor": {
                "description": "The cap that applies when none was set.",
                "type": "integer"
              },
              "setMinor": {
                "description": "The cap that was set, or null when the cap follows the capacity. Zero is not null: zero refuses any overage.",
                "type": [
                  "integer",
                  "null"
                ]
              }
            },
            "required": [
              "setMinor",
              "defaultMinor",
              "ceilingMinor",
              "bridled"
            ],
            "type": [
              "object",
              "null"
            ]
          }
        },
        "type": "object"
      },
      "Extractor": {
        "description": "A pointer saved on an inbox: a pattern, the part of the message it reads, and the key its value is written under.",
        "properties": {
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "key": {
            "description": "The name of the value in `extract` of a message. Unique in the inbox.",
            "type": "string"
          },
          "label": {
            "description": "What the editor shows for the extractor: what was given at creation, the key when nothing was. 80 characters at most.",
            "type": "string"
          },
          "pattern": {
            "description": "A regular expression of the engine of the ingester (RE2).",
            "type": "string"
          },
          "scope": {
            "description": "The part of the message the pattern reads.",
            "enum": [
              "text",
              "html",
              "subject"
            ],
            "type": "string"
          }
        },
        "type": "object"
      },
      "Extractor.CreateExtractorRequest": {
        "description": "A pointer saved on an inbox: a pattern, the part of the message it reads, and the key its value is written under.",
        "properties": {
          "key": {
            "description": "The name of the value in `extract` of a message: a letter, then letters, digits or underscores, 40 characters at most. Unique in the inbox; blanks around it are removed.",
            "example": "code",
            "pattern": "^[a-zA-Z][a-zA-Z0-9_]{0,39}$",
            "type": "string"
          },
          "label": {
            "description": "What the editor shows for the extractor, 80 characters at most. Absent, null or empty, it is the key. Blanks around it are removed.",
            "maxLength": 80,
            "type": [
              "string",
              "null"
            ]
          },
          "pattern": {
            "description": "A regular expression of the engine of the ingester (RE2: no lookahead, no backreference), 512 characters at most. The value is the first non-empty group, else the whole match. It is compiled by the engine before it is saved.",
            "example": "code (\\d+)",
            "maxLength": 512,
            "type": "string"
          },
          "scope": {
            "description": "The part of the message the pattern reads: `text` when absent. Any other word is refused.",
            "enum": [
              "text",
              "html",
              "subject"
            ],
            "example": "subject",
            "type": "string"
          }
        },
        "type": "object"
      },
      "ExtractorSuggestions": {
        "description": "The patterns the engine proposes for a selection.",
        "properties": {
          "candidates": {
            "description": "At most five, the exact ones first. `kind` names the strategy (`shape`, `context`, `context-strict`, `loose`, `literal`), `rationale` says it in words, `captured` is what the pattern captures on the source, and `exact` is true when that is the selection and nothing else.",
            "items": {
              "properties": {
                "captured": {
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                },
                "exact": {
                  "type": "boolean"
                },
                "kind": {
                  "type": "string"
                },
                "pattern": {
                  "type": "string"
                },
                "rationale": {
                  "type": "string"
                }
              },
              "required": [
                "kind",
                "rationale",
                "pattern",
                "captured",
                "exact"
              ],
              "type": "object"
            },
            "maxItems": 5,
            "type": "array"
          }
        },
        "type": "object"
      },
      "ExtractorSuggestions.SuggestExtractorsRequest": {
        "description": "The patterns the engine proposes for a selection.",
        "properties": {
          "offset": {
            "description": "Where the selection starts in the source, in bytes, to tell apart a value that appears several times. Absent when the caller does not know.",
            "example": 13,
            "type": "integer"
          },
          "selection": {
            "description": "The value selected in the source.",
            "example": "265279",
            "type": "string"
          },
          "source": {
            "description": "The part of the message the selection was made in. The engine reads 2 MB of it at most.",
            "example": "Your code is 265279.",
            "type": "string"
          }
        },
        "type": "object"
      },
      "ExtractorTrial": {
        "description": "What a pattern captured on the last messages of an inbox.",
        "properties": {
          "error": {
            "description": "The explanation of the engine, in plain words, when the pattern is not valid; null otherwise.",
            "type": [
              "string",
              "null"
            ]
          },
          "errorCode": {
            "description": "The cause of the refusal as a code, when the pattern is not valid, for a client that says it in its own language; null otherwise. `invalid` is a pattern the engine cannot compile for a reason with no code of its own: `error` holds its words.",
            "enum": [
              "lookahead",
              "lookbehind",
              "possessive",
              "atomic",
              "recursion",
              "conditional",
              "verb",
              "too_long",
              "control_character",
              "unclosed_group",
              "unmatched_group",
              "unclosed_class",
              "bad_escape",
              "invalid",
              null
            ],
            "type": [
              "string",
              "null"
            ]
          },
          "matchedMessages": {
            "description": "How many messages the pattern captured exactly once on.",
            "type": "integer"
          },
          "results": {
            "description": "One per message, newest first. More than one capture on a message is ambiguous: only the first is kept at reception.",
            "items": {
              "properties": {
                "captured": {
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                },
                "matchCount": {
                  "type": "integer"
                }
              },
              "required": [
                "captured",
                "matchCount"
              ],
              "type": "object"
            },
            "type": "array"
          },
          "totalMessages": {
            "description": "How many messages it was tried on: twenty at most.",
            "type": "integer"
          },
          "valid": {
            "description": "False when the engine cannot compile the pattern: then `error` says why and there is no result.",
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "ExtractorTrial.TryExtractorRequest": {
        "description": "What a pattern captured on the last messages of an inbox.",
        "properties": {
          "pattern": {
            "description": "The pattern to try, with the rules of a saved one.",
            "example": "code (\\d+)",
            "maxLength": 512,
            "type": "string"
          },
          "scope": {
            "description": "The part of the messages the pattern reads: `text` when absent.",
            "enum": [
              "text",
              "html",
              "subject"
            ],
            "example": "subject",
            "type": "string"
          }
        },
        "type": "object"
      },
      "Health": {
        "description": "Health probe of each host. Public: it needs no authentication.",
        "properties": {
          "status": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "HydraItemBaseSchema": {
        "properties": {
          "@context": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "additionalProperties": true,
                "properties": {
                  "@vocab": {
                    "type": "string"
                  },
                  "hydra": {
                    "enum": [
                      "http://www.w3.org/ns/hydra/core#"
                    ],
                    "type": "string"
                  }
                },
                "required": [
                  "@vocab",
                  "hydra"
                ],
                "type": "object"
              }
            ]
          },
          "@id": {
            "type": "string"
          },
          "@type": {
            "type": "string"
          }
        },
        "required": [
          "@id",
          "@type"
        ],
        "type": "object"
      },
      "Inbox": {
        "description": "An inbox: what a customer opens to receive mail or SMS, in a workspace.",
        "properties": {
          "channel": {
            "description": "What the inbox receives; it never changes.",
            "enum": [
              "email",
              "sms"
            ],
            "type": "string"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "description": {
            "description": "One line of free text; empty when there is none, never null.",
            "type": "string"
          },
          "domain": {
            "type": "string"
          },
          "extractorCount": {
            "description": "How many extractors the inbox has.",
            "type": "integer"
          },
          "id": {
            "description": "The identifier of the inbox, 8 characters of lower case letters and digits: the first label of its address, and the key of every route. It never changes.",
            "type": "string"
          },
          "lastMessageAt": {
            "format": "date-time",
            "type": "string"
          },
          "messageCount": {
            "description": "How many messages the inbox holds, whatever their status.",
            "type": "integer"
          },
          "messagesThisMonth": {
            "description": "What the inbox received on the UTC calendar month, read in the ledger: retention does not erode it, unlike `messageCount`.",
            "type": "integer"
          },
          "name": {
            "type": "string"
          },
          "performanceMode": {
            "description": "True when the inbox keeps no content and holds no retention: `retentionDays` then says nothing about what it keeps.",
            "type": "boolean"
          },
          "quota": {
            "description": "The ceilings the inbox sets on itself. Carried on every plan, including those that cannot set one: reading a ceiling is how a customer who left the plan finds the one they have to remove. The sum of the ceilings of an organization is never compared to its envelope.",
            "properties": {
              "daily": {
                "description": "The ceiling of a calendar day, in messages, or null when there is none.",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "monthly": {
                "description": "The monthly ceiling, or null when there is none.",
                "properties": {
                  "messages": {
                    "description": "The ceiling in messages, always the figure in force; null when it is a percentage of a plan that sells no envelope, which holds nothing back.",
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "percent": {
                    "description": "The share of the monthly envelope of the plan, from 1 to 100, when the ceiling was written that way; otherwise null.",
                    "type": [
                      "integer",
                      "null"
                    ]
                  }
                },
                "required": [
                  "percent",
                  "messages"
                ],
                "type": [
                  "object",
                  "null"
                ]
              },
              "onExceed": {
                "description": "What the ingester does when a ceiling is reached: refuse the message, or accept it and alert.",
                "enum": [
                  "reject",
                  "alert"
                ],
                "type": "string"
              }
            },
            "required": [
              "daily",
              "monthly",
              "onExceed"
            ],
            "type": "object"
          },
          "retentionDays": {
            "description": "How many days the messages are kept, from the plan the organization had when the inbox was opened.",
            "type": "integer"
          },
          "smsNumber": {
            "example": "+447700900123",
            "type": "string"
          },
          "tags": {
            "description": "At most 12 tags of at most 32 characters, de-duplicated without regard to case.",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "workspace": {
            "description": "The workspace the inbox lives in, so that a client holding an inbox can build its address without a second request.",
            "properties": {
              "name": {
                "type": "string"
              },
              "slug": {
                "type": "string"
              }
            },
            "required": [
              "slug",
              "name"
            ],
            "type": "object"
          }
        },
        "type": "object"
      },
      "Inbox.CreateInboxRequest": {
        "description": "An inbox: what a customer opens to receive mail or SMS, in a workspace.",
        "properties": {
          "channel": {
            "description": "What the inbox receives, `email` when absent. It never changes. An SMS inbox needs a plan that sells a number and has no address.",
            "enum": [
              "email",
              "sms"
            ],
            "type": "string"
          },
          "description": {
            "description": "One line of free text, at most 140 characters as a reader counts them, emoji included. Cleaned, and refused when it is too long, never cut. Absent or empty is no description.",
            "type": "string"
          },
          "name": {
            "description": "The name, at most 120 characters.",
            "example": "CI codes",
            "maxLength": 120,
            "type": "string"
          }
        },
        "type": "object"
      },
      "Inbox.UpdateInboxRequest.jsonMergePatch": {
        "description": "An inbox: what a customer opens to receive mail or SMS, in a workspace.",
        "properties": {
          "description": {
            "description": "The new description, at most 140 characters as a reader counts them; an empty one removes it.",
            "example": "Codes for the pipeline",
            "type": "string"
          },
          "name": {
            "description": "The new name, at most 120 characters.",
            "maxLength": 120,
            "type": "string"
          },
          "quota": {
            "description": "The ceilings: `daily` and `monthly` are a number of messages (`monthly` may be `{\"percent\": 1 to 100}` of the monthly envelope of the plan, the day may not), or null to remove them; `onExceed` is `reject` or `alert`. Setting a ceiling needs a plan that includes it; removing one never does.",
            "properties": {
              "daily": {
                "oneOf": [
                  {
                    "minimum": 1,
                    "type": "integer"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "monthly": {
                "oneOf": [
                  {
                    "minimum": 1,
                    "type": "integer"
                  },
                  {
                    "properties": {
                      "percent": {
                        "maximum": 100,
                        "minimum": 1,
                        "type": "integer"
                      }
                    },
                    "required": [
                      "percent"
                    ],
                    "type": "object"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "onExceed": {
                "enum": [
                  "reject",
                  "alert"
                ],
                "type": "string"
              }
            },
            "type": "object"
          },
          "tags": {
            "description": "The tags, which replace the current ones: at most 12 of at most 32 characters, de-duplicated without regard to case, the first spelling kept. An empty list clears them.",
            "items": {
              "maxLength": 32,
              "type": "string"
            },
            "maxItems": 12,
            "type": "array"
          },
          "workspace": {
            "description": "The address (`slug`) of the workspace to move the inbox to, one the caller reaches. The identifier and the address of the inbox do not change.",
            "type": "string"
          }
        },
        "type": "object"
      },
      "Message": {
        "description": "A message an inbox received, or the trace of one it refused.",
        "properties": {
          "attachments": {
            "description": "The real attachments of the message, kept or not, by name then identifier; an embedded image is not one (see `inlines`). Absent on a refused message. Download a kept one with `downloadAttachment`, by its identifier: the response never says where the bytes are.",
            "items": {
              "properties": {
                "checksum": {
                  "description": "`sha256:` then the sha256 of the decoded bytes, in hexadecimal.",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "contentType": {
                  "description": "The type the sender declared, which nothing checked against the bytes.",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "fileName": {
                  "description": "As the sender wrote it: data, never a path.",
                  "type": "string"
                },
                "id": {
                  "type": "string"
                },
                "reason": {
                  "description": "Why the bytes were not kept; only on an attachment that was not.",
                  "enum": [
                    "PERFORMANCE_MODE",
                    "TRIAL_INBOX",
                    "ATTACHMENT_TOO_LARGE",
                    "STORAGE_QUOTA_EXCEEDED"
                  ],
                  "type": "string"
                },
                "sizeBytes": {
                  "description": "Of the decoded bytes.",
                  "type": "integer"
                },
                "stored": {
                  "description": "Whether the bytes were kept, so whether there is something to download. It is `reason` being absent.",
                  "type": "boolean"
                }
              },
              "required": [
                "id",
                "fileName",
                "contentType",
                "sizeBytes",
                "checksum",
                "stored"
              ],
              "type": "object"
            },
            "type": "array"
          },
          "codes": {
            "description": "Every code the ingester found, the best candidate first. Absent on a refused message.",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "connection": {
            "description": "What the connection knew, in the read of one message and in a search of the public API: null when the ingester knew nothing, and each fact null when it did not know it, never an empty string. A refused message keeps it.",
            "properties": {
              "helo": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "remoteIp": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "tlsCipher": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "tlsVersion": {
                "description": "Named, such as `TLS 1.3`, never a number.",
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "remoteIp",
              "helo",
              "tlsVersion",
              "tlsCipher"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "deliveryMs": {
            "description": "How long the ingester took to accept it, in milliseconds.",
            "readOnly": true,
            "type": "integer"
          },
          "errorCode": {
            "description": "Why the message was refused; only on a `quota_exceeded` message, which carries nothing derived. One of PLAN_QUOTA_EXCEEDED, INBOX_QUOTA_EXCEEDED, WORKSPACE_QUOTA_EXCEEDED, OVERAGE_CAP_REACHED, DAILY_SPIKE_CAP, SUBSCRIPTION_SUSPENDED; a code a later version of the ingester writes is said as it is.",
            "type": "string"
          },
          "expiresAt": {
            "description": "When the retention of the plan removes the message, or null when it does not expire.",
            "format": "date-time",
            "readOnly": true,
            "type": [
              "string",
              "null"
            ]
          },
          "extract": {
            "additionalProperties": {
              "type": "string"
            },
            "description": "The values the extractors of the inbox found, by key. Absent on a refused message.",
            "type": "object"
          },
          "fromAddress": {
            "readOnly": true,
            "type": "string"
          },
          "fromName": {
            "description": "The display name of the sender, when the message gave one. Absent on a refused message.",
            "type": [
              "string",
              "null"
            ]
          },
          "headers": {
            "additionalProperties": {
              "type": "string"
            },
            "description": "The headers of the message, names in lower case; in the read of one message and in a search of the public API. Absent on a refused message.",
            "type": "object"
          },
          "htmlBody": {
            "description": "In the read of one message and in a search of the public API; absent from the list of an inbox and from the search of `app`. Absent on a refused message.",
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "readOnly": true,
            "type": "string"
          },
          "inbox": {
            "description": "The inbox that received it.",
            "readOnly": true,
            "type": "string"
          },
          "inlines": {
            "description": "The images embedded in the body, such as a signature logo: the parts the message declared `inline`. They are not attachments (never counted among them, never found by a search) and carry no link. Absent on a refused message.",
            "items": {
              "properties": {
                "contentId": {
                  "description": "What the `cid:` of the HTML body names.",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "contentType": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "fileName": {
                  "type": "string"
                },
                "id": {
                  "type": "string"
                },
                "sizeBytes": {
                  "type": "integer"
                }
              },
              "required": [
                "id",
                "contentId",
                "fileName",
                "contentType",
                "sizeBytes"
              ],
              "type": "object"
            },
            "type": "array"
          },
          "links": {
            "description": "The links of the message, in order of appearance, the HTML part first. Absent on a refused message.",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "otp": {
            "description": "The one-time code the ingester extracted, null when there is none. Absent on a refused message.",
            "type": [
              "string",
              "null"
            ]
          },
          "receivedAt": {
            "format": "date-time",
            "readOnly": true,
            "type": "string"
          },
          "sizeBytes": {
            "description": "The size of the message as received, in bytes; 0 on a message that was refused, whose content was not kept.",
            "readOnly": true,
            "type": "integer"
          },
          "status": {
            "description": "The state of the message. Read it before anything derived from the body.",
            "enum": [
              "received",
              "parsed",
              "quota_exceeded"
            ],
            "type": "string"
          },
          "subject": {
            "description": "Absent on a refused message; null when there is none.",
            "type": [
              "string",
              "null"
            ]
          },
          "textBody": {
            "description": "In the read of one message and in a search of the public API; absent from the list of an inbox and from the search of `app`. Absent on a refused message.",
            "type": [
              "string",
              "null"
            ]
          },
          "toAddress": {
            "readOnly": true,
            "type": "string"
          },
          "type": {
            "description": "The channel that carried it.",
            "enum": [
              "email",
              "sms"
            ],
            "readOnly": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "MessagePage": {
        "description": "A page of messages and the cursor of the next one.",
        "properties": {
          "messages": {
            "items": {
              "$ref": "#/components/schemas/Message"
            },
            "type": "array"
          },
          "nextCursor": {
            "description": "Send it back as `cursor` to read the next page; null on the last page.",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "type": "object"
      },
      "MessageSearchResult": {
        "description": "A page of messages found by a search, and the cursor of the next one.",
        "properties": {
          "messages": {
            "items": {
              "$ref": "#/components/schemas/Message"
            },
            "type": "array"
          },
          "nextCursor": {
            "description": "Send it back as `cursor` to read the next page; null on the last page.",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "type": "object"
      },
      "MessageSearchResult.SearchMessagesRequest": {
        "description": "A page of messages found by a search, and the cursor of the next one.",
        "properties": {
          "attachmentName": {
            "description": "A substring of the name of an attachment, without regard to case, over every real attachment of the message, kept or not (an inline image is not one). A text criterion: it joins `sentTo`, `sentFrom`, `subject`, `body` and `otp` in `all` or `any`.",
            "maxLength": 255,
            "type": "string"
          },
          "body": {
            "description": "A substring of the body, in its text part or its HTML part, without regard to case.",
            "maxLength": 255,
            "type": "string"
          },
          "cursor": {
            "description": "The `nextCursor` of the previous page.",
            "type": "string"
          },
          "hasAttachment": {
            "description": "Whether the message carries a real attachment (an inline image, such as a signature, is not one); `false` looks for the absence. A bound: it narrows in both modes, and alone it is a complete search.",
            "type": "boolean"
          },
          "hasOtp": {
            "description": "Whether the message carries a code (an empty one is not a code). A bound: it narrows in both modes, and alone it is a complete search.",
            "type": "boolean"
          },
          "inbox": {
            "description": "The identifier of an inbox. Naming one is a search on its own. One the caller does not reach is a 404, never an empty list. It wins over `workspace` when both are given.",
            "maxLength": 36,
            "type": "string"
          },
          "limit": {
            "default": 50,
            "description": "The size of the page, 50 by default and 200 at most; a larger one is brought down to 200, zero is refused.",
            "minimum": 1,
            "type": "integer"
          },
          "match": {
            "default": "all",
            "description": "How `sentTo`, `sentFrom`, `subject`, `body`, `otp` and `attachmentName` join: all of them, or any of them. The bounds (`since`, `type`, `hasOtp`, `hasAttachment`, `status`) narrow in both modes.",
            "enum": [
              "all",
              "any"
            ],
            "type": "string"
          },
          "otp": {
            "description": "A substring of the one-time code the ingester extracted; read in that column, never in the body.",
            "maxLength": 16,
            "type": "string"
          },
          "sentFrom": {
            "description": "A substring of the address of the sender, without regard to case.",
            "maxLength": 254,
            "type": "string"
          },
          "sentTo": {
            "description": "A substring of the address the message was sent to, without regard to case. `%` and `_` are text.",
            "maxLength": 254,
            "type": "string"
          },
          "since": {
            "description": "Messages received at this instant or after, in ISO 8601. A bound: it narrows in both modes.",
            "format": "date-time",
            "type": "string"
          },
          "status": {
            "default": "parsed",
            "description": "`parsed` (the default) hides a message the ingester has not finished reading; `any` shows every state, including the refused ones.",
            "enum": [
              "parsed",
              "any"
            ],
            "type": "string"
          },
          "subject": {
            "description": "A substring of the subject, without regard to case.",
            "example": "verification",
            "maxLength": 255,
            "type": "string"
          },
          "type": {
            "description": "The channel. A bound, absent by default.",
            "enum": [
              "email",
              "sms"
            ],
            "type": "string"
          },
          "wait": {
            "default": 0,
            "description": "How long to wait, in milliseconds, for a message that matches: the search is played again every 250 ms and answers as soon as one does. Five minutes (300000) at most, a larger value is brought down to it and is not refused; zero, absent or negative is a single search. An expired wait answers 200 with an empty page. An organization holds 20 waits open at once, shared by all the instances: the next is refused with 429 `TOO_MANY_WAITS` and `Retry-After: 1`. An instance that is stopping answers a wait it cannot finish with 503 `API_DRAINING` and `Retry-After: 1`, never with an empty page. It fills no search by itself.",
            "minimum": 0,
            "type": "integer"
          },
          "workspace": {
            "description": "The address (`slug`) of a workspace to search in. It narrows the search and does not fill it; the inbox wins when both are given.",
            "maxLength": 40,
            "type": "string"
          }
        },
        "type": "object"
      },
      "NotificationDestination": {
        "description": "Where the alerts of the organization are written: an email address (or its owners and administrators), a Slack or Discord channel, or a PagerDuty or OpsGenie service.",
        "properties": {
          "address": {
            "description": "The address the alerts are written to, or null for the owners and administrators of the organization; always null for a destination that is not an email.",
            "type": [
              "string",
              "null"
            ]
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "credentialPreview": {
            "description": "Enough of the webhook address or of the integration key to recognise it (its host and its last four characters, or `…` and its last four characters), never the credential itself, which is stored sealed and never comes back. Null for an email destination.",
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "type": "string"
          },
          "kind": {
            "enum": [
              "email",
              "slack",
              "discord",
              "pagerduty",
              "opsgenie"
            ],
            "type": "string"
          },
          "lastDeliveryAt": {
            "description": "When the last alert written to this destination was settled, sent or failed; null when none was. An email destination without an address has none.",
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "lastError": {
            "description": "The reason the last delivery was refused; null when it was accepted or when none was settled.",
            "type": [
              "string",
              "null"
            ]
          },
          "locale": {
            "description": "The language of the messages.",
            "enum": [
              "fr",
              "en"
            ],
            "type": "string"
          },
          "name": {
            "description": "What the screen calls the destination.",
            "type": "string"
          },
          "region": {
            "description": "The region of the OpsGenie account the key belongs to; null for every other kind.",
            "enum": [
              "eu",
              "us",
              null
            ],
            "type": [
              "string",
              "null"
            ]
          },
          "usedBy": {
            "description": "The enabled alert rules that write to this destination, one per alert and scope.",
            "items": {
              "properties": {
                "eventKind": {
                  "description": "The alert, such as `quota.threshold`.",
                  "type": "string"
                },
                "scopeId": {
                  "type": "string"
                },
                "scopeKind": {
                  "enum": [
                    "organization",
                    "workspace",
                    "inbox"
                  ],
                  "type": "string"
                },
                "scopeName": {
                  "description": "The name of the workspace or of the inbox; null for the organization.",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "sole": {
                  "description": "True when this destination is the only one the rule names: deleting it leaves the rule to the owners and administrators.",
                  "type": "boolean"
                }
              },
              "required": [
                "eventKind",
                "scopeKind",
                "scopeId",
                "scopeName",
                "sole"
              ],
              "type": "object"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "NotificationDestination.CreateNotificationDestinationRequest": {
        "description": "Where the alerts of the organization are written: an email address (or its owners and administrators), a Slack or Discord channel, or a PagerDuty or OpsGenie service.",
        "properties": {
          "address": {
            "description": "The address the alerts are written to, kept in lowercase (`DESTINATION_ADDRESS_INVALID`). Null or blank: the owners and administrators. Email only (`DESTINATION_FIELD_NOT_ALLOWED` otherwise).",
            "type": [
              "string",
              "null"
            ]
          },
          "integrationKey": {
            "description": "The integration key of a PagerDuty (32 letters and digits) or OpsGenie (a UUID) destination (`DESTINATION_KEY_INVALID`). It is stored sealed and never comes back: replace the destination to change it.",
            "type": [
              "string",
              "null"
            ]
          },
          "kind": {
            "description": "The kind of the destination: `email`, `slack`, `discord`, `pagerduty` or `opsgenie`; any other is refused with `DESTINATION_KIND_UNKNOWN`.",
            "enum": [
              "email",
              "slack",
              "discord",
              "pagerduty",
              "opsgenie"
            ],
            "type": "string"
          },
          "locale": {
            "description": "The language of the messages (`DESTINATION_LOCALE_INVALID`). French when left out.",
            "enum": [
              "fr",
              "en",
              null
            ],
            "type": [
              "string",
              "null"
            ]
          },
          "name": {
            "description": "What the screen calls the destination, 1 to 80 characters once trimmed (`DESTINATION_NAME_INVALID`).",
            "type": "string"
          },
          "region": {
            "description": "The region of an OpsGenie account, Europe by default (`DESTINATION_REGION_UNKNOWN`). Any other kind refuses it with `DESTINATION_FIELD_NOT_ALLOWED`.",
            "enum": [
              "eu",
              "us",
              null
            ],
            "type": [
              "string",
              "null"
            ]
          },
          "webhookUrl": {
            "description": "The incoming webhook address of a Slack (`https://hooks.slack.com/`) or Discord (`https://discord.com/api/webhooks/`) destination (`DESTINATION_TARGET_INVALID`). It is stored sealed and never comes back: replace the destination to change it.",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "kind",
          "name"
        ],
        "type": "object"
      },
      "NotificationDestination.UpdateNotificationDestinationRequest.jsonMergePatch": {
        "description": "Where the alerts of the organization are written: an email address (or its owners and administrators), a Slack or Discord channel, or a PagerDuty or OpsGenie service.",
        "properties": {
          "address": {
            "description": "The address the alerts are written to, or null for the owners and administrators.",
            "type": [
              "string",
              "null"
            ]
          },
          "kind": {
            "description": "The kind of the destination, which never changes.",
            "type": "string"
          },
          "locale": {
            "description": "The language of the mails.",
            "enum": [
              "fr",
              "en"
            ],
            "type": "string"
          },
          "name": {
            "description": "What the screen calls the destination, 1 to 80 characters once trimmed.",
            "type": "string"
          }
        },
        "type": "object"
      },
      "Problem": {
        "additionalProperties": true,
        "description": "A refusal, as RFC 9457 `application/problem+json` with the `code` of the register. A code adds the members its rule needs (`retryAfter`, `permission`...), so more members than these may come.",
        "properties": {
          "code": {
            "description": "The stable code of the refusal. It never changes once shipped.",
            "enum": [
              "BAD_REQUEST",
              "UNAUTHENTICATED",
              "FORBIDDEN",
              "NOT_FOUND",
              "METHOD_NOT_ALLOWED",
              "NOT_ACCEPTABLE",
              "CONFLICT",
              "UNSUPPORTED_MEDIA_TYPE",
              "VALIDATION_FAILED",
              "RATE_LIMITED",
              "SERVICE_UNAVAILABLE",
              "INTERNAL_ERROR",
              "INVALID_VALUE",
              "INVALID_CURSOR",
              "ORGANIZATION_LIMIT_REACHED",
              "ORGANIZATION_MEMBER_LIMIT_REACHED",
              "ORGANIZATION_FOUNDING_IN_PROGRESS",
              "ORGANIZATION_ALREADY_MEMBER",
              "ORGANIZATION_NAME_EMPTY",
              "ORGANIZATION_RENAME_LOCKED",
              "ORGANIZATION_RENAME_NOT_LOCKED",
              "ORGANIZATION_HAS_PAID_SUBSCRIPTION",
              "ORGANIZATION_LAST_OWNER",
              "ACCOUNT_DELETION_NOT_CONFIRMED",
              "ACCOUNT_HAS_OWN_ORGANIZATIONS",
              "ACCOUNT_IS_SOLE_OWNER",
              "LOGO_REFUSED",
              "LOGO_TOO_LARGE",
              "SSO_UNAVAILABLE",
              "SSO_PROVIDER_EXISTS",
              "SSO_PROVIDER_NOT_FOUND",
              "SSO_PROVIDER_REFUSED",
              "SSO_SAML_METADATA_INVALID",
              "SSO_SAML_METADATA_TOO_LARGE",
              "SSO_SAML_CERTIFICATE_EXPIRED",
              "SSO_SAML_CERTIFICATE_NOT_YET_VALID",
              "SSO_SAML_SHA1_REFUSED",
              "SSO_DOMAIN_INVALID",
              "SSO_DOMAIN_TAKEN",
              "SSO_DOMAIN_NOT_FOUND",
              "SSO_DOMAIN_NOT_PROVEN",
              "SSO_RESCUE_OWNER_REQUIRED",
              "SSO_WITHDRAWAL_EXPIRY_IN_THE_PAST",
              "SSO_WITHDRAWAL_EXPIRY_TOO_FAR",
              "SSO_WITHDRAWAL_EXPIRY_INVALID",
              "SSO_WITHDRAWAL_DOMAIN_NOT_PROVED",
              "SSO_DOMAIN_NOT_WITHDRAWN",
              "INVITATION_ALREADY_PENDING",
              "INVITATION_EXPIRED",
              "INVITATION_ALREADY_USED",
              "INVITATION_REVOKED",
              "INVITATION_ADDRESS_MISMATCH",
              "JOIN_LINK_EXPIRED",
              "JOIN_LINK_ALREADY_USED",
              "JOIN_LINK_REVOKED",
              "EMAIL_NOT_SENT",
              "WORKSPACE_NOT_FOUND",
              "NAME_REQUIRED",
              "NAME_TOO_LONG",
              "NAME_NOT_SLUGGABLE",
              "INVALID_SLUG",
              "SLUG_TAKEN",
              "TAG_TOO_LONG",
              "COLOR_INVALID",
              "WORKSPACE_LIMIT_REACHED",
              "WORKSPACE_QUOTAS_UNAVAILABLE",
              "CANNOT_DELETE_DEFAULT",
              "WORKSPACE_OPEN_TO_ORGANIZATION",
              "USER_REQUIRED",
              "NOT_AN_ORGANIZATION_MEMBER",
              "MEMBER_NOT_FOUND",
              "QUOTA_INVALID",
              "QUOTA_EMPTY",
              "ON_EXCEED_UNKNOWN",
              "DAILY_IS_INBOX_ONLY",
              "LIMIT_NOT_A_WHOLE_NUMBER",
              "LIMIT_IS_ZERO",
              "PERCENTAGE_OUT_OF_RANGE",
              "PERCENTAGE_NEEDS_A_CEILING",
              "INBOX_NOT_FOUND",
              "DESCRIPTION_INVALID",
              "TAGS_INVALID",
              "CHANNEL_UNKNOWN",
              "NOTHING_TO_UPDATE",
              "PERCENTAGE_IS_MONTHLY_ONLY",
              "INBOX_LIMIT_REACHED",
              "INBOX_QUOTAS_UNAVAILABLE",
              "SMS_NUMBER_LIMIT",
              "WORKSPACE_NOT_EMPTY",
              "MESSAGE_NOT_FOUND",
              "CRITERIA_EMPTY",
              "CRITERIA_UNKNOWN",
              "CRITERIA_INVALID",
              "TOO_MANY_WAITS",
              "API_DRAINING",
              "EXTRACTOR_NOT_FOUND",
              "INVALID_KEY",
              "KEY_ALREADY_USED",
              "PATTERN_REQUIRED",
              "INVALID_PATTERN",
              "INVALID_SCOPE",
              "INVALID_LABEL",
              "ATTACHMENT_NOT_FOUND",
              "ATTACHMENT_NOT_STORED",
              "ATTACHMENT_STORE_UNAVAILABLE",
              "SPEND_CAP_NEGATIVE",
              "SPEND_CAP_ABOVE_CEILING",
              "SPEND_CAP_MISSING",
              "SPEND_CAP_UNCHANGED",
              "PLAN_IS_UNLIMITED",
              "SUBSCRIPTION_ENDED",
              "NO_PAY_AS_YOU_GO",
              "SUBSCRIPTION_SUSPENDED",
              "PAYMENT_EVENT_REFUSED",
              "PAYMENT_PROVIDER_UNAVAILABLE",
              "CARD_SETUP_NOT_COMPLETE",
              "CARD_SETUP_NOT_FOUND",
              "CARD_SETUP_WITHOUT_CARD",
              "UNKNOWN_PACK",
              "PACK_FROZEN_UNTIL_RESUMED",
              "PLAN_NOT_PURCHASABLE",
              "TERM_REQUIRED",
              "ALREADY_SUBSCRIBED",
              "NO_SUBSCRIPTION",
              "PLAN_UNCHANGED",
              "NO_SUBSCRIPTION_TO_CANCEL",
              "COMMITMENT_BALANCE_REFUSED",
              "NO_CANCELLATION_TO_WITHDRAW",
              "BILLING_NAME_REQUIRED",
              "ADDRESS_INCOMPLETE",
              "COUNTRY_INVALID",
              "INVALID_VAT_NUMBER",
              "DESTINATION_KIND_UNKNOWN",
              "DESTINATION_ADDRESS_INVALID",
              "DESTINATION_NAME_INVALID",
              "DESTINATION_LOCALE_INVALID",
              "TOO_MANY_DESTINATIONS",
              "THRESHOLD_INVALID",
              "DESTINATION_KIND_IMMUTABLE",
              "DESTINATION_TARGET_INVALID",
              "DESTINATION_KEY_INVALID",
              "DESTINATION_REGION_UNKNOWN",
              "DESTINATION_FIELD_NOT_ALLOWED",
              "ALERT_CHANNEL_REFUSED",
              "ALERT_CHANNEL_UNAVAILABLE",
              "WEBHOOK_PORTAL_NOT_READY",
              "WEBHOOK_PLATFORM_UNAVAILABLE",
              "SUPPORT_KIND_INVALID",
              "SUPPORT_SUBJECT_REQUIRED",
              "SUPPORT_MESSAGE_REQUIRED",
              "FEATURE_REQUEST_SKELETON_EMPTY",
              "SUPPORT_TOO_MANY_THREADS",
              "SUPPORT_THREAD_NOT_FOUND",
              "SUPPORT_THREAD_CLOSED",
              "SUPPORT_THREAD_ALREADY_IN_STATE",
              "SUPPORT_ATTACHMENT_IDS_INVALID",
              "SUPPORT_TOO_MANY_ATTACHMENTS",
              "SUPPORT_ATTACHMENT_TOO_LARGE",
              "SUPPORT_ATTACHMENT_UNSUPPORTED",
              "SUPPORT_ATTACHMENT_REFUSED",
              "SUPPORT_TOO_MANY_UPLOADS",
              "SUPPORT_STORAGE_FULL",
              "SUPPORT_ATTACHMENT_NOT_FOUND",
              "SUPPORT_FILTER_INVALID",
              "SUPPORT_OUTCOME_INVALID",
              "SUPPORT_OUTCOME_NOT_ALLOWED",
              "SUPPORT_OUTCOME_NOTE_INVALID",
              "SUPPORT_NOT_A_FEATURE_REQUEST",
              "STAFF_REASON_INVALID",
              "OVERRIDE_EXPIRY_IN_THE_PAST",
              "OVERRIDE_EXPIRY_TOO_FAR",
              "OVERRIDE_EXPIRY_INVALID",
              "STAFF_EXPIRY_INVALID",
              "STAFF_EXPIRY_IN_THE_PAST",
              "STAFF_EXPIRY_TOO_FAR",
              "CAPACITY_OPERATIONS_NOT_POSITIVE",
              "CAPACITY_OPERATIONS_TOO_LARGE",
              "CAPACITY_GIFT_NOT_FOUND",
              "CAPACITY_GIFT_EXPIRED",
              "CAPACITY_RETRACTION_TOO_LARGE",
              "SPEND_CAP_BOUND_NOT_RAISED",
              "SPEND_CAP_BOUND_TOO_HIGH",
              "UNKNOWN_CAPABILITY",
              "CAPABILITY_OVERRIDE_NOT_FOUND",
              "USER_HAS_ORGANIZATIONS",
              "USERS_SELECTION_INVALID",
              "ASSISTANCE_SESSION_NOT_FOUND",
              "ASSISTANCE_SESSION_CLOSED",
              "ASSISTANCE_CODE_INVALID",
              "ASSISTANCE_TARGET_INVALID",
              "SUPPORT_ACCESS_NOT_GIVEN",
              "ASSISTANCE_CONSENT_ALREADY_GIVEN",
              "ASSISTANCE_CONSENT_NOT_FOUND",
              "ASSISTANCE_WRITE_REQUEST_PENDING",
              "ASSISTANCE_WRITE_REQUEST_NOT_FOUND",
              "EMAIL_DOMAIN_INVALID",
              "EMAIL_DOMAIN_ALREADY_BLOCKED",
              "EMAIL_DOMAIN_NOT_BLOCKED",
              "ASSISTANCE_FORBIDDEN",
              "ASSISTANCE_CONSENT_REQUIRED",
              "SESSION_CONFINED",
              "SIGN_IN_METHOD_NOT_ALLOWED",
              "SSO_NEVER_USED",
              "SECOND_FACTOR_MISSING",
              "SSO_EMAIL_NOT_PROVEN",
              "CONSOLE_SSO_REFUSED",
              "SUPPORT_CITATIONS_INVALID",
              "SUPPORT_CITATION_UNKNOWN",
              "AGENT_TOO_MANY_WRITES",
              "SUPPORT_ALREADY_REVIEWED",
              "SUPPORT_NOTHING_TO_REVIEW",
              "AGENT_TOKEN_NOT_FOUND",
              "AGENT_TOKEN_REVOKED",
              "AGENT_TOKEN_NAME_INVALID",
              "AGENT_TOKEN_NAME_TAKEN",
              "AGENT_TOKEN_SCOPES_INVALID",
              "API_KEY_NOT_FOUND",
              "API_KEY_NAME_INVALID",
              "API_KEY_PERMISSIONS_INVALID",
              "API_KEY_WORKSPACES_INVALID",
              "API_KEY_REVOKED",
              "WORKSPACE_HAS_ACTIVE_KEYS",
              "API_KEY_UNKNOWN",
              "API_KEY_EXPIRED",
              "API_KEY_PERMISSION_MISSING",
              "API_KEY_CANNOT_DELETE_WORKSPACE",
              "SMS_COUNTRY_NOT_OPEN",
              "SMS_NOTE_TOO_LONG",
              "SMS_INBOX_HAS_NUMBER",
              "SMS_REQUEST_ALREADY_OPEN",
              "SMS_REQUEST_NOT_FOUND",
              "SMS_REQUEST_NOT_WITHDRAWABLE",
              "SMS_REQUEST_NUMBER_SERVED",
              "SMS_REQUEST_NOT_IN_EXPECTED_STATE",
              "SMS_REQUEST_INBOX_DELETED",
              "SMS_NUMBER_INVALID",
              "SMS_NUMBER_TAKEN",
              "SMS_NUMBER_NOT_FOUND",
              "SMS_EVENT_REFUSED",
              "SMS_GATEWAY_UNAVAILABLE"
            ],
            "type": "string"
          },
          "detail": {
            "description": "English prose for the person who reads the answer. It may be reworded: branch on `code`.",
            "type": "string"
          },
          "status": {
            "description": "The HTTP status.",
            "examples": [
              404
            ],
            "type": "integer"
          },
          "title": {
            "description": "The name of the HTTP status.",
            "examples": [
              "Not Found"
            ],
            "type": "string"
          },
          "type": {
            "description": "The address of the problem: `/errors/<code>`.",
            "examples": [
              "/errors/INBOX_NOT_FOUND"
            ],
            "type": "string"
          },
          "violations": {
            "description": "On a body that fails validation, one entry per field.",
            "items": {
              "properties": {
                "code": {
                  "enum": [
                    "BAD_REQUEST",
                    "UNAUTHENTICATED",
                    "FORBIDDEN",
                    "NOT_FOUND",
                    "METHOD_NOT_ALLOWED",
                    "NOT_ACCEPTABLE",
                    "CONFLICT",
                    "UNSUPPORTED_MEDIA_TYPE",
                    "VALIDATION_FAILED",
                    "RATE_LIMITED",
                    "SERVICE_UNAVAILABLE",
                    "INTERNAL_ERROR",
                    "INVALID_VALUE",
                    "INVALID_CURSOR",
                    "ORGANIZATION_LIMIT_REACHED",
                    "ORGANIZATION_MEMBER_LIMIT_REACHED",
                    "ORGANIZATION_FOUNDING_IN_PROGRESS",
                    "ORGANIZATION_ALREADY_MEMBER",
                    "ORGANIZATION_NAME_EMPTY",
                    "ORGANIZATION_RENAME_LOCKED",
                    "ORGANIZATION_RENAME_NOT_LOCKED",
                    "ORGANIZATION_HAS_PAID_SUBSCRIPTION",
                    "ORGANIZATION_LAST_OWNER",
                    "ACCOUNT_DELETION_NOT_CONFIRMED",
                    "ACCOUNT_HAS_OWN_ORGANIZATIONS",
                    "ACCOUNT_IS_SOLE_OWNER",
                    "LOGO_REFUSED",
                    "LOGO_TOO_LARGE",
                    "SSO_UNAVAILABLE",
                    "SSO_PROVIDER_EXISTS",
                    "SSO_PROVIDER_NOT_FOUND",
                    "SSO_PROVIDER_REFUSED",
                    "SSO_SAML_METADATA_INVALID",
                    "SSO_SAML_METADATA_TOO_LARGE",
                    "SSO_SAML_CERTIFICATE_EXPIRED",
                    "SSO_SAML_CERTIFICATE_NOT_YET_VALID",
                    "SSO_SAML_SHA1_REFUSED",
                    "SSO_DOMAIN_INVALID",
                    "SSO_DOMAIN_TAKEN",
                    "SSO_DOMAIN_NOT_FOUND",
                    "SSO_DOMAIN_NOT_PROVEN",
                    "SSO_RESCUE_OWNER_REQUIRED",
                    "SSO_WITHDRAWAL_EXPIRY_IN_THE_PAST",
                    "SSO_WITHDRAWAL_EXPIRY_TOO_FAR",
                    "SSO_WITHDRAWAL_EXPIRY_INVALID",
                    "SSO_WITHDRAWAL_DOMAIN_NOT_PROVED",
                    "SSO_DOMAIN_NOT_WITHDRAWN",
                    "INVITATION_ALREADY_PENDING",
                    "INVITATION_EXPIRED",
                    "INVITATION_ALREADY_USED",
                    "INVITATION_REVOKED",
                    "INVITATION_ADDRESS_MISMATCH",
                    "JOIN_LINK_EXPIRED",
                    "JOIN_LINK_ALREADY_USED",
                    "JOIN_LINK_REVOKED",
                    "EMAIL_NOT_SENT",
                    "WORKSPACE_NOT_FOUND",
                    "NAME_REQUIRED",
                    "NAME_TOO_LONG",
                    "NAME_NOT_SLUGGABLE",
                    "INVALID_SLUG",
                    "SLUG_TAKEN",
                    "TAG_TOO_LONG",
                    "COLOR_INVALID",
                    "WORKSPACE_LIMIT_REACHED",
                    "WORKSPACE_QUOTAS_UNAVAILABLE",
                    "CANNOT_DELETE_DEFAULT",
                    "WORKSPACE_OPEN_TO_ORGANIZATION",
                    "USER_REQUIRED",
                    "NOT_AN_ORGANIZATION_MEMBER",
                    "MEMBER_NOT_FOUND",
                    "QUOTA_INVALID",
                    "QUOTA_EMPTY",
                    "ON_EXCEED_UNKNOWN",
                    "DAILY_IS_INBOX_ONLY",
                    "LIMIT_NOT_A_WHOLE_NUMBER",
                    "LIMIT_IS_ZERO",
                    "PERCENTAGE_OUT_OF_RANGE",
                    "PERCENTAGE_NEEDS_A_CEILING",
                    "INBOX_NOT_FOUND",
                    "DESCRIPTION_INVALID",
                    "TAGS_INVALID",
                    "CHANNEL_UNKNOWN",
                    "NOTHING_TO_UPDATE",
                    "PERCENTAGE_IS_MONTHLY_ONLY",
                    "INBOX_LIMIT_REACHED",
                    "INBOX_QUOTAS_UNAVAILABLE",
                    "SMS_NUMBER_LIMIT",
                    "WORKSPACE_NOT_EMPTY",
                    "MESSAGE_NOT_FOUND",
                    "CRITERIA_EMPTY",
                    "CRITERIA_UNKNOWN",
                    "CRITERIA_INVALID",
                    "TOO_MANY_WAITS",
                    "API_DRAINING",
                    "EXTRACTOR_NOT_FOUND",
                    "INVALID_KEY",
                    "KEY_ALREADY_USED",
                    "PATTERN_REQUIRED",
                    "INVALID_PATTERN",
                    "INVALID_SCOPE",
                    "INVALID_LABEL",
                    "ATTACHMENT_NOT_FOUND",
                    "ATTACHMENT_NOT_STORED",
                    "ATTACHMENT_STORE_UNAVAILABLE",
                    "SPEND_CAP_NEGATIVE",
                    "SPEND_CAP_ABOVE_CEILING",
                    "SPEND_CAP_MISSING",
                    "SPEND_CAP_UNCHANGED",
                    "PLAN_IS_UNLIMITED",
                    "SUBSCRIPTION_ENDED",
                    "NO_PAY_AS_YOU_GO",
                    "SUBSCRIPTION_SUSPENDED",
                    "PAYMENT_EVENT_REFUSED",
                    "PAYMENT_PROVIDER_UNAVAILABLE",
                    "CARD_SETUP_NOT_COMPLETE",
                    "CARD_SETUP_NOT_FOUND",
                    "CARD_SETUP_WITHOUT_CARD",
                    "UNKNOWN_PACK",
                    "PACK_FROZEN_UNTIL_RESUMED",
                    "PLAN_NOT_PURCHASABLE",
                    "TERM_REQUIRED",
                    "ALREADY_SUBSCRIBED",
                    "NO_SUBSCRIPTION",
                    "PLAN_UNCHANGED",
                    "NO_SUBSCRIPTION_TO_CANCEL",
                    "COMMITMENT_BALANCE_REFUSED",
                    "NO_CANCELLATION_TO_WITHDRAW",
                    "BILLING_NAME_REQUIRED",
                    "ADDRESS_INCOMPLETE",
                    "COUNTRY_INVALID",
                    "INVALID_VAT_NUMBER",
                    "DESTINATION_KIND_UNKNOWN",
                    "DESTINATION_ADDRESS_INVALID",
                    "DESTINATION_NAME_INVALID",
                    "DESTINATION_LOCALE_INVALID",
                    "TOO_MANY_DESTINATIONS",
                    "THRESHOLD_INVALID",
                    "DESTINATION_KIND_IMMUTABLE",
                    "DESTINATION_TARGET_INVALID",
                    "DESTINATION_KEY_INVALID",
                    "DESTINATION_REGION_UNKNOWN",
                    "DESTINATION_FIELD_NOT_ALLOWED",
                    "ALERT_CHANNEL_REFUSED",
                    "ALERT_CHANNEL_UNAVAILABLE",
                    "WEBHOOK_PORTAL_NOT_READY",
                    "WEBHOOK_PLATFORM_UNAVAILABLE",
                    "SUPPORT_KIND_INVALID",
                    "SUPPORT_SUBJECT_REQUIRED",
                    "SUPPORT_MESSAGE_REQUIRED",
                    "FEATURE_REQUEST_SKELETON_EMPTY",
                    "SUPPORT_TOO_MANY_THREADS",
                    "SUPPORT_THREAD_NOT_FOUND",
                    "SUPPORT_THREAD_CLOSED",
                    "SUPPORT_THREAD_ALREADY_IN_STATE",
                    "SUPPORT_ATTACHMENT_IDS_INVALID",
                    "SUPPORT_TOO_MANY_ATTACHMENTS",
                    "SUPPORT_ATTACHMENT_TOO_LARGE",
                    "SUPPORT_ATTACHMENT_UNSUPPORTED",
                    "SUPPORT_ATTACHMENT_REFUSED",
                    "SUPPORT_TOO_MANY_UPLOADS",
                    "SUPPORT_STORAGE_FULL",
                    "SUPPORT_ATTACHMENT_NOT_FOUND",
                    "SUPPORT_FILTER_INVALID",
                    "SUPPORT_OUTCOME_INVALID",
                    "SUPPORT_OUTCOME_NOT_ALLOWED",
                    "SUPPORT_OUTCOME_NOTE_INVALID",
                    "SUPPORT_NOT_A_FEATURE_REQUEST",
                    "STAFF_REASON_INVALID",
                    "OVERRIDE_EXPIRY_IN_THE_PAST",
                    "OVERRIDE_EXPIRY_TOO_FAR",
                    "OVERRIDE_EXPIRY_INVALID",
                    "STAFF_EXPIRY_INVALID",
                    "STAFF_EXPIRY_IN_THE_PAST",
                    "STAFF_EXPIRY_TOO_FAR",
                    "CAPACITY_OPERATIONS_NOT_POSITIVE",
                    "CAPACITY_OPERATIONS_TOO_LARGE",
                    "CAPACITY_GIFT_NOT_FOUND",
                    "CAPACITY_GIFT_EXPIRED",
                    "CAPACITY_RETRACTION_TOO_LARGE",
                    "SPEND_CAP_BOUND_NOT_RAISED",
                    "SPEND_CAP_BOUND_TOO_HIGH",
                    "UNKNOWN_CAPABILITY",
                    "CAPABILITY_OVERRIDE_NOT_FOUND",
                    "USER_HAS_ORGANIZATIONS",
                    "USERS_SELECTION_INVALID",
                    "ASSISTANCE_SESSION_NOT_FOUND",
                    "ASSISTANCE_SESSION_CLOSED",
                    "ASSISTANCE_CODE_INVALID",
                    "ASSISTANCE_TARGET_INVALID",
                    "SUPPORT_ACCESS_NOT_GIVEN",
                    "ASSISTANCE_CONSENT_ALREADY_GIVEN",
                    "ASSISTANCE_CONSENT_NOT_FOUND",
                    "ASSISTANCE_WRITE_REQUEST_PENDING",
                    "ASSISTANCE_WRITE_REQUEST_NOT_FOUND",
                    "EMAIL_DOMAIN_INVALID",
                    "EMAIL_DOMAIN_ALREADY_BLOCKED",
                    "EMAIL_DOMAIN_NOT_BLOCKED",
                    "ASSISTANCE_FORBIDDEN",
                    "ASSISTANCE_CONSENT_REQUIRED",
                    "SESSION_CONFINED",
                    "SIGN_IN_METHOD_NOT_ALLOWED",
                    "SSO_NEVER_USED",
                    "SECOND_FACTOR_MISSING",
                    "SSO_EMAIL_NOT_PROVEN",
                    "CONSOLE_SSO_REFUSED",
                    "SUPPORT_CITATIONS_INVALID",
                    "SUPPORT_CITATION_UNKNOWN",
                    "AGENT_TOO_MANY_WRITES",
                    "SUPPORT_ALREADY_REVIEWED",
                    "SUPPORT_NOTHING_TO_REVIEW",
                    "AGENT_TOKEN_NOT_FOUND",
                    "AGENT_TOKEN_REVOKED",
                    "AGENT_TOKEN_NAME_INVALID",
                    "AGENT_TOKEN_NAME_TAKEN",
                    "AGENT_TOKEN_SCOPES_INVALID",
                    "API_KEY_NOT_FOUND",
                    "API_KEY_NAME_INVALID",
                    "API_KEY_PERMISSIONS_INVALID",
                    "API_KEY_WORKSPACES_INVALID",
                    "API_KEY_REVOKED",
                    "WORKSPACE_HAS_ACTIVE_KEYS",
                    "API_KEY_UNKNOWN",
                    "API_KEY_EXPIRED",
                    "API_KEY_PERMISSION_MISSING",
                    "API_KEY_CANNOT_DELETE_WORKSPACE",
                    "SMS_COUNTRY_NOT_OPEN",
                    "SMS_NOTE_TOO_LONG",
                    "SMS_INBOX_HAS_NUMBER",
                    "SMS_REQUEST_ALREADY_OPEN",
                    "SMS_REQUEST_NOT_FOUND",
                    "SMS_REQUEST_NOT_WITHDRAWABLE",
                    "SMS_REQUEST_NUMBER_SERVED",
                    "SMS_REQUEST_NOT_IN_EXPECTED_STATE",
                    "SMS_REQUEST_INBOX_DELETED",
                    "SMS_NUMBER_INVALID",
                    "SMS_NUMBER_TAKEN",
                    "SMS_NUMBER_NOT_FOUND",
                    "SMS_EVENT_REFUSED",
                    "SMS_GATEWAY_UNAVAILABLE"
                  ],
                  "type": "string"
                },
                "message": {
                  "type": "string"
                },
                "propertyPath": {
                  "type": "string"
                }
              },
              "required": [
                "propertyPath",
                "message",
                "code"
              ],
              "type": "object"
            },
            "type": "array"
          }
        },
        "required": [
          "type",
          "title",
          "status",
          "detail",
          "code"
        ],
        "type": "object"
      },
      "SmsNumberRequest": {
        "description": "The request of an inbox for an SMS number, and where it stands.",
        "properties": {
          "country": {
            "description": "The country asked for, a code of two capital letters.",
            "type": "string"
          },
          "decidedAt": {
            "format": "date-time",
            "type": "string"
          },
          "id": {
            "description": "The identifier of this request.",
            "type": "string"
          },
          "inboxId": {
            "description": "The inbox of the path: the key of the request, since an inbox has one at a time.",
            "type": "string"
          },
          "note": {
            "type": "string"
          },
          "number": {
            "example": "+447700900123",
            "type": "string"
          },
          "reason": {
            "type": "string"
          },
          "requestedAt": {
            "format": "date-time",
            "type": "string"
          },
          "state": {
            "description": "`pending` and `accepted` hold a place of the plan; `fulfilled` means the number was given.",
            "enum": [
              "pending",
              "accepted",
              "declined",
              "withdrawn",
              "fulfilled"
            ],
            "type": "string"
          },
          "supportThreadId": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "SmsNumberRequest.RequestSmsNumberRequest": {
        "description": "The request of an inbox for an SMS number, and where it stands.",
        "properties": {
          "country": {
            "description": "The country of the number, a code of two capital letters among the countries open (see `countries` in the refusal `SMS_COUNTRY_NOT_OPEN`). `GB` when absent.",
            "example": "GB",
            "type": "string"
          },
          "note": {
            "description": "What the number is for, read by the team: optional, 2000 characters at most, trimmed. An empty note is kept as none.",
            "example": "Receive the codes of our login",
            "maxLength": 2000,
            "type": "string"
          }
        },
        "type": "object"
      },
      "Workspace": {
        "description": "A workspace of an organization: a partition of its inboxes.",
        "properties": {
          "canManage": {
            "description": "Whether the caller may create, change and delete workspaces and manage their members.",
            "type": "boolean"
          },
          "color": {
            "description": "One of the eight names of the palette, or null.",
            "enum": [
              "blue",
              "green",
              "amber",
              "red",
              "violet",
              "teal",
              "pink",
              "slate",
              null
            ],
            "type": [
              "string",
              "null"
            ]
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "id": {
            "description": "The identifier of the workspace: the scope of its alert rule (`PUT …/notification-rules/quota.threshold/workspace/{id}`). The address of the workspace stays its `slug`.",
            "type": "string"
          },
          "inboxCount": {
            "description": "How many inboxes the workspace holds: one that holds any cannot be deleted.",
            "type": "integer"
          },
          "isDefault": {
            "description": "The workspace every member of the organization reaches: an organization always has one, and it cannot be deleted.",
            "type": "boolean"
          },
          "memberCount": {
            "description": "How many people have a row in the workspace; null for the default workspace, which everybody reaches.",
            "type": [
              "integer",
              "null"
            ]
          },
          "messagesThisMonth": {
            "description": "What the workspace received on the UTC calendar month, its deleted inboxes included: its share of the messages of the organization, which no ceiling of the organization counts.",
            "type": "integer"
          },
          "name": {
            "type": "string"
          },
          "quota": {
            "description": "The ceiling the workspace sets on itself: monthly only, a workspace has no daily window. The sum of the ceilings of an organization is never compared to its envelope.",
            "properties": {
              "monthly": {
                "description": "The monthly ceiling, or null when there is none.",
                "properties": {
                  "messages": {
                    "description": "The ceiling in messages, always the figure in force; null when it is a percentage of a plan that sells no envelope, which holds nothing back.",
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "percent": {
                    "description": "The share of the monthly envelope of the plan, from 1 to 100, when the ceiling was written that way; otherwise null.",
                    "type": [
                      "integer",
                      "null"
                    ]
                  }
                },
                "required": [
                  "percent",
                  "messages"
                ],
                "type": [
                  "object",
                  "null"
                ]
              },
              "onExceed": {
                "description": "What the ingester does when the ceiling is reached: refuse the message, or accept it and alert.",
                "enum": [
                  "reject",
                  "alert"
                ],
                "type": "string"
              }
            },
            "required": [
              "monthly",
              "onExceed"
            ],
            "type": "object"
          },
          "slug": {
            "description": "The segment of the address of the workspace, `/o/<organization>/w/<slug>`: unique in the organization, and it stays when the workspace is renamed.",
            "type": "string"
          },
          "tag": {
            "description": "A label of at most 16 characters shown beside the name, or null.",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "type": "object"
      },
      "Workspace.CreateWorkspaceRequest": {
        "description": "A workspace of an organization: a partition of its inboxes.",
        "properties": {
          "color": {
            "description": "One of the eight names of the palette, exactly (case included), or null.",
            "enum": [
              "blue",
              "green",
              "amber",
              "red",
              "violet",
              "teal",
              "pink",
              "slate",
              null
            ],
            "type": [
              "string",
              "null"
            ]
          },
          "name": {
            "description": "The name, at most 60 characters. The address is made from it.",
            "example": "Checkout",
            "maxLength": 60,
            "type": "string"
          },
          "tag": {
            "description": "A label of at most 16 characters shown beside the name. An empty one is no tag; one that is too long is refused, never cut.",
            "maxLength": 16,
            "type": [
              "string",
              "null"
            ]
          }
        },
        "type": "object"
      },
      "Workspace.UpdateWorkspaceRequest.jsonMergePatch": {
        "description": "A workspace of an organization: a partition of its inboxes.",
        "properties": {
          "color": {
            "description": "One of the eight names of the palette, exactly (case included); null clears it.",
            "enum": [
              "blue",
              "green",
              "amber",
              "red",
              "violet",
              "teal",
              "pink",
              "slate",
              null
            ],
            "type": [
              "string",
              "null"
            ]
          },
          "name": {
            "description": "The new name. The address does not follow it.",
            "example": "Checkout team",
            "maxLength": 60,
            "type": "string"
          },
          "quota": {
            "description": "The monthly ceiling: `monthly` is a number of messages, `{\"percent\": 1 to 100}` of the monthly envelope of the plan, or null to remove it; `onExceed` is `reject` or `alert`. A workspace has no daily window. Setting a ceiling needs a plan that includes it; removing one never does.",
            "properties": {
              "monthly": {
                "oneOf": [
                  {
                    "minimum": 1,
                    "type": "integer"
                  },
                  {
                    "properties": {
                      "percent": {
                        "maximum": 100,
                        "minimum": 1,
                        "type": "integer"
                      }
                    },
                    "required": [
                      "percent"
                    ],
                    "type": "object"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "onExceed": {
                "enum": [
                  "reject",
                  "alert"
                ],
                "type": "string"
              }
            },
            "type": "object"
          },
          "slug": {
            "description": "The new address: lower case letters and digits separated by single hyphens, at most 40 characters, not `new`, free in the organization.",
            "maxLength": 40,
            "type": "string"
          },
          "tag": {
            "description": "The new tag; null or empty clears it and leaves the colour.",
            "maxLength": 16,
            "type": [
              "string",
              "null"
            ]
          }
        },
        "type": "object"
      },
      "WorkspaceMember": {
        "description": "A person with a row in a workspace.",
        "properties": {
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "email": {
            "description": "The address of the person at the identity provider; absent when the account has none.",
            "type": [
              "string",
              "null"
            ]
          },
          "name": {
            "description": "How the identity provider calls the person; absent when the account has no name. Never the identifier.",
            "type": [
              "string",
              "null"
            ]
          },
          "userId": {
            "description": "The Logto id of the person.",
            "type": "string"
          }
        },
        "type": "object"
      },
      "WorkspaceMember.AddWorkspaceMemberRequest": {
        "description": "A person with a row in a workspace.",
        "properties": {
          "userId": {
            "description": "The Logto id of the person, who must already be a member of the organization.",
            "example": "a1b2c3d4e5",
            "type": "string"
          }
        },
        "type": "object"
      },
      "WorkspaceMembers": {
        "description": "Who reaches a workspace: the whole organization, or the people with a row in it.",
        "properties": {
          "members": {
            "description": "The people with a row in the workspace, the oldest first.",
            "items": {
              "properties": {
                "createdAt": {
                  "description": "When the person was given the workspace.",
                  "format": "date-time",
                  "type": "string"
                },
                "email": {
                  "description": "The address of the person at the identity provider; absent when the account has none.",
                  "type": "string"
                },
                "name": {
                  "description": "How the identity provider calls the person; absent when the account has no name. Never the identifier.",
                  "type": "string"
                },
                "userId": {
                  "description": "The Logto id of the person.",
                  "type": "string"
                }
              },
              "required": [
                "userId",
                "createdAt"
              ],
              "type": "object"
            },
            "type": "array"
          },
          "openToOrganization": {
            "description": "True on the default workspace, which everybody of the organization reaches without a row: `members` is then empty because there is nobody to list, not because nobody is there.",
            "type": "boolean"
          }
        },
        "type": "object"
      }
    },
    "securitySchemes": {
      "bearerAuth": {
        "description": "An API key: `Authorization: Bearer fk_...`.",
        "scheme": "bearer",
        "type": "http"
      }
    }
  },
  "info": {
    "description": "Read and write your Facteur workspaces, inboxes and messages from a script or a test suite, without a browser.\n\nEvery request carries an API key in the `Authorization` header: `Authorization: Bearer fk_...`. A person creates the key in the Facteur app and sees it once. A key holds one or more of the permissions `ws:read` and `ws:write` (the content of a workspace: its inboxes and its messages) and `org:read` and `org:write` (the structure of the organization: its workspaces). Writing includes reading inside a family, and the two families never imply each other. A key reaches only the workspaces it was given: any other answers 404, as if it did not exist.\n\nEach operation below names the permission it needs and the refusals it can answer, each with its code. The guides are in the developer portal, whose address `GET /.well-known/oauth-protected-resource` gives as `resource_documentation`.",
    "title": "Facteur API",
    "version": "1.0.0"
  },
  "openapi": "3.1.0",
  "paths": {
    "/attachments/{attachmentId}": {
      "get": {
        "description": "The bytes, streamed, with the type the message declared for them. `Content-Disposition` is `inline` for `application/pdf`, `image/png`, `image/jpeg`, `image/gif` and `image/webp` and `attachment` for every other type, with the name written twice (`filename`, flattened to printable ASCII, and `filename*`, encoded). The response forbids sniffing (`X-Content-Type-Options: nosniff`), sandboxes the file (`Content-Security-Policy: default-src 'none'; sandbox; frame-ancestors 'none'`), keeps it to the same site (`Cross-Origin-Resource-Policy: same-site`), to the cache of the caller (`Cache-Control: private, max-age=86400`) and out of search engines (`X-Robots-Tag: noindex`). The inline images of a message are readable by their identifier like the attachments, and `Accept` negotiates nothing: the type of the answer is the one of the file.",
        "operationId": "downloadAttachment",
        "parameters": [
          {
            "deprecated": false,
            "description": "The `id` of an attachment or of an inline image, as a message says it.",
            "explode": false,
            "in": "path",
            "name": "attachmentId",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "*/*": {
                "schema": {
                  "format": "binary",
                  "type": "string"
                }
              }
            },
            "description": "The bytes of the attachment.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string"
                }
              },
              "Content-Disposition": {
                "description": "`inline` for a PDF and for PNG, JPEG, GIF and WebP images, `attachment` otherwise, with the name written twice.",
                "schema": {
                  "type": "string"
                }
              },
              "Content-Security-Policy": {
                "schema": {
                  "type": "string"
                }
              },
              "Cross-Origin-Resource-Policy": {
                "schema": {
                  "enum": [
                    "same-site"
                  ],
                  "type": "string"
                }
              },
              "X-Content-Type-Options": {
                "schema": {
                  "enum": [
                    "nosniff"
                  ],
                  "type": "string"
                }
              },
              "X-Robots-Tag": {
                "schema": {
                  "enum": [
                    "noindex"
                  ],
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "No key, or a key that is refused. `WWW-Authenticate` says where to read how to present one.",
            "x-codes": [
              "UNAUTHENTICATED",
              "API_KEY_UNKNOWN",
              "API_KEY_EXPIRED",
              "API_KEY_REVOKED"
            ]
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The key does not hold the permission of the operation, or the operation refuses every key.",
            "x-codes": [
              "API_KEY_PERMISSION_MISSING"
            ]
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "There is none of this identifier in the reach of the key. The answer is the same for another organization or a workspace the key does not name.",
            "x-codes": [
              "ATTACHMENT_NOT_FOUND",
              "ATTACHMENT_NOT_STORED"
            ]
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "More calls than the key may make in a minute. `Retry-After` says when to try again.",
            "x-codes": [
              "RATE_LIMITED"
            ]
          },
          "503": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "ATTACHMENT_STORE_UNAVAILABLE: the store of the attachments did not answer. Ask again."
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Any refusal: an `application/problem+json` body whose `code` says which."
          }
        },
        "security": [
          {
            "bearerAuth": [
              "ws:read"
            ]
          }
        ],
        "summary": "Downloads the content of an attachment.",
        "tags": [
          "Message"
        ]
      }
    },
    "/capacity": {
      "get": {
        "description": "Retrieves a Capacity resource.",
        "operationId": "getCapacity",
        "parameters": [],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Capacity"
                }
              }
            },
            "description": "Capacity resource"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "No key, or a key that is refused. `WWW-Authenticate` says where to read how to present one.",
            "x-codes": [
              "UNAUTHENTICATED",
              "API_KEY_UNKNOWN",
              "API_KEY_EXPIRED",
              "API_KEY_REVOKED"
            ]
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The key does not hold the permission of the operation, or the operation refuses every key.",
            "x-codes": [
              "API_KEY_PERMISSION_MISSING"
            ]
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "More calls than the key may make in a minute. `Retry-After` says when to try again.",
            "x-codes": [
              "RATE_LIMITED"
            ]
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Any refusal: an `application/problem+json` body whose `code` says which."
          }
        },
        "security": [
          {
            "bearerAuth": [
              "org:read"
            ]
          }
        ],
        "summary": "Retrieves a Capacity resource.",
        "tags": [
          "Capacity"
        ]
      }
    },
    "/health": {
      "get": {
        "description": "Retrieves a Health resource.",
        "operationId": "getHealth",
        "parameters": [],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Health"
                }
              }
            },
            "description": "Health resource"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Any refusal: an `application/problem+json` body whose `code` says which."
          }
        },
        "security": [],
        "summary": "Retrieves a Health resource.",
        "tags": [
          "Health"
        ]
      }
    },
    "/inboxes": {
      "get": {
        "description": "Retrieves the collection of Inbox resources.",
        "operationId": "listInboxes",
        "parameters": [],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/Inbox"
                  },
                  "type": "array"
                }
              }
            },
            "description": "Inbox collection"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "No key, or a key that is refused. `WWW-Authenticate` says where to read how to present one.",
            "x-codes": [
              "UNAUTHENTICATED",
              "API_KEY_UNKNOWN",
              "API_KEY_EXPIRED",
              "API_KEY_REVOKED"
            ]
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The key does not hold the permission of the operation, or the operation refuses every key.",
            "x-codes": [
              "API_KEY_PERMISSION_MISSING"
            ]
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "More calls than the key may make in a minute. `Retry-After` says when to try again.",
            "x-codes": [
              "RATE_LIMITED"
            ]
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Any refusal: an `application/problem+json` body whose `code` says which."
          }
        },
        "security": [
          {
            "bearerAuth": [
              "ws:read"
            ]
          }
        ],
        "summary": "Retrieves the collection of Inbox resources.",
        "tags": [
          "Inbox"
        ]
      }
    },
    "/inboxes/{inboxId}": {
      "delete": {
        "description": "Removes the Inbox resource.",
        "operationId": "deleteInbox",
        "parameters": [
          {
            "deprecated": false,
            "description": "Inbox identifier",
            "explode": false,
            "in": "path",
            "name": "inboxId",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          }
        ],
        "responses": {
          "204": {
            "description": "Inbox resource deleted"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "No key, or a key that is refused. `WWW-Authenticate` says where to read how to present one.",
            "x-codes": [
              "UNAUTHENTICATED",
              "API_KEY_UNKNOWN",
              "API_KEY_EXPIRED",
              "API_KEY_REVOKED"
            ]
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The key does not hold the permission of the operation, or the operation refuses every key.",
            "x-codes": [
              "API_KEY_PERMISSION_MISSING"
            ]
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "There is none of this identifier in the reach of the key. The answer is the same for another organization or a workspace the key does not name.",
            "x-codes": [
              "INBOX_NOT_FOUND"
            ]
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "More calls than the key may make in a minute. `Retry-After` says when to try again.",
            "x-codes": [
              "RATE_LIMITED"
            ]
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Any refusal: an `application/problem+json` body whose `code` says which."
          }
        },
        "security": [
          {
            "bearerAuth": [
              "ws:write"
            ]
          }
        ],
        "summary": "Removes the Inbox resource.",
        "tags": [
          "Inbox"
        ]
      },
      "patch": {
        "description": "Updates the Inbox resource.",
        "operationId": "updateInbox",
        "parameters": [
          {
            "deprecated": false,
            "description": "Inbox identifier",
            "explode": false,
            "in": "path",
            "name": "inboxId",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          }
        ],
        "requestBody": {
          "content": {
            "application/merge-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/Inbox.UpdateInboxRequest.jsonMergePatch"
              }
            }
          },
          "description": "The updated Inbox resource",
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Inbox"
                }
              }
            },
            "description": "Inbox resource updated",
            "links": {}
          },
          "400": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Invalid input",
            "links": {}
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "No key, or a key that is refused. `WWW-Authenticate` says where to read how to present one.",
            "x-codes": [
              "UNAUTHENTICATED",
              "API_KEY_UNKNOWN",
              "API_KEY_EXPIRED",
              "API_KEY_REVOKED"
            ]
          },
          "402": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The plan of the organization does not include what the call asks for, or its subscription is suspended. `currentPlan` and `requiredPlan` name the plans when a plan is the cause.",
            "x-codes": [
              "INBOX_QUOTAS_UNAVAILABLE"
            ]
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The key does not hold the permission of the operation, or the operation refuses every key.",
            "x-codes": [
              "API_KEY_PERMISSION_MISSING"
            ]
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "There is none of this identifier in the reach of the key. The answer is the same for another organization or a workspace the key does not name.",
            "x-codes": [
              "INBOX_NOT_FOUND"
            ]
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "More calls than the key may make in a minute. `Retry-After` says when to try again.",
            "x-codes": [
              "RATE_LIMITED"
            ]
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Any refusal: an `application/problem+json` body whose `code` says which."
          }
        },
        "security": [
          {
            "bearerAuth": [
              "ws:write"
            ]
          }
        ],
        "summary": "Updates the Inbox resource.",
        "tags": [
          "Inbox"
        ]
      }
    },
    "/inboxes/{inboxId}/extractors": {
      "get": {
        "description": "Retrieves the collection of Extractor resources.",
        "operationId": "listExtractors",
        "parameters": [
          {
            "deprecated": false,
            "description": "Extractor identifier",
            "explode": false,
            "in": "path",
            "name": "inboxId",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/Extractor"
                  },
                  "type": "array"
                }
              }
            },
            "description": "Extractor collection"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "No key, or a key that is refused. `WWW-Authenticate` says where to read how to present one.",
            "x-codes": [
              "UNAUTHENTICATED",
              "API_KEY_UNKNOWN",
              "API_KEY_EXPIRED",
              "API_KEY_REVOKED"
            ]
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The key does not hold the permission of the operation, or the operation refuses every key.",
            "x-codes": [
              "API_KEY_PERMISSION_MISSING"
            ]
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "There is none of this identifier in the reach of the key. The answer is the same for another organization or a workspace the key does not name.",
            "x-codes": [
              "INBOX_NOT_FOUND"
            ]
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "More calls than the key may make in a minute. `Retry-After` says when to try again.",
            "x-codes": [
              "RATE_LIMITED"
            ]
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Any refusal: an `application/problem+json` body whose `code` says which."
          }
        },
        "security": [
          {
            "bearerAuth": [
              "ws:read"
            ]
          }
        ],
        "summary": "Retrieves the collection of Extractor resources.",
        "tags": [
          "Extractor"
        ]
      },
      "post": {
        "description": "Creates a Extractor resource.",
        "operationId": "createExtractor",
        "parameters": [
          {
            "deprecated": false,
            "description": "Extractor identifier",
            "explode": false,
            "in": "path",
            "name": "inboxId",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Extractor.CreateExtractorRequest"
              }
            }
          },
          "description": "The new Extractor resource",
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Extractor"
                }
              }
            },
            "description": "Extractor resource created",
            "links": {}
          },
          "400": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Invalid input",
            "links": {}
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "No key, or a key that is refused. `WWW-Authenticate` says where to read how to present one.",
            "x-codes": [
              "UNAUTHENTICATED",
              "API_KEY_UNKNOWN",
              "API_KEY_EXPIRED",
              "API_KEY_REVOKED"
            ]
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The key does not hold the permission of the operation, or the operation refuses every key.",
            "x-codes": [
              "API_KEY_PERMISSION_MISSING"
            ]
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "There is none of this identifier in the reach of the key. The answer is the same for another organization or a workspace the key does not name.",
            "x-codes": [
              "INBOX_NOT_FOUND"
            ]
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "More calls than the key may make in a minute. `Retry-After` says when to try again.",
            "x-codes": [
              "RATE_LIMITED"
            ]
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Any refusal: an `application/problem+json` body whose `code` says which."
          }
        },
        "security": [
          {
            "bearerAuth": [
              "ws:write"
            ]
          }
        ],
        "summary": "Creates a Extractor resource.",
        "tags": [
          "Extractor"
        ]
      }
    },
    "/inboxes/{inboxId}/extractors/suggestions": {
      "post": {
        "description": "Creates a ExtractorSuggestions resource.",
        "operationId": "suggestExtractors",
        "parameters": [
          {
            "deprecated": false,
            "description": "ExtractorSuggestions identifier",
            "explode": false,
            "in": "path",
            "name": "inboxId",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ExtractorSuggestions.SuggestExtractorsRequest"
              }
            }
          },
          "description": "The new ExtractorSuggestions resource",
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExtractorSuggestions"
                }
              }
            },
            "description": "ExtractorSuggestions resource created",
            "links": {}
          },
          "400": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Invalid input",
            "links": {}
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "No key, or a key that is refused. `WWW-Authenticate` says where to read how to present one.",
            "x-codes": [
              "UNAUTHENTICATED",
              "API_KEY_UNKNOWN",
              "API_KEY_EXPIRED",
              "API_KEY_REVOKED"
            ]
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The key does not hold the permission of the operation, or the operation refuses every key.",
            "x-codes": [
              "API_KEY_PERMISSION_MISSING"
            ]
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "There is none of this identifier in the reach of the key. The answer is the same for another organization or a workspace the key does not name.",
            "x-codes": [
              "INBOX_NOT_FOUND"
            ]
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "More calls than the key may make in a minute. `Retry-After` says when to try again.",
            "x-codes": [
              "RATE_LIMITED"
            ]
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Any refusal: an `application/problem+json` body whose `code` says which."
          }
        },
        "security": [
          {
            "bearerAuth": [
              "ws:read"
            ]
          }
        ],
        "summary": "Creates a ExtractorSuggestions resource.",
        "tags": [
          "ExtractorSuggestions"
        ]
      }
    },
    "/inboxes/{inboxId}/extractors/trials": {
      "post": {
        "description": "Creates a ExtractorTrial resource.",
        "operationId": "tryExtractor",
        "parameters": [
          {
            "deprecated": false,
            "description": "ExtractorTrial identifier",
            "explode": false,
            "in": "path",
            "name": "inboxId",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ExtractorTrial.TryExtractorRequest"
              }
            }
          },
          "description": "The new ExtractorTrial resource",
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExtractorTrial"
                }
              }
            },
            "description": "ExtractorTrial resource created",
            "links": {}
          },
          "400": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Invalid input",
            "links": {}
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "No key, or a key that is refused. `WWW-Authenticate` says where to read how to present one.",
            "x-codes": [
              "UNAUTHENTICATED",
              "API_KEY_UNKNOWN",
              "API_KEY_EXPIRED",
              "API_KEY_REVOKED"
            ]
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The key does not hold the permission of the operation, or the operation refuses every key.",
            "x-codes": [
              "API_KEY_PERMISSION_MISSING"
            ]
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "There is none of this identifier in the reach of the key. The answer is the same for another organization or a workspace the key does not name.",
            "x-codes": [
              "INBOX_NOT_FOUND"
            ]
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "More calls than the key may make in a minute. `Retry-After` says when to try again.",
            "x-codes": [
              "RATE_LIMITED"
            ]
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Any refusal: an `application/problem+json` body whose `code` says which."
          }
        },
        "security": [
          {
            "bearerAuth": [
              "ws:read"
            ]
          }
        ],
        "summary": "Creates a ExtractorTrial resource.",
        "tags": [
          "ExtractorTrial"
        ]
      }
    },
    "/inboxes/{inboxId}/extractors/{extractorId}": {
      "delete": {
        "description": "Removes the Extractor resource.",
        "operationId": "deleteExtractor",
        "parameters": [
          {
            "deprecated": false,
            "description": "Extractor identifier",
            "explode": false,
            "in": "path",
            "name": "inboxId",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "deprecated": false,
            "description": "Extractor identifier",
            "explode": false,
            "in": "path",
            "name": "extractorId",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          }
        ],
        "responses": {
          "204": {
            "description": "Extractor resource deleted"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "No key, or a key that is refused. `WWW-Authenticate` says where to read how to present one.",
            "x-codes": [
              "UNAUTHENTICATED",
              "API_KEY_UNKNOWN",
              "API_KEY_EXPIRED",
              "API_KEY_REVOKED"
            ]
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The key does not hold the permission of the operation, or the operation refuses every key.",
            "x-codes": [
              "API_KEY_PERMISSION_MISSING"
            ]
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "There is none of this identifier in the reach of the key. The answer is the same for another organization or a workspace the key does not name.",
            "x-codes": [
              "INBOX_NOT_FOUND",
              "EXTRACTOR_NOT_FOUND"
            ]
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "More calls than the key may make in a minute. `Retry-After` says when to try again.",
            "x-codes": [
              "RATE_LIMITED"
            ]
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Any refusal: an `application/problem+json` body whose `code` says which."
          }
        },
        "security": [
          {
            "bearerAuth": [
              "ws:write"
            ]
          }
        ],
        "summary": "Removes the Extractor resource.",
        "tags": [
          "Extractor"
        ]
      }
    },
    "/inboxes/{inboxId}/messages": {
      "get": {
        "description": "Retrieves a MessagePage resource.",
        "operationId": "listInboxMessages",
        "parameters": [
          {
            "deprecated": false,
            "description": "The size of the page: 50 by default, 200 at most; a larger one is brought down to 200.",
            "explode": false,
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "minimum": 1,
              "type": "integer"
            },
            "style": "form"
          },
          {
            "deprecated": false,
            "description": "The `nextCursor` of the previous page; absent for the first one.",
            "explode": false,
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "deprecated": false,
            "description": "MessagePage identifier",
            "explode": false,
            "in": "path",
            "name": "inboxId",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MessagePage"
                }
              }
            },
            "description": "MessagePage resource"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "No key, or a key that is refused. `WWW-Authenticate` says where to read how to present one.",
            "x-codes": [
              "UNAUTHENTICATED",
              "API_KEY_UNKNOWN",
              "API_KEY_EXPIRED",
              "API_KEY_REVOKED"
            ]
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The key does not hold the permission of the operation, or the operation refuses every key.",
            "x-codes": [
              "API_KEY_PERMISSION_MISSING"
            ]
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "There is none of this identifier in the reach of the key. The answer is the same for another organization or a workspace the key does not name.",
            "x-codes": [
              "INBOX_NOT_FOUND"
            ]
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "More calls than the key may make in a minute. `Retry-After` says when to try again.",
            "x-codes": [
              "RATE_LIMITED"
            ]
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Any refusal: an `application/problem+json` body whose `code` says which."
          }
        },
        "security": [
          {
            "bearerAuth": [
              "ws:read"
            ]
          }
        ],
        "summary": "Retrieves a MessagePage resource.",
        "tags": [
          "MessagePage"
        ]
      }
    },
    "/inboxes/{inboxId}/sms-number/request": {
      "delete": {
        "description": "Removes the SmsNumberRequest resource.",
        "operationId": "withdrawSmsNumberRequest",
        "parameters": [
          {
            "deprecated": false,
            "description": "SmsNumberRequest identifier",
            "explode": false,
            "in": "path",
            "name": "inboxId",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          }
        ],
        "responses": {
          "204": {
            "description": "SmsNumberRequest resource deleted"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "No key, or a key that is refused. `WWW-Authenticate` says where to read how to present one.",
            "x-codes": [
              "UNAUTHENTICATED",
              "API_KEY_UNKNOWN",
              "API_KEY_EXPIRED",
              "API_KEY_REVOKED"
            ]
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The key does not hold the permission of the operation, or the operation refuses every key.",
            "x-codes": [
              "API_KEY_PERMISSION_MISSING"
            ]
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "There is none of this identifier in the reach of the key. The answer is the same for another organization or a workspace the key does not name.",
            "x-codes": [
              "INBOX_NOT_FOUND",
              "SMS_REQUEST_NOT_FOUND"
            ]
          },
          "409": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "What the call names is in a state that does not allow it, such as a request already open. The code says which.",
            "x-codes": [
              "SMS_REQUEST_NOT_WITHDRAWABLE"
            ]
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "More calls than the key may make in a minute. `Retry-After` says when to try again.",
            "x-codes": [
              "RATE_LIMITED"
            ]
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Any refusal: an `application/problem+json` body whose `code` says which."
          }
        },
        "security": [
          {
            "bearerAuth": [
              "ws:write"
            ]
          }
        ],
        "summary": "Removes the SmsNumberRequest resource.",
        "tags": [
          "SmsNumberRequest"
        ]
      },
      "get": {
        "description": "Retrieves a SmsNumberRequest resource.",
        "operationId": "getSmsNumberRequest",
        "parameters": [
          {
            "deprecated": false,
            "description": "SmsNumberRequest identifier",
            "explode": false,
            "in": "path",
            "name": "inboxId",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SmsNumberRequest"
                }
              }
            },
            "description": "SmsNumberRequest resource"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "No key, or a key that is refused. `WWW-Authenticate` says where to read how to present one.",
            "x-codes": [
              "UNAUTHENTICATED",
              "API_KEY_UNKNOWN",
              "API_KEY_EXPIRED",
              "API_KEY_REVOKED"
            ]
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The key does not hold the permission of the operation, or the operation refuses every key.",
            "x-codes": [
              "API_KEY_PERMISSION_MISSING"
            ]
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "There is none of this identifier in the reach of the key. The answer is the same for another organization or a workspace the key does not name.",
            "x-codes": [
              "INBOX_NOT_FOUND",
              "SMS_REQUEST_NOT_FOUND"
            ]
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "More calls than the key may make in a minute. `Retry-After` says when to try again.",
            "x-codes": [
              "RATE_LIMITED"
            ]
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Any refusal: an `application/problem+json` body whose `code` says which."
          }
        },
        "security": [
          {
            "bearerAuth": [
              "ws:read"
            ]
          }
        ],
        "summary": "Retrieves a SmsNumberRequest resource.",
        "tags": [
          "SmsNumberRequest"
        ]
      },
      "post": {
        "description": "Creates a SmsNumberRequest resource.",
        "operationId": "requestSmsNumber",
        "parameters": [
          {
            "deprecated": false,
            "description": "SmsNumberRequest identifier",
            "explode": false,
            "in": "path",
            "name": "inboxId",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SmsNumberRequest.RequestSmsNumberRequest"
              }
            }
          },
          "description": "The new SmsNumberRequest resource",
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SmsNumberRequest"
                }
              }
            },
            "description": "SmsNumberRequest resource created",
            "links": {}
          },
          "400": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The request cannot be read: a criterion that is empty, unknown or invalid, a cursor that is not one, a value its rule refuses, or a body that is not JSON. The code says which, and `field` names the criterion.",
            "x-codes": [
              "SMS_COUNTRY_NOT_OPEN",
              "SMS_NOTE_TOO_LONG"
            ]
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "No key, or a key that is refused. `WWW-Authenticate` says where to read how to present one.",
            "x-codes": [
              "UNAUTHENTICATED",
              "API_KEY_UNKNOWN",
              "API_KEY_EXPIRED",
              "API_KEY_REVOKED"
            ]
          },
          "402": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The plan of the organization does not include what the call asks for, or its subscription is suspended. `currentPlan` and `requiredPlan` name the plans when a plan is the cause.",
            "x-codes": [
              "SMS_NUMBER_LIMIT",
              "SUBSCRIPTION_SUSPENDED"
            ]
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The key does not hold the permission of the operation, or the operation refuses every key.",
            "x-codes": [
              "API_KEY_PERMISSION_MISSING"
            ]
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "There is none of this identifier in the reach of the key. The answer is the same for another organization or a workspace the key does not name.",
            "x-codes": [
              "INBOX_NOT_FOUND"
            ]
          },
          "409": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "What the call names is in a state that does not allow it, such as a request already open. The code says which.",
            "x-codes": [
              "SMS_REQUEST_ALREADY_OPEN"
            ]
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "More calls than the key may make in a minute. `Retry-After` says when to try again.",
            "x-codes": [
              "RATE_LIMITED"
            ]
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Any refusal: an `application/problem+json` body whose `code` says which."
          }
        },
        "security": [
          {
            "bearerAuth": [
              "ws:write"
            ]
          }
        ],
        "summary": "Creates a SmsNumberRequest resource.",
        "tags": [
          "SmsNumberRequest"
        ]
      }
    },
    "/messages": {
      "get": {
        "description": "Returns the messages that match the criteria given as query parameters, newest first, one page at a time. At least one criterion is required; a parameter that does not exist is refused.",
        "operationId": "searchMessages",
        "parameters": [
          {
            "deprecated": false,
            "description": "The identifier of an inbox. Naming one is a search on its own. One the caller does not reach is a 404, never an empty list.",
            "explode": false,
            "in": "query",
            "name": "inbox",
            "required": false,
            "schema": {
              "maxLength": 36,
              "type": "string"
            },
            "style": "form"
          },
          {
            "deprecated": false,
            "description": "The address (`slug`) of a workspace to search in. It narrows the search and does not fill it; the inbox wins when both are given.",
            "explode": false,
            "in": "query",
            "name": "workspace",
            "required": false,
            "schema": {
              "maxLength": 40,
              "type": "string"
            },
            "style": "form"
          },
          {
            "deprecated": false,
            "description": "A substring of the address the message was sent to, without regard to case. `%` and `_` are text.",
            "explode": false,
            "in": "query",
            "name": "sentTo",
            "required": false,
            "schema": {
              "maxLength": 254,
              "type": "string"
            },
            "style": "form"
          },
          {
            "deprecated": false,
            "description": "A substring of the address of the sender, without regard to case.",
            "explode": false,
            "in": "query",
            "name": "sentFrom",
            "required": false,
            "schema": {
              "maxLength": 254,
              "type": "string"
            },
            "style": "form"
          },
          {
            "deprecated": false,
            "description": "A substring of the subject, without regard to case.",
            "explode": false,
            "in": "query",
            "name": "subject",
            "required": false,
            "schema": {
              "example": "verification",
              "maxLength": 255,
              "type": "string"
            },
            "style": "form"
          },
          {
            "deprecated": false,
            "description": "A substring of the body, in its text part or its HTML part, without regard to case.",
            "explode": false,
            "in": "query",
            "name": "body",
            "required": false,
            "schema": {
              "maxLength": 255,
              "type": "string"
            },
            "style": "form"
          },
          {
            "deprecated": false,
            "description": "A substring of the one-time code the ingester extracted; read in that column, never in the body.",
            "explode": false,
            "in": "query",
            "name": "otp",
            "required": false,
            "schema": {
              "maxLength": 16,
              "type": "string"
            },
            "style": "form"
          },
          {
            "deprecated": false,
            "description": "Whether the message carries a code (an empty one is not a code). A bound: it narrows in both modes, and alone it is a complete search.",
            "explode": false,
            "in": "query",
            "name": "hasOtp",
            "required": false,
            "schema": {
              "type": "boolean"
            },
            "style": "form"
          },
          {
            "deprecated": false,
            "description": "A substring of the name of an attachment, without regard to case, over every real attachment of the message, kept or not (an inline image is not one). A text criterion: it joins `sentTo`, `sentFrom`, `subject`, `body` and `otp` in `all` or `any`.",
            "explode": false,
            "in": "query",
            "name": "attachmentName",
            "required": false,
            "schema": {
              "maxLength": 255,
              "type": "string"
            },
            "style": "form"
          },
          {
            "deprecated": false,
            "description": "Whether the message carries a real attachment (an inline image, such as a signature, is not one); `false` looks for the absence. A bound: it narrows in both modes, and alone it is a complete search.",
            "explode": false,
            "in": "query",
            "name": "hasAttachment",
            "required": false,
            "schema": {
              "type": "boolean"
            },
            "style": "form"
          },
          {
            "deprecated": false,
            "description": "Messages received at this instant or after. A bound: it narrows in both modes.",
            "explode": false,
            "in": "query",
            "name": "since",
            "required": false,
            "schema": {
              "format": "date-time",
              "type": "string"
            },
            "style": "form"
          },
          {
            "deprecated": false,
            "description": "`parsed` (the default) hides a message the ingester has not finished reading; `any` shows every state, including the refused ones.",
            "explode": false,
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "default": "parsed",
              "enum": [
                "parsed",
                "any"
              ],
              "type": "string"
            },
            "style": "form"
          },
          {
            "deprecated": false,
            "description": "The channel. A bound, absent by default.",
            "explode": false,
            "in": "query",
            "name": "type",
            "required": false,
            "schema": {
              "enum": [
                "email",
                "sms"
              ],
              "type": "string"
            },
            "style": "form"
          },
          {
            "deprecated": false,
            "description": "How `sentTo`, `sentFrom`, `subject`, `body`, `otp` and `attachmentName` join: all of them, or any of them. The bounds (`since`, `type`, `hasOtp`, `hasAttachment`, `status`) narrow in both modes.",
            "explode": false,
            "in": "query",
            "name": "match",
            "required": false,
            "schema": {
              "default": "all",
              "enum": [
                "all",
                "any"
              ],
              "type": "string"
            },
            "style": "form"
          },
          {
            "deprecated": false,
            "description": "The size of the page, 50 by default and 200 at most; a larger one is brought down to 200, zero is refused.",
            "explode": false,
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "minimum": 1,
              "type": "integer"
            },
            "style": "form"
          },
          {
            "deprecated": false,
            "description": "The `nextCursor` of the previous page.",
            "explode": false,
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "type": "string"
            },
            "style": "form"
          },
          {
            "deprecated": false,
            "description": "How long to wait, in milliseconds, for a message that matches: the search is played again every 250 ms and answers as soon as one does. Five minutes (300000) at most, a larger value is brought down to it and is not refused; zero, absent, negative or not a number is a single search. An expired wait answers 200 with an empty page. An organization holds 20 waits open at once, shared by all the instances: the next is refused with 429 `TOO_MANY_WAITS` and `Retry-After: 1`. An instance that is stopping answers a wait it cannot finish with 503 `API_DRAINING` and `Retry-After: 1`, never with an empty page. It fills no search by itself.",
            "explode": false,
            "in": "query",
            "name": "wait",
            "required": false,
            "schema": {
              "default": 0,
              "minimum": 0,
              "type": "integer"
            },
            "style": "form"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MessageSearchResult"
                }
              }
            },
            "description": "MessageSearchResult resource"
          },
          "400": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The request cannot be read: a criterion that is empty, unknown or invalid, a cursor that is not one, a value its rule refuses, or a body that is not JSON. The code says which, and `field` names the criterion.",
            "x-codes": [
              "CRITERIA_EMPTY",
              "CRITERIA_UNKNOWN",
              "CRITERIA_INVALID",
              "INVALID_CURSOR"
            ]
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "No key, or a key that is refused. `WWW-Authenticate` says where to read how to present one.",
            "x-codes": [
              "UNAUTHENTICATED",
              "API_KEY_UNKNOWN",
              "API_KEY_EXPIRED",
              "API_KEY_REVOKED"
            ]
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The key does not hold the permission of the operation, or the operation refuses every key.",
            "x-codes": [
              "API_KEY_PERMISSION_MISSING"
            ]
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "There is none of this identifier in the reach of the key. The answer is the same for another organization or a workspace the key does not name.",
            "x-codes": [
              "INBOX_NOT_FOUND",
              "WORKSPACE_NOT_FOUND"
            ]
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "More calls than the key may make in a minute. `Retry-After` says when to try again.",
            "x-codes": [
              "RATE_LIMITED"
            ]
          },
          "503": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The instance that holds the call is stopping and cannot finish a wait: `Retry-After: 1`, send it again. It is never an empty page.",
            "x-codes": [
              "API_DRAINING"
            ]
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Any refusal: an `application/problem+json` body whose `code` says which."
          }
        },
        "security": [
          {
            "bearerAuth": [
              "ws:read"
            ]
          }
        ],
        "summary": "Retrieves a MessageSearchResult resource.",
        "tags": [
          "MessageSearchResult"
        ]
      }
    },
    "/messages/search": {
      "post": {
        "description": "The search of `searchMessages` with its criteria in a JSON body instead of the query string: the same criteria, limits, page, cursor and wait. Returns the messages that match, newest first, one page at a time, bodies included. At least one criterion is required; a field that does not exist is refused.",
        "operationId": "searchMessagesByBody",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MessageSearchResult.SearchMessagesRequest"
              }
            }
          },
          "description": "The new MessageSearchResult resource",
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MessageSearchResult"
                }
              }
            },
            "description": "MessageSearchResult resource created",
            "links": {}
          },
          "400": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The request cannot be read: a criterion that is empty, unknown or invalid, a cursor that is not one, a value its rule refuses, or a body that is not JSON. The code says which, and `field` names the criterion.",
            "x-codes": [
              "CRITERIA_EMPTY",
              "CRITERIA_UNKNOWN",
              "CRITERIA_INVALID",
              "INVALID_CURSOR"
            ]
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "No key, or a key that is refused. `WWW-Authenticate` says where to read how to present one.",
            "x-codes": [
              "UNAUTHENTICATED",
              "API_KEY_UNKNOWN",
              "API_KEY_EXPIRED",
              "API_KEY_REVOKED"
            ]
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The key does not hold the permission of the operation, or the operation refuses every key.",
            "x-codes": [
              "API_KEY_PERMISSION_MISSING"
            ]
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "There is none of this identifier in the reach of the key. The answer is the same for another organization or a workspace the key does not name.",
            "x-codes": [
              "INBOX_NOT_FOUND",
              "WORKSPACE_NOT_FOUND"
            ]
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "More calls than the key may make in a minute. `Retry-After` says when to try again.",
            "x-codes": [
              "RATE_LIMITED"
            ]
          },
          "503": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The instance that holds the call is stopping and cannot finish a wait: `Retry-After: 1`, send it again. It is never an empty page.",
            "x-codes": [
              "API_DRAINING"
            ]
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Any refusal: an `application/problem+json` body whose `code` says which."
          }
        },
        "security": [
          {
            "bearerAuth": [
              "ws:read"
            ]
          }
        ],
        "summary": "Creates a MessageSearchResult resource.",
        "tags": [
          "MessageSearchResult"
        ]
      }
    },
    "/messages/{messageId}": {
      "get": {
        "description": "Retrieves a Message resource.",
        "operationId": "getMessage",
        "parameters": [
          {
            "deprecated": false,
            "description": "Message identifier",
            "explode": false,
            "in": "path",
            "name": "messageId",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Message"
                }
              }
            },
            "description": "Message resource"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "No key, or a key that is refused. `WWW-Authenticate` says where to read how to present one.",
            "x-codes": [
              "UNAUTHENTICATED",
              "API_KEY_UNKNOWN",
              "API_KEY_EXPIRED",
              "API_KEY_REVOKED"
            ]
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The key does not hold the permission of the operation, or the operation refuses every key.",
            "x-codes": [
              "API_KEY_PERMISSION_MISSING"
            ]
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "There is none of this identifier in the reach of the key. The answer is the same for another organization or a workspace the key does not name.",
            "x-codes": [
              "MESSAGE_NOT_FOUND"
            ]
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "More calls than the key may make in a minute. `Retry-After` says when to try again.",
            "x-codes": [
              "RATE_LIMITED"
            ]
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Any refusal: an `application/problem+json` body whose `code` says which."
          }
        },
        "security": [
          {
            "bearerAuth": [
              "ws:read"
            ]
          }
        ],
        "summary": "Retrieves a Message resource.",
        "tags": [
          "Message"
        ]
      }
    },
    "/notification-destinations": {
      "get": {
        "description": "Retrieves the collection of NotificationDestination resources.",
        "operationId": "listNotificationDestinations",
        "parameters": [],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/NotificationDestination"
                  },
                  "type": "array"
                }
              }
            },
            "description": "NotificationDestination collection"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "No key, or a key that is refused. `WWW-Authenticate` says where to read how to present one.",
            "x-codes": [
              "UNAUTHENTICATED",
              "API_KEY_UNKNOWN",
              "API_KEY_EXPIRED",
              "API_KEY_REVOKED"
            ]
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The key does not hold the permission of the operation, or the operation refuses every key.",
            "x-codes": [
              "API_KEY_PERMISSION_MISSING"
            ]
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "More calls than the key may make in a minute. `Retry-After` says when to try again.",
            "x-codes": [
              "RATE_LIMITED"
            ]
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Any refusal: an `application/problem+json` body whose `code` says which."
          }
        },
        "security": [
          {
            "bearerAuth": [
              "org:read"
            ]
          }
        ],
        "summary": "Retrieves the collection of NotificationDestination resources.",
        "tags": [
          "NotificationDestination"
        ]
      }
    },
    "/workspaces": {
      "get": {
        "description": "Retrieves the collection of Workspace resources.",
        "operationId": "listWorkspaces",
        "parameters": [],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/Workspace"
                  },
                  "type": "array"
                }
              }
            },
            "description": "Workspace collection"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "No key, or a key that is refused. `WWW-Authenticate` says where to read how to present one.",
            "x-codes": [
              "UNAUTHENTICATED",
              "API_KEY_UNKNOWN",
              "API_KEY_EXPIRED",
              "API_KEY_REVOKED"
            ]
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The key does not hold the permission of the operation, or the operation refuses every key.",
            "x-codes": [
              "API_KEY_PERMISSION_MISSING"
            ]
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "More calls than the key may make in a minute. `Retry-After` says when to try again.",
            "x-codes": [
              "RATE_LIMITED"
            ]
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Any refusal: an `application/problem+json` body whose `code` says which."
          }
        },
        "security": [
          {
            "bearerAuth": [
              "org:read"
            ]
          }
        ],
        "summary": "Retrieves the collection of Workspace resources.",
        "tags": [
          "Workspace"
        ]
      },
      "post": {
        "description": "Creates a Workspace resource.",
        "operationId": "createWorkspace",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Workspace.CreateWorkspaceRequest"
              }
            }
          },
          "description": "The new Workspace resource",
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Workspace"
                }
              }
            },
            "description": "Workspace resource created",
            "links": {}
          },
          "400": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Invalid input",
            "links": {}
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "No key, or a key that is refused. `WWW-Authenticate` says where to read how to present one.",
            "x-codes": [
              "UNAUTHENTICATED",
              "API_KEY_UNKNOWN",
              "API_KEY_EXPIRED",
              "API_KEY_REVOKED"
            ]
          },
          "402": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The plan of the organization does not include what the call asks for, or its subscription is suspended. `currentPlan` and `requiredPlan` name the plans when a plan is the cause.",
            "x-codes": [
              "WORKSPACE_LIMIT_REACHED",
              "SUBSCRIPTION_SUSPENDED"
            ]
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The key does not hold the permission of the operation, or the operation refuses every key.",
            "x-codes": [
              "API_KEY_PERMISSION_MISSING"
            ]
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "More calls than the key may make in a minute. `Retry-After` says when to try again.",
            "x-codes": [
              "RATE_LIMITED"
            ]
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Any refusal: an `application/problem+json` body whose `code` says which."
          }
        },
        "security": [
          {
            "bearerAuth": [
              "org:write"
            ]
          }
        ],
        "summary": "Creates a Workspace resource.",
        "tags": [
          "Workspace"
        ]
      }
    },
    "/workspaces/{slug}": {
      "delete": {
        "description": "An API key never deletes a workspace: the call always answers 403. Delete the workspace from the application, by a person.",
        "operationId": "deleteWorkspace",
        "parameters": [
          {
            "deprecated": false,
            "description": "Workspace identifier",
            "explode": false,
            "in": "path",
            "name": "slug",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          }
        ],
        "responses": {
          "204": {
            "description": "Workspace resource deleted"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "No key, or a key that is refused. `WWW-Authenticate` says where to read how to present one.",
            "x-codes": [
              "UNAUTHENTICATED",
              "API_KEY_UNKNOWN",
              "API_KEY_EXPIRED",
              "API_KEY_REVOKED"
            ]
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The key does not hold the permission of the operation, or the operation refuses every key.",
            "x-codes": [
              "API_KEY_CANNOT_DELETE_WORKSPACE"
            ]
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "More calls than the key may make in a minute. `Retry-After` says when to try again.",
            "x-codes": [
              "RATE_LIMITED"
            ]
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Any refusal: an `application/problem+json` body whose `code` says which."
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "Refuse to delete a workspace.",
        "tags": [
          "Workspace"
        ]
      },
      "get": {
        "description": "Retrieves a Workspace resource.",
        "operationId": "getWorkspace",
        "parameters": [
          {
            "deprecated": false,
            "description": "Workspace identifier",
            "explode": false,
            "in": "path",
            "name": "slug",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Workspace"
                }
              }
            },
            "description": "Workspace resource"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "No key, or a key that is refused. `WWW-Authenticate` says where to read how to present one.",
            "x-codes": [
              "UNAUTHENTICATED",
              "API_KEY_UNKNOWN",
              "API_KEY_EXPIRED",
              "API_KEY_REVOKED"
            ]
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The key does not hold the permission of the operation, or the operation refuses every key.",
            "x-codes": [
              "API_KEY_PERMISSION_MISSING"
            ]
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "There is none of this identifier in the reach of the key. The answer is the same for another organization or a workspace the key does not name.",
            "x-codes": [
              "WORKSPACE_NOT_FOUND"
            ]
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "More calls than the key may make in a minute. `Retry-After` says when to try again.",
            "x-codes": [
              "RATE_LIMITED"
            ]
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Any refusal: an `application/problem+json` body whose `code` says which."
          }
        },
        "security": [
          {
            "bearerAuth": [
              "org:read"
            ]
          }
        ],
        "summary": "Retrieves a Workspace resource.",
        "tags": [
          "Workspace"
        ]
      },
      "patch": {
        "description": "Updates the Workspace resource.",
        "operationId": "updateWorkspace",
        "parameters": [
          {
            "deprecated": false,
            "description": "Workspace identifier",
            "explode": false,
            "in": "path",
            "name": "slug",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          }
        ],
        "requestBody": {
          "content": {
            "application/merge-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/Workspace.UpdateWorkspaceRequest.jsonMergePatch"
              }
            }
          },
          "description": "The updated Workspace resource",
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Workspace"
                }
              }
            },
            "description": "Workspace resource updated",
            "links": {}
          },
          "400": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Invalid input",
            "links": {}
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "No key, or a key that is refused. `WWW-Authenticate` says where to read how to present one.",
            "x-codes": [
              "UNAUTHENTICATED",
              "API_KEY_UNKNOWN",
              "API_KEY_EXPIRED",
              "API_KEY_REVOKED"
            ]
          },
          "402": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The plan of the organization does not include what the call asks for, or its subscription is suspended. `currentPlan` and `requiredPlan` name the plans when a plan is the cause.",
            "x-codes": [
              "WORKSPACE_QUOTAS_UNAVAILABLE"
            ]
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The key does not hold the permission of the operation, or the operation refuses every key.",
            "x-codes": [
              "API_KEY_PERMISSION_MISSING"
            ]
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "There is none of this identifier in the reach of the key. The answer is the same for another organization or a workspace the key does not name.",
            "x-codes": [
              "WORKSPACE_NOT_FOUND"
            ]
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "More calls than the key may make in a minute. `Retry-After` says when to try again.",
            "x-codes": [
              "RATE_LIMITED"
            ]
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Any refusal: an `application/problem+json` body whose `code` says which."
          }
        },
        "security": [
          {
            "bearerAuth": [
              "org:write"
            ]
          }
        ],
        "summary": "Updates the Workspace resource.",
        "tags": [
          "Workspace"
        ]
      }
    },
    "/workspaces/{slug}/inboxes": {
      "get": {
        "description": "Retrieves the collection of Inbox resources.",
        "operationId": "listWorkspaceInboxes",
        "parameters": [
          {
            "deprecated": false,
            "description": "Inbox identifier",
            "explode": false,
            "in": "path",
            "name": "slug",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/Inbox"
                  },
                  "type": "array"
                }
              }
            },
            "description": "Inbox collection"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "No key, or a key that is refused. `WWW-Authenticate` says where to read how to present one.",
            "x-codes": [
              "UNAUTHENTICATED",
              "API_KEY_UNKNOWN",
              "API_KEY_EXPIRED",
              "API_KEY_REVOKED"
            ]
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The key does not hold the permission of the operation, or the operation refuses every key.",
            "x-codes": [
              "API_KEY_PERMISSION_MISSING"
            ]
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "There is none of this identifier in the reach of the key. The answer is the same for another organization or a workspace the key does not name.",
            "x-codes": [
              "WORKSPACE_NOT_FOUND"
            ]
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "More calls than the key may make in a minute. `Retry-After` says when to try again.",
            "x-codes": [
              "RATE_LIMITED"
            ]
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Any refusal: an `application/problem+json` body whose `code` says which."
          }
        },
        "security": [
          {
            "bearerAuth": [
              "ws:read"
            ]
          }
        ],
        "summary": "Retrieves the collection of Inbox resources.",
        "tags": [
          "Inbox"
        ]
      },
      "post": {
        "description": "Creates a Inbox resource.",
        "operationId": "createInbox",
        "parameters": [
          {
            "deprecated": false,
            "description": "Inbox identifier",
            "explode": false,
            "in": "path",
            "name": "slug",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Inbox.CreateInboxRequest"
              }
            }
          },
          "description": "The new Inbox resource",
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Inbox"
                }
              }
            },
            "description": "Inbox resource created",
            "links": {}
          },
          "400": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Invalid input",
            "links": {}
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "No key, or a key that is refused. `WWW-Authenticate` says where to read how to present one.",
            "x-codes": [
              "UNAUTHENTICATED",
              "API_KEY_UNKNOWN",
              "API_KEY_EXPIRED",
              "API_KEY_REVOKED"
            ]
          },
          "402": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The plan of the organization does not include what the call asks for, or its subscription is suspended. `currentPlan` and `requiredPlan` name the plans when a plan is the cause.",
            "x-codes": [
              "INBOX_LIMIT_REACHED",
              "SUBSCRIPTION_SUSPENDED"
            ]
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The key does not hold the permission of the operation, or the operation refuses every key.",
            "x-codes": [
              "API_KEY_PERMISSION_MISSING"
            ]
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "There is none of this identifier in the reach of the key. The answer is the same for another organization or a workspace the key does not name.",
            "x-codes": [
              "WORKSPACE_NOT_FOUND"
            ]
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "More calls than the key may make in a minute. `Retry-After` says when to try again.",
            "x-codes": [
              "RATE_LIMITED"
            ]
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Any refusal: an `application/problem+json` body whose `code` says which."
          }
        },
        "security": [
          {
            "bearerAuth": [
              "ws:write"
            ]
          }
        ],
        "summary": "Creates a Inbox resource.",
        "tags": [
          "Inbox"
        ]
      }
    },
    "/workspaces/{slug}/members": {
      "get": {
        "description": "Retrieves a WorkspaceMembers resource.",
        "operationId": "listWorkspaceMembers",
        "parameters": [
          {
            "deprecated": false,
            "description": "WorkspaceMembers identifier",
            "explode": false,
            "in": "path",
            "name": "slug",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkspaceMembers"
                }
              }
            },
            "description": "WorkspaceMembers resource"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "No key, or a key that is refused. `WWW-Authenticate` says where to read how to present one.",
            "x-codes": [
              "UNAUTHENTICATED",
              "API_KEY_UNKNOWN",
              "API_KEY_EXPIRED",
              "API_KEY_REVOKED"
            ]
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The key does not hold the permission of the operation, or the operation refuses every key.",
            "x-codes": [
              "API_KEY_PERMISSION_MISSING"
            ]
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "There is none of this identifier in the reach of the key. The answer is the same for another organization or a workspace the key does not name.",
            "x-codes": [
              "WORKSPACE_NOT_FOUND"
            ]
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "More calls than the key may make in a minute. `Retry-After` says when to try again.",
            "x-codes": [
              "RATE_LIMITED"
            ]
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Any refusal: an `application/problem+json` body whose `code` says which."
          }
        },
        "security": [
          {
            "bearerAuth": [
              "org:read"
            ]
          }
        ],
        "summary": "Retrieves a WorkspaceMembers resource.",
        "tags": [
          "WorkspaceMembers"
        ]
      },
      "post": {
        "description": "Creates a WorkspaceMember resource.",
        "operationId": "addWorkspaceMember",
        "parameters": [
          {
            "deprecated": false,
            "description": "WorkspaceMember identifier",
            "explode": false,
            "in": "path",
            "name": "slug",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WorkspaceMember.AddWorkspaceMemberRequest"
              }
            }
          },
          "description": "The new WorkspaceMember resource",
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkspaceMember"
                }
              }
            },
            "description": "WorkspaceMember resource created",
            "links": {}
          },
          "400": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Invalid input",
            "links": {}
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "No key, or a key that is refused. `WWW-Authenticate` says where to read how to present one.",
            "x-codes": [
              "UNAUTHENTICATED",
              "API_KEY_UNKNOWN",
              "API_KEY_EXPIRED",
              "API_KEY_REVOKED"
            ]
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The key does not hold the permission of the operation, or the operation refuses every key.",
            "x-codes": [
              "API_KEY_PERMISSION_MISSING"
            ]
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "There is none of this identifier in the reach of the key. The answer is the same for another organization or a workspace the key does not name.",
            "x-codes": [
              "WORKSPACE_NOT_FOUND"
            ]
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "More calls than the key may make in a minute. `Retry-After` says when to try again.",
            "x-codes": [
              "RATE_LIMITED"
            ]
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Any refusal: an `application/problem+json` body whose `code` says which."
          }
        },
        "security": [
          {
            "bearerAuth": [
              "org:write"
            ]
          }
        ],
        "summary": "Creates a WorkspaceMember resource.",
        "tags": [
          "WorkspaceMember"
        ]
      }
    },
    "/workspaces/{slug}/members/{userId}": {
      "delete": {
        "description": "Removes the WorkspaceMember resource.",
        "operationId": "removeWorkspaceMember",
        "parameters": [
          {
            "deprecated": false,
            "description": "WorkspaceMember identifier",
            "explode": false,
            "in": "path",
            "name": "slug",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          },
          {
            "deprecated": false,
            "description": "WorkspaceMember identifier",
            "explode": false,
            "in": "path",
            "name": "userId",
            "required": true,
            "schema": {
              "type": "string"
            },
            "style": "simple"
          }
        ],
        "responses": {
          "204": {
            "description": "WorkspaceMember resource deleted"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "No key, or a key that is refused. `WWW-Authenticate` says where to read how to present one.",
            "x-codes": [
              "UNAUTHENTICATED",
              "API_KEY_UNKNOWN",
              "API_KEY_EXPIRED",
              "API_KEY_REVOKED"
            ]
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The key does not hold the permission of the operation, or the operation refuses every key.",
            "x-codes": [
              "API_KEY_PERMISSION_MISSING"
            ]
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "There is none of this identifier in the reach of the key. The answer is the same for another organization or a workspace the key does not name.",
            "x-codes": [
              "WORKSPACE_NOT_FOUND",
              "MEMBER_NOT_FOUND"
            ]
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "More calls than the key may make in a minute. `Retry-After` says when to try again.",
            "x-codes": [
              "RATE_LIMITED"
            ]
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Any refusal: an `application/problem+json` body whose `code` says which."
          }
        },
        "security": [
          {
            "bearerAuth": [
              "org:write"
            ]
          }
        ],
        "summary": "Removes the WorkspaceMember resource.",
        "tags": [
          "WorkspaceMember"
        ]
      }
    }
  },
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "servers": [
    {
      "description": "",
      "url": "https://api.facteur.local/"
    }
  ],
  "tags": [
    {
      "description": "Health probe of each host. Public: it needs no authentication.",
      "name": "Health"
    },
    {
      "description": "A pointer saved on an inbox: a pattern, the part of the message it reads, and the key its value is written under.",
      "name": "Extractor"
    },
    {
      "description": "The patterns the engine proposes for a selection.",
      "name": "ExtractorSuggestions"
    },
    {
      "description": "What a pattern captured on the last messages of an inbox.",
      "name": "ExtractorTrial"
    },
    {
      "description": "An inbox: what a customer opens to receive mail or SMS, in a workspace.",
      "name": "Inbox"
    },
    {
      "description": "A message an inbox received, or the trace of one it refused.",
      "name": "Message"
    },
    {
      "description": "A page of messages and the cursor of the next one.",
      "name": "MessagePage"
    },
    {
      "description": "A page of messages found by a search, and the cursor of the next one.",
      "name": "MessageSearchResult"
    },
    {
      "description": "A workspace of an organization: a partition of its inboxes.",
      "name": "Workspace"
    },
    {
      "description": "A person with a row in a workspace.",
      "name": "WorkspaceMember"
    },
    {
      "description": "Who reaches a workspace: the whole organization, or the people with a row in it.",
      "name": "WorkspaceMembers"
    },
    {
      "description": "What the organization holds in its open billing period, where it went, and what it may still spend.",
      "name": "Capacity"
    },
    {
      "description": "Where the alerts of the organization are written: an email address (or its owners and administrators), a Slack or Discord channel, or a PagerDuty or OpsGenie service.",
      "name": "NotificationDestination"
    },
    {
      "description": "The request of an inbox for an SMS number, and where it stands.",
      "name": "SmsNumberRequest"
    }
  ],
  "webhooks": {},
  "x-api-key-policy": {
    "description": "What no key does, whatever permissions it holds. None of these gestures has a route on this API.",
    "never": [
      {
        "action": "invite_people",
        "description": "Invite a person to an organization. Only a signed-in person does it, in the Facteur app."
      },
      {
        "action": "pay",
        "description": "Pay, change the plan or the spending cap, or read the invoices. Only a signed-in person does it, in the Facteur app."
      },
      {
        "action": "manage_api_keys",
        "description": "Create, change or revoke an API key. A key cannot make or end a key, its own included."
      },
      {
        "action": "manage_alert_destinations",
        "description": "Create, change or delete a destination of the alerts. A key can only list them."
      }
    ]
  }
}
