POST /tenants – Creates a new tenant.


Headers:

  • Authorization: Bearer <access_token> (required)
  • Content-Type: application/json or application/x-www-form-urlencoded (required)

Body:

  • See Tenant for required fields.

Path Parameters:

  • None

Query Parameters:

  • None

  • 201 Created – Returns a JSON-stringified Tenant object.

Status Code Meaning When it Happens
400 Bad Request Missing or invalid fields in request body
401 Unauthorized Missing or invalid authentication token
409 Conflict Tenant with the same ID and product already exists
500 Internal Server Error Unexpected error during tenant creation
{
"error": "Detailed error message here"
}

POST /tenants
{
"tenantId": "tenant123",
"product": "script",
"domain": "domain.com",
"endpointUrl": "https://api.example.com"
}
{
"tenantId": "tenant123",
"product": "script",
"domain": "domain.com",
"endpointUrl": "https://api.example.com",
}

  • Parameters

    • event: APIGatewayProxyEvent

      The API Gateway event containing the request.

    • context: Context
    • callback: Callback<APIGatewayProxyResult>

    Returns void | Promise<APIGatewayProxyResult>

    A Promise resolving to an API Gateway-compatible response.