{
    "variable": [
        {
            "id": "baseUrl",
            "key": "baseUrl",
            "type": "string",
            "name": "string",
            "value": "https:\/\/api.clearpolicy.app"
        }
    ],
    "info": {
        "name": "ClearPolicy API Documentation",
        "_postman_id": "20400db9-f115-44c2-8f7c-e559f3b680e6",
        "description": "This documentation provides a reference to the API endpoints, including example requests and responses.",
        "schema": "https:\/\/schema.getpostman.com\/json\/collection\/v2.1.0\/collection.json"
    },
    "item": [
        {
            "name": "Attestation Requests",
            "description": "\nAPIs for managing attestation requests.",
            "item": [
                {
                    "name": "Create a new attestation request.",
                    "request": {
                        "url": {
                            "host": "{{baseUrl}}",
                            "path": "api\/v1\/attestation-requests",
                            "query": [],
                            "raw": "{{baseUrl}}\/api\/v1\/attestation-requests"
                        },
                        "method": "POST",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application\/json"
                            },
                            {
                                "key": "Accept",
                                "value": "application\/json"
                            }
                        ],
                        "body": {
                            "mode": "raw",
                            "raw": "{\"person_id\":\"01kg82xqfx6fvr046d15hnfmjv\",\"document_id\":\"01kg82xqfx6fvr046d15hnfmjv\",\"requested_attestation_type\":\"acknowledgment\"}"
                        },
                        "description": "You must provide the `person_id` and `document_id` in the request body."
                    },
                    "response": [
                        {
                            "header": [],
                            "code": 201,
                            "body": "{\n  \"id\": \"01kg82xqfx6fvr046d15hnfmjv\",\n  \"organization_id\": \"01kg82xqfx6fvr046d15hnfmjv\",\n  \"document_revision_id\": \"01kg82xqfx6fvr046d15hnfmjv\",\n  \"person_id\": \"01kg82xqfx6fvr046d15hnfmjv\",\n  \"sent_at\": \"2024-01-01T00:00:00.000000Z\",\n  \"requested_attestation_type\": \"signature\",\n  \"viewed_at\": null,\n  \"attested_at\": null,\n  \"canceled_at\": null,\n  \"requested_by_user_id\": \"01kg82xqfx6fvr046d15hnfmjv\",\n  \"batch_id\": null,\n  \"created_at\": \"2024-01-01T00:00:00.000000Z\",\n  \"updated_at\": \"2024-01-01T00:00:00.000000Z\",\n  \"status\": \"sent\",\n }",
                            "name": ""
                        }
                    ]
                }
            ]
        },
        {
            "name": "Documents",
            "description": "\nAPIs for managing documents.",
            "item": [
                {
                    "name": "List all documents.",
                    "request": {
                        "url": {
                            "host": "{{baseUrl}}",
                            "path": "api\/v1\/documents",
                            "query": [
                                {
                                    "key": "name",
                                    "value": "Employee+Handbook",
                                    "description": "The name of the document.",
                                    "disabled": false
                                }
                            ],
                            "raw": "{{baseUrl}}\/api\/v1\/documents?name=Employee+Handbook"
                        },
                        "method": "GET",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application\/json"
                            },
                            {
                                "key": "Accept",
                                "value": "application\/json"
                            }
                        ],
                        "body": null,
                        "description": "You can filter documents by providing query parameters such as `name`."
                    },
                    "response": [
                        {
                            "header": [],
                            "code": 200,
                            "body": "[\n{\n  \"id\": \"01kg82xqfx6fvr046d15hnfmjv\",\n  \"organization_id\": \"01kg82xqfx6fvr046d15hnfmjv\",\n  \"name\": \"Employee Handbook\",\n  \"created_at\": \"2024-01-01T00:00:00.000000Z\",\n  \"updated_at\": \"2024-01-01T00:00:00.000000Z\",\n  \"has_published_revision\": true,\n  \"last_updated_at\": \"2024-01-01T00:00:00.000000Z\"\n},\n{\n  \"id\": \"05ns89asd87fsdg045g45hnfskd\",\n  \"organization_id\": \"01kg82xqfx6fvr046d15hnfmjv\",\n  \"name\": \"Code of Conduct\",\n  \"created_at\": \"2024-01-02T00:00:00.000000Z\",\n  \"updated_at\": \"2024-01-02T00:00:00.000000Z\",\n  \"has_published_revision\": false,\n  \"last_updated_at\": \"2024-01-02T00:00:00.000000Z\"\n}\n]",
                            "name": ""
                        }
                    ]
                }
            ]
        },
        {
            "name": "Endpoints",
            "description": "",
            "item": [
                {
                    "name": "Retrieve current user.",
                    "request": {
                        "url": {
                            "host": "{{baseUrl}}",
                            "path": "api\/v1\/me",
                            "query": [],
                            "raw": "{{baseUrl}}\/api\/v1\/me"
                        },
                        "method": "GET",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application\/json"
                            },
                            {
                                "key": "Accept",
                                "value": "application\/json"
                            }
                        ],
                        "body": null,
                        "description": "This endpoint returns the details of the currently authenticated user, including their name, email, and the name of the organization they belong to."
                    },
                    "response": [
                        {
                            "header": [],
                            "code": 200,
                            "body": "{\n  \"id\": \"01kg82xqfx6fvr046d15hnfmjv\",\n  \"name\": \"John Doe\",\n  \"email\": \"john.doe@example.com\",\n  \"current_organization_name\": \"Example Organization\"\n}",
                            "name": ""
                        }
                    ]
                }
            ]
        },
        {
            "name": "People",
            "description": "\nAPIs for managing people.",
            "item": [
                {
                    "name": "List all people.",
                    "request": {
                        "url": {
                            "host": "{{baseUrl}}",
                            "path": "api\/v1\/people",
                            "query": [
                                {
                                    "key": "id",
                                    "value": "01kg82xqfx6fvr046d15hnfmjv",
                                    "description": "The unique identifier of the person.",
                                    "disabled": false
                                },
                                {
                                    "key": "name",
                                    "value": "John+Doe",
                                    "description": "The name of the person.",
                                    "disabled": false
                                },
                                {
                                    "key": "email",
                                    "value": "john.doe%40example.com",
                                    "description": "The email address of the person.",
                                    "disabled": false
                                },
                                {
                                    "key": "phone",
                                    "value": "%2B12345678901",
                                    "description": "The phone number of the person. Must be in international format.",
                                    "disabled": false
                                },
                                {
                                    "key": "archived",
                                    "value": "architecto",
                                    "description": "",
                                    "disabled": false
                                }
                            ],
                            "raw": "{{baseUrl}}\/api\/v1\/people?id=01kg82xqfx6fvr046d15hnfmjv&name=John+Doe&email=john.doe%40example.com&phone=%2B12345678901&archived=architecto"
                        },
                        "method": "GET",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application\/json"
                            },
                            {
                                "key": "Accept",
                                "value": "application\/json"
                            }
                        ],
                        "body": null,
                        "description": "You can filter people by providing query parameters such as `id`, `name`, `email`, or `phone`."
                    },
                    "response": [
                        {
                            "header": [],
                            "code": 200,
                            "body": "[\n{\n  \"id\": \"01kg82xqfx6fvr046d15hnfmjv\",\n  \"name\": \"John Doe\",\n  \"email\": \"john.doe@example.com\",\n  \"phone\": \"+12345678901\"\n},\n{\n  \"id\": \"05ns89asd87fsdg045g45hnfskd\",\n  \"name\": \"Jane Smith\",\n  \"email\": \"jane.smith@example.com\",\n  \"phone\": \"+12345678902\"\n}\n]",
                            "name": ""
                        }
                    ]
                },
                {
                    "name": "Create a new person.",
                    "request": {
                        "url": {
                            "host": "{{baseUrl}}",
                            "path": "api\/v1\/people",
                            "query": [],
                            "raw": "{{baseUrl}}\/api\/v1\/people"
                        },
                        "method": "POST",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application\/json"
                            },
                            {
                                "key": "Accept",
                                "value": "application\/json"
                            }
                        ],
                        "body": {
                            "mode": "raw",
                            "raw": "{\"name\":\"John Doe\",\"email\":\"john.doe@example.com\",\"phone\":\"+12345678901\",\"groups\":[\"n\"],\"documents\":[\"architecto\"]}"
                        },
                        "description": "You must provide the `name` and `email` of the person. The `phone` number is optional but must be in international format if provided."
                    },
                    "response": [
                        {
                            "header": [],
                            "code": 201,
                            "body": "{\n  \"id\": \"01kg82xqfx6fvr046d15hnfmjv\",\n  \"name\": \"John Doe\",\n  \"email\": \"john.doe@example.com\",\n  \"phone\": \"+12345678901\"\n}",
                            "name": ""
                        }
                    ]
                },
                {
                    "name": "Retrieve the specified person.",
                    "request": {
                        "url": {
                            "host": "{{baseUrl}}",
                            "path": "api\/v1\/people\/:id",
                            "query": [],
                            "raw": "{{baseUrl}}\/api\/v1\/people\/:id",
                            "variable": [
                                {
                                    "id": "id",
                                    "key": "id",
                                    "value": "01kkn48q1cvh6xerxhfxdy2zpe",
                                    "description": "The ID of the person."
                                }
                            ]
                        },
                        "method": "GET",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application\/json"
                            },
                            {
                                "key": "Accept",
                                "value": "application\/json"
                            }
                        ],
                        "body": null,
                        "description": "You can retrieve a person by its unique identifier (ID). The response will include the person's name, email, and phone number."
                    },
                    "response": [
                        {
                            "header": [],
                            "code": 200,
                            "body": "{\n  \"id\": \"01kg82xqfx6fvr046d15hnfmjv\",\n  \"name\": \"John Doe\",\n  \"email\": \"john.doe@example.com\",\n  \"phone\": \"+12345678901\"\n}",
                            "name": ""
                        }
                    ]
                }
            ]
        }
    ],
    "auth": {
        "type": "bearer",
        "bearer": [
            {
                "key": "Authorization",
                "type": "string"
            }
        ]
    }
}