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

# Create agent

> Creates an agent with task instructions and an optional schedule.



## OpenAPI

````yaml openapi-public-preview.json POST /v1/agents
openapi: 3.1.0
info:
  title: Entendre API
  version: 1.0.0
  description: Programmatic access to crypto-native accounting and treasury operations.
servers:
  - url: https://api.entendre.finance
    description: Production API.
security:
  - ApiKey: []
tags:
  - name: Organization
    description: Read your organization profile and find members for agent assignments.
  - name: Transactions
    description: Find transactions, inspect their details and create manual records.
  - name: Sources
    description: >-
      Manage wallets, exchange accounts, bank accounts and other transaction
      sources.
  - name: Assets
    description: Inspect asset acquisitions, remaining quantities and cost basis.
  - name: Journals
    description: >-
      Create and post journal entries, correct eligible entries and sync posted
      journals to a connected general ledger.
  - name: Documents
    description: >-
      Upload documents, check processing status and link supporting evidence to
      transactions.
  - name: Legal Entities
    description: Manage the legal entities used in your accounting records.
  - name: Ledger Accounts
    description: Manage your chart of accounts and find accounts for journal entries.
  - name: Tags
    description: Create and manage tags to classify your records.
  - name: Accruals
    description: >-
      Create and post accruals, inspect their status and reverse eligible
      entries.
  - name: Cash Application
    description: Match deposits to invoices and manage the resulting cash applications.
  - name: Classification
    description: >-
      Classify transactions in a batch, post eligible entries and inspect the
      results.
  - name: Revaluation
    description: Run asset revaluations for an accounting period and check their results.
  - name: Accounting Periods
    description: Check whether a period is ready to close, then close or reopen it.
  - name: Income Statement
    description: View revenue, expenses and net income for a reporting period.
  - name: Balance Sheet
    description: View assets, liabilities and equity as of a reporting date.
  - name: Trial Balance
    description: Review ledger account balances and debit and credit totals.
  - name: Closing Positions
    description: View asset positions at the end of a reporting period.
  - name: Treasury Balances
    description: Review treasury balances by asset and source.
  - name: Realized Gains & Losses
    description: Review realized gains and losses from asset dispositions.
  - name: Asset Tax Lots
    description: Inspect asset tax lots, remaining quantities and cost basis.
  - name: Schedule of Dispositions
    description: >-
      Review asset dispositions and their proceeds, cost basis and gains or
      losses.
  - name: Financial Insights
    description: Review financial insights for your selected reporting context.
  - name: Agents
    description: Create agents, schedule their work and inspect their runs.
  - name: Memory
    description: Read, search and maintain the memory files your agents use.
  - name: Connections
    description: Connect providers, manage authorization and disconnect.
  - name: GL Mapping
    description: >-
      Map ledger accounts and legal entities to your ERP. Import legal entities,
      tags and chart of accounts.
  - name: Request
    description: Request information, documents or connections from a client.
  - name: Client
    description: Manage your firm’s client relationships.
  - name: Team
    description: Invite team members and manage their access to your firm.
  - name: Settings
    description: Read and update your firm settings.
externalDocs:
  description: Versioning, deprecation, and rate-limit policy
  url: https://entendre.ai/docs/get-started/versioning
