> ## Documentation Index
> Fetch the complete documentation index at: https://architect-d889a35e-sync-pr-4026.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Create account log entry

> Create an account log entry using the authenticated API key's tenant context



## OpenAPI

````yaml /services/external-actor-gateway-service/openapi.yaml post /v0/account_logs
openapi: 3.1.0
info:
  contact:
    email: api-support@tryarchitect.com
    name: Architect
    url: https://tryarchitect.com
  description: >-
    The Customer API lets you manage pages, audiences, persons, accounts,
    topics, page links, analytics, and webhook subscriptions.


    ## Authentication

    Send your API key in the `x-api-key` header on every request.


    ## Terminology

    - **Page**: a top-level customer experience container.

    - **Audience**: a targeted experience that belongs to a Page.

    - **Version**: a generated or editable Audience state, including drafts and
    published versions.

    - **Person**: an individual contact record.


    ## Pagination

    Collection endpoints use `limit` and `cursor`. When another page is
    available, pass the returned `nextCursor` value back as `cursor`. When there
    are no more results, `nextCursor` is `null`.


    ## Webhooks

    Create subscriptions with `POST /v0/webhook_subscriptions`. The
    `signingSecret` is returned only once, when the subscription is created, so
    store it securely.


    Webhook deliveries are sent as `POST` requests with these headers:

    - `X-Webhook-Signature-256`: HMAC-SHA256 of the raw request body, prefixed
    with `sha256=`

    - `X-Webhook-Timestamp`: Unix timestamp in milliseconds used when the
    signature was generated


    Webhook deliveries are at-least-once. Use `eventId` for idempotency and
    return a `2xx` response quickly after persisting work.


    Example delivery body:

    ```json

    {
      "timestamp": "2024-01-15T10:30:00.000Z",
      "eventId": "event_01j5k9m7n8p9q2r3s4t5v6w7x8",
      "payload": {
        "type": "page.version.created",
        "pageId": "page_01j5k9m7n8p9q2r3s4t5v6w7x8",
        "versionId": "<audience_version_id>",
        "createdAt": "2024-01-15T10:30:00.000Z"
      }
    }

    ```


    Version webhook event names currently use the internal `page.version.*`
    namespace. In Customer API terms, these correspond to Audience version
    lifecycle events.
  title: Architect - Customer API
  version: 0.0.1
servers:
  - description: Production environment
    url: https://api.tryarchitect.com
  - description: Beta environment
    url: https://api.beta.tryarchitect.com
  - description: Local environment
    url: http://localhost:25001
security:
  - apiKey: []
tags:
  - name: Pages
    description: Page management operations
  - name: Analytics
    description: Analytics and session read operations
  - name: Audiences
    description: Audience management operations
  - name: Audience Versions
    description: Audience version management operations
  - name: Audience Messages
    description: Audience message editing operations
  - name: Page Links
    description: Page link management operations
  - name: Assets
    description: Asset management operations
  - name: Persons
    description: Person management operations
  - name: Person Logs
    description: Person log ingestion operations
  - name: Accounts
    description: Account management operations
  - name: Account Activity
    description: Merged account and linked person activity operations
  - name: Account Logs
    description: Account log ingestion operations
  - name: Topics
    description: Knowledge topic management operations
  - name: Topic Entries
    description: Knowledge topic entry management operations
  - name: Webhook Subscriptions
    description: Webhook subscription management operations
paths:
  /v0/account_logs:
    post:
      tags:
        - Account Logs
      summary: Create account log entry
      description: >-
        Create an account log entry using the authenticated API key's tenant
        context
      operationId: createAccountLog
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateAccountLogRequest'
        required: true
      responses:
        '201':
          description: AccountLog created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PostAccountLog'
        '400':
          $ref: '#/components/responses/ValidationError'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '403':
          $ref: '#/components/responses/ForbiddenError'
        '409':
          $ref: '#/components/responses/ConflictError'
        '429':
          $ref: '#/components/responses/RateLimitError'
        '500':
          $ref: '#/components/responses/InternalServerError'
        '503':
          $ref: '#/components/responses/ServiceUnavailableError'
