{
  "info": {
    "name": "SubSub API",
    "description": "Post scheduled jobs and unit inspections into SubSub, and read the trades and buildings they can name. Paste your API token (My account -> Integrations -> Connect your CRM) into the collection's `token` variable. Full reference: https://subsub.work/developers",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
  },
  "auth": {
    "type": "bearer",
    "bearer": [
      {
        "key": "token",
        "value": "{{token}}",
        "type": "string"
      }
    ]
  },
  "variable": [
    {
      "key": "baseUrl",
      "value": "https://api.subsub.work/api/v1",
      "type": "string"
    },
    {
      "key": "token",
      "value": "",
      "type": "string"
    }
  ],
  "item": [
    {
      "name": "Reads",
      "item": [
        {
          "name": "Who this token belongs to",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/me",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "me"
              ]
            },
            "description": "The account the token belongs to. A read, so it is the safe way to test a token."
          }
        },
        {
          "name": "Trades",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/trades",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "trades"
              ]
            },
            "description": "Every trade id a job may name, with its label."
          }
        },
        {
          "name": "Buildings",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/properties?page=0",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "properties"
              ],
              "query": [
                {
                  "key": "page",
                  "value": "0"
                }
              ]
            },
            "description": "The buildings a job or inspection may name by propertyId. 100 a page; a short page is the last."
          }
        }
      ]
    },
    {
      "name": "Jobs",
      "item": [
        {
          "name": "Post a job",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/jobs",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "jobs"
              ]
            },
            "description": "Required: externalId, title, trades, date. Optional: source, client, address, area, zip, propertyId, time, scope, sqft, stories, materialSource, materialSupplier, materialBranch, materialsPaidBy, notes. Send address or propertyId. The same externalId sent twice returns the job that exists rather than making another.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"externalId\": \"CRM-1041\",\n  \"source\": \"generic\",\n  \"title\": \"Reroof — 14 Alder Way\",\n  \"trades\": [\n    \"roofing\",\n    \"gutters\"\n  ],\n  \"date\": \"2026-10-14\",\n  \"time\": \"08:00\",\n  \"address\": \"14 Alder Way\",\n  \"area\": \"Seattle\",\n  \"zip\": \"98101\",\n  \"client\": \"M. Okafor\",\n  \"scope\": \"Tear off and replace, 30yr architectural.\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Post a job (webhook address, no header)",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/hooks/generic/{{token}}",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "hooks",
                "generic",
                "{{token}}"
              ]
            },
            "description": "For a system that cannot set an Authorization header: the token goes in the address.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"externalId\": \"CRM-1041\",\n  \"source\": \"generic\",\n  \"title\": \"Reroof — 14 Alder Way\",\n  \"trades\": [\n    \"roofing\",\n    \"gutters\"\n  ],\n  \"date\": \"2026-10-14\",\n  \"time\": \"08:00\",\n  \"address\": \"14 Alder Way\",\n  \"area\": \"Seattle\",\n  \"zip\": \"98101\",\n  \"client\": \"M. Okafor\",\n  \"scope\": \"Tear off and replace, 30yr architectural.\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "auth": {
              "type": "noauth"
            }
          }
        }
      ]
    },
    {
      "name": "Inspections",
      "item": [
        {
          "name": "Post an inspection",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/inspections",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "inspections"
              ]
            },
            "description": "Required: externalId, kind, property, rooms. Optional: source, propertyId, unit, tenantName, inspectedOn. Send property or propertyId. It always arrives as a draft. Accounts with buildings only.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"externalId\": \"WALK-2207\",\n  \"kind\": \"move_out\",\n  \"property\": \"Ballard Apts\",\n  \"unit\": \"4B\",\n  \"inspectedOn\": \"2026-10-14\",\n  \"rooms\": [\n    {\n      \"name\": \"Kitchen\",\n      \"status\": \"ok\"\n    },\n    {\n      \"name\": \"Bathroom 1\",\n      \"status\": \"needs work\",\n      \"note\": \"Cracked basin, left of the tap.\"\n    }\n  ]\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Post an inspection (webhook address, no header)",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/hooks/generic/{{token}}/inspections",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "hooks",
                "generic",
                "{{token}}",
                "inspections"
              ]
            },
            "description": "The inspections door for a system that cannot set a header.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"externalId\": \"WALK-2207\",\n  \"kind\": \"move_out\",\n  \"property\": \"Ballard Apts\",\n  \"unit\": \"4B\",\n  \"inspectedOn\": \"2026-10-14\",\n  \"rooms\": [\n    {\n      \"name\": \"Kitchen\",\n      \"status\": \"ok\"\n    },\n    {\n      \"name\": \"Bathroom 1\",\n      \"status\": \"needs work\",\n      \"note\": \"Cracked basin, left of the tap.\"\n    }\n  ]\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "auth": {
              "type": "noauth"
            }
          }
        }
      ]
    }
  ]
}