> ## 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.

# Get what a device may send

> The event names a device (a signed-in app user) may send, each with its cap and property limits, plus the per-person, project-wide and new-people caps. Empty until a person saves; any other name is refused. `revision` is 0 before the first save.



## OpenAPI

````yaml /api-reference/openapi.json get /v1/client-events
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/client-events:
    get:
      tags:
        - client_events
      summary: Get what a device may send
      description: >-
        The event names a device (a signed-in app user) may send, each with its
        cap and property limits, plus the per-person, project-wide and
        new-people caps. Empty until a person saves; any other name is refused.
        `revision` is 0 before the first save.
      operationId: client_events.get
      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
      responses:
        '200':
          description: Get what a device may send
          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/ClientEventsSetting'
        '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:
    ClientEventsSetting:
      type: object
      properties:
        revision:
          type: integer
          minimum: 0
          description: '0 until the first save: the defaults, no row.'
        daily_cap_per_person:
          type: integer
          minimum: 1
          maximum: 10000
          description: >-
            Most device events one person may send a day, across all names, 1 to
            10,000. Default 200. Past it a device is answered rate_limited with
            the time to wait. The day is the project's.
        daily_cap_project:
          type:
            - integer
            - 'null'
          minimum: 1
          maximum: 1000000
          description: >-
            Most device events a day across all people, 1 to 1,000,000. Null:
            off, the default. Past it every device is answered rate_limited
            until the next day. It bounds the harm of many identities, each
            under its own per-person cap, but it is shared: one actor can use it
            up for every device.
        new_people_per_hour:
          type:
            - integer
            - 'null'
          minimum: 1
          maximum: 1000
          description: >-
            Most new people a device's first sign-in may create in each UTC
            clock hour, 1 to 1,000. Null, the default: a first sign-in is
            refused, so only people already known can sign in. Past the limit a
            new identity is refused with rate_limited and nothing is created. It
            applies whether or not any event is allowed. Each new person starts
            with the project's starting units, so keep it low.
        events:
          type: array
          items:
            $ref: '#/components/schemas/ClientEventAllow'
          maxItems: 50
          description: 'Empty by default: a name not here is refused as forbidden.'
        updated_at:
          type:
            - string
            - 'null'
          format: date-time
          description: 'A moment in time: UTC, ISO 8601'
        updated_by:
          $ref: '#/components/schemas/MemberRef'
      required:
        - revision
        - daily_cap_per_person
        - daily_cap_project
        - new_people_per_hour
        - events
        - updated_at
        - updated_by
      additionalProperties: false
      description: >-
        What a device may send: the event names allowed and the caps, with the
        revision to quote when changing 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
    ClientEventAllow:
      type: object
      properties:
        event:
          type: string
          maxLength: 100
          pattern: ^[a-z][a-z0-9_]*(\.[a-z][a-z0-9_]*)+$
          description: >-
            An event's name: lowercase words joined by dots, thing first, such
            as `checkin.scanned`
        daily_cap:
          type:
            - integer
            - 'null'
          minimum: 1
          maximum: 10000
          default: null
          description: >-
            Most per person per day for this name, counted inside the default
            cap, so the lower of the two applies. Null: only the default cap.
        properties:
          type: array
          items:
            $ref: '#/components/schemas/ClientEventPropertyRule'
          maxItems: 50
          default: []
          description: >-
            The properties this event may carry, each with its clamp (up to 50).
            There is no "any property" mode: the default is an empty list, so a
            device sends the name and nothing else. A property not listed, a
            null, or a list value refuses the event. 4096 bytes of properties in
            all is a separate limit that always applies.
      required:
        - event
      additionalProperties: false
    MemberRef:
      type:
        - object
        - 'null'
      properties:
        id:
          type: string
          pattern: ^mem_[0-7][0-9a-hjkmnp-tv-z]{25}$
          description: A member ID, starting with `mem_`.
        name:
          type: string
          description: The member's display name.
      required:
        - id
        - name
      description: 'A member of the team: their ID and display name.'
    ClientEventPropertyRule:
      oneOf:
        - type: object
          properties:
            name:
              type: string
              minLength: 1
              maxLength: 64
              description: >-
                The property's name, 1 to 64 characters. A device must send it
                exactly as written.
            type:
              type: string
              enum:
                - string
              description: The value must be text.
            max_length:
              type: integer
              minimum: 1
              maximum: 1024
              description: >-
                Longest value, in characters, 1 to 1024. A longer value refuses
                the event.
          required:
            - name
            - type
            - max_length
          additionalProperties: false
        - type: object
          properties:
            name:
              type: string
              minLength: 1
              maxLength: 64
              description: >-
                The property's name, 1 to 64 characters. A device must send it
                exactly as written.
            type:
              type: string
              enum:
                - number
              description: The value must be a finite number.
            min:
              type: number
              description: Smallest value allowed, inclusive.
            max:
              type: number
              description: Largest value allowed, inclusive. Not below `min`.
          required:
            - name
            - type
            - min
            - max
          additionalProperties: false
        - type: object
          properties:
            name:
              type: string
              minLength: 1
              maxLength: 64
              description: >-
                The property's name, 1 to 64 characters. A device must send it
                exactly as written.
            type:
              type: string
              enum:
                - boolean
              description: The value must be true or false.
          required:
            - name
            - type
          additionalProperties: false
  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.