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

# Propose a change for a person to approve

> Asks a person to approve 1 to 10 changes in order, including a starter template or units, rules and taking them live in one request. Later steps may refer to unit or rule keys created earlier in the same request. Nothing runs until an owner or admin approves.



## OpenAPI

````yaml /api-reference/openapi.json post /v1/proposals
openapi: 3.1.0
info:
  title: Lurk API
  version: 1.0.0
  description: Events in, rules decide, units change, receipts out.
servers:
  - url: https://api.getlurk.com
security: []
tags:
  - name: events
    description: Send what your users do. Lurk runs your live rules on each event.
    x-group: Events
    x-displayName: Events
  - name: units
    description: What people collect and hold, and their balances.
    x-group: Units
    x-displayName: Units
  - name: rules
    description: What Lurk does when an event comes in. A person takes a rule live.
    x-group: Rules
    x-displayName: Rules
  - name: activity
    description: A receipt for every change, with why it happened.
    x-group: Receipts
    x-displayName: Receipts
  - name: users
    description: The people your events are about.
    x-group: People
    x-displayName: People
  - name: webhook_endpoints
    description: Where Lurk sends signed notices of what changed.
    x-group: Webhooks
    x-displayName: Webhooks
  - name: known_values
    description: The properties of your own events whose values Lurk remembers.
    x-group: Known values
    x-displayName: Known values
  - name: feedback
    description: Tell the Lurk team about a bug, a gap or an idea.
    x-group: Feedback
    x-displayName: Feedback
  - name: annotations
    description: >-
      Short notes on a day of the project, such as a release or a campaign
      start.
    x-group: Annotations
    x-displayName: Annotations
  - name: trusted_issuers
    description: The sign-in providers a project trusts for its app's users.
    x-group: Trusted issuers
    x-displayName: Trusted issuers
  - name: client_events
    description: The events a signed-in device may send, and their caps.
    x-group: Client events
    x-displayName: Client events
  - name: issuer_identities
    description: Which person each sign-in subject is bound to.
    x-group: Issuer identities
    x-displayName: Issuer identities
  - name: proposals
    description: Changes an agent or Lurky asks for and a person approves or declines.
    x-group: Proposals
    x-displayName: Proposals
  - name: holds
    description: Changes a rule parked for a person to give or refuse.
    x-group: Holds
    x-displayName: Holds
  - name: audiences
    description: The groups of people that rules can read.
    x-group: Audiences
    x-displayName: Audiences
  - name: budgets
    description: What each live rule's budgets have given in the window they are in now.
    x-group: Budgets
    x-displayName: Budgets
  - name: templates
    description: Kits that add units and rules to a project in one go.
    x-group: Templates
    x-displayName: Templates
  - name: views
    description: Saved questions about a project, with their answers.
    x-group: Views
    x-displayName: Views
  - name: integrations
    description: Every way events reach Lurk or state leaves it, and the state of each.
    x-group: Integrations
    x-displayName: Integrations
  - name: projects
    description: Where units, rules and events live. An organization can have several.
    x-group: Projects
    x-displayName: Projects
  - name: clocks
    description: A test project's clock, which can be moved to try schedules and expiries.
    x-group: Clocks
    x-displayName: Clocks
