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

# Provision user

> Creates (or idempotently returns) an Endaoment user owned by the calling partner. The partner-scoped idempotency key is `partnerUserIdentifier`. Returns 201 when a user is created and 200 when an existing user is returned and its non-email identity is refreshed.



## OpenAPI

````yaml https://api.endaoment.org/oas-json post /v1/auth/partner/users
openapi: 3.0.0
info:
  title: Endaoment API
  description: >-
    The official Endaoment API endpoints. Dev (canary) = newest features;
    Staging (stable) = pre-production.
  version: 0.0.0-dev
  contact: {}
servers:
  - url: https://api.endaoment.org
    description: Production
security: []
tags:
  - name: Partner Endpoints
    description: Tech-platform partner server-to-server APIs
  - name: Authentication
    description: OAuth callers, API keys, and session verification
  - name: Funds
    description: Donor-advised fund lifecycle
  - name: Donations
    description: Donation pledges, supported assets, and impact totals
  - name: Portfolios
    description: Investment portfolio catalog
  - name: Nonprofit Organizations
    description: Nonprofit lookup, subprojects, and missing-org intake
  - name: Grant Transfers
    description: Grant and entity transfers
  - name: Collaboration
    description: Collaborator recommendations and fund collaboration
  - name: Activity
    description: Public and scoped activity feeds
paths:
  /v1/auth/partner/users:
    post:
      tags:
        - Partner Endpoints
      summary: Provision user
      description: >-
        Creates (or idempotently returns) an Endaoment user owned by the calling
        partner. The partner-scoped idempotency key is `partnerUserIdentifier`.
        Returns 201 when a user is created and 200 when an existing user is
        returned and its non-email identity is refreshed.
      operationId: AuthController_createPartnerUser_v1
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PartnerCreateUserDto'
      responses:
        '200':
          description: >-
            An existing partner-managed user was returned and its non-email
            identity refreshed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PartnerUserResponseDto'
        '201':
          description: A new partner-managed user was created.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PartnerUserResponseDto'
        '409':
          description: >-
            The partnerUserIdentifier or email conflicts with an existing user:
            a different email for the same identifier, an email already bound to
            another identifier, or a pre-cutover user missing an identifier.
      security:
        - ApiKey: []
