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

# Set API consumer status

> Enables or disables AI access for a registered consumer. This route cannot change monetary limits or renewal dates.



## OpenAPI

````yaml /openapi.json post /set_api_consumer_status
openapi: 3.0.3
info:
  title: Agencii Platform API
  version: 1.0.0
  description: >-
    Reference documentation for the Agencii Platform API. Provides endpoints
    allowing you to run your agents on custom backends or on other unsupported
    channels. ⚡ Live Postman Example:
    https://www.postman.com/vrsen-ai/agencii-api/overview
servers:
  - url: https://agency-swarm-app-japboyzddq-uc.a.run.app
    description: Production server
security:
  - BearerAuth: []
paths:
  /set_api_consumer_status:
    post:
      summary: Set API consumer status
      description: >-
        Enables or disables AI access for a registered consumer. This route
        cannot change monetary limits or renewal dates.
      operationId: setApiConsumerStatus
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SetApiConsumerStatusRequest'
      responses:
        '200':
          description: Status updated.
          content:
            application/json:
              schema:
                type: object
                required:
                  - consumerId
                  - active
                properties:
                  consumerId:
                    type: string
                  active:
                    type: boolean
        '400':
          description: Invalid request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
        '401':
          description: Missing or invalid platform API key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
        '403':
          description: The API key does not own this integration.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
        '404':
          description: Integration or consumer not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
      servers:
        - url: https://api-integration-v2-qd6wo466iq-uc.a.run.app
          description: Staging API v2 server
components:
  schemas:
    SetApiConsumerStatusRequest:
      type: object
      required:
        - apiIntegrationId
        - consumerId
        - active
      properties:
        apiIntegrationId:
          type: string
        consumerId:
          type: string
        active:
          type: boolean
    ApiErrorResponse:
      type: object
      required:
        - error
      properties:
        error:
          type: string
        code:
          type: string
          nullable: true
          example: consumer_allowance_exhausted
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        Platform token required for authentication. Find or create one inside
        Profile Icon > API Keys. Example: Bearer sk-agencii-...

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.