{
    "openapi": "3.0.1",
    "info": {
        "title": "api.backstack.com",
        "description": "Backstack application API.",
        "version": "1.0.0",
        "contact": {
            "name": "Support",
            "url": "https://backstack.com/support",
            "email": "support@backstack.com"
        }
    },
    "externalDocs": {
        "description": "Official Backstack API Documentation",
        "url": "backstack.com/docs"
    },
    "servers": [
        {
            "url": "https://api.backstack.com"
        }
    ],
    "paths": {
        "/": {
            "summary": "",
            "description": "",
            "get": {
                "summary": "View the Backstack API OpenAPI specification.",
                "description": "View the Backstack API OpenAPI specification.",
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/account": {
            "summary": "",
            "description": "",
            "get": {
                "summary": "",
                "description": "Retrieves the current session account data.",
                "x-http": "GET https:api.backstack.com/account\nAuthorization: Bearer backstack_...\nX-JWT: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9...\n...",
                "responses": {
                    "200": {
                        "description": "OK",
                        "x-http": "{\n  \"success\": true,\n  \"code\": 200,\n  \"message\": null,\n  \"dev_message\": null,\n  \"data\": {\n    \"id\": \"acct_...\",\n    \"title\": \"Acme Corporation\",\n    \"environment_id\": \"env_...\",\n    \"created_at\": \"2022-09-01 07:18:49\",\n    \"address\": \"123 Canal Street,\n    \"city\": \"New Orleans,\n    \"state\": \"LA\",\n    \"zip\": \"70112\",\n    \"timezone_id\": \"America/Chicago\",\n    \"country_id\": \"US\",\n    \"url\": null,\n    \"phone\": null\n  }\n}"
                    },
                    "500": {
                        "description": "Internal Server Error"
                    }
                }
            },
            "post": {
                "summary": "",
                "description": "Updates the current session account data.",
                "x-http": "POST https://api.backstack.com/account\nAuthorization: Bearer backstack_...\nX-JWT: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9...\n...\nContent-Type: application/json\n\n{\n  \"title\": \"Acme Corp.\",\n  ...\n}",
                "requestBody": {
                    "description": "Submit any of the provided properties. Where allowed, submit null or an empty string to clear the existing value.",
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "title": {
                                        "type": "string",
                                        "minLength": 3,
                                        "maxLength": 50
                                    },
                                    "address": {
                                        "type": "string",
                                        "maxLength": 100
                                    },
                                    "city": {
                                        "type": "string",
                                        "maxLength": 100
                                    },
                                    "state": {
                                        "type": "string",
                                        "maxLength": 100
                                    },
                                    "zip": {
                                        "type": "string",
                                        "maxLength": 20
                                    },
                                    "url": {
                                        "type": "string",
                                        "maxLength": 100
                                    },
                                    "phone": {
                                        "type": "string",
                                        "maxLength": 20
                                    },
                                    "country_id": {
                                        "type": "string",
                                        "minLength": 2,
                                        "maxLength": 2,
                                        "description": "countries.id from the active app countries. See the /app/locales endpoint for more information.",
                                        "example": "US"
                                    },
                                    "timezone_id": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 50,
                                        "description": "timezones.id available for the countries.id. See the /app/locales endpoint for more information.",
                                        "example": "America/Chicago"
                                    }
                                }
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "OK",
                        "x-http": "{\n  \"success\": true,\n  \"code\": 200,\n  \"message\": \"Account updated successfully.\",\n  \"dev_message\": null,\n  \"data\": {\n    \"id\": \"acct_...\",\n    \"title\": \"Acme Corp.\",\n    \"environment_id\": \"env_...\",\n    \"created_at\": \"2022-09-01 07:18:49\",\n    \"address\": \"123 Canal Street,\n    \"city\": \"New Orleans,\n    \"state\": \"LA\",\n    \"zip\": \"70112\",\n    \"timezone_id\": \"America/Chicago\",\n    \"country_id\": \"US\",\n    \"url\": null,\n    \"phone\": null\n  }\n}"
                    },
                    "422": {
                        "description": "Unprocessable Entity"
                    },
                    "500": {
                        "description": "Internal Server Error"
                    }
                }
            },
            "delete": {
                "summary": "",
                "description": "",
                "x-http": "DELETE https://api.backstack.com/account\nAuthorization: Bearer backstack_...\nX-JWT: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9...\n...",
                "responses": {
                    "200": {
                        "description": "OK",
                        "x-http": "{\n  \"success\": true,\n  \"code\": 200,\n  \"message\": \"Account deleted successfully.\",\n  \"dev_message\": null,\n  \"data\": {\n    \"id\": \"acct_...\"\n  }\n}"
                    },
                    "500": {
                        "description": "Internal Server Error"
                    }
                }
            }
        },
        "/account/users": {
            "summary": "",
            "description": "",
            "get": {
                "summary": "",
                "description": "",
                "x-http": "",
                "parameters": [
                    {
                        "name": "cursor",
                        "in": "query",
                        "description": "The nextCursor value provided in the previous response.",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "example": "WyJKYW5lIFNtaXRoIiwidXNlcl8wMUpBQkNERUZHSEpLTU5QUVJTVFZXWFlaMCJd"
                        }
                    },
                    {
                        "name": "filter",
                        "in": "query",
                        "description": "Filter to apply to the list.",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "enum": [
                                "all",
                                "active",
                                "inactive"
                            ],
                            "default": "all"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    },
                    "500": {
                        "description": "Internal Server Error"
                    }
                }
            },
            "post": {
                "summary": "",
                "description": "The app must have a login url provided in the dashboard settings.",
                "x-http": "",
                "requestBody": {
                    "description": "",
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "required": [
                                    "name",
                                    "email"
                                ],
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "minLength": 3,
                                        "maxLength": 50
                                    },
                                    "email": {
                                        "type": "string",
                                        "minLength": 5,
                                        "maxLength": 100,
                                        "format": "email"
                                    },
                                    "roles": {
                                        "description": "Role ids assigned to the user.",
                                        "type": "array",
                                        "items": {
                                            "type": "string"
                                        },
                                        "example": [
                                            "role_1234567890",
                                            "role_1234567891"
                                        ]
                                    }
                                }
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "OK"
                    },
                    "400": {
                        "description": "Bad Request"
                    },
                    "422": {
                        "description": "Unprocessable Entity"
                    },
                    "500": {
                        "description": "Internal Server Error"
                    }
                }
            }
        },
        "/account/users/{userId}": {
            "summary": "",
            "description": "",
            "parameters": [
                {
                    "name": "userId",
                    "in": "path",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ],
            "get": {
                "summary": "",
                "description": "",
                "x-http": "",
                "responses": {
                    "200": {
                        "description": "OK"
                    },
                    "400": {
                        "description": "Bad Request"
                    },
                    "500": {
                        "description": "Internal Server Error"
                    }
                }
            },
            "post": {
                "summary": "Update account user.",
                "description": "",
                "x-http": "",
                "requestBody": {
                    "description": "",
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "minLength": 3,
                                        "maxLength": 50
                                    },
                                    "email": {
                                        "type": "string",
                                        "minLength": 5,
                                        "maxLength": 100,
                                        "format": "email"
                                    },
                                    "roles": {
                                        "description": "Role ids assigned to the user.",
                                        "type": "array",
                                        "items": {
                                            "type": "string"
                                        },
                                        "example": [
                                            "role_1234567890",
                                            "role_1234567891"
                                        ]
                                    }
                                }
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "OK"
                    },
                    "422": {
                        "description": "Unprocessable Entity"
                    },
                    "500": {
                        "description": "Internal Server Error"
                    }
                }
            },
            "delete": {
                "summary": "Delete account user.",
                "description": "",
                "x-http": "",
                "responses": {
                    "200": {
                        "description": "OK"
                    },
                    "500": {
                        "description": "Internal Server Error"
                    }
                }
            }
        },
        "/app": {
            "summary": "",
            "description": "",
            "get": {
                "summary": "Read the current session app.",
                "description": "",
                "x-http": "",
                "responses": {
                    "200": {
                        "description": "OK"
                    },
                    "500": {
                        "description": "Internal Server Error"
                    }
                }
            }
        },
        "/app/auth/forgot-password": {
            "summary": "",
            "description": "",
            "post": {
                "summary": "",
                "description": "",
                "x-http": "",
                "requestBody": {
                    "description": "",
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "required": [
                                    "email"
                                ],
                                "properties": {
                                    "email": {
                                        "type": "string",
                                        "minLength": 5,
                                        "maxLength": 100,
                                        "format": "email"
                                    }
                                }
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "OK"
                    },
                    "422": {
                        "description": "Unprocessable Entity"
                    },
                    "500": {
                        "description": "Internal Server Error"
                    }
                }
            }
        },
        "/app/auth/login": {
            "summary": "",
            "description": "",
            "get": {
                "summary": "",
                "description": "",
                "x-http": "",
                "responses": {
                    "200": {
                        "description": "OK"
                    },
                    "500": {
                        "description": "Internal Server Error"
                    }
                }
            },
            "post": {
                "summary": "",
                "description": "",
                "x-http": "",
                "requestBody": {
                    "description": "",
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "required": [
                                    "email",
                                    "password"
                                ],
                                "properties": {
                                    "email": {
                                        "type": "string",
                                        "minLength": 5,
                                        "maxLength": 100,
                                        "format": "email"
                                    },
                                    "password": {
                                        "type": "string",
                                        "minLength": 8,
                                        "maxLength": 100,
                                        "format": "password"
                                    }
                                }
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "OK"
                    },
                    "422": {
                        "description": "Unprocessable Entity"
                    },
                    "500": {
                        "description": "Internal Server Error"
                    }
                }
            }
        },
        "/app/auth/logout": {
            "summary": "",
            "description": "",
            "post": {
                "summary": "",
                "description": "",
                "x-http": "",
                "responses": {
                    "200": {
                        "description": "OK"
                    },
                    "500": {
                        "description": "Internal Server Error"
                    }
                }
            }
        },
        "/app/locales/countries": {
            "summary": "",
            "description": "",
            "get": {
                "summary": "List app countries.",
                "description": "Provides a list of all countries and their active status.",
                "x-http": "",
                "parameters": [
                    {
                        "name": "filter",
                        "in": "query",
                        "description": "Filter to apply to the list.",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "enum": [
                                "all",
                                "active",
                                "inactive"
                            ],
                            "default": "all"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    },
                    "500": {
                        "description": "Internal Server Error"
                    }
                }
            },
            "post": {
                "summary": "",
                "description": "",
                "x-http": "",
                "requestBody": {
                    "description": "",
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "countries": {
                                        "type": "array",
                                        "description": "Active country ids.",
                                        "items": {
                                            "type": "string"
                                        },
                                        "example": [
                                            "US",
                                            "CA"
                                        ],
                                        "minItems": 1
                                    }
                                }
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "OK"
                    },
                    "422": {
                        "description": "Unprocessable Entity"
                    },
                    "500": {
                        "description": "Internal Server Error"
                    }
                }
            }
        },
        "/app/locales/timezones": {
            "summary": "",
            "description": "",
            "get": {
                "summary": "",
                "description": "",
                "x-http": "",
                "parameters": [
                    {
                        "name": "country_id",
                        "in": "query",
                        "description": "The country id.",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "example": "US"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    },
                    "422": {
                        "description": "Unprocessable Entity"
                    },
                    "500": {
                        "description": "Internal Server Error"
                    }
                }
            }
        },
        "/app/session": {
            "summary": "",
            "description": "",
            "get": {
                "summary": "",
                "description": "",
                "x-http": "",
                "responses": {
                    "200": {
                        "description": "OK"
                    },
                    "500": {
                        "description": "Internal Server Error"
                    }
                }
            }
        },
        "/app/signup": {
            "summary": "",
            "description": "",
            "get": {
                "summary": "",
                "description": "",
                "x-http": "",
                "responses": {
                    "200": {
                        "description": "OK"
                    },
                    "500": {
                        "description": "Internal Server Error"
                    }
                }
            },
            "post": {
                "summary": "",
                "description": "",
                "x-http": "",
                "responses": {
                    "200": {
                        "description": "OK"
                    },
                    "422": {
                        "description": "Unprocessable Entity"
                    },
                    "500": {
                        "description": "Internal Server Error"
                    }
                }
            }
        },
        "/app/signup/activation": {
            "summary": "",
            "description": "",
            "get": {
                "summary": "",
                "description": "",
                "x-http": "",
                "responses": {
                    "200": {
                        "description": "OK"
                    },
                    "500": {
                        "description": "Internal Server Error"
                    }
                }
            },
            "post": {
                "summary": "",
                "description": "",
                "x-http": "",
                "responses": {
                    "200": {
                        "description": "OK"
                    },
                    "422": {
                        "description": "Unprocessable Entity"
                    },
                    "500": {
                        "description": "Internal Server Error"
                    }
                }
            }
        },
        "/user": {
            "summary": "",
            "description": "",
            "get": {
                "summary": "Read the current session user.",
                "description": "",
                "x-http": "",
                "responses": {
                    "200": {
                        "description": "OK"
                    },
                    "500": {
                        "description": "Internal Server Error"
                    }
                }
            },
            "post": {
                "summary": "Update the current session user.",
                "description": "",
                "x-http": "",
                "requestBody": {
                    "description": "",
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "minLength": 3,
                                        "maxLength": 50
                                    },
                                    "email": {
                                        "type": "string",
                                        "minLength": 5,
                                        "maxLength": 100,
                                        "format": "email"
                                    }
                                }
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "OK"
                    },
                    "422": {
                        "description": "Unprocessable Entity"
                    },
                    "500": {
                        "description": "Internal Server Error"
                    }
                }
            },
            "delete": {
                "summary": "Delete the current session user.",
                "description": "Deletes the user and related session. Returns the deleted user id.",
                "x-http": "",
                "responses": {
                    "200": {
                        "description": "OK"
                    },
                    "500": {
                        "description": "Internal Server Error"
                    }
                }
            }
        },
        "/user/change-password": {
            "summary": "",
            "description": "",
            "post": {
                "summary": "Change password.",
                "description": "",
                "x-http": "",
                "requestBody": {
                    "description": "",
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "required": [
                                    "password",
                                    "confirmation"
                                ],
                                "properties": {
                                    "password": {
                                        "type": "string",
                                        "minLength": 8,
                                        "maxLength": 50
                                    },
                                    "confirmation": {
                                        "type": "string",
                                        "minLength": 8,
                                        "maxLength": 50
                                    }
                                }
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "OK"
                    },
                    "422": {
                        "description": "Unprocessable Entity"
                    },
                    "500": {
                        "description": "Internal Server Error"
                    }
                }
            }
        },
        "/user/notification-settings": {
            "summary": "",
            "description": "",
            "get": {
                "summary": "",
                "description": "",
                "x-http": "",
                "responses": {
                    "200": {
                        "description": "OK"
                    },
                    "500": {
                        "description": "Internal Server Error"
                    }
                }
            },
            "post": {
                "summary": "",
                "description": "",
                "x-http": "",
                "responses": {
                    "200": {
                        "description": "OK"
                    },
                    "500": {
                        "description": "Internal Server Error"
                    }
                }
            }
        },
        "/user/notifications": {
            "summary": "",
            "description": "",
            "get": {
                "summary": "",
                "description": "",
                "x-http": "",
                "responses": {
                    "200": {
                        "description": "OK"
                    },
                    "500": {
                        "description": "Internal Server Error"
                    }
                }
            }
        },
        "/user/notifications/{notificationId}": {
            "summary": "",
            "description": "",
            "parameters": [
                {
                    "name": "notificationId",
                    "in": "path",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ],
            "get": {
                "summary": "",
                "description": "",
                "x-http": "",
                "responses": {
                    "200": {
                        "description": "OK"
                    },
                    "500": {
                        "description": "Internal Server Error"
                    }
                }
            },
            "post": {
                "summary": "Update notification.",
                "description": "",
                "x-http": "",
                "responses": {
                    "200": {
                        "description": "OK"
                    },
                    "422": {
                        "description": "Unprocessable Entity"
                    },
                    "500": {
                        "description": "Internal Server Error"
                    }
                }
            },
            "delete": {
                "summary": "",
                "description": "",
                "x-http": "",
                "responses": {
                    "200": {
                        "description": "OK"
                    },
                    "500": {
                        "description": "Internal Server Error"
                    }
                }
            }
        }
    }
}