paths:
  /v1/proposals:
    post:
      tags:
        - proposals
      summary: Propose a change for a person to approve
      description: >-
        Asks a person to approve 1 to 10 changes in order, including a starter
        template or units, rules and taking them live in one request. Later
        steps may refer to unit or rule keys created earlier in the same
        request. Nothing runs until an owner or admin approves.
      operationId: proposals.create
      parameters:
        - schema:
            type: string
            description: W3C Trace Context; joins your trace to ours
          required: false
          description: W3C Trace Context; joins your trace to ours
          name: traceparent
          in: header
        - schema:
            type: string
            minLength: 1
            maxLength: 255
            description: A retry with the same key and body returns the first response
          required: true
          description: A retry with the same key and body returns the first response
          name: Idempotency-Key
          in: header
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateProposalInput'
      responses:
        '201':
          description: Propose a change for a person to approve
          headers:
            Request-Id:
              schema:
                type: string
                description: Quote this when you contact support
              required: true
              description: Quote this when you contact support
            traceparent:
              schema:
                type: string
                description: W3C Trace Context for this call, in the caller's trace
              required: true
              description: W3C Trace Context for this call, in the caller's trace
            RateLimit:
              schema:
                type: string
                description: The tightest limit now, e.g. `"ingest-key";r=5999;t=42`
              required: true
              description: The tightest limit now, e.g. `"ingest-key";r=5999;t=42`
            RateLimit-Policy:
              schema:
                type: string
                description: Its quota and window, e.g. `"ingest-key";q=6000;w=60`
              required: true
              description: Its quota and window, e.g. `"ingest-key";q=6000;w=60`
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Proposal'
        '429':
          description: Too many requests. Wait `Retry-After` seconds.
          headers:
            Request-Id:
              schema:
                type: string
                description: Quote this when you contact support
              required: true
              description: Quote this when you contact support
            traceparent:
              schema:
                type: string
                description: W3C Trace Context for this call, in the caller's trace
              required: true
              description: W3C Trace Context for this call, in the caller's trace
            RateLimit:
              schema:
                type: string
                description: The tightest limit now, e.g. `"ingest-key";r=5999;t=42`
              required: true
              description: The tightest limit now, e.g. `"ingest-key";r=5999;t=42`
            RateLimit-Policy:
              schema:
                type: string
                description: Its quota and window, e.g. `"ingest-key";q=6000;w=60`
              required: true
              description: Its quota and window, e.g. `"ingest-key";q=6000;w=60`
            Retry-After:
              schema:
                type: string
                description: Seconds to wait
              required: true
              description: Seconds to wait
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        default:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - bearerAuth: []
components:
  schemas:
    CreateProposalInput:
      type: object
      properties:
        title:
          type: string
          minLength: 1
          maxLength: 120
          description: Up to 120 characters. Defaults to the first change's summary
        summary:
          type: string
          maxLength: 1000
          description: Why, for the person who decides. Up to 1,000 characters
        changes:
          type: array
          items:
            type: object
            properties:
              operation:
                $ref: '#/components/schemas/ProposableOperation'
              input:
                type: object
                additionalProperties: {}
                description: That operation's input
            required:
              - operation
              - input
            additionalProperties: false
          minItems: 1
          maxItems: 10
          description: >-
            What to ask for: 1 to 10 changes, run in this order when a person
            approves. A later change can refer to a unit or rule key created by
            an earlier `units.create`, `rules.create` or `templates.install` in
            the same request (`units.create` requires `name` and `group`:
            `points`, `progress`, `badge` or `perk`)
      required:
        - changes
      additionalProperties: false
    Proposal:
      type: object
      properties:
        id:
          type: string
          description: The prop_… ID
        status:
          $ref: '#/components/schemas/ProposalStatus'
        title:
          type: string
          description: 'A headline: Morning regular goes live'
        summary:
          type: string
          description: Why, as the one who asked wrote it; empty if they gave no reason
        by:
          type: string
          description: 'Who asked: "agent:<key id>", "key:<id>", "member:<id>"'
        via:
          type: string
          enum:
            - api
            - agent
            - lurky
            - dashboard
            - system
          description: >-
            How it was asked for: `api`, `agent`, `lurky` or `dashboard`
            (`system` is not produced today)
        agent:
          type:
            - string
            - 'null'
          description: 'The agent''s name: Claude Code'
        changes:
          type: array
          items:
            $ref: '#/components/schemas/ProposalChange'
          minItems: 1
          description: What approving runs, in order
        created_at:
          type: string
          format: date-time
          description: 'When it was created: UTC, ISO 8601'
        expires_at:
          type: string
          format: date-time
          description: >-
            When it stops being open if nobody decides: 7 days after it was
            asked for
        decided_at:
          type:
            - string
            - 'null'
          format: date-time
          description: >-
            When a person decided it: UTC, ISO 8601; null while it is open or
            expired
        decided_by:
          type:
            - string
            - 'null'
          description: '"member:<id>" of the person who decided'
        note:
          type:
            - string
            - 'null'
          description: The person's note on their decision
        url:
          type:
            - string
            - 'null'
          description: >-
            Where a person decides it; null where the dashboard's address is not
            known
        included_changes:
          type: array
          items:
            type: integer
            minimum: 0
          description: >-
            0-based indices of changes that ran when approved; absent until
            approved
        applied:
          type: array
          items:
            type: string
          description: >-
            Target IDs of each change that ran when approved, matching
            included_changes in order; absent until approved
        key_claims:
          type: array
          items:
            $ref: '#/components/schemas/ApiKeyClaimSummary'
          description: >-
            One-time key claims created when api_keys.create was approved;
            absent when none
      required:
        - id
        - status
        - title
        - summary
        - by
        - via
        - agent
        - changes
        - created_at
        - expires_at
        - decided_at
        - decided_by
        - note
        - url
      description: >-
        A change someone asked for and a person decides. Nothing in it has run
        until a person approves it.
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            status:
              type: integer
            code:
              type: string
              enum:
                - invalid_json
                - invalid_key
                - forbidden
                - approval_required
                - not_found
                - idempotency_conflict
                - conflict
                - unblock_clock_reversed
                - insufficient_balance
                - reference_used
                - validation_failed
                - rate_limited
                - internal
                - unavailable
            message:
              type: string
            param:
              type: string
            next_step:
              type: string
              description: >-
                What to do about this kind of error, in one sentence. Always
                sent by current servers
            request_id:
              type: string
            doc_url:
              type: string
              format: uri
          required:
            - status
            - code
            - message
            - request_id
            - doc_url
      required:
        - error
    ProposableOperation:
      type: string
      enum:
        - rules.publish
        - rules.resume
        - rules.pause
        - units.create
        - units.update
        - rules.create
        - rules.update
        - templates.install
        - templates.remove
        - units.give
        - audiences.create
        - audiences.add_users
        - api_keys.create
      description: >-
        What approving a proposal can run: taking a rule live, pausing or
        resuming it, creating or updating a rule, adding or taking back a
        template, creating or changing a unit, creating an audience, adding
        people to a list audience, requesting a one-time project API key claim,
        or giving a unit by hand (only Lurky or a member's assistant may ask for
        a give).
    ProposalStatus:
      type: string
      enum:
        - open
        - approved
        - declined
        - expired
      description: >-
        `open` waits for a person. `approved`: a person approved it and its
        changes ran. `declined`: a person declined it and nothing ran.
        `expired`: nobody decided it within 7 days, so it can no longer be
        decided.
    ProposalChange:
      type: object
      properties:
        operation:
          $ref: '#/components/schemas/ProposableOperation'
        target:
          type: object
          properties:
            type:
              type: string
              description: >-
                What kind of thing it is: rule, unit, template, audience, person
                or people
            id:
              type: string
              description: >-
                Its ID. A template, or a unit, rule or audience that is not
                created yet, is named by its key or name instead
            name:
              type: string
              description: Its name
          required:
            - type
            - id
            - name
          description: What it changes, with its ID and name
        summary:
          type: string
          description: 'The change in words: Morning regular goes live'
        input:
          type: object
          additionalProperties: {}
          description: The operation's input, as it will run
        before:
          type: object
          additionalProperties: {}
          description: >-
            The parts of the target that differ, as they are now; empty when it
            is new
        after:
          type: object
          additionalProperties: {}
          description: The same parts as they will be once it is approved
        effect:
          type:
            - string
            - 'null'
          description: >-
            What approving does and does not do, said plainly: a live rule keeps
            running its live version until a person takes the new one live.
            Absent on proposals made before it existed
      required:
        - operation
        - target
        - summary
        - input
        - before
        - after
    ApiKeyClaimSummary:
      type: object
      properties:
        id:
          type: string
          description: The kcl_… claim ID
        name:
          type: string
          description: What the key is for
        status:
          $ref: '#/components/schemas/ApiKeyClaimStatus'
        expires_at:
          type: string
          format: date-time
          description: When the claim window closes
        pkce_required:
          type: boolean
          description: Whether redeeming requires the local PKCE verifier
        code_issue_count:
          type: integer
          minimum: 0
          description: How many one-time claim codes have been issued for this claim
        api_key_id:
          type:
            - string
            - 'null'
          description: The minted key_… ID once claimed; null before
      required:
        - id
        - name
        - status
        - expires_at
        - pkce_required
        - api_key_id
    ApiKeyClaimStatus:
      type: string
      enum:
        - pending
        - claimed
        - cancelled
        - expired
      description: >-
        `pending`: waiting to be claimed; `claimed`: exchanged for a key;
        `cancelled`: cancelled before redemption; `expired`: claim window
        closed.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        A project key (Developers → API keys). Keep it on your server, not in an
        app.

````

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