> ## Documentation Index
> Fetch the complete documentation index at: https://docs.ninjachat.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# management.projects.update

> Requires projects:write. Changing routing also requires routing:write. Budgets are integer USD cents. Responses are not cacheable. Keys/secrets are shown only at creation/rotation. Mutations do not support automatic retries: read current resource state after an ambiguous failure. Standard limits: 120 reads/minute and 30 writes/minute per account.



## OpenAPI

````yaml /openapi.json patch /management/projects/{id}
openapi: 3.1.0
info:
  title: NinjaChat API
  version: 1.0.0
  description: >-
    Clean-break NinjaChat v1. Chat and Responses bill actual token usage; images
    and videos use catalog unit pricing.
servers:
  - url: https://www.ninjachat.ai/api/v1
security: []
paths:
  /management/projects/{id}:
    patch:
      summary: management.projects.update
      description: >-
        Requires projects:write. Changing routing also requires routing:write.
        Budgets are integer USD cents. Responses are not cacheable. Keys/secrets
        are shown only at creation/rotation. Mutations do not support automatic
        retries: read current resource state after an ambiguous failure.
        Standard limits: 120 reads/minute and 30 writes/minute per account.
      parameters:
        - schema:
            type: string
            pattern: ^[a-fA-F0-9]{24}$
          required: true
          name: id
          in: path
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  minLength: 1
                  maxLength: 64
                  pattern: ^[a-zA-Z0-9\s_-]+$
                monthlyBudgetCents:
                  type:
                    - integer
                    - 'null'
                  minimum: 0
                  maximum: 1000000
                environment:
                  type: string
                  enum:
                    - development
                    - staging
                    - production
                routingPolicy:
                  allOf:
                    - $ref: '#/components/schemas/RoutingPolicy'
                    - type:
                        - object
                        - 'null'
              additionalProperties: false
      responses:
        '200':
          description: >-
            Management operation result. Lists use a data array;
            key/project/audit lists include next_cursor (null at end). Key
            create/rotate returns key once plus data metadata. X-Audit-Status:
            pending means the operation succeeded but its completion audit
            append needs investigation using X-Request-ID.
          content:
            application/json:
              schema:
                type: object
                properties: {}
        '400':
          description: Invalid or unsupported request parameter.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Missing or invalid API key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '402':
          description: Insufficient balance or project spend limit reached.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Management scope is missing, or the account is unavailable.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Resource does not exist in this account.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '409':
          description: Resource quota exceeded.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '429':
          description: Rate limit exceeded.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Gateway error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - managementKey: []
components:
  schemas:
    RoutingPolicy:
      type: object
      properties:
        strategy:
          type: string
          enum:
            - balanced
            - cost
            - latency
            - quality
        providers:
          type: object
          properties:
            only:
              type: array
              items:
                type: string
                minLength: 1
                maxLength: 128
              minItems: 1
              maxItems: 20
            exclude:
              type: array
              items:
                type: string
                minLength: 1
                maxLength: 128
              minItems: 1
              maxItems: 20
            order:
              type: array
              items:
                type: string
                minLength: 1
                maxLength: 128
              minItems: 1
              maxItems: 20
          additionalProperties: false
        allow_fallbacks:
          type: boolean
          default: true
        require_parameters:
          type: boolean
          default: true
        data_policy:
          type: string
          enum:
            - default
            - no_training
            - zero_retention
          default: default
        caching:
          type: string
          enum:
            - auto
        max_cost_usd:
          type: number
          exclusiveMinimum: 0
          maximum: 1000
      additionalProperties: false
    ErrorResponse:
      type: object
      properties:
        error:
          type: object
          properties:
            message:
              type: string
            type:
              type: string
            code:
              type: string
            param:
              type:
                - string
                - 'null'
          required:
            - message
            - type
            - code
          additionalProperties: false
      required:
        - error
      additionalProperties: false
  securitySchemes:
    managementKey:
      type: http
      scheme: bearer
      bearerFormat: nj_mk_...
      description: >-
        Account-scoped management credential created by the account owner after
        email verification. Inference keys cannot access these endpoints;
        management keys cannot run inference.

````