{
    "variable": [
        {
            "id": "baseUrl",
            "key": "baseUrl",
            "type": "string",
            "name": "string",
            "value": "https:\/\/zoeticoach.com"
        }
    ],
    "info": {
        "name": "ZoetiCoach Partner API Documentation",
        "_postman_id": "dcb02424-a55c-4b17-877c-832bb441aaaa",
        "description": "Read\/write client identity records and pull real, AI-verified WhatsApp check-in adherence data into your own EHR, CRM, or backend system. Enterprise plan required.",
        "schema": "https:\/\/schema.getpostman.com\/json\/collection\/v2.1.0\/collection.json"
    },
    "item": [
        {
            "name": "Adherence",
            "description": "\nReal, AI-verified check-in adherence data \u2014 the core value of this API.\nDerived entirely from actual WhatsApp check-in behavior run through\nZoetiCoach's own verification pipeline. This is deliberately read-only:\nthere is no way to write a check-in through this API.",
            "item": [
                {
                    "name": "Get a client's adherence history",
                    "request": {
                        "url": {
                            "host": "{{baseUrl}}",
                            "path": "api\/partner\/v1\/clients\/:externalId\/checkins",
                            "query": [
                                {
                                    "key": "days",
                                    "value": "30",
                                    "description": "How many trailing days of history to return (1-90). Defaults to 30.",
                                    "disabled": false
                                }
                            ],
                            "raw": "{{baseUrl}}\/api\/partner\/v1\/clients\/:externalId\/checkins?days=30",
                            "variable": [
                                {
                                    "id": "externalId",
                                    "key": "externalId",
                                    "value": "patient-8821",
                                    "description": "Your own record id for this client."
                                }
                            ]
                        },
                        "method": "GET",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application\/json"
                            },
                            {
                                "key": "Accept",
                                "value": "application\/json"
                            }
                        ],
                        "body": null,
                        "description": "Per-day done\/partial\/missed\/frozen\/replied\/none status for the\nrequested window, plus the client's current streak and total points."
                    },
                    "response": [
                        {
                            "header": [],
                            "code": 200,
                            "body": "{\"external_id\": \"patient-8821\", \"days\": [{\"date\": \"2026-09-28\", \"status\": \"done\"}, {\"date\": \"2026-09-29\", \"status\": \"partial\"}], \"current_streak_days\": 4, \"total_points\": 55, \"week_energy_score\": 7}",
                            "name": ""
                        },
                        {
                            "header": [],
                            "code": 404,
                            "body": "{\"message\": \"Client not found.\"}",
                            "name": ""
                        }
                    ]
                }
            ]
        },
        {
            "name": "Authentication",
            "description": "\nIntrospect the current API token \u2014 its abilities and when it was created.\nUseful for a partner's SDK to confirm which endpoints a given token can\ncall without having to trigger a 403 first.",
            "item": [
                {
                    "name": "Get the current token's abilities",
                    "request": {
                        "url": {
                            "host": "{{baseUrl}}",
                            "path": "api\/partner\/v1\/me",
                            "query": [],
                            "raw": "{{baseUrl}}\/api\/partner\/v1\/me"
                        },
                        "method": "GET",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application\/json"
                            },
                            {
                                "key": "Accept",
                                "value": "application\/json"
                            }
                        ],
                        "body": null,
                        "description": ""
                    },
                    "response": [
                        {
                            "header": [],
                            "code": 200,
                            "body": "{\"token_name\": \"Zapier integration\", \"abilities\": [\"clients:write\", \"checkins:read\"], \"created_at\": \"2026-09-29T10:00:00.000000Z\"}",
                            "name": ""
                        }
                    ]
                }
            ]
        },
        {
            "name": "Clients",
            "description": "\nMinimal client-identity endpoints \u2014 establishing the external_id mapping a\npartner needs to later pull adherence data via the Adherence group below.\nThere is no list\/enumerate endpoint anywhere in this API by design \u2014 every\nlookup requires you to already know the specific external_id you're\nasking about.",
            "item": [
                {
                    "name": "Create a client",
                    "request": {
                        "url": {
                            "host": "{{baseUrl}}",
                            "path": "api\/partner\/v1\/clients",
                            "query": [],
                            "raw": "{{baseUrl}}\/api\/partner\/v1\/clients"
                        },
                        "method": "POST",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application\/json"
                            },
                            {
                                "key": "Accept",
                                "value": "application\/json"
                            }
                        ],
                        "body": {
                            "mode": "raw",
                            "raw": "{\"external_id\":\"b\",\"name\":\"n\",\"phone\":\"gzmiyvdljnikhway\",\"language\":\"kcmyuw\"}"
                        },
                        "description": "Creates a minimal client-identity record and returns ZoetiCoach's own id\nalongside your external_id, so you can map the two going forward.\nConsent is never set via this API \u2014 the client starts inert (no\nWhatsApp check-ins) until they complete ZoetiCoach's own opt-in flow,\nwhich this call triggers automatically.\n\nSend an `Idempotency-Key` header to make a retry of this exact request\nsafe \u2014 a repeat with the same key returns the original response\ninstead of creating a duplicate client."
                    },
                    "response": [
                        {
                            "header": [],
                            "code": 201,
                            "body": "{\"id\": 42, \"external_id\": \"patient-8821\", \"name\": \"Priya Nair\", \"status\": \"active\", \"language\": \"en\"}",
                            "name": ""
                        },
                        {
                            "header": [],
                            "code": 422,
                            "body": "{\"message\": \"The external id has already been taken.\", \"errors\": {\"external_id\": [\"The external id has already been taken.\"]}}",
                            "name": ""
                        }
                    ]
                },
                {
                    "name": "Get a client",
                    "request": {
                        "url": {
                            "host": "{{baseUrl}}",
                            "path": "api\/partner\/v1\/clients\/:externalId",
                            "query": [],
                            "raw": "{{baseUrl}}\/api\/partner\/v1\/clients\/:externalId",
                            "variable": [
                                {
                                    "id": "externalId",
                                    "key": "externalId",
                                    "value": "patient-8821",
                                    "description": "Your own record id for this client."
                                }
                            ]
                        },
                        "method": "GET",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application\/json"
                            },
                            {
                                "key": "Accept",
                                "value": "application\/json"
                            }
                        ],
                        "body": null,
                        "description": "Look up a client by the external_id you gave it at creation."
                    },
                    "response": [
                        {
                            "header": [],
                            "code": 200,
                            "body": "{\"id\": 42, \"external_id\": \"patient-8821\", \"name\": \"Priya Nair\", \"status\": \"active\", \"language\": \"en\"}",
                            "name": ""
                        },
                        {
                            "header": [],
                            "code": 404,
                            "body": "{\"message\": \"Client not found.\"}",
                            "name": ""
                        }
                    ]
                },
                {
                    "name": "Update a client",
                    "request": {
                        "url": {
                            "host": "{{baseUrl}}",
                            "path": "api\/partner\/v1\/clients\/:externalId",
                            "query": [],
                            "raw": "{{baseUrl}}\/api\/partner\/v1\/clients\/:externalId",
                            "variable": [
                                {
                                    "id": "externalId",
                                    "key": "externalId",
                                    "value": "patient-8821",
                                    "description": "Your own record id for this client."
                                }
                            ]
                        },
                        "method": "PATCH",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application\/json"
                            },
                            {
                                "key": "Accept",
                                "value": "application\/json"
                            }
                        ],
                        "body": {
                            "mode": "raw",
                            "raw": "{\"name\":\"b\",\"status\":\"paused\"}"
                        },
                        "description": "Updates name and\/or status only \u2014 nothing else about a client is\nwritable through this API."
                    },
                    "response": [
                        {
                            "header": [],
                            "code": 200,
                            "body": "{\"id\": 42, \"external_id\": \"patient-8821\", \"name\": \"Priya Nair\", \"status\": \"paused\", \"language\": \"en\"}",
                            "name": ""
                        },
                        {
                            "header": [],
                            "code": 404,
                            "body": "{\"message\": \"Client not found.\"}",
                            "name": ""
                        }
                    ]
                }
            ]
        }
    ],
    "auth": {
        "type": "bearer",
        "bearer": [
            {
                "key": "Authorization",
                "type": "string"
            }
        ]
    }
}