paths:
  /v1/agents:
    post:
      tags:
        - Agents
      summary: Create agent
      description: >-
        Create an agent with task instructions and an optional schedule. Use
        Update agent to change its schedule.
      operationId: create_agent
      parameters:
        - name: Idempotency-Key
          in: header
          required: true
          description: >-
            Unique key for this operation. Retry with the same key and request
            body after a timeout. Keys are retained for at least 24 hours.
          schema:
            type: string
            minLength: 1
            maxLength: 255
          example: example-operation-2026-08-31-001
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - name
                - description
              properties:
                name:
                  type: string
                  description: Display name for the agent.
                description:
                  type: string
                  description: Human-readable description of what this agent should do.
                cron_expressions:
                  type: array
                  items:
                    type: string
                  description: >-
                    Five-field cron expressions in the organization timezone,
                    such as `0 2 * * *`.
                schedule_description:
                  type: string
                  description: >-
                    Natural language schedule as an alternative to
                    `cron_expressions` (such as "every weekday at 9am").
                legal_entities:
                  type: array
                  maxItems: 100
                  items:
                    type: object
                    additionalProperties: false
                    required:
                      - id
                      - name
                    properties:
                      id:
                        type: string
                        minLength: 1
                        maxLength: 128
                        description: Legal entity ID (`le_…`).
                      name:
                        type: string
                        minLength: 1
                        maxLength: 256
                        description: Legal entity name.
                  description: Legal entities this agent operates on.
                sources:
                  type: array
                  maxItems: 100
                  items:
                    type: object
                    additionalProperties: false
                    required:
                      - id
                      - name
                    properties:
                      id:
                        type: string
                        minLength: 1
                        maxLength: 128
                        description: Source ID.
                      name:
                        type: string
                        minLength: 1
                        maxLength: 256
                        description: Source name.
                  description: Financial account sources this agent operates on.
                emails:
                  type: array
                  items:
                    type: string
                    format: email
                  description: Email addresses for run notifications.
                slack_channel_id:
                  type:
                    - string
                    - 'null'
                  description: Slack channel ID for notifications.
                owner_user_id:
                  type:
                    - string
                    - 'null'
                  description: >-
                    Owner (`usr_…`). Omit it or send `null` to make the creating
                    user the owner. To clear the owner later, send `null` to
                    Update agent.
                reviewer_user_id:
                  type:
                    - string
                    - 'null'
                  description: >-
                    The reviewer user id. Native tool approval requests go to
                    this reviewer. If no reviewer is assigned, requests go to
                    the owner.
                enabled_mcp_connection_ids:
                  type: array
                  maxItems: 50
                  items:
                    type: string
                    format: uuid
                  description: MCP connections that the agent can use. Omit for none.
              description: >-
                Scheduling is optional. Omit scheduling fields to create an
                on-demand agent.
            example:
              name: Monthly close assistant
              description: Reviews the month-end close checklist.
              schedule_description: Every month on the 2nd at 09:00
      responses:
        '201':
          description: Created.
          headers:
            X-Request-Id:
              description: Support correlation ID.
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/Agent'
                required:
                  - data
                additionalProperties: false
              example:
                data:
                  id: agt_abc123
                  name: Monthly close assistant
                  agent_type: custom
                  status: paused
                  is_active: false
                  description: null
                  cron_expressions: []
                  schedule: []
                  triggers: []
                  organization_id: org_507f1f77bcf86cd799439011
                  last_run_at: null
                  last_error_message: null
                  last_agent_run_status: null
                  owner_user_id: null
                  reviewer_user_id: null
                  created_at: '2026-08-31T12:00:00Z'
                  updated_at: '2026-08-31T12:00:00Z'
                  created_by: null
        '400':
          description: >-
            The request is invalid. `error.fields` lists the fields to correct.
            Nothing was changed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: VALIDATION_ERROR
                  message: Invalid path, query or request body.
                  request_id: req_example
        '401':
          description: The API key is missing, invalid or expired.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: UNAUTHORIZED
                  message: Invalid or expired API Key
                  request_id: req_example
                  suggested_action: >-
                    Send an API key in X-API-Key, or an OAuth access token as
                    Authorization: Bearer. Refresh an expired access token.
                  documentation_url: https://entendre.ai/docs/get-started/authentication
          headers:
            WWW-Authenticate:
              $ref: '#/components/headers/WWW-Authenticate'
        '403':
          description: >-
            The API key does not have the required scope or is not associated
            with a user, or the action needs a review in the dashboard.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: FORBIDDEN
                  message: Insufficient access to organization
                  request_id: req_example
        '404':
          description: The resource does not exist, or your organization cannot access it.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: RESOURCE_NOT_FOUND
                  message: Resource not found
                  request_id: req_example
        '409':
          description: >-
            The current state of the resource or an accounting rule prevents
            this operation. Read the resource again before you choose another
            action.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: CONFLICT
                  message: The resource state does not allow this operation.
                  request_id: req_example
        '429':
          description: >-
            Too many requests. If the response has a `Retry-After` header, wait
            that many seconds before you retry. Otherwise, read `error.message`.
          headers:
            Retry-After:
              description: Seconds to wait before retrying.
              schema:
                type: integer
                minimum: 1
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: RATE_LIMITED
                  message: Rate limit exceeded. Retry after 30s.
                  request_id: req_example
        '500':
          description: >-
            An unexpected error occurred. A write can still have taken effect;
            check the resource before you retry. Give the `request_id` to
            support.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: INTERNAL_ERROR
                  message: Internal server error
                  request_id: req_example
        '503':
          description: >-
            A service that this operation needs is unavailable. If the response
            has a `Retry-After` header, wait that many seconds. Check for
            earlier accepted work before you send the request again.
          headers:
            Retry-After:
              description: Seconds to wait before retrying.
              schema:
                type: integer
                minimum: 1
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: SERVICE_UNAVAILABLE
                  message: Service unavailable.
                  request_id: req_example