components:
  schemas:
    PartnerCreateUserDto:
      type: object
      properties:
        partnerUserIdentifier:
          type: string
          description: >-
            Opaque partner-generated identifier for this user, used as the
            partner-scoped idempotency key. Must be 8–64 printable ASCII
            characters; leading/trailing whitespace is trimmed before
            validation.
          example: c3f8b2e4-9d1a-4f6b-8e2c-7a5d90c41b3f
          minLength: 8
          maxLength: 64
          pattern: ^[\x20-\x7E]{8,64}$
        firstName:
          type: string
          description: First name of the partner-managed user
          example: Ada
          maxLength: 255
        lastName:
          type: string
          description: Last name of the partner-managed user
          example: Lovelace
          maxLength: 255
        email:
          type: string
          description: Email address of the partner-managed user
          example: new-user@altruist.com
          format: email
        address:
          description: Physical address of the partner-managed user
          allOf:
            - $ref: '#/components/schemas/AddressInputDto'
      required:
        - partnerUserIdentifier
        - firstName
        - lastName
        - email
        - address
    PartnerUserResponseDto:
      type: object
      properties:
        id:
          type: string
          description: >-
            Endaoment user id. Persist this and use it for all subsequent
            operations for this user.
          example: 0b3e6f2a-9d1a-4f6b-8e2c-7a5d90c41b3f
          format: uuid
        partnerUserIdentifier:
          type: string
          description: >-
            The opaque partner-generated identifier, echoed back from the
            request.
          example: c3f8b2e4-9d1a-4f6b-8e2c-7a5d90c41b3f
        email:
          type: string
          description: The partner-managed user's email address, normalized to lowercase.
          example: new-user@altruist.com
          format: email
        techPlatformClientId:
          type: string
          description: >-
            The tech platform client id that owns this user (derived server-side
            from the API key).
          example: altruist
        emailVerificationStatus:
          type: string
          description: >-
            Email verification status. `PENDING` until the user completes a
            first-party login.
          enum:
            - PENDING
            - VERIFIED
          example: PENDING
      required:
        - id
        - partnerUserIdentifier
        - email
        - techPlatformClientId
        - emailVerificationStatus
    AddressInputDto:
      type: object
      properties:
        line1:
          type: string
          description: First line of the address
          example: 123 Main Street
          maxLength: 255
        line2:
          type: object
          description: Second line of the address (optional)
          example: Suite 100
          maxLength: 255
          nullable: true
        city:
          type: string
          description: City name
          example: San Francisco
          maxLength: 255
        state:
          type: object
          description: State/Province/Region. Required if country is USA
          example: CA
          maxLength: 255
          nullable: true
        zip:
          type: string
          description: Postal/ZIP code. Required if country is USA
          example: '94105'
          maxLength: 255
          nullable: true
        country:
          type: string
          description: Three-letter ISO country code. Defaults to USA
          example: USA
          enum:
            - ABW
            - AFG
            - AGO
            - AIA
            - ALA
            - ALB
            - AND
            - ARE
            - ARG
            - ARM
            - ASM
            - ATA
            - ATF
            - ATG
            - AUS
            - AUT
            - AZE
            - BDI
            - BEL
            - BEN
            - BES
            - BFA
            - BGD
            - BGR
            - BHR
            - BHS
            - BIH
            - BLM
            - BLR
            - BLZ
            - BMU
            - BOL
            - BRA
            - BRB
            - BRN
            - BTN
            - BVT
            - BWA
            - CAF
            - CAN
            - CCK
            - CHE
            - CHL
            - CHN
            - CIV
            - CMR
            - COD
            - COG
            - COK
            - COL
            - COM
            - CPV
            - CRI
            - CUB
            - CUW
            - CXR
            - CYM
            - CYP
            - CZE
            - DEU
            - DJI
            - DMA
            - DNK
            - DOM
            - DZA
            - ECU
            - EGY
            - ERI
            - ESH
            - ESP
            - EST
            - ETH
            - FIN
            - FJI
            - FLK
            - FRA
            - FRO
            - FSM
            - GAB
            - GBR
            - GEO
            - GGY
            - GHA
            - GIB
            - GIN
            - GLP
            - GMB
            - GNB
            - GNQ
            - GRC
            - GRD
            - GRL
            - GTM
            - GUF
            - GUM
            - GUY
            - HKG
            - HMD
            - HND
            - HRV
            - HTI
            - HUN
            - IDN
            - IMN
            - IND
            - IOT
            - IRL
            - IRN
            - IRQ
            - ISL
            - ISR
            - ITA
            - JAM
            - JEY
            - JOR
            - JPN
            - KAZ
            - KEN
            - KGZ
            - KHM
            - KIR
            - KNA
            - KOR
            - KWT
            - LAO
            - LBN
            - LBR
            - LBY
            - LCA
            - LIE
            - LKA
            - LSO
            - LTU
            - LUX
            - LVA
            - MAC
            - MAF
            - MAR
            - MCO
            - MDA
            - MDG
            - MDV
            - MEX
            - MHL
            - MKD
            - MLI
            - MLT
            - MMR
            - MNE
            - MNG
            - MNP
            - MOZ
            - MRT
            - MSR
            - MTQ
            - MUS
            - MWI
            - MYS
            - MYT
            - NAM
            - NCL
            - NER
            - NFK
            - NGA
            - NIC
            - NIU
            - NLD
            - NOR
            - NPL
            - NRU
            - NZL
            - OMN
            - PAK
            - PAN
            - PCN
            - PER
            - PHL
            - PLW
            - PNG
            - POL
            - PRI
            - PRK
            - PRT
            - PRY
            - PSE
            - PYF
            - QAT
            - REU
            - ROU
            - RUS
            - RWA
            - SAU
            - SDN
            - SEN
            - SGP
            - SGS
            - SHN
            - SJM
            - SLB
            - SLE
            - SLV
            - SMR
            - SOM
            - SPM
            - SRB
            - SSD
            - STP
            - SUR
            - SVK
            - SVN
            - SWE
            - SWZ
            - SXM
            - SYC
            - SYR
            - TCA
            - TCD
            - TGO
            - THA
            - TJK
            - TKL
            - TKM
            - TLS
            - TON
            - TTO
            - TUN
            - TUR
            - TUV
            - TWN
            - TZA
            - UGA
            - UKR
            - UMI
            - URY
            - USA
            - UZB
            - VAT
            - VCT
            - VEN
            - VGB
            - VIR
            - VNM
            - VUT
            - WLF
            - WSM
            - XKX
            - YEM
            - ZAF
            - ZMB
            - ZWE
          default: USA
      required:
        - line1
        - city
  securitySchemes:
    ApiKey:
      type: apiKey
      in: header
      name: x-api-key

````