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

# Create an intention (status defaults to draft)



## OpenAPI

````yaml /openapi.yaml post /v1/intentions
openapi: 3.1.0
info:
  title: Inviolet Gateway API
  description: |
    Intent-based access control for AI agents. Every endpoint lives under
    `/v1/*` and authenticates via `Authorization: Bearer <api-key>`. Keys
    are provisioned in the UI at `/developer/api-keys`.
  version: 0.6.0
  contact:
    name: Inviolet
    url: https://inviolet.ai
  license:
    name: Proprietary
servers:
  - url: https://gateway.inviolet.ai
    description: Production
  - url: http://localhost:8080
    description: Local development
security:
  - BearerAuth: []
tags:
  - name: Intent
    description: Core evaluation loop.
  - name: Intentions
    description: Declarative intent patterns.
  - name: Approvals
    description: Human-in-the-loop approvals.
  - name: Webhooks
    description: Outbound HMAC-signed event delivery.
paths:
  /v1/intentions:
    post:
      tags:
        - Intentions
      summary: Create an intention (status defaults to draft)
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Intention'
      responses:
        '201':
          description: Created.
        '403':
          description: Scope `policy_write` or `admin` required.
components:
  schemas:
    Intention:
      type: object
      required:
        - label
        - intent_class
      properties:
        id:
          type: string
        label:
          type: string
          example: customer_support_lookup
        display_name:
          type: string
          example: Customer Support Lookup
        description:
          type: string
        intent_class:
          type: string
          enum:
            - reporting
            - export
            - admin
            - lookup
            - analysis
            - write
            - other
        status:
          type: string
          enum:
            - draft
            - active
            - archived
        approval_required:
          type: boolean
        ttl_minutes:
          type: integer
          nullable: true
        data_elements:
          type: array
          items:
            type: object
            properties:
              data_source_id:
                type: string
              path:
                type: string
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: ApiKey
      description: |
        API key minted at /developer/api-keys. Three scopes: `read_only`,
        `policy_write`, `admin`.

````