components:
  schemas:
    Agent:
      type: object
      required:
        - id
        - name
        - agent_type
        - status
        - is_active
        - organization_id
        - created_at
      properties:
        id:
          type: string
          examples:
            - agt_abc123
          description: Agent ID (`agt_…`).
        name:
          type: string
          description: Agent name.
        agent_type:
          type:
            - string
            - 'null'
          readOnly: true
          description: Agent type.
        status:
          type: string
          enum:
            - active
            - paused
            - archived
          description: Lifecycle status. Paused and archived agents cannot start new runs.
        is_active:
          type: boolean
          deprecated: true
          description: '`true` when the agent is active. `status` gives the exact state.'
          readOnly: true
        description:
          type:
            - string
            - 'null'
          description: What the agent does.
        cron_expressions:
          type: array
          items:
            type: string
          description: >-
            Raw 5-field cron expressions. For display, use the human-readable
            `schedule` instead of these raw strings.
        schedule:
          type: array
          items:
            type: string
          description: >-
            Readable schedule for each `cron_expressions` item, in the
            organization timezone. Empty when the agent has no schedule.
        triggers:
          type: array
          description: >-
            Triggers that start the agent. Only triggers with `is_active: true`
            start it.
          items:
            type: object
            properties:
              id:
                type: string
                description: Trigger ID.
              trigger_type:
                type: string
                description: >-
                  `schedule` for a cron trigger, or a `*_webhook` type for an
                  event trigger.
              is_active:
                type: boolean
                description: '`true` when the trigger starts the agent.'
              cron_expressions:
                type: array
                items:
                  type: string
                description: >-
                  Cron expressions for a `schedule` trigger; empty for webhook
                  triggers.
              event_types:
                type: array
                items:
                  type: string
                description: >-
                  Event names a webhook trigger listens for; empty for a
                  `schedule` trigger.
              last_triggered_at:
                type:
                  - string
                  - 'null'
                format: date-time
                description: Last time the trigger started the agent.
              created_at:
                type:
                  - string
                  - 'null'
                format: date-time
                description: Time the agent was created (ISO 8601).
              updated_at:
                type:
                  - string
                  - 'null'
                format: date-time
                description: Time the agent was last updated (ISO 8601).
        emails:
          type: array
          items:
            type: string
          description: Email notification recipients.
        slack_channel_id:
          type:
            - string
            - 'null'
          description: Slack channel ID for notifications.
        organization_id:
          type: string
          description: Organization ID (`org_…`).
        last_run_at:
          type:
            - string
            - 'null'
          format: date-time
          description: Time of the latest run.
        last_error_message:
          type:
            - string
            - 'null'
          description: Error message from the most recent failed run.
        latest_run:
          anyOf:
            - $ref: '#/components/schemas/AgentRun'
            - type: 'null'
          description: The latest run, or `null`.
        last_agent_run_status:
          type:
            - string
            - 'null'
          description: Latest run status. Only included in list responses.
        owner_user_id:
          type:
            - string
            - 'null'
          description: >-
            Prefixed `usr_` id of the assignable owner (defaults to the
            creator), or null.
        reviewer_user_id:
          type:
            - string
            - 'null'
          description: >-
            The reviewer user id. Native tool approval requests go to this
            reviewer. If no reviewer is assigned, requests go to the owner.
        created_at:
          type: string
          format: date-time
          description: Time the agent was created (ISO 8601).
        updated_at:
          type: string
          format: date-time
          description: Time the agent was last updated (ISO 8601).
        created_by:
          type:
            - string
            - 'null'
          description: ID of the user who created the agent.
        arguments:
          type: object
          description: >-
            Agent settings. `legalEntityIds` lists the legal entities (`le_…`).
            `sourceIds` lists the source IDs without a type prefix.
        slack_team_id:
          type:
            - string
            - 'null'
          description: Slack workspace ID of the agent, or `null`.
        enabled_mcp_connection_ids:
          type: array
          items:
            type: string
          description: MCP connections that the agent can use.
    ErrorResponse:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          required:
            - code
            - message
            - request_id
          properties:
            code:
              type: string
              description: Machine-readable error code.
            message:
              type: string
              description: Technical description for developers.
            fields:
              type: object
              additionalProperties:
                type: string
              description: >-
                Present only on VALIDATION_ERROR. Maps failing field paths to
                reason strings.
            details:
              type: object
              additionalProperties: true
              description: >-
                Optional redacted diagnostic details. Request validation uses
                fields or field_errors.
            suggested_action:
              type: string
              description: A suggested next step.
            documentation_url:
              type: string
              format: uri
              description: Link to documentation about this error.
            request_id:
              type: string
              description: Unique request ID for support escalation.
          description: Error details.
    AgentRun:
      type: object
      required:
        - id
        - agent_id
        - status
        - created_at
        - status_url
      properties:
        id:
          type: string
          examples:
            - run_xyz789
          description: Run ID (`run_…`).
        status:
          type: string
          enum:
            - in_progress
            - pending_review
            - success
            - error
            - skipped
          description: >-
            Run status. `pending_review` waits for a review. `skipped` means
            that the agent was paused or archived before the run started. A
            cancelled run currently ends as `error`.
        success_data:
          type:
            - string
            - 'null'
          description: Result data on success.
        error_data:
          type:
            - string
            - 'null'
          description: Error details on failure.
        error_message:
          type:
            - string
            - 'null'
          description: Human-readable error message.
        reviewed_by:
          type:
            - string
            - 'null'
          description: The user who approved the run.
        reviewed_at:
          type:
            - string
            - 'null'
          format: date-time
          description: Time of the review decision, or `null` before a decision.
        created_at:
          type: string
          format: date-time
          description: Time the run was created (ISO 8601).
        updated_at:
          type: string
          format: date-time
          description: Time the run was last updated (ISO 8601).
        agent_id:
          type: string
          description: ID of the agent that owns the run.
          example: agt_507f1f77bcf86cd799439011
        review:
          $ref: '#/components/schemas/Review'
        result_links:
          type: array
          items:
            $ref: '#/components/schemas/ResourceLink'
          description: Records that the run created or changed.
        status_url:
          type: string
          readOnly: true
          description: URL that returns this run through List agent runs.
          example: /v1/agents/agt_507f1f77bcf86cd799439011/runs?run_ids=run_xyz789
    Review:
      type: object
      properties:
        status:
          type: string
          description: Review status. `pending` does not approve the run.
          enum:
            - not_required
            - pending
            - approved
            - rejected
        reviewer_user_id:
          type:
            - string
            - 'null'
          description: >-
            The reviewer user id. Native tool approval requests go to this
            reviewer. If no reviewer is assigned, requests go to the owner.
        review_url:
          type:
            - string
            - 'null'
          description: >-
            Dashboard URL for an authorized user to complete a required review.
            Present when status is pending; null when no review is required.
        reviewed_at:
          type:
            - string
            - 'null'
          description: ISO timestamp of decision.
      required:
        - status
        - reviewer_user_id
        - review_url
        - reviewed_at
      additionalProperties: false
    ResourceLink:
      type: object
      properties:
        id:
          type: string
          description: ID of the referenced resource.
        url:
          type: string
          description: Relative API path.
        type:
          type: string
          description: Resource type.
      required:
        - id
        - url
        - type
      additionalProperties: false
  headers:
    WWW-Authenticate:
      description: >-
        Bearer challenge with `realm="entendre"` and `resource_metadata`, the
        URL of the protected-resource metadata (RFC 9728).
        `error="invalid_token"` is added when the credential that was sent is
        invalid or expired.
      schema:
        type: string
  securitySchemes:
    ApiKey:
      type: apiKey
      in: header
      name: X-API-Key
      description: >-
        Your organization API key. See
        [Authentication](/get-started/authentication).

````

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