Skip to content
SENS Platform Docs

Create a tenant-owned custom-script block as a platform or tenant administrator.

POST
/v1/tenants/{tenantNumber}/flow-blocks
curl --request POST \
--url https://api.dev.iot-sens.schlossers.at/v1/tenants/1/flow-blocks \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "key": "example", "name": "example", "description": "example" }'
tenantNumber
required
integer format: int32
>= 1 <= 2147483647
Media typeapplication/json
object
key
required
string
/^[a-z0-9][a-z0-9._-]{0,127}$/
name
required
string
>= 1 characters <= 200 characters
description
string
<= 500 characters
Examplegenerated
{
"key": "example",
"name": "example",
"description": "example"
}

Tenant custom block created.

A safe platform error response.

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: VALIDATION_FAILED AUTHENTICATION_FAILED AUTHORIZATION_FAILED RESOURCE_NOT_FOUND CONFLICT DEPENDENCY_FAILURE FLOW_FAILURE RATE_LIMITED INTERNAL_ERROR
category
required
string
Allowed values: validation authentication authorization not_found conflict dependency_failure flow_failure rate_limit internal
message
required

Safe client-facing diagnostic message.

string
correlationId
required

Correlation ID for operational investigation.

string
>= 1 characters
details

Safe bounded diagnostic details.

object
key
additional properties
One of:
string
Example
{
"error": {
"code": "VALIDATION_FAILED",
"category": "validation"
}
}
Cache-Control
string
Allowed value: no-store