{
  "info": {
    "name": "Mailcore Corporate Mailbox API v1",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
    "description": "Route/model-derived requests for https://mailcore.uz/api/mailbox/v1. baseUrl is the HTTPS origin https://mailcore.uz (without /api/mailbox/v1). The organisation owner creates an integration for selected mailboxes; configure its dedicated mcb_ mailboxToken and exact opaque resource IDs. Secret defaults are empty. Importing this collection does not grant access or complete your CRM acceptance. Save a new idempotencyKey for a new CRM mutation and reuse it with the same body on a lost response."
  },
  "auth": {
    "type": "bearer",
    "bearer": [
      {
        "key": "token",
        "value": "{{mailboxToken}}",
        "type": "string"
      }
    ]
  },
  "variable": [
    {
      "key": "afterSequence",
      "value": ""
    },
    {
      "key": "attachment_id",
      "value": ""
    },
    {
      "key": "baseUrl",
      "value": "https://mailcore.uz"
    },
    {
      "key": "cursor",
      "value": ""
    },
    {
      "key": "folderId",
      "value": ""
    },
    {
      "key": "idempotencyKey",
      "value": ""
    },
    {
      "key": "limit",
      "value": ""
    },
    {
      "key": "mailboxToken",
      "value": ""
    },
    {
      "key": "mailbox_id",
      "value": ""
    },
    {
      "key": "message_id",
      "value": ""
    },
    {
      "key": "operation_id",
      "value": ""
    },
    {
      "key": "thread_id",
      "value": ""
    },
    {
      "key": "webhook_id",
      "value": ""
    }
  ],
  "item": [
    {
      "name": "API capabilities and limits",
      "request": {
        "method": "GET",
        "header": [
          {
            "key": "Accept",
            "value": "application/json"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/api/mailbox/v1",
          "query": []
        },
        "description": "API capabilities and limits\nUse the verified live contract. Persist an Idempotency-Key and exact body before each mutation; a new key can create another send. No secret is included in this collection."
      }
    },
    {
      "name": "Verify current token and live grants",
      "request": {
        "method": "GET",
        "header": [
          {
            "key": "Accept",
            "value": "application/json"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/api/mailbox/v1/token/verify",
          "query": []
        },
        "description": "Verify current token and live grants\nUse the verified live contract. Persist an Idempotency-Key and exact body before each mutation; a new key can create another send. No secret is included in this collection."
      }
    },
    {
      "name": "List explicitly granted mailboxes",
      "request": {
        "method": "GET",
        "header": [
          {
            "key": "Accept",
            "value": "application/json"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/api/mailbox/v1/mailboxes",
          "query": []
        },
        "description": "List explicitly granted mailboxes\nUse the verified live contract. Persist an Idempotency-Key and exact body before each mutation; a new key can create another send. No secret is included in this collection."
      }
    },
    {
      "name": "List folders",
      "request": {
        "method": "GET",
        "header": [
          {
            "key": "Accept",
            "value": "application/json"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/api/mailbox/v1/mailboxes/{{mailbox_id}}/folders",
          "query": []
        },
        "description": "List folders\nUse the verified live contract. Persist an Idempotency-Key and exact body before each mutation; a new key can create another send. No secret is included in this collection."
      }
    },
    {
      "name": "Read a bounded folder snapshot",
      "request": {
        "method": "GET",
        "header": [
          {
            "key": "Accept",
            "value": "application/json"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/api/mailbox/v1/mailboxes/{{mailbox_id}}/messages?folderId={{folderId}}",
          "query": [
            {
              "key": "folderId",
              "value": "{{folderId}}",
              "disabled": false
            },
            {
              "key": "cursor",
              "value": "{{cursor}}",
              "disabled": true
            },
            {
              "key": "limit",
              "value": "50",
              "disabled": true
            }
          ]
        },
        "description": "Read a bounded folder snapshot\nUse the verified live contract. Persist an Idempotency-Key and exact body before each mutation; a new key can create another send. No secret is included in this collection."
      }
    },
    {
      "name": "Queue an outgoing message",
      "request": {
        "method": "POST",
        "header": [
          {
            "key": "Accept",
            "value": "application/json"
          },
          {
            "key": "Content-Type",
            "value": "application/json"
          },
          {
            "key": "Idempotency-Key",
            "value": "{{idempotencyKey}}"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/api/mailbox/v1/mailboxes/{{mailbox_id}}/messages",
          "query": []
        },
        "description": "Queue an outgoing message\nUse the verified live contract. Persist an Idempotency-Key and exact body before each mutation; a new key can create another send. No secret is included in this collection.",
        "body": {
          "mode": "raw",
          "raw": "{\n  \"to\": [\n    \"recipient@example.invalid\"\n  ],\n  \"subject\": \"CRM integration test\",\n  \"text\": \"Authorised integration test.\"\n}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        }
      }
    },
    {
      "name": "Read MIME bodies and attachment references",
      "request": {
        "method": "GET",
        "header": [
          {
            "key": "Accept",
            "value": "application/json"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/api/mailbox/v1/mailboxes/{{mailbox_id}}/messages/{{message_id}}",
          "query": []
        },
        "description": "Read MIME bodies and attachment references\nUse the verified live contract. Persist an Idempotency-Key and exact body before each mutation; a new key can create another send. No secret is included in this collection."
      }
    },
    {
      "name": "Download original RFC 822 message",
      "request": {
        "method": "GET",
        "header": [
          {
            "key": "Accept",
            "value": "application/json"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/api/mailbox/v1/mailboxes/{{mailbox_id}}/messages/{{message_id}}/raw",
          "query": []
        },
        "description": "Download original RFC 822 message\nUse the verified live contract. Persist an Idempotency-Key and exact body before each mutation; a new key can create another send. No secret is included in this collection."
      }
    },
    {
      "name": "Download attachment bytes",
      "request": {
        "method": "GET",
        "header": [
          {
            "key": "Accept",
            "value": "application/json"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/api/mailbox/v1/mailboxes/{{mailbox_id}}/messages/{{message_id}}/attachments/{{attachment_id}}",
          "query": []
        },
        "description": "Download attachment bytes\nUse the verified live contract. Persist an Idempotency-Key and exact body before each mutation; a new key can create another send. No secret is included in this collection."
      }
    },
    {
      "name": "Read observed thread metadata",
      "request": {
        "method": "GET",
        "header": [
          {
            "key": "Accept",
            "value": "application/json"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/api/mailbox/v1/mailboxes/{{mailbox_id}}/threads/{{thread_id}}",
          "query": [
            {
              "key": "limit",
              "value": "100",
              "disabled": true
            }
          ]
        },
        "description": "Read observed thread metadata\nUse the verified live contract. Persist an Idempotency-Key and exact body before each mutation; a new key can create another send. No secret is included in this collection."
      }
    },
    {
      "name": "Queue a threaded reply",
      "request": {
        "method": "POST",
        "header": [
          {
            "key": "Accept",
            "value": "application/json"
          },
          {
            "key": "Content-Type",
            "value": "application/json"
          },
          {
            "key": "Idempotency-Key",
            "value": "{{idempotencyKey}}"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/api/mailbox/v1/mailboxes/{{mailbox_id}}/messages/{{message_id}}/reply",
          "query": []
        },
        "description": "Queue a threaded reply\nUse the verified live contract. Persist an Idempotency-Key and exact body before each mutation; a new key can create another send. No secret is included in this collection.",
        "body": {
          "mode": "raw",
          "raw": "{\n  \"text\": \"Authorised reply test.\",\n  \"externalOperator\": \"crm-operator-reference\"\n}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        }
      }
    },
    {
      "name": "Queue explicit flag changes",
      "request": {
        "method": "POST",
        "header": [
          {
            "key": "Accept",
            "value": "application/json"
          },
          {
            "key": "Content-Type",
            "value": "application/json"
          },
          {
            "key": "Idempotency-Key",
            "value": "{{idempotencyKey}}"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/api/mailbox/v1/mailboxes/{{mailbox_id}}/messages/{{message_id}}/flags",
          "query": []
        },
        "description": "Queue explicit flag changes\nUse the verified live contract. Persist an Idempotency-Key and exact body before each mutation; a new key can create another send. No secret is included in this collection.",
        "body": {
          "mode": "raw",
          "raw": "{\n  \"add\": [\n    \"seen\"\n  ],\n  \"remove\": []\n}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        }
      }
    },
    {
      "name": "Queue a reversible folder move",
      "request": {
        "method": "POST",
        "header": [
          {
            "key": "Accept",
            "value": "application/json"
          },
          {
            "key": "Content-Type",
            "value": "application/json"
          },
          {
            "key": "Idempotency-Key",
            "value": "{{idempotencyKey}}"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/api/mailbox/v1/mailboxes/{{mailbox_id}}/messages/{{message_id}}/move",
          "query": []
        },
        "description": "Queue a reversible folder move\nUse the verified live contract. Persist an Idempotency-Key and exact body before each mutation; a new key can create another send. No secret is included in this collection.",
        "body": {
          "mode": "raw",
          "raw": "{\n  \"folderId\": \"{{folder_id}}\"\n}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        }
      }
    },
    {
      "name": "Read durable operation and Sent-copy state",
      "request": {
        "method": "GET",
        "header": [
          {
            "key": "Accept",
            "value": "application/json"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/api/mailbox/v1/mailboxes/{{mailbox_id}}/operations/{{operation_id}}",
          "query": []
        },
        "description": "Read durable operation and Sent-copy state\nUse the verified live contract. Persist an Idempotency-Key and exact body before each mutation; a new key can create another send. No secret is included in this collection."
      }
    },
    {
      "name": "Recover observed changes after a sequence",
      "request": {
        "method": "GET",
        "header": [
          {
            "key": "Accept",
            "value": "application/json"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/api/mailbox/v1/mailboxes/{{mailbox_id}}/events",
          "query": [
            {
              "key": "afterSequence",
              "value": "0",
              "disabled": true
            },
            {
              "key": "limit",
              "value": "100",
              "disabled": true
            }
          ]
        },
        "description": "Recover observed changes after a sequence\nUse the verified live contract. Persist an Idempotency-Key and exact body before each mutation; a new key can create another send. No secret is included in this collection."
      }
    },
    {
      "name": "Capture a safe baseline before a full snapshot",
      "request": {
        "method": "GET",
        "header": [
          {
            "key": "Accept",
            "value": "application/json"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/api/mailbox/v1/mailboxes/{{mailbox_id}}/events/checkpoint",
          "query": []
        },
        "description": "Capture a safe baseline before a full snapshot\nUse the verified live contract. Persist an Idempotency-Key and exact body before each mutation; a new key can create another send. No secret is included in this collection."
      }
    },
    {
      "name": "List owned webhook subscriptions",
      "request": {
        "method": "GET",
        "header": [
          {
            "key": "Accept",
            "value": "application/json"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/api/mailbox/v1/mailboxes/{{mailbox_id}}/webhooks",
          "query": []
        },
        "description": "List owned webhook subscriptions\nUse the verified live contract. Persist an Idempotency-Key and exact body before each mutation; a new key can create another send. No secret is included in this collection."
      }
    },
    {
      "name": "Create a metadata-only signed webhook",
      "request": {
        "method": "POST",
        "header": [
          {
            "key": "Accept",
            "value": "application/json"
          },
          {
            "key": "Content-Type",
            "value": "application/json"
          },
          {
            "key": "Idempotency-Key",
            "value": "{{idempotencyKey}}"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/api/mailbox/v1/mailboxes/{{mailbox_id}}/webhooks",
          "query": []
        },
        "description": "Create a metadata-only signed webhook\nUse the verified live contract. Persist an Idempotency-Key and exact body before each mutation; a new key can create another send. No secret is included in this collection.",
        "body": {
          "mode": "raw",
          "raw": "{\n  \"url\": \"https://crm.example.invalid/mailcore-mailbox-webhook\",\n  \"eventTypes\": [\n    \"message.created\",\n    \"message.updated\",\n    \"message.deleted\",\n    \"folder.reset\",\n    \"operation.updated\"\n  ]\n}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        }
      }
    },
    {
      "name": "Disable an owned webhook",
      "request": {
        "method": "POST",
        "header": [
          {
            "key": "Accept",
            "value": "application/json"
          },
          {
            "key": "Content-Type",
            "value": "application/json"
          },
          {
            "key": "Idempotency-Key",
            "value": "{{idempotencyKey}}"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/api/mailbox/v1/mailboxes/{{mailbox_id}}/webhooks/{{webhook_id}}/disable",
          "query": []
        },
        "description": "Disable an owned webhook\nUse the verified live contract. Persist an Idempotency-Key and exact body before each mutation; a new key can create another send. No secret is included in this collection.",
        "body": {
          "mode": "raw",
          "raw": "{}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        }
      }
    }
  ]
}
