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

# Create a product user

> Asynchronous. The response is a transaction to poll, not the created user,
because product-user writes are resolved by the ingestion pipeline that
owns per-field source precedence.

`orgIds` is a convenience for creating memberships in the same call; each
one becomes its own item in the transaction. An organization id that is
neither a known organization nor already referenced by a membership is
rejected. Organizations are never created implicitly.




## OpenAPI

````yaml /api-reference/openapi.yaml post /v2/users
openapi: 3.1.0
info:
  title: Inflection Developer API
  version: 1.0.0
  description: >
    The Inflection Developer API (`/v2`). Authenticate with a Personal Access

    Token (`Authorization: Bearer inf_pat_...`).


    **`/v2` is `/v1` plus more.** Every `/v1` endpoint is served here unchanged,

    so a client can pin to one version and reach the whole API. On top of those

    sit reads `/v1` never had: journeys, journey and email stats with a journey

    rollup, and the email and list collections. `/v1` remains published.


    **Response envelope.** Every response is wrapped:

    `{ "data": …, "pagination": …, "errors": [...], "meta": { "status":
    "SUCCESS|FAILURE", "timestamp": "…" } }`.

    `data` carries the payload, `pagination` appears only on paged lists, and on

    failures `errors` is populated with `meta.status: "FAILURE"`.


    **Query parameters are camelCase**: `pageNumber`, `pageSize`, `startTime`,

    `folderId`. The journeys, emails, lists and stats reads additionally accept

    the snake_case spelling of every scalar parameter (`page_number`,

    `folder_id`, …); the contact, activity and list-member endpoints do not.

    Repeatable parameters also accept a `[]` suffix (`status[]`, `tag[]`).


    **Asynchronous contact writes.** `POST/PATCH /v2/contacts*` are processed

    asynchronously: they return **200** with a `PENDING` transaction

    acknowledgement (not the created/updated contact). Poll

    `GET /v2/contacts/transactions/{transactionId}` for the per-contact result.


    **Status-code quirks** (documented per-operation): a missing **contact** is

    reported as **400** (not 404), whereas a missing **list**, **email** or

    **journey** is **404**. For journeys and emails that also covers a

    soft-deleted record and a malformed id. Nothing returns 201 or 204.


    **Empty results are not errors.** On the paged reads, a `tag`, `folderId` or

    `search` that matches nothing returns an empty page, not a 404.


    **Errors.** Failures use the envelope above

    (`errors[].{errorCode,message,detail}`). Authentication and authorization

    failures (401/403) are returned with an empty body. The journey stats rollup

    adds `RESULT_SET_TOO_LARGE` (a **400**) when a filter matches more journeys

    than one request may cover; narrow it rather than paging further.


    **Rate limiting.** Requests are metered per tenant. Exceeding the budget

    yields **429** (empty body) on any endpoint; the `Retry-After` header gives

    the seconds to wait and `X-RateLimit-Limit` the sustained per-second budget.
servers:
  - url: https://api.inflection.io
    description: Production
security:
  - PatAuth: []
tags:
  - name: Contacts
    description: Create, read, and update contacts. Writes are asynchronous.
  - name: Contact Activity
    description: >-
      Product, marketing, and combined activity for a contact, plus Salesforce
      data.
  - name: Journeys
    description: Read journeys (campaigns), their schedule and their derived status.
  - name: Stats
    description: >-
      Send and engagement metrics for journeys and emails, with a journey
      rollup.
  - name: Lists
    description: Static and dynamic lists, and static-list members.
  - name: Emails
    description: Email listing and creation.
  - name: Product Users
    description: |
      Read product users -- the logins underneath a contact -- by id or email,
      and list them for a contact or an organization.
  - name: Organizations
    description: Read organizations (company accounts) and a contact's memberships.
  - name: Email Versions
    description: Per-contact versions of a Personalized Email Asset, served under `/v1`.