components:
  schemas:
    CreateAccountLogRequest:
      type: object
      properties:
        accountId:
          $ref: '#/components/schemas/AccountId'
        domain:
          type: string
          minLength: 1
        name:
          type: string
          minLength: 1
          maxLength: 255
        source:
          $ref: '#/components/schemas/Source'
        type:
          $ref: '#/components/schemas/Type'
        idempotencyKey:
          type: string
          minLength: 1
          maxLength: 255
        payload:
          type: object
          propertyNames:
            type: string
          additionalProperties: {}
      required:
        - source
        - type
        - payload
      additionalProperties: false
    PostAccountLog:
      type: object
      properties:
        accountId:
          $ref: '#/components/schemas/AccountId'
        accountLogId:
          type: string
          minLength: 1
          description: The created account log entry ID
        createdAt:
          $ref: '#/components/schemas/UnnamedSchema'
        source:
          $ref: '#/components/schemas/Source'
        type:
          $ref: '#/components/schemas/Source'
      required:
        - accountId
        - accountLogId
        - createdAt
        - source
        - type
      additionalProperties: false
    AccountId:
      type: string
      minLength: 1
      pattern: ^account_[a-z0-9]{26}$
    Source:
      type: string
      minLength: 1
      maxLength: 100
      pattern: ^[a-z0-9]+(-[a-z0-9]+)*$
      description: Stored person log source
    Type:
      default: webhook
      description: >-
        Kebab-case person activity type. Defaults to 'webhook' when omitted
        (e.g. 'contact-update')
      type: string
      minLength: 1
      maxLength: 100
      pattern: ^[a-z0-9]+(-[a-z0-9]+)*$
    UnnamedSchema:
      type: string
      pattern: ^\+[1-9]\d{1,14}$
    Error:
      properties:
        code:
          enum:
            - UNAUTHORIZED
            - FORBIDDEN
            - NOT_FOUND
            - VALIDATION_ERROR
            - CONFLICT
            - RATE_LIMITED
            - INTERNAL
            - SERVICE_UNAVAILABLE
          examples:
            - VALIDATION_ERROR
            - UNAUTHORIZED
            - NOT_FOUND
          type: string
        detail:
          examples:
            - Authentication is required
            - Audience not found
            - Default topic titles cannot be updated
          type: string
        details:
          description: >-
            Optional structured details about the error, such as validation
            issues or rate-limit metadata.
          examples:
            - - field: body
                issues:
                  - code: validation_failed
                    message: 'name: Name is required'
                    path:
                      - name
            - limit: 100
              remaining: 0
              resetTime: 1713225600000
              retryAfter: 60
          oneOf:
            - items:
                additionalProperties: true
                type: object
              type: array
            - additionalProperties: true
              type: object
        requestId:
          examples:
            - req_01j5k9m7n8p9q2r3s4t5v6w7x8
          type: string
        status:
          example: 400
          type: number
        title:
          examples:
            - Bad Request
            - Unauthorized
            - Not Found
          type: string
        type:
          examples:
            - https://api.tryarchitect.com/errors/validation_error
            - https://api.tryarchitect.com/errors/not_found
          type: string
      required:
        - code
        - detail
        - requestId
        - status
        - title
        - type
      type: object
  responses:
    ValidationError:
      content:
        application/json:
          examples:
            default:
              value:
                code: VALIDATION_ERROR
                detail: 'body - name: Name is required; email: Invalid email address'
                details:
                  - field: body
                    issues:
                      - code: validation_failed
                        message: 'name: Name is required'
                        path:
                          - name
                requestId: req_01j5k9m7n8p9q2r3s4t5v6w7x8
                status: 400
                title: Bad Request
                type: https://api.tryarchitect.com/errors/validation_error
          schema:
            $ref: '#/components/schemas/Error'
      description: >-
        The request could not be processed because the path, query string, or
        JSON body was invalid.
    UnauthorizedError:
      content:
        application/json:
          examples:
            default:
              value:
                code: UNAUTHORIZED
                detail: Authentication is required
                requestId: req_01j5k9m7n8p9q2r3s4t5v6w7x8
                status: 401
                title: Unauthorized
                type: https://api.tryarchitect.com/errors/unauthorized
          schema:
            $ref: '#/components/schemas/Error'
      description: The request did not include valid authentication credentials.
    ForbiddenError:
      content:
        application/json:
          examples:
            default:
              value:
                code: FORBIDDEN
                detail: Multi-tenant API keys are not supported
                requestId: req_01j5k9m7n8p9q2r3s4t5v6w7x8
                status: 403
                title: Forbidden
                type: https://api.tryarchitect.com/errors/forbidden
          schema:
            $ref: '#/components/schemas/Error'
      description: >-
        The caller is authenticated but does not have access to the requested
        tenant or operation.
    ConflictError:
      content:
        application/json:
          examples:
            default:
              value:
                code: CONFLICT
                detail: Default topic titles cannot be updated
                requestId: req_01j5k9m7n8p9q2r3s4t5v6w7x8
                status: 409
                title: Conflict
                type: https://api.tryarchitect.com/errors/conflict
          schema:
            $ref: '#/components/schemas/Error'
      description: >-
        The request conflicts with current resource state, lifecycle rules, or
        uniqueness constraints.
    RateLimitError:
      content:
        application/json:
          examples:
            default:
              value:
                code: RATE_LIMITED
                detail: Rate limit exceeded
                details:
                  limit: 100
                  remaining: 0
                  resetTime: 1713225600000
                  retryAfter: 60
                requestId: req_01j5k9m7n8p9q2r3s4t5v6w7x8
                status: 429
                title: Too Many Requests
                type: https://api.tryarchitect.com/errors/rate_limited
          schema:
            $ref: '#/components/schemas/Error'
      description: >-
        The authenticated caller has exceeded the current request rate limit
        window.
    InternalServerError:
      content:
        application/json:
          examples:
            default:
              value:
                code: INTERNAL
                detail: An unexpected error occurred
                requestId: req_01j5k9m7n8p9q2r3s4t5v6w7x8
                status: 500
                title: Internal Server Error
                type: https://api.tryarchitect.com/errors/internal
          schema:
            $ref: '#/components/schemas/Error'
      description: The server encountered an unexpected error while processing the request.
    ServiceUnavailableError:
      content:
        application/json:
          examples:
            default:
              value:
                code: SERVICE_UNAVAILABLE
                detail: The service is temporarily unavailable
                requestId: req_01j5k9m7n8p9q2r3s4t5v6w7x8
                status: 503
                title: Service Unavailable
                type: https://api.tryarchitect.com/errors/service_unavailable
          schema:
            $ref: '#/components/schemas/Error'
      description: >-
        The service is temporarily unavailable. Retry the request after a short
        delay.
  securitySchemes:
    apiKey:
      description: API key authentication for the External Actor Gateway
      in: header
      name: x-api-key
      type: apiKey

````