Error Codes

Comprehensive reference for all error codes returned by the Texture REST API

Error Response Structure

All error responses from the Texture REST API return a JSON body with at minimum a code and message field:

{
  "code": "ERROR_CODE",
  "message": "Human-readable description of the error"
}
FieldTypeDescription
codestringMachine-readable error code. Use this for programmatic error handling.
messagestringHuman-readable description. Use for logging — do not parse for control flow, as wording may change.

Additional Fields

Some error responses include extra fields alongside code and message:

FieldTypeWhen PresentDescription
detailsobjectValidation errorsContains field-level error information
mismatchedFieldsstring[]PARAMETER_MISMATCH onlyLists which fields differ from the existing resource
retryAfternumberRATE_LIMITED onlySeconds until rate limit window resets (also in Retry-After header)

Example: Standard Error

{
  "code": "DEVICE_NOT_FOUND",
  "message": "The specified device does not exist"
}

Example: Validation Error with Details

{
  "code": "VALIDATION_ERROR",
  "message": "The request body failed validation",
  "details": {
    "serialNumber": "Serial number is required",
    "capacity": "Must be a positive number"
  }
}

Example: Rate Limit Error

{
  "code": "RATE_LIMITED",
  "message": "Rate limit exceeded. Try again later.",
  "retryAfter": 42
}

Example: Conflict with Mismatched Fields

{
  "code": "PARAMETER_MISMATCH",
  "message": "A device with this manufacturer device ID already exists with different parameters",
  "mismatchedFields": ["serialNumber", "name"]
}

Authentication Errors (401)

Returned when the API cannot verify the caller's identity.

Error CodeDescriptionWhat to Do
UNAUTHENTICATEDMissing, invalid, expired, or revoked API keyVerify your API key is included, correctly formatted, and active. Generate a new key in the Dashboard if needed.

Common causes

  • Missing Texture-Api-Key header
  • Malformed API key value
  • API key has been revoked or expired
  • Using the wrong API key type for the endpoint (e.g., using a Management key on an OEM endpoint that requires a Manufacturer key)

Do not retry. Fix the API key and re-send.


Authorization Errors (403)

Returned when the API key is valid but lacks permission for the requested operation.

Error CodeDescriptionWhat to Do
FORBIDDENInsufficient permissions for this resource or actionVerify the key's scopes include the resource type and operation you're attempting
DEVICE_MODEL_MANUFACTURER_MISMATCHThe device model belongs to a different manufacturer than your API keyConfirm your Manufacturer API key matches the device model's manufacturer
DEVICE_NOT_OEM_DIRECTThe device was not provisioned via OEM DirectOnly OEM Direct devices can receive telemetry via POST /devices/:id/telemetry
MANUFACTURER_NOT_ALLOWEDThe device's manufacturer is not in your API key's scopeCheck that your Manufacturer API key is scoped to the correct manufacturer

Do not retry. Adjust your API key permissions or correct the request.


Validation Errors (400)

Returned when the request data is invalid or the operation cannot be performed given the resource's current state.

Error CodeDescriptionWhat to Do
VALIDATION_ERRORRequired fields missing or invalid. The details field lists specific field errors.Read the details object, fix the indicated fields, and retry
INVALID_LOCATIONThe provided address or coordinates could not be resolved to a valid locationVerify the address is correctly formatted and geocodable
INVALID_STATEThe operation is not valid for the resource's current stateCheck the resource's current state; some operations are only valid in certain lifecycle stages
INVALID_STATUSThe requested status transition is not allowedConsult the API docs for valid status transitions
INVALID_CRITERIAThe filter or query criteria are malformedCheck filter syntax and supported operators
CUSTOMER_NOT_CONNECTED_TO_SITEThe customer is not associated with the specified siteVerify the customer-site relationship before performing this operation
DELETION_PROTECTION_ENABLEDWorkspace has deletion protection enabledDisable deletion protection before retrying
SITE_ALREADY_EXISTSA site with this address already exists in the workspaceUse the existing site or provide a different address
DUPLICATE_NAMEA resource with this name already exists in the same scopeChoose a different name
DEVICE_MODEL_NOT_FOUNDThe specified deviceModelId does not match any known device modelVerify the device model ID; use the device models endpoint to list available models

Do not retry without modifying the request. Read the message and details fields to identify what needs to change.


Resource Not Found Errors (404)

Returned when the specified resource does not exist or is not accessible with your current API key.

Error CodeDescription
NOT_FOUNDThe requested resource does not exist
CUSTOMER_NOT_FOUNDThe specified customer ID does not exist
DEVICE_NOT_FOUNDThe specified device ID does not exist
SITE_NOT_FOUNDThe specified site ID does not exist
SITE_NOT_IN_WORKSPACEThe site exists but is not accessible from your current workspace scope
APIKEY_NOT_FOUNDThe specified API key ID does not exist
WORKSPACE_NOT_FOUNDThe specified workspace ID does not exist
SCHEDULE_NOT_FOUNDThe specified schedule ID does not exist
DEVICE_NOT_ASSOCIATEDThe device exists but is not associated with any workspace
COLLECTION_NOT_FOUNDThe specified collection ID does not exist