paths:
  /v2/users:
    post:
      tags:
        - Product Users
      summary: Create a product user
      description: >
        Asynchronous. The response is a transaction to poll, not the created
        user,

        because product-user writes are resolved by the ingestion pipeline that

        owns per-field source precedence.


        `orgIds` is a convenience for creating memberships in the same call;
        each

        one becomes its own item in the transaction. An organization id that is

        neither a known organization nor already referenced by a membership is

        rejected. Organizations are never created implicitly.
      operationId: createProductUser
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ProductUserInput'
      responses:
        '200':
          description: A pending transaction.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProductUserTransactionResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '409':
          description: A product user with this id already exists; use PATCH instead.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
        '429':
          $ref: '#/components/responses/TooManyRequests'
components:
  schemas:
    ProductUserInput:
      type: object
      properties:
        userId:
          type: string
          description: Your own product-user id. Omit it and one is generated for you.
        email:
          type: string
          format: email
          description: Required. Lower-cased and trimmed before storage.
        orgIds:
          type: array
          items:
            type: string
          maxItems: 100
          description: Organizations to link the user to, each its own transaction item.
        properties:
          type: object
          additionalProperties: true
          description: Product-user properties, keyed in snake_case.
      required:
        - email
    ProductUserTransactionResponse:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/ProductUserTransaction'
        meta:
          $ref: '#/components/schemas/Meta'
    ErrorEnvelope:
      type: object
      description: Standard failure envelope.
      properties:
        errors:
          type: array
          items:
            $ref: '#/components/schemas/ErrorItem'
        meta:
          $ref: '#/components/schemas/Meta'
    ProductUserTransaction:
      type: object
      properties:
        transactionId:
          type: string
        status:
          type: string
          enum:
            - PENDING
            - DONE
            - ERROR
          description: >
            `ERROR` means the write could not be queued and none of it was
            applied.
        createdAt:
          type: string
          format: date-time
        results:
          type: array
          items:
            $ref: '#/components/schemas/ProductUserTransactionItem'
          description: Present once the transaction is no longer pending.
      required:
        - transactionId
        - status
    Meta:
      type: object
      description: Envelope metadata present on every response.
      properties:
        status:
          type: string
          enum:
            - SUCCESS
            - FAILURE
        timestamp:
          type: string
          format: date-time
      required:
        - status
    ErrorItem:
      type: object
      properties:
        errorCode:
          type: string
          examples:
            - NOT_FOUND
        message:
          type: string
        detail:
          type: string
      required:
        - errorCode
        - message
    ProductUserTransactionItem:
      type: object
      properties:
        userId:
          type: string
        orgId:
          type: string
          description: Present on a membership item, absent on the user itself.
        operation:
          type: string
          enum:
            - UPSERT_PRODUCT_USER
            - UPSERT_PRODUCT_USER_ORGANISATION_MAPPING
            - DELETE_PRODUCT_USER_ORGANISATION_MAPPING_SOURCE
        status:
          type: string
          enum:
            - CREATED
            - UPDATED
            - NO_CHANGE
            - DELETED
            - FAILED
        error:
          type: string
          description: Present only when this item failed.
  responses:
    BadRequest:
      description: Malformed request or validation error.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
    Unauthorized:
      description: Missing or invalid Personal Access Token. Empty body.
    Forbidden:
      description: >-
        The PAT lacks the required scope (READ for reads, WRITE for writes).
        Empty body.
    TooManyRequests:
      description: |
        Per-tenant rate limit exceeded. Empty body. Retry after the number of
        seconds given in the `Retry-After` header.
      headers:
        Retry-After:
          description: Seconds to wait before retrying.
          schema:
            type: integer
        X-RateLimit-Limit:
          description: Sustained request budget, in requests per second, per tenant.
          schema:
            type: integer
  securitySchemes:
    PatAuth:
      type: http
      scheme: bearer
      bearerFormat: inf_pat
      description: |
        Personal Access Token or OAuth 2.1 access token, sent as a bearer
        credential (`Authorization: Bearer inf_pat_...`). Read operations
        require a token with the `READ` scope; write operations
        (POST/PATCH/DELETE) require `WRITE`.

````