Browse Usage Quotas Administration

stable · api · 0.1.0

Set one Project Client quota

POST /api/v1/admin/operations/quotas.set

Capability Domain: Usage Quotas Administration

Authentication

platformSession — Requires an active Platform Operator with quotas responsibility, matching environment and Project Client scope, plus recent passkey or recovery-code authentication.

Scope: None

Parameters and request body

  • X-Correlation-ID — header, optional
    X-Correlation-ID schema
    {
        "type": "string",
        "format": "uuid"
    }

Request schema

application/json

application/json request schema
{
    "type": "object",
    "additionalProperties": false,
    "required": [
        "project_client_id",
        "parameters"
    ],
    "properties": {
        "project_client_id": {
            "type": "string",
            "format": "uuid"
        },
        "parameters": {
            "type": "object",
            "additionalProperties": false,
            "required": [
                "resource"
            ],
            "properties": {
                "resource": {
                    "type": "string",
                    "enum": [
                        "api_traffic",
                        "storage_bytes",
                        "deliveries",
                        "events",
                        "scheduled_invocations",
                        "realtime_connections",
                        "payment_transactions",
                        "audit_retention"
                    ]
                },
                "soft_limit": {
                    "type": [
                        "integer",
                        "null"
                    ],
                    "minimum": 1
                },
                "hard_limit": {
                    "type": [
                        "integer",
                        "null"
                    ],
                    "minimum": 1
                },
                "window_seconds": {
                    "type": [
                        "integer",
                        "null"
                    ],
                    "minimum": 60,
                    "maximum": 2678400,
                    "default": 3600
                }
            }
        }
    }
}

application/json request example

application/json request example
{
    "project_client_id": "30000000-0000-4000-8000-000000000003",
    "parameters": {
        "resource": "api_traffic",
        "soft_limit": 800,
        "hard_limit": 1000,
        "window_seconds": 3600
    }
}

Responses and errors

StatusDescription
200Project Client quota updated
401An active Platform Session is required
403Current Terms and Privacy Notice acceptance is required
422Operator authorization, Project Client scope, environment, recent strong authentication, or request validation failed

200 schema

200 response schema
{
    "type": "object",
    "required": [
        "data"
    ],
    "properties": {
        "data": {
            "type": "object",
            "required": [
                "updated"
            ],
            "properties": {
                "updated": {
                    "type": "boolean",
                    "enum": [
                        true
                    ]
                }
            }
        }
    }
}

401 schema

401 response schema
{
    "type": "object",
    "required": [
        "error"
    ],
    "properties": {
        "error": {
            "type": "object",
            "required": [
                "code",
                "message",
                "retryable",
                "correlation_id",
                "details"
            ],
            "properties": {
                "code": {
                    "type": "string"
                },
                "message": {
                    "type": "string"
                },
                "retryable": {
                    "type": "boolean"
                },
                "correlation_id": {
                    "type": "string",
                    "format": "uuid"
                },
                "details": {
                    "type": "object"
                }
            }
        }
    }
}

403 schema

403 response schema
{
    "type": "object",
    "required": [
        "error"
    ],
    "properties": {
        "error": {
            "type": "object",
            "required": [
                "code",
                "message",
                "retryable",
                "correlation_id",
                "details"
            ],
            "properties": {
                "code": {
                    "type": "string"
                },
                "message": {
                    "type": "string"
                },
                "retryable": {
                    "type": "boolean"
                },
                "correlation_id": {
                    "type": "string",
                    "format": "uuid"
                },
                "details": {
                    "type": "object"
                }
            }
        }
    }
}

422 schema

422 response schema
{
    "type": "object",
    "required": [
        "message",
        "errors"
    ],
    "properties": {
        "message": {
            "type": "string"
        },
        "errors": {
            "type": "object",
            "additionalProperties": {
                "type": "array",
                "items": {
                    "type": "string"
                }
            }
        }
    }
}

200 example

200 response example
{
    "data": {
        "updated": true
    }
}

401 example

401 response example
{
    "error": {
        "code": "unauthenticated",
        "message": "Authentication is required.",
        "retryable": false,
        "correlation_id": "20000000-0000-4000-8000-000000000016",
        "details": []
    }
}

403 example

403 response example
{
    "error": {
        "code": "legal_acceptance_required",
        "message": "Review and accept the current Terms and Privacy Notice to continue.",
        "retryable": false,
        "correlation_id": "20000000-0000-4000-8000-000000000016",
        "details": []
    }
}

422 example

422 response example
{
    "message": "The Platform Operator is not authorized for this responsibility and Project Client.",
    "errors": {
        "operator": [
            "The Platform Operator is not authorized for this responsibility and Project Client."
        ]
    }
}

Idempotency

The latest valid values replace this resource quota. Repeating identical values leaves the effective quota unchanged.