Verify the resource ID is correct. The resource may have been deleted, or your API key may not have access to the workspace that contains it.


Conflict Errors (409)

Returned when the request conflicts with the current state of an existing resource.

Error CodeDescriptionWhat to Do
DUPLICATE_CONNECTIONA connection with these parameters already existsUse the existing connection instead of creating a duplicate
PARAMETER_MISMATCHA device with the same manufacturerDeviceId exists with different attribute valuesEither update the existing device or correct the conflicting fields in your request

Handling PARAMETER_MISMATCH

This error is specific to OEM device creation (POST /devices). When you create a device and one with the same manufacturerDeviceId already exists, the API compares fields. If they all match, the call succeeds idempotently. If any fields differ, you receive PARAMETER_MISMATCH with a mismatchedFields array listing the differing fields.


Rate Limit Errors (429)

Returned when the caller exceeds the API's request rate limits.

Rate Limit Response Headers

HeaderTypeDescription
X-RateLimit-LimitnumberMaximum requests allowed per window
X-RateLimit-RemainingnumberRequests remaining in the current window
X-RateLimit-ResetnumberUnix timestamp (seconds) when the window resets
Retry-AfternumberSeconds until you can retry

Rate Limits by Operation Type

Operation TypeLimit
Read operations (GET)300 requests/minute
Write operations (POST, PATCH, PUT, DELETE)60 requests/minute

Rate limits are applied per API key. Wait for the number of seconds in Retry-After, then retry. For sustained rate limiting, implement exponential backoff.


Server Errors (500, 502)

Returned when an unexpected error occurs on the server side. These are never caused by your request data.

HTTP StatusError CodeDescription
500UNKNOWN_ERRORAn unexpected error occurred while processing the request
500LOCATION_SERVICE_ERRORThe address validation service is temporarily unavailable
502SERVICE_UNAVAILABLEA dependent service is temporarily unreachable

Retry with exponential backoff (1s → 2s → 4s). After 3–5 retries, stop and contact Texture support.


OEM Device Integration Errors

Quick reference for OEM Direct Integration endpoints.

Device Creation — POST /devices

Error CodeHTTPDescriptionWhat to Do
VALIDATION_ERROR400Required fields missing or invalidCheck details for field-level errors
DEVICE_MODEL_NOT_FOUND400The deviceModelId does not match any known modelVerify the device model ID
SITE_NOT_FOUND404The specified siteId does not existVerify the site ID
DEVICE_MODEL_MANUFACTURER_MISMATCH403The device model belongs to a different manufacturerUse a model belonging to your manufacturer
PARAMETER_MISMATCH409Device with same manufacturerDeviceId exists with different attributesSee Conflict Errors section
Idempotency

If you create a device with a manufacturerDeviceId that already exists and all fields match, the request succeeds and returns the existing device. This allows safe retries.

Telemetry Push — POST /devices/
/telemetry

Error CodeHTTPDescriptionWhat to Do
DEVICE_NOT_FOUND404The device ID does not existVerify the device ID
DEVICE_NOT_OEM_DIRECT403The device was not provisioned via OEM DirectThis endpoint only accepts telemetry for OEM Direct devices
MANUFACTURER_NOT_ALLOWED403The device's manufacturer is not in your API key's scopeVerify your Manufacturer API key scope
DEVICE_NOT_ASSOCIATED404The device is not associated with any workspaceDevice must be associated with a workspace before telemetry can be ingested
VALIDATION_ERROR400The telemetry payload is invalid or missing required fieldsCheck details for field-level errors

HTTP Status Code Quick Reference

StatusMeaningRetryable?Action
400Bad RequestNoFix request data per code, message, and details
401UnauthenticatedNoFix or replace API key
403ForbiddenNoCheck API key scopes and permissions
404Not FoundNo*Verify resource ID and workspace access
409ConflictNoResolve the conflict per the error details
429Too Many RequestsYesWait for Retry-After, then retry
500Internal Server ErrorYesRetry with exponential backoff
502Service UnavailableYesRetry with exponential backoff

* 404 may be retryable if the resource was very recently created (eventual consistency). A single retry after 1–2 seconds is reasonable.


Best Practices for Error Handling

  1. Branch on HTTP status code first. Use the status code to determine the error category, then inspect code for specifics.
  2. Use code for programmatic handling. The code field is stable and machine-readable. Map code values to specific handling logic in your client.
  3. Use message for logging only. The message field is human-readable and may change without notice. Do not parse it for control flow.
  4. Retry only retryable errors. Only 429, 500, and 502 responses should be retried. All other status codes indicate a problem with the request itself.
  5. Respect Retry-After. When present, always honor the Retry-After header before retrying.
  6. Implement exponential backoff for server errors. Start at 1 second and double on each retry, up to a maximum of 3–5 attempts.
  7. Log the full error response. Always log code, message, and any additional fields (details, mismatchedFields) for debugging.
  8. Handle PARAMETER_MISMATCH explicitly in your device provisioning flow. This is an expected response when re-provisioning devices and should be handled as a recoverable conflict, not a generic error.
  9. Monitor rate limit headers proactively. Check X-RateLimit-Remaining on successful responses to throttle your request rate before hitting 429.