### GET /leads Source: https://api.texturehq.com/v1/docs/swagger.json Get a list of leads for a workspace ```markdown ### Parameters - **page** (integer, query, optional): The page number to fetch devices from. - **perPage** (integer, query, optional): The number of devices per page to return. ### Responses #### 200 - Object with lead data and pagination info - **data** (array (object)) (required) Array items: - **id** (string) (required) - **email** (string (email)) (required) - **firstName** (string,null) (required) - **lastName** (string,null) (required) - **phone** (string,null) (required) - **address1** (string,null) (required) - **address2** (string,null) (required) - **city** (string,null) (required) - **state** (string,null) (required) - **postalCode** (string,null) (required) - **country** (string,null) (required) - **metadata** (object) (required) - **createdAt** (string,null) (required) - **updatedAt** (string,null) (required) - **page** (number) (required) - **perPage** (number) (required) - **totalItems** (number) (required) - **totalPages** (number) (required) #### 401 - Unauthorized - Invalid API key - **message** (string) (required) - **details** (object) - **error** (string) #### 500 - Internal server error - **message** (string) (required) - **details** (object) - **error** (string) ### Example Usage ```bash curl -X GET "https://api.texturehq.com/v1/leads?page=1&perPage=10" ``` ``` -------------------------------- ### GET /devices/{id}/commands Source: https://api.texturehq.com/v1/docs/swagger.json Get paginated commands for a single device ```markdown ### Parameters - **id** (string, path, required) (example: "clmt0f0qq000g6jez6qa2sj4t") - **status** (array (string (pending|completed|scheduled|failed)), query, optional) - **page** (integer, query, optional): The page number to fetch devices from. - **perPage** (integer, query, optional): The number of devices per page to return. ### Responses #### 200 - Device commands data **DeviceCommandsResponse** - **data** (array (object)) (required) Array items: - **id** (string) (required): The unique identifier for the command issued by Texture. (example: "cllgn0u4r000008l7eazybfbo") - **status** (string (pending|completed|scheduled|failed)) (required): The current status of the command. (example: "pending") ("pending"|"completed"|"scheduled"|"failed") - **reason** (string): The reason for the command status. - **type** (string (battery:set-reserve|battery:set-operating-mode|charger:set-operating-mode|thermostat:set-operating-mode|thermostat:set-fan-mode|vehicle:set-charge-limit|vehicle:set-operating-mode)) (required): The unique slug representing the type of command. (example: "thermostat:set-operating-mode") ("battery:set-reserve"|"battery:set-operating-mode"|"charger:set-operating-mode"|"thermostat:set-operating-mode"|"thermostat:set-fan-mode"|"vehicle:set-charge-limit"|"vehicle:set-operating-mode") - **issuedAt** (string (date-time)) (required): The date and time the command was issued. - **executedAt** (string (date-time)): The date and time the command was executed. - **input** (object) (required): The input payload sent with the command. Includes necessary information for execution. Conforms to the schema provided on the command type. (example: {"operatingMode":"eco","heatTarget":70.5,"coolTarget":80.5}) - **page** (number) (required) - **perPage** (number) (required) - **totalItems** (number) (required) - **totalPages** (number) (required) ### Example Usage ```bash curl -X GET "https://api.texturehq.com/v1/devices/{id}/commands?status=item1,item2&page=1&perPage=10" ``` ``` -------------------------------- ### GET /devices Source: https://api.texturehq.com/v1/docs/swagger.json Get all devices for a workspace with additional optional filtering. ```markdown ### Parameters - **referenceId** (string, query, optional): The reference ID to filter devices by. - **manufacturer** (string, query, optional): The manufacturer to filter devices by. - **manufacturerDeviceId** (string, query, optional): The manufacturer device ID to filter devices by. - **type** (string, query, optional): The device type to filter devices by. - **model** (string, query, optional): The device model to filter devices by. - **page** (integer, query, optional): The page number to fetch devices from. - **perPage** (integer, query, optional): The number of devices per page to return. ### Responses #### 200 - Object with device data and pagination info **DevicesResponse** - **data** (array (object)) (required) Array items: - **id** (string) (required): The unique identifier for the device issued by Texture. (example: "cllgn0u4r000008l7eazybfbo") - **siteId** (string,null): The unique identifier for the site this device belongs to. (example: "cllgn0u4r000008l7eazybfbo") - **name** (string) (required): The name of the device. - **manufacturerDeviceId** (string) (required): The unique identifier for the device issued by the manufacturer. (example: "b1143000-69ac-481f-9bef-4bfd96198133") - **serialNumber** (string,null): The serial number of the device. (example: "123456789") - **referenceId** (string) (required): A unique identifier referring to the user/account in your system (example: "2952bc94-0273-4087-830b-d0ab2bece1e7") - **manufacturer** (string) (required): The manufacturer of the device. (example: "ecobee") - **type** (string (battery|charger|inverter|thermostat|vehicle|other|unknown)) (required): The type of the device. (example: "thermostat") ("battery"|"charger"|"inverter"|"thermostat"|"vehicle"|"other"|"unknown") - **model** (string) (required): The name of the device model. (example: "nikeSmart") - **rawType** (string,null): The raw device type as provided by the manufacturer. (example: "Battery Storage System") - **rawModel** (string,null): The raw device model as provided by the manufacturer. (example: "ACME-BATTERY-PRO-13.5") - **modelYear** (integer,null): The year the device was manufactured. (example: 2021) - **state** (object) (required) - **chargingState** (string (charging|discharging|idle|unknown)) (required): Whether the battery is currently charging. The state could be unknown if not provided by the manufacturer. ("charging"|"discharging"|"idle"|"unknown") - **charge** (number) (required): The current charge of the battery in watt-hours (Wh). - **chargePercentage** (number) (required): The current charge of the battery as a percentage. Represented as a number between 0 and 100. - **chargeRate** (number): The current charge rate of the battery in watts (W). - **backupReserve** (number): The charge percentage that should be reserved for backup power. Represented as a number between 0 and 100. - **isStormModeActive** (boolean): Whether the battery has an active storm mode alert. - **isStormModeEnabled** (boolean): Whether the battery has storm mode enabled. - **strategy** (string (unknown|self_consumption|time_of_use|backup)): The current strategy or mode the battery is operating in. ("unknown"|"self_consumption"|"time_of_use"|"backup") - **gridStatus** (string (exporting|importing|idle|unknown)): The current grid status (importing, exporting, idle, unknown). ("exporting"|"importing"|"idle"|"unknown") - **gridPower** (integer): The recent estimate of power output to/from the grid in Watts (W). Positive values indicate importing from the grid, negative values indicate exporting to the grid. - **gridEnergy** (integer): Estimated recent grid energy usage in Watt-hours (Wh). - **id** (string) (required): The unique identifier for the recorded state. (example: "cllgn0u4r000008l7eazybfbo") - **createdAt** (string) (required): The date and time the device state was recorded. (example: "2021-03-10T18:00:00.000Z") - **whConsumed** (number,null) (required) - **staticState** (object) - **capacity** (number) (required): The rated maximum capacity of the battery in watt-hours (Wh). - **maxChargeRate** (number): The rated maximum charge rate of the battery in watts (W). - **maxDischargeRate** (number): The rated maximum discharge rate of the battery in watts (W). - **numberOfBatteries** (integer): The number of batteries in the system. - **location** (object): The location of the device. (example: {"address":{"streetOne":"123 Main St","streetTwo":"Apt 101","city":"Beverly Hills","state":"CA","postalCode":"90210","country":"USA"},"coordinates":{"latitude":34.1,"longitude":-118.3}}) - **address** (object) (required) - **streetOne** (string,null) - **streetTwo** (string,null) - **city** (string,null) - **state** (string,null) - **postalCode** (string,null) - **country** (string,null) - **county** (string,null) - **hashedAddress** (string,null) - **coordinates** (object) - **latitude** (number) (required) - **longitude** (number) (required) - **availableCommands** (array (object)) (required): The list of commands that can be sent to the device. Array items: - **slug** (string (battery:set-reserve|battery:set-operating-mode|charger:set-operating-mode|thermostat:set-operating-mode|thermostat:set-fan-mode|vehicle:set-charge-limit|vehicle:set-operating-mode)) (required): The unique slug representing the type of command. (example: "thermostat:set-operating-mode") ("battery:set-reserve"|"battery:set-operating-mode"|"charger:set-operating-mode"|"thermostat:set-operating-mode"|"thermostat:set-fan-mode"|"vehicle:set-charge-limit"|"vehicle:set-operating-mode") - **description** (string) (required): A brief description of the command type. (example: "Sets the operating mode of the thermostat.") - **tags** (array (string)) (required): The list of tags associated with the device. (example: ["bedroom","upstairs"]) - **createdAt** (string,null) (required): The date and time that this device was created. (example: "2024-04-01T00:00:00.000Z") - **updatedAt** (string,null): The date and time that this device was last updated. (example: "2024-04-01T00:00:00.000Z") - **page** (number) (required) - **perPage** (number) (required) - **totalItems** (number) (required) - **totalPages** (number) (required) ### Example Usage ```bash curl -X GET "https://api.texturehq.com/v1/devices?referenceId=string&manufacturer=string&manufacturerDeviceId=string&type=string&model=string&page=1&perPage=10" ``` ``` -------------------------------- ### API Overview: Texture API Source: https://api.texturehq.com/v1/docs/swagger.json # Texture REST API Welcome to the Texture REST API documentation. Texture provides a comprehensive platform for managing energy devices, sites, and customer data at scale. ## Getting Started ### 1. Create an Account Visit [dashboard.texturehq.com](https://dashboard.texturehq.com) to create your Texture account and access your API credentials. ### 2. Obtain Your API Key Once logged in to the dashboard: - Navigate to Developer → API Keys - Create a new API key with appropriate permissions - You can create multiple keys for different purposes or scopes so we suggest creating a different key for each purpose or scope. ### 3. Authentication Include your API key in the request header: ``` Texture-Api-Key: your-api-key-here ``` ### 4. Make Your First Request Try fetching your devices: ```bash curl -H "Texture-Api-Key: your-api-key-here" https://api.texturehq.com/v1/devices ``` ## Core Capabilities The Texture API enables you to: - **Device Management**: Register, monitor, and control energy devices including batteries, solar panels, and EV chargers - **Site Management**: Organize devices by physical locations and manage site configurations - **Customer Management**: Track customer information and device ownership - **Energy Metrics**: Access real-time and historical energy data - **Commands & Control**: Send commands to devices for optimization and control - **Alerts & Monitoring**: Configure and manage alerts for device events - **Programs & Schedules**: Create and manage energy programs and schedules - **Enrollments**: Manage device enrollments in utility, demand response, and other programs ## API Design Principles - **RESTful**: Standard HTTP methods (GET, POST, PUT, DELETE) - **JSON**: All requests and responses use JSON format - **Pagination**: List endpoints support pagination - **Consistent Error Handling**: Standardized error responses across all endpoints - **Idempotency**: Safe retry mechanisms for critical operations ## Rate Limits API requests are rate-limited to ensure platform stability: - **Standard**: 1,000 requests per minute - **Bulk Operations**: 100 requests per minute - Contact support for higher limits ## SDKs & Client Libraries Generate client libraries using our OpenAPI specification: - **Download OpenAPI Spec**: [https://api.texturehq.com/v1/docs/swagger.json](https://api.texturehq.com/v1/docs/swagger.json) - **TypeScript/JavaScript**: Use openapi-generator or similar tools - **Python**: Generate with openapi-python-client - **Other Languages**: Any OpenAPI 3.1 compatible generator ## Support & Resources - **Documentation**: [docs.texturehq.com](https://docs.texturehq.com) - **API Status**: [status.texturehq.com](https://status.texturehq.com) - **Support**: [support@texturehq.com](mailto:support@texturehq.com) - **Slack Community**: [Join our Slack](https://join.slack.com/t/texture-community/shared_invite/zt-2ho02ds2o-pBNH1ZGcopxgIY3BgKcKzg) --- **Note**: This API is actively maintained and expanded. We follow semantic versioning and provide migration guides for breaking changes. ```yaml # Texture API # Version: 1.0.0 # Texture REST API Welcome to the Texture REST API documentation. Texture provides a comprehensive platform for managing energy devices, sites, and customer data at scale. ## Getting Started ### 1. Create an Account Visit [dashboard.texturehq.com](https://dashboard.texturehq.com) to create your Texture account and access your API credentials. ### 2. Obtain Your API Key Once logged in to the dashboard: - Navigate to Developer → API Keys - Create a new API key with appropriate permissions - You can create multiple keys for different purposes or scopes so we suggest creating a different key for each purpose or scope. ### 3. Authentication Include your API key in the request header: ``` Texture-Api-Key: your-api-key-here ``` ### 4. Make Your First Request Try fetching your devices: ```bash curl -H "Texture-Api-Key: your-api-key-here" https://api.texturehq.com/v1/devices ``` ## Core Capabilities The Texture API enables you to: - **Device Management**: Register, monitor, and control energy devices including batteries, solar panels, and EV chargers - **Site Management**: Organize devices by physical locations and manage site configurations - **Customer Management**: Track customer information and device ownership - **Energy Metrics**: Access real-time and historical energy data - **Commands & Control**: Send commands to devices for optimization and control - **Alerts & Monitoring**: Configure and manage alerts for device events - **Programs & Schedules**: Create and manage energy programs and schedules - **Enrollments**: Manage device enrollments in utility, demand response, and other programs ## API Design Principles - **RESTful**: Standard HTTP methods (GET, POST, PUT, DELETE) - **JSON**: All requests and responses use JSON format - **Pagination**: List endpoints support pagination - **Consistent Error Handling**: Standardized error responses across all endpoints - **Idempotency**: Safe retry mechanisms for critical operations ## Rate Limits API requests are rate-limited to ensure platform stability: - **Standard**: 1,000 requests per minute - **Bulk Operations**: 100 requests per minute - Contact support for higher limits ## SDKs & Client Libraries Generate client libraries using our OpenAPI specification: - **Download OpenAPI Spec**: [https://api.texturehq.com/v1/docs/swagger.json](https://api.texturehq.com/v1/docs/swagger.json) - **TypeScript/JavaScript**: Use openapi-generator or similar tools - **Python**: Generate with openapi-python-client - **Other Languages**: Any OpenAPI 3.1 compatible generator ## Support & Resources - **Documentation**: [docs.texturehq.com](https://docs.texturehq.com) - **API Status**: [status.texturehq.com](https://status.texturehq.com) - **Support**: [support@texturehq.com](mailto:support@texturehq.com) - **Slack Community**: [Join our Slack](https://join.slack.com/t/texture-community/shared_invite/zt-2ho02ds2o-pBNH1ZGcopxgIY3BgKcKzg) --- **Note**: This API is actively maintained and expanded. We follow semantic versioning and provide migration guides for breaking changes. # Base URL: https://api.texturehq.com/v1 ``` -------------------------------- ### GET /sites Source: https://api.texturehq.com/v1/docs/swagger.json Get a list of sites ```markdown ### Parameters - **referenceId** (array (string), query, optional) (example: ["9bb290c8-fe97-46ce-92a8-952823164277"]) - **page** (integer, query, optional): The page number to fetch devices from. - **perPage** (integer, query, optional): The number of devices per page to return. ### Responses #### 200 - Object with site data and pagination info **Sites** - **data** (array (object)) (required) Array items: - **id** (string) (required): The unique identifier for the Site issued by Texture. (example: "cllgn0u4r000008l7eazybfbo") - **name** (string,null): The name of the Site. - **referenceId** (string,null): The reference ID of the Site. (example: "9bb290c8-fe97-46ce-92a8-952823164277") - **workspaceId** (string) (required): The unique identifier for the Workspace to which the Site belongs, issued by Texture. (example: "clmt0f0qq000g6jez6qa2sj4t") - **createdAt** (string,null) (required): The date and time that this Site was created. (example: "2024-04-01T00:00:00.000Z") - **updatedAt** (string,null): The date and time that this Site was last updated. (example: "2024-04-01T00:00:00.000Z") - **devices** (array (object)) Array items: - **id** (string) (required): The unique identifier for the device issued by Texture. (example: "cllgn0u4r000008l7eazybfbo") - **siteId** (string,null): The unique identifier for the site this device belongs to. (example: "cllgn0u4r000008l7eazybfbo") - **name** (string) (required): The name of the device. - **manufacturerDeviceId** (string) (required): The unique identifier for the device issued by the manufacturer. (example: "b1143000-69ac-481f-9bef-4bfd96198133") - **serialNumber** (string,null): The serial number of the device. (example: "123456789") - **referenceId** (string) (required): A unique identifier referring to the user/account in your system (example: "2952bc94-0273-4087-830b-d0ab2bece1e7") - **manufacturer** (string) (required): The manufacturer of the device. (example: "ecobee") - **type** (string (battery|charger|inverter|thermostat|vehicle|other|unknown)) (required): The type of the device. (example: "thermostat") ("battery"|"charger"|"inverter"|"thermostat"|"vehicle"|"other"|"unknown") - **model** (string) (required): The name of the device model. (example: "nikeSmart") - **rawType** (string,null): The raw device type as provided by the manufacturer. (example: "Battery Storage System") - **rawModel** (string,null): The raw device model as provided by the manufacturer. (example: "ACME-BATTERY-PRO-13.5") - **modelYear** (integer,null): The year the device was manufactured. (example: 2021) - **state** (object) (required) - **chargingState** (string (charging|discharging|idle|unknown)) (required): Whether the battery is currently charging. The state could be unknown if not provided by the manufacturer. ("charging"|"discharging"|"idle"|"unknown") - **charge** (number) (required): The current charge of the battery in watt-hours (Wh). - **chargePercentage** (number) (required): The current charge of the battery as a percentage. Represented as a number between 0 and 100. - **chargeRate** (number): The current charge rate of the battery in watts (W). - **backupReserve** (number): The charge percentage that should be reserved for backup power. Represented as a number between 0 and 100. - **isStormModeActive** (boolean): Whether the battery has an active storm mode alert. - **isStormModeEnabled** (boolean): Whether the battery has storm mode enabled. - **strategy** (string (unknown|self_consumption|time_of_use|backup)): The current strategy or mode the battery is operating in. ("unknown"|"self_consumption"|"time_of_use"|"backup") - **gridStatus** (string (exporting|importing|idle|unknown)): The current grid status (importing, exporting, idle, unknown). ("exporting"|"importing"|"idle"|"unknown") - **gridPower** (integer): The recent estimate of power output to/from the grid in Watts (W). Positive values indicate importing from the grid, negative values indicate exporting to the grid. - **gridEnergy** (integer): Estimated recent grid energy usage in Watt-hours (Wh). - **id** (string) (required): The unique identifier for the recorded state. (example: "cllgn0u4r000008l7eazybfbo") - **createdAt** (string) (required): The date and time the device state was recorded. (example: "2021-03-10T18:00:00.000Z") - **whConsumed** (number,null) (required) - **staticState** (object) - **capacity** (number) (required): The rated maximum capacity of the battery in watt-hours (Wh). - **maxChargeRate** (number): The rated maximum charge rate of the battery in watts (W). - **maxDischargeRate** (number): The rated maximum discharge rate of the battery in watts (W). - **numberOfBatteries** (integer): The number of batteries in the system. - **location** (object): The location of the device. (example: {"address":{"streetOne":"123 Main St","streetTwo":"Apt 101","city":"Beverly Hills","state":"CA","postalCode":"90210","country":"USA"},"coordinates":{"latitude":34.1,"longitude":-118.3}}) - **address** (object) (required) - **streetOne** (string,null) - **streetTwo** (string,null) - **city** (string,null) - **state** (string,null) - **postalCode** (string,null) - **country** (string,null) - **county** (string,null) - **hashedAddress** (string,null) - **coordinates** (object) - **latitude** (number) (required) - **longitude** (number) (required) - **availableCommands** (array (object)) (required): The list of commands that can be sent to the device. Array items: - **slug** (string (battery:set-reserve|battery:set-operating-mode|charger:set-operating-mode|thermostat:set-operating-mode|thermostat:set-fan-mode|vehicle:set-charge-limit|vehicle:set-operating-mode)) (required): The unique slug representing the type of command. (example: "thermostat:set-operating-mode") ("battery:set-reserve"|"battery:set-operating-mode"|"charger:set-operating-mode"|"thermostat:set-operating-mode"|"thermostat:set-fan-mode"|"vehicle:set-charge-limit"|"vehicle:set-operating-mode") - **description** (string) (required): A brief description of the command type. (example: "Sets the operating mode of the thermostat.") - **tags** (array (string)) (required): The list of tags associated with the device. (example: ["bedroom","upstairs"]) - **createdAt** (string,null) (required): The date and time that this device was created. (example: "2024-04-01T00:00:00.000Z") - **updatedAt** (string,null): The date and time that this device was last updated. (example: "2024-04-01T00:00:00.000Z") - **connectedCustomers** (array (object)) Array items: - **id** (string) (required): The unique identifier for the customer issued by Texture. (example: "clmt0f0qq000g6jez6qa2sj4t") - **workspaceId** (string) (required): The unique identifier for the workspace issued by Texture. (example: "clmt0f0qq000g6jez6qa2sj4t") - **referenceId** (string,null) (required): The reference ID for the customer. (example: "01234567") - **firstName** (string,null): The given name of the customer. (example: "John") - **lastName** (string,null): The surname of the customer. (example: "Smith") - **email** (string,null): The email address of the customer. (example: "test@example.com") - **phone** (string,null): The phone number of the customer as provided during creation or update. (example: "1234567890") - **devices** (array (object)): The devices connected to the customer. Array items: - **createdAt** (string,null) (required): The date and time the customer was created in the system. (example: "2025-10-30T23:48:35.453Z") - **updatedAt** (string,null): The date and time the customer was last updated in the system. (example: "2025-10-30T23:48:35.454Z") - **location** (object) - **streetOne** (string,null): The first line of the street location. (example: "123 Main St") - **streetTwo** (string,null): The second line of the street location. (example: "Apt 4B") - **city** (string,null): The city of the location. (example: "Springfield") - **state** (string,null): The state or province of the location. (example: "IL") - **postalCode** (string,null): The postal or ZIP code of the location. (example: "62701") - **country** (string,null): The country of the location. (example: "USA") - **latitude** (number,null): The latitude coordinate of the location. (example: 39.7817) - **longitude** (number,null): The longitude coordinate of the location. (example: -89.6501) - **energyUsage** (array,null) - **utility** (object): The utility for the Site. - **name** (string) (required): The name of the utility provider. (example: "Pacifc Gas and Electric") - **wholesaleMarket** (object): The wholesale market for the Site. - **name** (string) (required): The name of the wholesale market. (example: "California Independent Systems Operator") - **weather** (object): Current weather and forecast data for the site location. Only included when specifically requested. - **provider** (string) (required): The provider of the weather data. (example: "OpenWeatherMap") - **dewPoint** (object,null) - **humidity** (object,null) - **temperature** (object,null) - **conditions** (object,null) - **cloudiness** (object,null) - **sunrise** (object,null) - **sunset** (object,null) - **permits** (array (object)): The list of permits associated with the Site. Only available for workspaces with an enabled permits integration. Array items: - **id** (string) (required): The ID of the permit. (example: "123") - **description** (string,null): The description on the permit. This is a free-form text field that can contain any information about the permit. (example: "Install 27 kwh back-up batteries in cabinet") - **number** (string) (required): The permit number provided by the jurisdiction. (example: "B2303829") - **jurisdiction** (string) (required): The jurisdiction where permit was filled. (example: "Berkeley") - **jobValue** (number,null): The reported job value on the permit in cents (integer value representing dollars * 100). (example: 500100) - **type** (string,null): The type of permit. (example: "Building alteration: 3+ residential units or commercial") - **status** (string,null): The status of the permit. (example: "active") - **fileDate** (string,null): The date the permit was filed. (example: "2023-10-02") - **tags** (array,null): The list of tags associated with the permit. (example: ["solar","utilities","residential","solar_battery_storage"]) - **energyModeling** (object): The energy modeling data for the Site. Only available for workspaces with an enabled site intelligence integration. - **consumption** (object,null) - **costs** (object,null) - **intervals** (array,null) - **intervals** (array (object)): The list of intervals associated with the Site. Array items: - **startDate** (string) (required): The start date and time of the interval. (example: "2024-04-01T00:00:00.000Z") - **endDate** (string) (required): The end date and time of the interval. (example: "2024-04-01T00:15:00.000Z") - **consumption** (number,null): The amount of energy consumed during the interval. (example: 3.2) - **page** (number) (required) - **perPage** (number) (required) - **totalItems** (number) (required) - **totalPages** (number) (required) #### 403 - Unauthorized Unauthorized #### 404 - Not found Not found ### Example Usage ```bash curl -X GET "https://api.texturehq.com/v1/sites?referenceId=9bb290c8-fe97-46ce-92a8-952823164277&page=1&perPage=10" ``` ``` -------------------------------- ### POST /programs/{programSlug} Source: https://api.texturehq.com/v1/docs/swagger.json Create a new instance of a program. This allows you to activate a program for a specific organization. ```markdown ### Parameters - **programSlug** (string, path, required) (example: "nyc-battery-program-2025") ### Request Body **Content-Type:** application/json - **name** (string) (required): The name of the program instance (example: "NYC Battery Program 2025 - ConEd") ### Responses #### 201 - Program instance created successfully - **id** (string) (required): The unique identifier for the program instance (example: "cllgn0u4r000008l7eazybfbo") - **programSlug** (string) (required): The slug of the program (example: "nyc-battery-program-2025") - **name** (string) (required): The name of the program instance (example: "NYC Battery Program 2025 - ConEd") - **createdAt** (string (date-time)) (required): The date and time the program instance was created (example: "2025-01-01T00:00:00Z") ### Example Usage ```bash curl -X POST "https://api.texturehq.com/v1/programs/{programSlug}" \ -H "Content-Type: application/json" \ -d '{ "name": "NYC Battery Program 2025 - ConEd" }' ``` ``` -------------------------------- ### GET /alerts Source: https://api.texturehq.com/v1/docs/swagger.json Get a list of alerts ```markdown ### Parameters - **id** (string, query, optional): Filter alerts by ID. - **externalId** (string, query, optional): Filter alerts by external ID. - **severity** (string (CRITICAL|WARNING|INFO), query, optional): Filter alerts by severity level. (example: "WARNING") - **status** (string (OPEN|ACKNOWLEDGED|IGNORED|RESOLVED), query, optional): Filter alerts by status. (example: "OPEN") - **deviceId** (string, query, optional): Filter alerts by device ID. - **siteId** (string, query, optional): Filter alerts by site ID. - **sourceSystem** (string, query, optional): Filter alerts by source system. - **manufacturerDeviceId** (string, query, optional): Filter alerts by manufacturer device ID. - **page** (integer, query, optional): The page number to fetch devices from. - **perPage** (integer, query, optional): The number of devices per page to return. ### Responses #### 200 - Object with alerts data and pagination info - **data** (array (object)) (required) Array items: - **id** (string) (required): The unique identifier for the alert issued by Texture. (example: "cllgn0u4r000008l7eazybfbo") - **externalId** (string,null): The external identifier for the alert from the source system. (example: "alert-123456") - **sourceSystem** (string) (required): The source system that generated the alert. (example: "texture") - **alertType** (string,null): Legacy free-text alert type. (example: "device_offline") - **type** (string (COMMUNICATIONS|POWER_LIMIT|GRID_STATUS|HARDWARE_FAULT|FIRMWARE_UPDATE|CONFIGURATION|VOLTAGE_FREQUENCY|STATE_OF_ENERGY|TEMPERATURE|ISLANDING|GENERATOR|SOFTWARE_PROCESS|SENSOR|SYSTEM_SHUTDOWN|PERFORMANCE_DEGRADED|SITE_LEVEL|SAFETY|UNKNOWN)) (required): The normalized alert type. (example: "HARDWARE_FAULT") ("COMMUNICATIONS"|"POWER_LIMIT"|"GRID_STATUS"|"HARDWARE_FAULT"|"FIRMWARE_UPDATE"|"CONFIGURATION"|"VOLTAGE_FREQUENCY"|"STATE_OF_ENERGY"|"TEMPERATURE"|"ISLANDING"|"GENERATOR"|"SOFTWARE_PROCESS"|"SENSOR"|"SYSTEM_SHUTDOWN"|"PERFORMANCE_DEGRADED"|"SITE_LEVEL"|"SAFETY"|"UNKNOWN") - **subtype** (string,null): Optional normalized subtype for the alert. (example: "BATTERY_METER_COMMS") ("BATTERY_METER_COMMS"|"INVERTER_COMMS"|"PV_INVERTER_COMMS"|"SITE_CONTROLLER_COMMS"|"SITE_MAX_LIMITED"|"SITE_MIN_LIMITED"|"RAMP_RATE_LIMITED"|"POWER_FACTOR_LIMITED"|"GRID_FORMING"|"GRID_FOLLOWING"|"GRID_RESYNC_FAILED"|"INVERTER_FAULT"|"BATTERY_FAULT"|"CONTACTOR_FAULT"|"GENERATOR_FAULT"|"OPTICASTER_EXE_FAILED"|"CONTROL_AGENT_CRASHED"|"LOW_SOE"|"SLEEP_MODE"|"WAIT_FOR_SOLAR"|"EXTERNAL_SWITCH_SHUTDOWN"|"GPIO_SHUTDOWN"|"EXCESSIVE_VOLTAGE_DROP"|"FREQUENCY_DEVIATION"|"METER_DISCONNECTED"|"TEMPERATURE_SENSOR_FAULT"|"PERFORMANCE_BELOW_EXPECTATION") - **providerCode** (string,null): Provider-provided code or identifier, if any. (example: "3019") - **providerName** (string,null): Provider display name for the alert. (example: "Battery Meter Comms") - **severity** (string (CRITICAL|WARNING|INFO)) (required): The severity level of the alert. (example: "WARNING") ("CRITICAL"|"WARNING"|"INFO") - **status** (string (OPEN|ACKNOWLEDGED|IGNORED|RESOLVED)) (required): The current status of the alert. (example: "OPEN") ("OPEN"|"ACKNOWLEDGED"|"IGNORED"|"RESOLVED") - **title** (string) (required): The title of the alert. (example: "Device is offline") - **description** (string,null): Additional description or details about the alert. (example: "The thermostat in the bedroom has been offline for 15 minutes.") - **deviceId** (string,null): The unique identifier of the device this alert is related to. (example: "cllgn0u4r000008l7eazybfbo") - **siteId** (string,null): The unique identifier of the site this alert is related to. (example: "cllgn0u4r000008l7eazybfbo") - **workspaceId** (string) (required): The workspace this alert belongs to. (example: "cllgn0u4r000008l7eazybfbo") - **createdAt** (string,null) (required): The date and time the alert was created. (example: "2024-04-01T00:00:00.000Z") - **updatedAt** (string,null) (required): The date and time the alert was last updated. (example: "2024-04-01T00:00:00.000Z") - **acknowledgedAt** (string,null): The date and time the alert was acknowledged. (example: "2024-04-01T00:00:00.000Z") - **ignoredAt** (string,null): The date and time the alert was ignored. (example: "2024-04-01T00:00:00.000Z") - **resolvedAt** (string,null): The date and time the alert was resolved. (example: "2024-04-01T00:00:00.000Z") - **acknowledgedBy** (string,null): The user who acknowledged the alert. (example: "cllgn0u4r000008l7eazybfbo") - **ignoredBy** (string,null): The user who ignored the alert. (example: "cllgn0u4r000008l7eazybfbo") - **resolvedBy** (string,null): The user who resolved the alert. (example: "cllgn0u4r000008l7eazybfbo") - **snoozedUntil** (string,null): The date and time until which the alert is snoozed. (example: "2024-04-01T01:00:00.000Z") - **manufacturer** (string,null): The manufacturer of the device. (example: "Sierra Wireless") - **manufacturerDeviceId** (string,null): The manufacturer device id. (example: "C7625_S59240_DA0") - **deviceName** (string,null): The manufacturer device name. (example: "Cell Modem") - **deviceType** (string,null): The manufacturer device type. (example: "Sierra Wireless Event Reporting") - **deviceModel** (string,null): The manufacturer device model. (example: "C7625") - **deviceSerialNumber** (string,null): The manufacturer device serial number. (example: "QR1024744301B118") - **page** (number) (required) - **perPage** (number) (required) - **totalItems** (number) (required) - **totalPages** (number) (required) #### 403 - Unauthorized Unauthorized #### 404 - Not found Not found ### Example Usage ```bash curl -X GET "https://api.texturehq.com/v1/alerts?id=string&externalId=string&severity=WARNING&status=OPEN&deviceId=string&siteId=string&sourceSystem=string&manufacturerDeviceId=string&page=1&perPage=10" ``` ```