components:
    schemas:
        Action:
            additionalProperties: true
            properties:
                Addresses:
                    items:
                        $ref: '#/components/schemas/Address'
                    type:
                        - array
                        - "null"
                CreatedAt:
                    format: date-time
                    type: string
                Forms:
                    items:
                        $ref: '#/components/schemas/Form'
                    type:
                        - array
                        - "null"
                ID:
                    format: int64
                    minimum: 0
                    type: integer
                Teams:
                    items:
                        $ref: '#/components/schemas/ActionTeam'
                    type:
                        - array
                        - "null"
                UpdatedAt:
                    format: date-time
                    type: string
                Users:
                    items:
                        $ref: '#/components/schemas/ActionUserWithActive'
                    type:
                        - array
                        - "null"
                advanced_search:
                    description: Advanced search stringified.
                broadcast_link:
                    type: string
                cover_img: {}
                created_by:
                    format: int64
                    minimum: 0
                    type: integer
                created_by_details:
                    $ref: '#/components/schemas/ActionCreatedByDetails'
                end:
                    format: date-time
                    type: string
                featured:
                    type: boolean
                form_state:
                    type: string
                goal:
                    format: int64
                    type: integer
                goal_forms:
                    format: int64
                    type: integer
                gotv_abstention_tag:
                    type: string
                gotv_not_voted_tag:
                    type: string
                gotv_voted_tag:
                    type: string
                group_id:
                    format: int64
                    minimum: 0
                    type: integer
                hide_broadcast_link:
                    type: boolean
                leaders:
                    items:
                        $ref: '#/components/schemas/ActionUserWithActive'
                    type:
                        - array
                        - "null"
                links:
                    items:
                        type: string
                    type:
                        - array
                        - "null"
                maximum_capacity:
                    format: int64
                    minimum: 0
                    type: integer
                name:
                    description: Name of the action.
                    examples:
                        - Let's mobilize
                    type: string
                pitch:
                    description: Pitch of the action.
                    type: string
                polygon:
                    description: Polygon stringified.
                    type: string
                promote_sharing:
                    type: boolean
                public:
                    type: boolean
                registration_link:
                    type: string
                restricted:
                    type: boolean
                site_id:
                    type: string
                site_slug:
                    type: string
                site_state:
                    type: string
                start:
                    format: date-time
                    type: string
                status:
                    enum:
                        - todo
                        - archived
                        - finished
                    type: string
                survey_id:
                    format: int64
                    minimum: 0
                    type: integer
                time_zone:
                    type: string
                type_data:
                    description: Action type.
                    enum:
                        - canvassing
                        - event
                        - mail
                        - call
                        - static
                        - other
                        - leaflet
                        - sharing
                        - reporting
                        - challenge
                        - gotvcanvassing
                        - gotvcalling
                    type: string
            required:
                - ID
            type: object
        ActionAggreg:
            additionalProperties: true
            properties:
                Action:
                    $ref: '#/components/schemas/Action'
                NbContacts:
                    format: int64
                    type: integer
                NbVisites:
                    format: int64
                    type: integer
                NbVisitesDeclared:
                    format: int64
                    type: integer
            type: object
        ActionCreatedByDetails:
            additionalProperties: true
            properties:
                avatar:
                    type: string
                email:
                    type: string
                first_name:
                    type: string
                last_name:
                    type: string
                phone:
                    type: string
                status:
                    type: string
            required:
                - first_name
                - last_name
                - status
                - phone
                - email
                - avatar
            type: object
        ActionTeam:
            additionalProperties: true
            properties:
                address:
                    $ref: '#/components/schemas/Address'
                created_at:
                    format: date-time
                    type: string
                description:
                    description: Free-form description.
                    type: string
                hide_users:
                    description: When true, the team's users list is hidden to non-members.
                    type: boolean
                id:
                    description: Team ID.
                    examples:
                        - 101
                    format: int64
                    minimum: 0
                    type: integer
                leaders:
                    items:
                        $ref: '#/components/schemas/UserInfo'
                    type:
                        - array
                        - "null"
                name:
                    description: Team display name.
                    examples:
                        - Team Number1
                    type: string
                private:
                    description: When true, the team is only visible to its members.
                    type: boolean
                updated_at:
                    format: date-time
                    type: string
                userswithactive:
                    items:
                        $ref: '#/components/schemas/ActionUserWithActive'
                    type:
                        - array
                        - "null"
            required:
                - id
                - name
            type: object
        ActionUserWithActive:
            additionalProperties: true
            properties:
                CreatedAt:
                    description: Timestamp when the user was created.
                    format: date-time
                    readOnly: true
                    type: string
                UpdatedAt:
                    description: Timestamp when the user was last updated.
                    format: date-time
                    readOnly: true
                    type: string
                active:
                    examples:
                        - true
                    type:
                        - boolean
                        - "null"
                address:
                    description: Street address.
                    examples:
                        - 1 rue de la paix
                    type: string
                avatar:
                    description: Avatar URL.
                    examples:
                        - https://example.com/avatar.png
                    format: uri
                    type: string
                birthdate:
                    description: Birthdate.
                    format: date-time
                    type: string
                city:
                    description: City.
                    examples:
                        - Paris
                    type: string
                created:
                    description: Legacy creation timestamp returned by the upstream service.
                    format: date-time
                    readOnly: true
                    type: string
                firstname:
                    description: First name.
                    examples:
                        - John
                    type: string
                group_id:
                    description: IDs of groups the user belongs to.
                    items:
                        format: int64
                        type: integer
                    type:
                        - array
                        - "null"
                id:
                    description: Unique identifier of the user.
                    examples:
                        - 101
                    format: int64
                    readOnly: true
                    type: integer
                locale:
                    description: Locale language.
                    examples:
                        - en
                    type: string
                location:
                    description: Geographic position as lat,lon string.
                    examples:
                        - 1.826483,-1.549486
                    type: string
                mail:
                    description: Email address.
                    examples:
                        - john.doe@example.com
                    format: email
                    type: string
                phone:
                    description: Phone number.
                    examples:
                        - "0123456789"
                    type: string
                postal:
                    description: Postal code.
                    examples:
                        - "75000"
                    type: string
                status:
                    description: 'User status. Comma-separated list of strings. Values: ''available_week_morning,available_week_night,available_holidays,available_weekend,not_set''.'
                    examples:
                        - available_week_morning,available_weekend
                    type: string
                surname:
                    description: Last name.
                    examples:
                        - Doe
                    type: string
                two_factor_enable:
                    description: Indicates if two-factor authentication is enabled.
                    type: boolean
                two_factor_method:
                    description: Two-factor authentication method.
                    enum:
                        - email
                        - totp
                    type: string
            required:
                - active
            type: object
        Address:
            additionalProperties: true
            properties:
                addition:
                    description: Additional address info.
                    type: string
                building:
                    description: Building name or identifier.
                    type: string
                building_type:
                    description: Type of building.
                    enum:
                        - house
                        - apartment
                        - office
                        - other
                    type: string
                city:
                    description: City name.
                    examples:
                        - Paris
                    type: string
                country:
                    description: Country.
                    examples:
                        - France
                    type: string
                county:
                    description: County or department.
                    type: string
                door:
                    description: Door or apartment identifier.
                    type: string
                floor:
                    description: Floor number.
                    type: string
                housenumber:
                    description: Street number.
                    examples:
                        - "12"
                    type: string
                id:
                    description: Unique identifier of the address.
                    examples:
                        - 7
                    format: int64
                    minimum: 0
                    readOnly: true
                    type: integer
                infos:
                    description: Additional address information.
                    type: string
                latitude:
                    description: WGS-84 latitude.
                    examples:
                        - "48.8606"
                    readOnly: true
                    type: string
                location:
                    description: Geocoded location string.
                    examples:
                        - 48.8606,2.3376
                    readOnly: true
                    type: string
                longitude:
                    description: WGS-84 longitude.
                    examples:
                        - "2.3376"
                    readOnly: true
                    type: string
                pollingstation:
                    type: string
                postalcode:
                    description: Postal / ZIP code.
                    examples:
                        - "75001"
                    type: string
                score:
                    description: Address geocoding accuracy score 0-1
                    format: int64
                    readOnly: true
                    type: integer
                state:
                    description: State or region.
                    type: string
                street:
                    description: Street name.
                    examples:
                        - Rue de Rivoli
                    type: string
            type: object
        AddressChangePayload:
            additionalProperties: true
            properties:
                addition:
                    description: Additional address info.
                    type: string
                building:
                    description: Building name or identifier.
                    type: string
                building_type:
                    description: Type of building.
                    enum:
                        - house
                        - apartment
                        - office
                        - other
                    type: string
                city:
                    description: City name.
                    examples:
                        - Paris
                    type: string
                country:
                    description: Country.
                    examples:
                        - France
                    type: string
                county:
                    description: County or department.
                    type: string
                door:
                    description: Door or apartment identifier.
                    type: string
                floor:
                    description: Floor number.
                    type: string
                house_number:
                    description: Street number.
                    examples:
                        - "12"
                    type: string
                id:
                    description: Unique identifier of the address.
                    examples:
                        - 7
                    format: int64
                    minimum: 0
                    readOnly: true
                    type: integer
                infos:
                    description: Additional address information.
                    type: string
                postalcode:
                    description: Postal / ZIP code.
                    examples:
                        - "75001"
                    type: string
                state:
                    description: State or region.
                    type: string
                street:
                    description: Street name.
                    examples:
                        - Rue de Rivoli
                    type: string
            type: object
        AdvancedSearch:
            additionalProperties: true
            properties:
                query:
                    $ref: '#/components/schemas/AdvancedSearchQuery'
                    description: Filter query tree.
            type: object
        AdvancedSearchCondition:
            additionalProperties: true
            properties:
                $condition:
                    $ref: '#/components/schemas/AdvancedSearchConditionConditionStruct'
                    description: List of conditions.
            required:
                - $condition
            type: object
        AdvancedSearchConditionConditionStruct:
            additionalProperties: true
            properties:
                attr:
                    description: Attribute to filter on.
                    examples:
                        - city
                    type: string
                form_id:
                    description: Form ID when filtering on contacts' formdata.
                    examples:
                        - 123
                    format: int64
                    type: integer
                form_ref_ids:
                    description: Refvalue IDs when filtering on contacts' formdata.
                    examples:
                        - - 1
                          - 2
                          - 3
                    items:
                        format: int64
                        type: integer
                    type:
                        - array
                        - "null"
                from:
                    description: Lower bound of a range filter (inclusive).
                ope:
                    description: Operator to apply on the attribute.
                    enum:
                        - ext
                        - not_ext
                        - eql
                        - not_eql
                        - contains
                        - not_contains
                        - range
                        - lte
                        - gte
                        - start_with
                        - not_start_with
                        - end_with
                        - eql:strictdata
                        - not_eql:strictdata
                    examples:
                        - eql
                    type: string
                to:
                    description: Upper bound of a range filter (inclusive).
                value:
                    description: Value to compare the attribute against.
            required:
                - attr
                - ope
            type: object
        AdvancedSearchOptions:
            additionalProperties: true
            properties:
                page:
                    description: Page index (0-based).
                    examples:
                        - 0
                    format: int64
                    minimum: 0
                    type: integer
                per_page:
                    description: Results per page.
                    examples:
                        - 50
                    format: int64
                    maximum: 1000
                    minimum: 1
                    type: integer
                query:
                    $ref: '#/components/schemas/AdvancedSearchQuery'
                    description: Filter query tree.
                sort_asc:
                    description: Sort ascending.
                    examples:
                        - true
                    type: boolean
                sort_attr:
                    description: Field to sort by.
                    enum:
                        - surname
                        - firstname
                        - birthdate
                        - gender
                        - lastchange
                        - mail
                        - married_name
                        - city
                    examples:
                        - surname
                    type: string
            required:
                - per_page
            type: object
        AdvancedSearchQuery:
            oneOf:
                - additionalProperties: false
                  description: Every group/condition must be satisfied.
                  properties:
                    $all:
                        description: Condition groups (each group is a set of filters combined with AND or OR).
                        items:
                            $ref: '#/components/schemas/SearchConditionGroup'
                        type: array
                  required:
                    - $all
                  title: Match all (AND)
                  type: object
                - additionalProperties: false
                  description: At least one group/condition must be satisfied.
                  properties:
                    $at_least_one:
                        description: Condition groups (each group is a set of filters combined with AND or OR).
                        items:
                            $ref: '#/components/schemas/SearchConditionGroup'
                        type: array
                  required:
                    - $at_least_one
                  title: Match at least one (OR)
                  type: object
        CodeCampaign:
            additionalProperties: true
            properties:
                code:
                    description: Campaign code.
                    type: string
                created_at:
                    description: Creation timestamp.
                    format: date-time
                    type: string
                updated_at:
                    description: Last update timestamp.
                    format: date-time
                    type: string
            required:
                - code
                - created_at
                - updated_at
            type: object
        Contact:
            additionalProperties: true
            properties:
                CreatedAt:
                    description: Timestamp when the contact was created.
                    format: date-time
                    readOnly: true
                    type: string
                UpdatedAt:
                    description: Timestamp when the contact was last updated.
                    format: date-time
                    readOnly: true
                    type: string
                action_ids:
                    description: IDs of actions of which the contact is targeted.
                    items:
                        format: int64
                        minimum: 0
                        type: integer
                    type:
                        - array
                        - "null"
                address:
                    $ref: '#/components/schemas/Address'
                    description: Postal address.
                age_category:
                    description: Age category.
                    format: int64
                    minimum: 0
                    type: integer
                birth_city:
                    description: City of birth.
                    type: string
                birth_country:
                    description: Country code of birth.
                    type: string
                birth_dept:
                    description: Department of birth.
                    type: string
                birthdate:
                    description: Date of birth.
                    format: date-time
                    type: string
                black_list:
                    description: Whether the contact has opted out of communications.
                    type: boolean
                custom_fields:
                    description: Organisation-defined custom fields.
                    items:
                        $ref: '#/components/schemas/CustomField'
                    type:
                        - array
                        - "null"
                firstname:
                    description: First name.
                    examples:
                        - Jane
                    type: string
                formdatas:
                    description: Organisation-defined form data.
                    items:
                        $ref: '#/components/schemas/FormData'
                    type:
                        - array
                        - "null"
                gender:
                    description: 'Gender. One of: M (Male), F (Female), O (Other). Empty if unknown.'
                    enum:
                        - M
                        - F
                        - O
                    examples:
                        - female
                    type: string
                group_id:
                    description: ID of the group the contact belongs to.
                    format: int64
                    minimum: 0
                    readOnly: true
                    type: integer
                id:
                    description: Unique identifier of the contact.
                    format: int64
                    minimum: 0
                    readOnly: true
                    type: integer
                lastchange:
                    format: date-time
                    readOnly: true
                    type:
                        - string
                        - "null"
                lastchangeuserid:
                    format: int64
                    minimum: 0
                    readOnly: true
                    type: integer
                mail:
                    description: Primary email address.
                    examples:
                        - jane@example.com
                    format: email
                    type: string
                married_name:
                    type: string
                membership_code:
                    description: Membership code (prefix + serial).
                    type: string
                membership_number:
                    description: Membership serial number assigned when the contact's first membership is created.
                    format: int64
                    minimum: 0
                    type: integer
                mobile:
                    description: Mobile phone number.
                    type: string
                mobile_invalid:
                    description: Whether the mobile phone number is invalid.
                    type: boolean
                nationality:
                    description: Nationality.
                    type: string
                notes:
                    description: Notes associated with the contact.
                    items:
                        $ref: '#/components/schemas/Note'
                    type:
                        - array
                        - "null"
                phone:
                    description: Landline phone number.
                    type: string
                phone_invalid:
                    description: Whether the landline phone number is invalid.
                    type: boolean
                surname:
                    description: Last (family) name.
                    examples:
                        - Doe
                    type: string
                tags:
                    description: Tags attached to the contact.
                    items:
                        $ref: '#/components/schemas/Tag'
                    type:
                        - array
                        - "null"
                user_contact_id:
                    description: ID of the user associated with the contact, if any.
                    format: int64
                    type: integer
            required:
                - id
            type: object
        ContactDataWrapper:
            additionalProperties: true
            properties:
                contact:
                    $ref: '#/components/schemas/Contact'
            required:
                - contact
            type: object
        ContactForTransaction:
            additionalProperties: true
            properties:
                firstname:
                    description: Contact first name.
                    type: string
                group_id:
                    description: ID of the group the contact belongs to.
                    format: int64
                    minimum: 0
                    readOnly: true
                    type: integer
                id:
                    description: Unique identifier.
                    format: int64
                    minimum: 0
                    type: integer
                membership_code:
                    description: Membership code.
                    type: string
                membership_number:
                    description: Membership number.
                    format: int64
                    minimum: 0
                    type: integer
                surname:
                    description: Contact surname.
                    type: string
            required:
                - id
            type: object
        ContactRef:
            additionalProperties: true
            properties:
                id:
                    description: Unique identifier of the contact.
                    examples:
                        - 42
                    format: int64
                    minimum: 0
                    type: integer
            required:
                - id
            type: object
        ContactTransactionsData:
            additionalProperties: true
            properties:
                total_don:
                    additionalProperties:
                        format: int64
                        minimum: 0
                        type: integer
                    description: 'Total donated amount in cents, keyed by currency code (e.g. {"eur": 12500}).'
                    type: object
                transaction_bundles:
                    description: All transaction bundles paid by this contact, newest first.
                    items:
                        $ref: '#/components/schemas/TransactionBundle'
                    type:
                        - array
                        - "null"
            required:
                - transaction_bundles
                - total_don
            type: object
        ContactUpsertAddress:
            additionalProperties: true
            properties:
                addition:
                    description: Additional address line.
                    type: string
                building:
                    description: Building identifier.
                    type: string
                city:
                    description: City.
                    type: string
                citycode:
                    description: City code.
                    type: string
                country:
                    description: Country.
                    type: string
                county:
                    description: County or department.
                    type: string
                door:
                    description: Door or apartment identifier.
                    type: string
                floor:
                    description: Floor.
                    type: string
                housenumber:
                    description: House number.
                    type: string
                id:
                    description: Existing address ID to update.
                    format: int64
                    minimum: 0
                    type: integer
                infos:
                    description: Extra address information.
                    type: string
                latitude:
                    description: Latitude coordinate.
                    type: string
                longitude:
                    description: Longitude coordinate.
                    type: string
                pollingstation:
                    description: Polling station.
                    type: string
                postalcode:
                    description: Postal code.
                    type: string
                state:
                    description: State or region.
                    type: string
                street:
                    description: Street name.
                    type: string
            type: object
        ContactUpsertData:
            additionalProperties: true
            properties:
                actions:
                    description: Task values by form ID or label.
                    items:
                        $ref: '#/components/schemas/ContactUpsertSelection'
                    type:
                        - array
                        - "null"
                address:
                    $ref: '#/components/schemas/ContactUpsertAddress'
                    description: Postal address.
                age_category:
                    description: Internal age-category identifier.
                    format: int64
                    type: integer
                birthcity:
                    description: Birth city.
                    type: string
                birthcountry:
                    description: Birth country.
                    type: string
                birthdate:
                    description: Birthdate.
                    type: string
                birthdept:
                    description: Birth department.
                    type: string
                black_list:
                    description: Whether the contact is blacklisted.
                    type: boolean
                consents:
                    description: Consent values by form ID or label.
                    items:
                        $ref: '#/components/schemas/ContactUpsertSelection'
                    type:
                        - array
                        - "null"
                custom_fields:
                    description: Custom field values by form ID or label.
                    items:
                        $ref: '#/components/schemas/ContactUpsertSelection'
                    type:
                        - array
                        - "null"
                external_id:
                    description: External system identifier used for upsert matching.
                    type: string
                firstname:
                    description: First name.
                    examples:
                        - Jane
                    type: string
                forms:
                    description: Survey values by form ID or label.
                    items:
                        $ref: '#/components/schemas/ContactUpsertSelection'
                    type:
                        - array
                        - "null"
                gender:
                    description: Gender.
                    enum:
                        - M
                        - F
                        - O
                    examples:
                        - F
                    type: string
                id:
                    description: Existing contact ID to update.
                    examples:
                        - 42
                    format: int64
                    minimum: 0
                    type: integer
                mail:
                    description: Email address.
                    examples:
                        - jane@example.com
                    format: email
                    type: string
                married_name:
                    description: Married name.
                    examples:
                        - Smith
                    type: string
                mobile:
                    description: Mobile phone number.
                    type: string
                name_presences:
                    description: Presence-status values by form ID or label.
                    items:
                        $ref: '#/components/schemas/ContactUpsertSelection'
                    type:
                        - array
                        - "null"
                nationality:
                    description: Nationality.
                    type: string
                nationbuilderid:
                    description: Legacy NationBuilder identifier.
                    format: int64
                    type: integer
                notes:
                    description: Notes to attach to the contact.
                    items:
                        $ref: '#/components/schemas/ContactUpsertNote'
                    type:
                        - array
                        - "null"
                phone:
                    description: Landline phone number.
                    type: string
                status:
                    description: Level-of-support values by form ID or label.
                    items:
                        $ref: '#/components/schemas/ContactUpsertSelection'
                    type:
                        - array
                        - "null"
                surname:
                    description: Last name.
                    examples:
                        - Doe
                    type: string
                tags:
                    description: Tags attached to the contact.
                    items:
                        $ref: '#/components/schemas/Tag'
                    type:
                        - array
                        - "null"
            type: object
        ContactUpsertEnvelope:
            additionalProperties: true
            properties:
                data:
                    $ref: '#/components/schemas/ContactUpsertData'
                    description: Contact payload to create or update asynchronously.
                kind:
                    description: Resource kind.
                    enum:
                        - contact
                    examples:
                        - contact
                    type: string
            required:
                - kind
                - data
            type: object
        ContactUpsertNote:
            additionalProperties: true
            properties:
                content:
                    description: Note content.
                    type: string
                id:
                    description: Existing note ID to update.
                    format: int64
                    minimum: 0
                    type: integer
                pinned:
                    description: Whether the note is pinned.
                    type: boolean
            required:
                - content
            type: object
        ContactUpsertSelection:
            additionalProperties: true
            properties:
                id:
                    description: Form or refvalue ID.
                    format: int64
                    minimum: 0
                    type: integer
                label:
                    description: Form or refvalue label.
                    type: string
                value:
                    description: Submitted value.
                    type: string
            type: object
        CreateInvitationsData:
            additionalProperties: true
            properties:
                invitations:
                    items:
                        $ref: '#/components/schemas/Invitation'
                    type:
                        - array
                        - "null"
                msg:
                    examples:
                        - invitations created successfully
                    type: string
            required:
                - msg
            type: object
        CreateInvitationsPayload:
            additionalProperties: true
            properties:
                invitations:
                    items:
                        $ref: '#/components/schemas/InvitationEntry'
                    type:
                        - array
                        - "null"
            required:
                - invitations
            type: object
        CurrencyTotal:
            additionalProperties: true
            properties:
                count:
                    description: Number of records in this currency.
                    format: int64
                    type: integer
                currency:
                    description: Currency code (e.g. "eur", "usd"); empty when unset.
                    type: string
                total_amount:
                    description: Summed amount in cents.
                    format: int64
                    type: integer
            required:
                - currency
                - total_amount
                - count
            type: object
        CustomField:
            additionalProperties: true
            properties:
                data:
                    description: Custom field value.
                    examples:
                        - XL
                    type: string
                form_id:
                    description: Form ID.
                    format: int64
                    minimum: 0
                    type: integer
                form_ref_id:
                    description: Form reference ID.
                    format: int64
                    minimum: 0
                    type: integer
                id:
                    description: Custom field definition ID.
                    format: int64
                    minimum: 0
                    readOnly: true
                    type: integer
            required:
                - id
                - form_id
                - form_ref_id
                - data
            type: object
        DataEnvelopeContactDataWrapper:
            additionalProperties: true
            properties:
                data:
                    $ref: '#/components/schemas/ContactDataWrapper'
            required:
                - data
            type: object
        DataEnvelopeCreateInvitationsPayload:
            additionalProperties: true
            properties:
                data:
                    $ref: '#/components/schemas/CreateInvitationsPayload'
            required:
                - data
            type: object
        DataEnvelopeGlobalMessagePayload:
            additionalProperties: true
            properties:
                data:
                    $ref: '#/components/schemas/GlobalMessagePayload'
            required:
                - data
            type: object
        DataEnvelopeSearch:
            additionalProperties: true
            properties:
                data:
                    $ref: '#/components/schemas/Search'
            required:
                - data
            type: object
        DataEnvelopeSearchKpi:
            additionalProperties: true
            properties:
                data:
                    $ref: '#/components/schemas/SearchKpi'
            required:
                - data
            type: object
        DataEnvelopeTeamCreateWrapper:
            additionalProperties: true
            properties:
                data:
                    $ref: '#/components/schemas/TeamCreateWrapper'
            required:
                - data
            type: object
        DataEnvelopeTeamPatchWrapper:
            additionalProperties: true
            properties:
                data:
                    $ref: '#/components/schemas/TeamPatchWrapper'
            required:
                - data
            type: object
        DataEnvelopeTransactionBundle:
            additionalProperties: true
            properties:
                data:
                    $ref: '#/components/schemas/TransactionBundle'
            required:
                - data
            type: object
        DataEnvelopeUpdateUserRoleData:
            additionalProperties: true
            properties:
                data:
                    $ref: '#/components/schemas/UpdateUserRoleData'
            required:
                - data
            type: object
        DataEnvelopeUserPatch:
            additionalProperties: true
            properties:
                data:
                    $ref: '#/components/schemas/UserPatch'
            required:
                - data
            type: object
        DeleteInvitationData:
            additionalProperties: true
            properties:
                message:
                    examples:
                        - Invitation deleted successfully
                    type: string
            required:
                - message
            type: object
        DeleteTeamData:
            additionalProperties: true
            properties:
                message:
                    examples:
                        - Team successfully deleted
                    type: string
                team_id:
                    examples:
                        - 1
                    format: int64
                    minimum: 0
                    type: integer
            required:
                - message
                - team_id
            type: object
        Donation:
            additionalProperties: true
            properties:
                CreatedAt:
                    description: Creation timestamp.
                    format: date-time
                    type: string
                UpdatedAt:
                    description: Last update timestamp.
                    format: date-time
                    type: string
                affectation:
                    description: Optional affectation code.
                    type: string
                amount:
                    default: 0
                    description: Amount in cents.
                    examples:
                        - 2500
                    format: int64
                    minimum: 0
                    type: integer
                amount_initial:
                    description: Initial amount in cents.
                    examples:
                        - 2500
                    format: int64
                    minimum: 0
                    type: integer
                comment:
                    description: Optional comment.
                    type: string
                contact:
                    $ref: '#/components/schemas/ContactForTransaction'
                    description: Associated contact.
                contact_id:
                    description: Contact ID - required for donations.
                    format: int64
                    minimum: 0
                    type: integer
                currency:
                    description: Currency code.
                    examples:
                        - eur
                    type: string
                date:
                    description: Donation date (ISO 8601 format).
                    format: date-time
                    type: string
                donation_price_id:
                    description: Donation price ID (must exist in group's donation prices).
                    format: int64
                    minimum: 0
                    type: integer
                id:
                    description: Donation ID (for updates, omit for new donations).
                    format: int64
                    minimum: 0
                    type: integer
            required:
                - amount
                - date
                - contact_id
            type: object
        DonationPrice:
            additionalProperties: true
            properties:
                allow_custom_amount:
                    description: Whether users can set a custom amount.
                    type: boolean
                amount:
                    description: Amount in cents.
                    examples:
                        - 1000
                    format: int64
                    minimum: 0
                    type: integer
                created_at:
                    description: Creation timestamp.
                    format: date-time
                    type: string
                currency:
                    description: ISO currency code.
                    examples:
                        - EUR
                    type: string
                hidden:
                    description: Whether this price is hidden.
                    type: boolean
                id:
                    description: Unique identifier.
                    format: int64
                    minimum: 0
                    type: integer
                kind:
                    description: Price kind.
                    enum:
                        - federation
                        - elected
                        - donation
                    type: string
                name:
                    description: Price label.
                    type: string
                updated_at:
                    description: Last update timestamp.
                    format: date-time
                    type: string
            required:
                - id
                - created_at
                - updated_at
                - amount
                - currency
                - allow_custom_amount
                - name
                - hidden
            type: object
        DonationsKpi:
            additionalProperties: true
            properties:
                donation_count:
                    description: Total number of donations matching the filter.
                    format: int64
                    type: integer
                new_donors:
                    description: Contacts whose first-ever donation falls within the date window. Only meaningful when a date filter is provided.
                    format: int64
                    type: integer
                totals_by_currency:
                    description: Summed amount and count, per currency.
                    items:
                        $ref: '#/components/schemas/CurrencyTotal'
                    type:
                        - array
                        - "null"
                unique_donors:
                    description: Number of distinct contacts who donated.
                    format: int64
                    type: integer
            required:
                - donation_count
                - unique_donors
                - new_donors
                - totals_by_currency
            type: object
        ErrorDetail:
            additionalProperties: true
            properties:
                location:
                    description: Where the error occurred, e.g. 'body.items[3].tags' or 'path.thing-id'
                    type: string
                message:
                    description: Error message text
                    type: string
                value:
                    description: The value at the given location
            type: object
        ErrorModel:
            additionalProperties: true
            properties:
                detail:
                    description: A human-readable explanation specific to this occurrence of the problem.
                    examples:
                        - Property foo is required but is missing.
                    type: string
                errors:
                    description: Optional list of individual error details
                    items:
                        $ref: '#/components/schemas/ErrorDetail'
                    type:
                        - array
                        - "null"
                instance:
                    description: A URI reference that identifies the specific occurrence of the problem.
                    examples:
                        - https://example.com/error-log/abc123
                    format: uri
                    type: string
                status:
                    description: HTTP status code
                    examples:
                        - 400
                    format: int64
                    type: integer
                title:
                    description: A short, human-readable summary of the problem type. This value should not change between occurrences of the error.
                    examples:
                        - Bad Request
                    type: string
                type:
                    default: about:blank
                    description: A URI reference to human-readable documentation for the error.
                    examples:
                        - https://example.com/errors/example
                    format: uri
                    type: string
            type: object
        Form:
            additionalProperties: true
            properties:
                CreatedAt:
                    description: Timestamp when the form was created.
                    format: date-time
                    readOnly: true
                    type: string
                UpdatedAt:
                    description: Timestamp when the form was last updated.
                    format: date-time
                    readOnly: true
                    type: string
                group_id:
                    description: IDs of groups the form belongs to.
                    items:
                        format: int64
                        type: integer
                    type:
                        - array
                        - "null"
                id:
                    format: int64
                    minimum: 0
                    type: integer
                label:
                    description: Label of the form.
                    examples:
                        - Volunteer registration
                    type: string
                refvalues:
                    description: A list of possible answers or predefined values associated with the form. These can be simple options or a range of values, depending on the form type.
                    items:
                        $ref: '#/components/schemas/Refvalue'
                    type:
                        - array
                        - "null"
                type:
                    description: The format of the form.
                    enum:
                        - text
                        - radio
                        - numeric
                        - checkbox
                        - date
                        - range
                        - signature
                        - photos
                    examples:
                        - radio
                    type: string
            required:
                - id
                - label
                - type
                - refvalues
            type: object
        FormData:
            additionalProperties: true
            properties:
                contact_id:
                    description: ID of the contact the form data belongs to.
                    format: int64
                    minimum: 0
                    readOnly: true
                    type: integer
                data:
                    description: Form data value.
                    examples:
                        - Some answer
                    type: string
                date:
                    description: Date of the form data.
                    format: date-time
                    type: string
                form_id:
                    description: Form ID.
                    format: int64
                    minimum: 0
                    type: integer
                form_ref_id:
                    description: Form reference ID.
                    format: int64
                    minimum: 0
                    type: integer
                group_id:
                    description: ID of the group the form data belongs to.
                    format: int64
                    minimum: 0
                    readOnly: true
                    type: integer
                id:
                    description: Form data ID.
                    format: int64
                    minimum: 0
                    readOnly: true
                    type: integer
                survey_id:
                    description: Survey ID if the form data is from a survey.
                    format: int64
                    minimum: 0
                    type: integer
            required:
                - id
                - form_id
                - form_ref_id
                - data
            type: object
        FormDataWrapper:
            additionalProperties: true
            properties:
                form:
                    $ref: '#/components/schemas/Form'
                forms:
                    items:
                        $ref: '#/components/schemas/Form'
                    type:
                        - array
                        - "null"
            type: object
        FormsDataWrapper:
            additionalProperties: true
            properties:
                forms:
                    items:
                        $ref: '#/components/schemas/Form'
                    type:
                        - array
                        - "null"
            required:
                - forms
            type: object
        GetUserData:
            additionalProperties: true
            properties:
                user:
                    $ref: '#/components/schemas/User'
            required:
                - user
            type: object
        GlobalMessageData:
            additionalProperties: true
            properties:
                accepted:
                    examples:
                        - true
                    type: boolean
            required:
                - accepted
            type: object
        GlobalMessagePayload:
            additionalProperties: true
            properties:
                body:
                    description: The message body.
                    examples:
                        - Hello, this is a global message.
                    type: string
                team_ids:
                    description: The IDs of the teams to send the message to. If empty, the message will be sent to all users.
                    examples:
                        - - 1
                          - 2
                          - 3
                    items:
                        format: int64
                        type: integer
                    type:
                        - array
                        - "null"
                title:
                    description: The message title.
                    examples:
                        - Global Message
                    type: string
            required:
                - body
                - title
                - team_ids
            type: object
        Interaction:
            additionalProperties: true
            properties:
                address:
                    description: Physical address related to the interaction, if applicable. (e.g., meeting location)
                    type: string
                comments:
                    type: string
                contact_id:
                    description: ID of the contact associated with this interaction.
                    format: int64
                    minimum: 0
                    type: integer
                created_at:
                    format: date-time
                    type: string
                date_end:
                    format: date-time
                    type: string
                date_of_event:
                    format: date-time
                    type:
                        - string
                        - "null"
                files:
                    description: List of files attached to the interaction.
                    items:
                        $ref: '#/components/schemas/InteractionFile'
                    type:
                        - array
                        - "null"
                group_id:
                    format: int64
                    minimum: 0
                    type: integer
                id:
                    format: int64
                    minimum: 0
                    type: integer
                only_super_admin:
                    description: If true, only user with specific permissions can see this interaction.
                    type: boolean
                sub_type:
                    enum:
                        - incoming
                        - ' outgoing'
                    type: string
                tags:
                    description: Tags attached to the interaction.
                    items:
                        $ref: '#/components/schemas/InteractionTag'
                    type:
                        - array
                        - "null"
                title:
                    type: string
                type:
                    enum:
                        - email
                        - letter
                        - call
                        - meeting
                        - sms
                        - donation
                    type: string
                updated_at:
                    format: date-time
                    type: string
                user:
                    $ref: '#/components/schemas/UserInfo'
                    description: User who logged the interaction.
                user_id:
                    description: ID of the user who logged the interaction.
                    format: int64
                    minimum: 0
                    type: integer
            type: object
        InteractionFile:
            additionalProperties: true
            properties:
                created_at:
                    format: date-time
                    type: string
                folder:
                    type: string
                group_id:
                    format: int64
                    minimum: 0
                    type: integer
                id:
                    format: int64
                    minimum: 0
                    type: integer
                mime:
                    type: string
                name:
                    type: string
                owner_id:
                    format: int64
                    type: integer
                type:
                    type: string
                updated_at:
                    format: date-time
                    type: string
                url:
                    type: string
            type: object
        InteractionTag:
            additionalProperties: true
            properties:
                color:
                    description: 'Tag color, typically a hex code (e.g. #FF5733).'
                    type: string
                created_at:
                    format: date-time
                    type: string
                id:
                    format: int64
                    minimum: 0
                    type: integer
                name:
                    type: string
            type: object
        InteractionTagCount:
            additionalProperties: true
            properties:
                color:
                    description: 'Tag color, typically a hex code (e.g. #FF5733).'
                    type: string
                count:
                    description: Number of interactions using this tag.
                    format: int64
                    type: integer
                created_at:
                    format: date-time
                    type: string
                id:
                    format: int64
                    minimum: 0
                    type: integer
                name:
                    type: string
            required:
                - count
            type: object
        InteractionTagWrite:
            additionalProperties: true
            properties:
                color:
                    description: 'Tag color, typically a hex code (e.g. #FF5733).'
                    type: string
                name:
                    type: string
            type: object
        InteractionWrite:
            additionalProperties: true
            properties:
                address:
                    description: Physical address related to the interaction, if applicable (e.g., meeting location).
                    type: string
                comments:
                    type: string
                date_end:
                    format: date-time
                    type: string
                date_of_event:
                    description: When the interaction actually took place, if different from when it was logged.
                    format: date-time
                    type: string
                only_super_admin:
                    description: If true, only users with the private-interactions permission can see this interaction.
                    type: boolean
                sub_type:
                    enum:
                        - incoming
                        - outgoing
                    type: string
                tags:
                    description: Tags to attach to the interaction. Provide an existing tag's id to reuse it, or omit id (with a name) to create a new tag. This list fully replaces the interaction's tags on update.
                    items:
                        $ref: '#/components/schemas/InteractionTag'
                    type:
                        - array
                        - "null"
                title:
                    type: string
                type:
                    enum:
                        - email
                        - letter
                        - call
                        - meeting
                        - sms
                        - donation
                    type: string
            type: object
        Invitation:
            additionalProperties: true
            properties:
                created_at:
                    format: date-time
                    type: string
                email:
                    examples:
                        - johndoe@mail.com
                    type: string
                group_id:
                    examples:
                        - 101
                    format: int64
                    minimum: 0
                    type: integer
                id:
                    examples:
                        - 101
                    format: int64
                    minimum: 0
                    type: integer
                last_sent:
                    format: date-time
                    type: string
                mobile_phone:
                    examples:
                        - "0123456789"
                    type: string
                role:
                    $ref: '#/components/schemas/InvitationRole'
                role_id:
                    examples:
                        - 5
                    format: int64
                    minimum: 0
                    type: integer
                team_ids:
                    examples:
                        - - 11
                          - 12
                    items:
                        format: int64
                        minimum: 0
                        type: integer
                    type:
                        - array
                        - "null"
                user_id:
                    examples:
                        - 2345
                    format: int64
                    minimum: 0
                    type: integer
            type: object
        InvitationEntry:
            additionalProperties: true
            properties:
                email:
                    description: Email to invite.
                    examples:
                        - example@mail.com
                    type: string
                role_id:
                    description: Role ID. If not provided, the 'user' role will be assigned by default.
                    examples:
                        - 8
                    format: int64
                    minimum: 0
                    type: integer
                team_ids:
                    description: Team IDs to assign when the invitation is accepted.
                    examples:
                        - - 11
                          - 12
                    items:
                        format: int64
                        minimum: 0
                        type: integer
                    type:
                        - array
                        - "null"
            required:
                - email
            type: object
        InvitationRole:
            additionalProperties: true
            properties:
                id:
                    examples:
                        - 5
                    format: int64
                    minimum: 0
                    type: integer
                name:
                    type: string
                order:
                    format: int64
                    minimum: 0
                    type: integer
                type:
                    enum:
                        - superadmin
                        - admin
                        - manager
                        - user
                        - custom
                    type: string
            type: object
        KpiContactsData:
            additionalProperties: true
            properties:
                total:
                    description: Total number of contacts matching the query.
                    examples:
                        - 1597
                    format: int64
                    type: integer
            required:
                - total
            type: object
        ListActionsData:
            additionalProperties: true
            properties:
                ActionsAggreg:
                    items:
                        $ref: '#/components/schemas/ActionAggreg'
                    type:
                        - array
                        - "null"
            required:
                - ActionsAggreg
            type: object
        ListInvitationsData:
            additionalProperties: true
            properties:
                invitations:
                    items:
                        $ref: '#/components/schemas/Invitation'
                    type:
                        - array
                        - "null"
            type: object
        ListRolesData:
            additionalProperties: true
            properties:
                count:
                    examples:
                        - 1
                    format: int64
                    type: integer
                roles:
                    items:
                        $ref: '#/components/schemas/Role'
                    type:
                        - array
                        - "null"
            required:
                - count
                - roles
            type: object
        ListTeamsData:
            additionalProperties: true
            properties:
                teams:
                    items:
                        $ref: '#/components/schemas/Team'
                    type:
                        - array
                        - "null"
            required:
                - teams
            type: object
        ListUsersData:
            additionalProperties: true
            properties:
                count:
                    description: Number of users returned.
                    examples:
                        - 100
                    format: int64
                    type: integer
                users:
                    description: Users list.
                    items:
                        $ref: '#/components/schemas/User'
                    type:
                        - array
                        - "null"
            required:
                - count
                - users
            type: object
        Membership:
            additionalProperties: true
            properties:
                CreatedAt:
                    description: Creation timestamp.
                    format: date-time
                    type: string
                UpdatedAt:
                    description: Last update timestamp.
                    format: date-time
                    type: string
                amount:
                    default: 0
                    description: Amount in cents.
                    examples:
                        - 3000
                    format: int64
                    minimum: 0
                    type: integer
                amount_initial:
                    description: Initial amount in cents.
                    examples:
                        - 3000
                    format: int64
                    minimum: 0
                    type: integer
                comment:
                    description: Optional comment.
                    type: string
                contact:
                    $ref: '#/components/schemas/ContactForTransaction'
                    description: Associated contact.
                contact_id:
                    description: Contact ID - required for memberships.
                    format: int64
                    minimum: 0
                    type: integer
                currency:
                    description: Currency code.
                    examples:
                        - eur
                    type: string
                end_date:
                    description: Membership end date (ISO 8601 format).
                    format: date-time
                    type: string
                id:
                    description: Membership ID (for updates, omit for new memberships).
                    format: int64
                    minimum: 0
                    type: integer
                membership_price_id:
                    description: Membership price ID (must exist in group's membership prices).
                    format: int64
                    minimum: 0
                    type: integer
                rolling_year:
                    description: Optional rolling year.
                    type: boolean
                start_date:
                    description: Membership start date (ISO 8601 format).
                    format: date-time
                    type: string
            required:
                - amount
                - contact_id
            type: object
        MembershipPrice:
            additionalProperties: true
            properties:
                allow_custom_amount:
                    description: Whether users can set a custom amount.
                    type: boolean
                amount:
                    description: Amount in cents.
                    examples:
                        - 2000
                    format: int64
                    minimum: 0
                    type: integer
                created_at:
                    description: Creation timestamp.
                    format: date-time
                    type: string
                currency:
                    description: ISO currency code.
                    examples:
                        - EUR
                    type: string
                duration:
                    description: Membership duration.
                    examples:
                        - "Y"
                    type: string
                hidden:
                    description: Whether this price is hidden.
                    type: boolean
                id:
                    description: Unique identifier.
                    format: int64
                    minimum: 0
                    type: integer
                kind:
                    description: Price kind.
                    type: string
                membership_price_group_id:
                    description: Membership price group identifier.
                    format: int64
                    minimum: 0
                    type: integer
                name:
                    description: Price label.
                    type: string
                rolling_period:
                    description: Rolling period.
                    examples:
                        - "Y"
                    type: string
                updated_at:
                    description: Last update timestamp.
                    format: date-time
                    type: string
            required:
                - id
                - created_at
                - updated_at
                - amount
                - currency
                - allow_custom_amount
                - name
                - hidden
                - membership_price_group_id
            type: object
        MembershipPriceGroup:
            additionalProperties: true
            properties:
                created_at:
                    description: Creation timestamp.
                    format: date-time
                    type: string
                hidden:
                    description: Whether this group is hidden.
                    type: boolean
                id:
                    description: Unique identifier.
                    format: int64
                    minimum: 0
                    type: integer
                membership_prices:
                    description: Membership prices belonging to this group.
                    items:
                        $ref: '#/components/schemas/MembershipPrice'
                    type:
                        - array
                        - "null"
                name:
                    description: Group label.
                    type: string
                updated_at:
                    description: Last update timestamp.
                    format: date-time
                    type: string
            required:
                - id
                - created_at
                - updated_at
                - name
                - hidden
            type: object
        MembershipsKpi:
            additionalProperties: true
            properties:
                membership_count:
                    description: Total number of memberships matching the filter.
                    format: int64
                    type: integer
                new_members:
                    description: Contacts whose first-ever membership (by start date) falls within the date window.
                    format: int64
                    type: integer
                totals_by_currency:
                    description: Summed amount and count, per currency.
                    items:
                        $ref: '#/components/schemas/CurrencyTotal'
                    type:
                        - array
                        - "null"
                unique_members:
                    description: Number of distinct contacts with a membership.
                    format: int64
                    type: integer
            required:
                - membership_count
                - unique_members
                - new_members
                - totals_by_currency
            type: object
        Note:
            additionalProperties: true
            properties:
                contact_id:
                    format: int64
                    minimum: 0
                    type: integer
                created_at:
                    format: date-time
                    type: string
                data:
                    description: Content of the note.
                    type: string
                group_id:
                    format: int64
                    minimum: 0
                    type: integer
                id:
                    format: int64
                    minimum: 0
                    type: integer
                only_super_admin:
                    description: If true, only user with specific permissions can see this note.
                    type: boolean
                pinned:
                    description: Whether the note is pinned to the top of the contact's page.
                    type: boolean
                updated_at:
                    format: date-time
                    type: string
                user:
                    $ref: '#/components/schemas/User'
                    description: User who created the note.
            required:
                - id
            type: object
        Refvalue:
            additionalProperties: true
            properties:
                CreatedAt:
                    description: Timestamp when the refvalue was created.
                    format: date-time
                    readOnly: true
                    type: string
                UpdatedAt:
                    description: Timestamp when the refvalue was last updated.
                    format: date-time
                    readOnly: true
                    type: string
                form_id:
                    description: ID of the form to which this refvalue belongs.
                    format: int64
                    minimum: 0
                    type: integer
                id:
                    description: Unique identifier of the refvalue.
                    format: int64
                    minimum: 0
                    type: integer
                label:
                    description: Label of the refvalue.
                    examples:
                        - "Yes"
                    type: string
                max:
                    description: Maximum value for numeric or range forms.
                    examples:
                        - 5
                    format: int64
                    minimum: 0
                    type: integer
                min:
                    description: Minimum value for numeric or range forms.
                    examples:
                        - 1
                    format: int64
                    minimum: 0
                    type: integer
                order:
                    description: The order in which the refvalues should be displayed for selection.
                    examples:
                        - 1
                    format: int64
                    minimum: 0
                    type: integer
                step:
                    description: Step value for numeric or range forms, indicating the increments between valid values.
                    examples:
                        - 1
                    format: int64
                    minimum: 0
                    type: integer
                value:
                    description: The actual value associated with the refvalue. This is what gets stored when the form is submitted.
                    examples:
                        - "yes"
                    type: string
            required:
                - id
                - form_id
                - label
                - value
            type: object
        Role:
            additionalProperties: true
            properties:
                color:
                    description: Role colour as a hex string.
                    examples:
                        - '#DF0D73'
                    type: string
                id:
                    description: Role ID.
                    format: int64
                    minimum: 0
                    type: integer
                mobile:
                    description: Whether the role has mobile access.
                    type: boolean
                name:
                    description: Role name.
                    type: string
                order:
                    description: Display order for roles in role management view.
                    format: int64
                    minimum: 0
                    type: integer
                type:
                    description: Role type.
                    enum:
                        - superadmin
                        - admin
                        - manager
                        - user
                        - custom
                    type: string
                web:
                    description: Whether the role has web access.
                    type: boolean
            type: object
        Search:
            additionalProperties: true
            properties:
                advanced_search:
                    $ref: '#/components/schemas/AdvancedSearchOptions'
                    description: Search parameters with filter query tree (see AdvancedSearchQuery for mutually exclusive options).
                include_interactions:
                    description: Include interaction in results.
                    examples:
                        - true
                    type: boolean
            required:
                - advanced_search
            type: object
        SearchConditionGroup:
            oneOf:
                - additionalProperties: false
                  description: Every group/condition must be satisfied.
                  properties:
                    $all:
                        description: Individual filter conditions.
                        items:
                            $ref: '#/components/schemas/AdvancedSearchCondition'
                        type: array
                  required:
                    - $all
                  title: Match all (AND)
                  type: object
                - additionalProperties: false
                  description: At least one group/condition must be satisfied.
                  properties:
                    $at_least_one:
                        description: Individual filter conditions.
                        items:
                            $ref: '#/components/schemas/AdvancedSearchCondition'
                        type: array
                  required:
                    - $at_least_one
                  title: Match at least one (OR)
                  type: object
                - additionalProperties: false
                  description: None of these conditions may be satisfied.
                  properties:
                    $not_all:
                        description: Individual filter conditions.
                        items:
                            $ref: '#/components/schemas/AdvancedSearchCondition'
                        type: array
                  required:
                    - $not_all
                  title: Match none (NOT)
                  type: object
        SearchContactsData:
            additionalProperties: true
            properties:
                contacts:
                    description: Matched contacts.
                    items:
                        $ref: '#/components/schemas/SearchOutputContact'
                    type:
                        - array
                        - "null"
            required:
                - contacts
            type: object
        SearchKpi:
            additionalProperties: true
            properties:
                advanced_search:
                    $ref: '#/components/schemas/AdvancedSearch'
                    description: Search parameters with filter query tree (see AdvancedSearchQuery for mutually exclusive options).
            required:
                - advanced_search
            type: object
        SearchOutputContact:
            additionalProperties: true
            properties:
                CreatedAt:
                    description: Timestamp when the contact was created.
                    format: date-time
                    readOnly: true
                    type: string
                UpdatedAt:
                    description: Timestamp when the contact was last updated.
                    format: date-time
                    readOnly: true
                    type: string
                action_ids:
                    description: IDs of actions of which the contact is targeted.
                    items:
                        format: int64
                        minimum: 0
                        type: integer
                    type:
                        - array
                        - "null"
                address:
                    $ref: '#/components/schemas/Address'
                    description: Postal address.
                age_category:
                    description: Age category.
                    format: int64
                    minimum: 0
                    type: integer
                birth_city:
                    description: City of birth.
                    type: string
                birth_country:
                    description: Country code of birth.
                    type: string
                birth_dept:
                    description: Department of birth.
                    type: string
                birthdate:
                    description: Date of birth.
                    format: date-time
                    type: string
                black_list:
                    description: Whether the contact has opted out of communications.
                    type: boolean
                custom_fields:
                    description: Organisation-defined custom fields.
                    items:
                        $ref: '#/components/schemas/CustomField'
                    type:
                        - array
                        - "null"
                firstname:
                    description: First name.
                    examples:
                        - Jane
                    type: string
                formdatas:
                    description: Organisation-defined form data.
                    items:
                        $ref: '#/components/schemas/FormData'
                    type:
                        - array
                        - "null"
                gender:
                    description: 'Gender. One of: M (Male), F (Female), O (Other). Empty if unknown.'
                    enum:
                        - M
                        - F
                        - O
                    examples:
                        - female
                    type: string
                group_id:
                    description: ID of the group the contact belongs to.
                    format: int64
                    minimum: 0
                    readOnly: true
                    type: integer
                id:
                    description: Unique identifier of the contact.
                    format: int64
                    minimum: 0
                    readOnly: true
                    type: integer
                interactions:
                    description: Interactions with this contact, included if the request's include_interactions flag is true.
                    items:
                        $ref: '#/components/schemas/Interaction'
                    type:
                        - array
                        - "null"
                lastchange:
                    format: date-time
                    readOnly: true
                    type:
                        - string
                        - "null"
                lastchangeuserid:
                    format: int64
                    minimum: 0
                    readOnly: true
                    type: integer
                mail:
                    description: Primary email address.
                    examples:
                        - jane@example.com
                    format: email
                    type: string
                married_name:
                    type: string
                membership_code:
                    description: Membership code (prefix + serial).
                    type: string
                membership_number:
                    description: Membership serial number assigned when the contact's first membership is created.
                    format: int64
                    minimum: 0
                    type: integer
                mobile:
                    description: Mobile phone number.
                    type: string
                mobile_invalid:
                    description: Whether the mobile phone number is invalid.
                    type: boolean
                nationality:
                    description: Nationality.
                    type: string
                notes:
                    description: Notes associated with the contact.
                    items:
                        $ref: '#/components/schemas/Note'
                    type:
                        - array
                        - "null"
                phone:
                    description: Landline phone number.
                    type: string
                phone_invalid:
                    description: Whether the landline phone number is invalid.
                    type: boolean
                surname:
                    description: Last (family) name.
                    examples:
                        - Doe
                    type: string
                tags:
                    description: Tags attached to the contact.
                    items:
                        $ref: '#/components/schemas/Tag'
                    type:
                        - array
                        - "null"
                user_contact_id:
                    description: ID of the user associated with the contact, if any.
                    format: int64
                    type: integer
            required:
                - id
            type: object
        StatusEnvelopeContactDataWrapper:
            additionalProperties: true
            properties:
                data:
                    $ref: '#/components/schemas/ContactDataWrapper'
                status:
                    description: Operation result.
                    examples:
                        - success
                    type: string
            required:
                - status
                - data
            type: object
        StatusEnvelopeContactTransactionsData:
            additionalProperties: true
            properties:
                data:
                    $ref: '#/components/schemas/ContactTransactionsData'
                status:
                    description: Operation result.
                    examples:
                        - success
                    type: string
            required:
                - status
                - data
            type: object
        StatusEnvelopeCreateInvitationsData:
            additionalProperties: true
            properties:
                data:
                    $ref: '#/components/schemas/CreateInvitationsData'
                status:
                    description: Operation result.
                    examples:
                        - success
                    type: string
            required:
                - status
                - data
            type: object
        StatusEnvelopeDeleteInvitationData:
            additionalProperties: true
            properties:
                data:
                    $ref: '#/components/schemas/DeleteInvitationData'
                status:
                    description: Operation result.
                    examples:
                        - success
                    type: string
            required:
                - status
                - data
            type: object
        StatusEnvelopeDeleteTeamData:
            additionalProperties: true
            properties:
                data:
                    $ref: '#/components/schemas/DeleteTeamData'
                status:
                    description: Operation result.
                    examples:
                        - success
                    type: string
            required:
                - status
                - data
            type: object
        StatusEnvelopeDonationsKpi:
            additionalProperties: true
            properties:
                data:
                    $ref: '#/components/schemas/DonationsKpi'
                status:
                    description: Operation result.
                    examples:
                        - success
                    type: string
            required:
                - status
                - data
            type: object
        StatusEnvelopeFormDataWrapper:
            additionalProperties: true
            properties:
                data:
                    $ref: '#/components/schemas/FormDataWrapper'
                status:
                    description: Operation result.
                    examples:
                        - success
                    type: string
            required:
                - status
                - data
            type: object
        StatusEnvelopeFormsDataWrapper:
            additionalProperties: true
            properties:
                data:
                    $ref: '#/components/schemas/FormsDataWrapper'
                status:
                    description: Operation result.
                    examples:
                        - success
                    type: string
            required:
                - status
                - data
            type: object
        StatusEnvelopeGetUserData:
            additionalProperties: true
            properties:
                data:
                    $ref: '#/components/schemas/GetUserData'
                status:
                    description: Operation result.
                    examples:
                        - success
                    type: string
            required:
                - status
                - data
            type: object
        StatusEnvelopeGlobalMessageData:
            additionalProperties: true
            properties:
                data:
                    $ref: '#/components/schemas/GlobalMessageData'
                status:
                    description: Operation result.
                    examples:
                        - success
                    type: string
            required:
                - status
                - data
            type: object
        StatusEnvelopeKpiContactsData:
            additionalProperties: true
            properties:
                data:
                    $ref: '#/components/schemas/KpiContactsData'
                status:
                    description: Operation result.
                    examples:
                        - success
                    type: string
            required:
                - status
                - data
            type: object
        StatusEnvelopeListActionsData:
            additionalProperties: true
            properties:
                data:
                    $ref: '#/components/schemas/ListActionsData'
                status:
                    description: Operation result.
                    examples:
                        - success
                    type: string
            required:
                - status
                - data
            type: object
        StatusEnvelopeListInvitationsData:
            additionalProperties: true
            properties:
                data:
                    $ref: '#/components/schemas/ListInvitationsData'
                status:
                    description: Operation result.
                    examples:
                        - success
                    type: string
            required:
                - status
                - data
            type: object
        StatusEnvelopeListRolesData:
            additionalProperties: true
            properties:
                data:
                    $ref: '#/components/schemas/ListRolesData'
                status:
                    description: Operation result.
                    examples:
                        - success
                    type: string
            required:
                - status
                - data
            type: object
        StatusEnvelopeListTeamsData:
            additionalProperties: true
            properties:
                data:
                    $ref: '#/components/schemas/ListTeamsData'
                status:
                    description: Operation result.
                    examples:
                        - success
                    type: string
            required:
                - status
                - data
            type: object
        StatusEnvelopeListTransactionBundleHistoryEntry:
            additionalProperties: true
            properties:
                data:
                    items:
                        $ref: '#/components/schemas/TransactionBundleHistoryEntry'
                    type:
                        - array
                        - "null"
                status:
                    description: Operation result.
                    examples:
                        - success
                    type: string
            required:
                - status
                - data
            type: object
        StatusEnvelopeListUsersData:
            additionalProperties: true
            properties:
                data:
                    $ref: '#/components/schemas/ListUsersData'
                status:
                    description: Operation result.
                    examples:
                        - success
                    type: string
            required:
                - status
                - data
            type: object
        StatusEnvelopeMembershipsKpi:
            additionalProperties: true
            properties:
                data:
                    $ref: '#/components/schemas/MembershipsKpi'
                status:
                    description: Operation result.
                    examples:
                        - success
                    type: string
            required:
                - status
                - data
            type: object
        StatusEnvelopeSearchContactsData:
            additionalProperties: true
            properties:
                data:
                    $ref: '#/components/schemas/SearchContactsData'
                status:
                    description: Operation result.
                    examples:
                        - success
                    type: string
            required:
                - status
                - data
            type: object
        StatusEnvelopeTeamDataWrapper:
            additionalProperties: true
            properties:
                data:
                    $ref: '#/components/schemas/TeamDataWrapper'
                status:
                    description: Operation result.
                    examples:
                        - success
                    type: string
            required:
                - status
                - data
            type: object
        StatusEnvelopeTransaction:
            additionalProperties: true
            properties:
                data:
                    $ref: '#/components/schemas/Transaction'
                status:
                    description: Operation result.
                    examples:
                        - success
                    type: string
            required:
                - status
                - data
            type: object
        StatusEnvelopeTransactionBundle:
            additionalProperties: true
            properties:
                data:
                    $ref: '#/components/schemas/TransactionBundle'
                status:
                    description: Operation result.
                    examples:
                        - success
                    type: string
            required:
                - status
                - data
            type: object
        StatusEnvelopeTransactionSettings:
            additionalProperties: true
            properties:
                data:
                    $ref: '#/components/schemas/TransactionSettings'
                status:
                    description: Operation result.
                    examples:
                        - success
                    type: string
            required:
                - status
                - data
            type: object
        StatusListEnvelopeCodeCampaign:
            additionalProperties: true
            properties:
                data:
                    items:
                        $ref: '#/components/schemas/CodeCampaign'
                    type:
                        - array
                        - "null"
                status:
                    description: Operation result.
                    examples:
                        - success
                    type: string
                total:
                    description: Total number of matching items.
                    format: int64
                    type: integer
            required:
                - status
                - data
                - total
            type: object
        StatusListEnvelopeDonation:
            additionalProperties: true
            properties:
                data:
                    items:
                        $ref: '#/components/schemas/Donation'
                    type:
                        - array
                        - "null"
                status:
                    description: Operation result.
                    examples:
                        - success
                    type: string
                total:
                    description: Total number of matching items.
                    format: int64
                    type: integer
            required:
                - status
                - data
                - total
            type: object
        StatusListEnvelopeDonationPrice:
            additionalProperties: true
            properties:
                data:
                    items:
                        $ref: '#/components/schemas/DonationPrice'
                    type:
                        - array
                        - "null"
                status:
                    description: Operation result.
                    examples:
                        - success
                    type: string
                total:
                    description: Total number of matching items.
                    format: int64
                    type: integer
            required:
                - status
                - data
                - total
            type: object
        StatusListEnvelopeMembership:
            additionalProperties: true
            properties:
                data:
                    items:
                        $ref: '#/components/schemas/Membership'
                    type:
                        - array
                        - "null"
                status:
                    description: Operation result.
                    examples:
                        - success
                    type: string
                total:
                    description: Total number of matching items.
                    format: int64
                    type: integer
            required:
                - status
                - data
                - total
            type: object
        StatusListEnvelopeMembershipPrice:
            additionalProperties: true
            properties:
                data:
                    items:
                        $ref: '#/components/schemas/MembershipPrice'
                    type:
                        - array
                        - "null"
                status:
                    description: Operation result.
                    examples:
                        - success
                    type: string
                total:
                    description: Total number of matching items.
                    format: int64
                    type: integer
            required:
                - status
                - data
                - total
            type: object
        StatusListEnvelopeMembershipPriceGroup:
            additionalProperties: true
            properties:
                data:
                    items:
                        $ref: '#/components/schemas/MembershipPriceGroup'
                    type:
                        - array
                        - "null"
                status:
                    description: Operation result.
                    examples:
                        - success
                    type: string
                total:
                    description: Total number of matching items.
                    format: int64
                    type: integer
            required:
                - status
                - data
                - total
            type: object
        StatusListEnvelopeTransaction:
            additionalProperties: true
            properties:
                data:
                    items:
                        $ref: '#/components/schemas/Transaction'
                    type:
                        - array
                        - "null"
                status:
                    description: Operation result.
                    examples:
                        - success
                    type: string
                total:
                    description: Total number of matching items.
                    format: int64
                    type: integer
            required:
                - status
                - data
                - total
            type: object
        StatusListEnvelopeTransactionBundle:
            additionalProperties: true
            properties:
                data:
                    items:
                        $ref: '#/components/schemas/TransactionBundle'
                    type:
                        - array
                        - "null"
                status:
                    description: Operation result.
                    examples:
                        - success
                    type: string
                total:
                    description: Total number of matching items.
                    format: int64
                    type: integer
            required:
                - status
                - data
                - total
            type: object
        StatusListEnvelopeTransactionStatus:
            additionalProperties: true
            properties:
                data:
                    items:
                        $ref: '#/components/schemas/TransactionStatus'
                    type:
                        - array
                        - "null"
                status:
                    description: Operation result.
                    examples:
                        - success
                    type: string
                total:
                    description: Total number of matching items.
                    format: int64
                    type: integer
            required:
                - status
                - data
                - total
            type: object
        StatusOnlyEnvelope:
            additionalProperties: true
            properties:
                status:
                    description: Operation result.
                    examples:
                        - success
                    type: string
            required:
                - status
            type: object
        StatusStringEnvelope:
            additionalProperties: true
            properties:
                data:
                    description: Result message.
                    examples:
                        - OK
                    type: string
                status:
                    description: Operation result.
                    examples:
                        - success
                    type: string
            required:
                - status
                - data
            type: object
        Tag:
            additionalProperties: true
            properties:
                name:
                    description: Tag label.
                    examples:
                        - volunteer
                    type: string
            required:
                - name
            type: object
        Team:
            additionalProperties: true
            properties:
                address:
                    $ref: '#/components/schemas/Address'
                created_at:
                    format: date-time
                    type: string
                description:
                    description: Free-form description.
                    type: string
                hide_users:
                    description: When true, the team's users list is hidden to non-members.
                    type: boolean
                id:
                    description: Team ID.
                    examples:
                        - 101
                    format: int64
                    minimum: 0
                    type: integer
                leaders:
                    items:
                        $ref: '#/components/schemas/User'
                    type:
                        - array
                        - "null"
                name:
                    description: Team display name.
                    examples:
                        - Team Number1
                    type: string
                private:
                    description: When true, the team is only visible to its members.
                    type: boolean
                updated_at:
                    format: date-time
                    type: string
                users:
                    items:
                        $ref: '#/components/schemas/User'
                    type:
                        - array
                        - "null"
            required:
                - id
                - name
            type: object
        TeamCreatePayload:
            additionalProperties: true
            properties:
                address:
                    $ref: '#/components/schemas/AddressChangePayload'
                description:
                    description: Free-form description.
                    type: string
                hide_users:
                    description: When true, the team's users list is hidden to non-members.
                    type: boolean
                leaders:
                    description: Subset of users who should be team leaders.
                    items:
                        $ref: '#/components/schemas/UserRef'
                    type:
                        - array
                        - "null"
                name:
                    description: Team display name.
                    examples:
                        - Team Number1
                    type: string
                private:
                    description: When true, the team is only visible to its members.
                    type: boolean
                users:
                    description: Users that should belong to the team.
                    items:
                        $ref: '#/components/schemas/UserRef'
                    type:
                        - array
                        - "null"
            required:
                - name
                - users
            type: object
        TeamCreateWrapper:
            additionalProperties: true
            properties:
                team:
                    $ref: '#/components/schemas/TeamCreatePayload'
            required:
                - team
            type: object
        TeamDataWrapper:
            additionalProperties: true
            properties:
                team:
                    $ref: '#/components/schemas/Team'
            required:
                - team
            type: object
        TeamPatchPayload:
            additionalProperties: true
            properties:
                address:
                    $ref: '#/components/schemas/AddressChangePayload'
                description:
                    description: Free-form description.
                    type: string
                hide_users:
                    description: When true, the team's users list is hidden to non-members.
                    type: boolean
                id:
                    description: Team ID to update.
                    examples:
                        - 1
                    format: int64
                    minimum: 0
                    type: integer
                leaders:
                    description: Subset of users who should be team leaders.
                    items:
                        $ref: '#/components/schemas/UserRef'
                    type:
                        - array
                        - "null"
                name:
                    description: Team display name.
                    examples:
                        - Renamed team
                    type: string
                private:
                    description: When true, the team is only visible to its members.
                    type: boolean
                users:
                    description: Users that should belong to the team.
                    items:
                        $ref: '#/components/schemas/UserRef'
                    type:
                        - array
                        - "null"
            required:
                - id
            type: object
        TeamPatchWrapper:
            additionalProperties: true
            properties:
                team:
                    $ref: '#/components/schemas/TeamPatchPayload'
            required:
                - team
            type: object
        Transaction:
            additionalProperties: true
            properties:
                CreatedAt:
                    description: Creation timestamp.
                    format: date-time
                    type: string
                UpdatedAt:
                    description: Last update timestamp.
                    format: date-time
                    type: string
                amount:
                    default: 0
                    description: Amount in cents.
                    examples:
                        - 5000
                    format: int64
                    minimum: 0
                    type: integer
                code_campaign:
                    description: Optional campaign code (must exist in group's campaigns).
                    type: string
                comment:
                    description: Optional comment.
                    type: string
                comment_date:
                    description: Optional comment date.
                    format: date-time
                    type: string
                contact_id:
                    description: Contact ID - required for transactions.
                    format: int64
                    minimum: 0
                    type: integer
                currency:
                    description: Currency code.
                    examples:
                        - eur
                    type: string
                date:
                    description: Transaction date (ISO 8601 format).
                    format: date-time
                    type:
                        - string
                        - "null"
                delivered_at:
                    description: Optional delivery date.
                    format: date-time
                    type: string
                delivery_token:
                    description: Optional delivery token.
                    type: string
                external_transaction_id:
                    description: Optional external transaction ID.
                    format: int64
                    minimum: 0
                    type: integer
                group_id:
                    description: ID of the group (espace) the transaction belongs to.
                    format: int64
                    minimum: 0
                    readOnly: true
                    type: integer
                id:
                    description: Transaction ID (for updates, omit for new transactions).
                    format: int64
                    minimum: 0
                    type: integer
                payment_method:
                    additionalProperties: {}
                    description: Additional payment method details (JSON object).
                    type: object
                payment_method_kind:
                    description: Payment method type (e.g., 'card', 'check', 'cash', 'transfer'). Must match allowed payment methods for the group.
                    type: string
                reimbursed_amount:
                    description: Reimbursed amount in cents.
                    format: int64
                    minimum: 0
                    type: integer
                status_id:
                    description: Transaction status identifier. Use an ID from GET /v1/transaction_statuses, or default_status_id from GET /v1/transaction_settings.
                    format: int64
                    minimum: 0
                    type: integer
                transaction_bundle_id:
                    description: Bundle identifier.
                    format: int64
                    minimum: 0
                    type: integer
                unpaid_amount:
                    description: Unpaid amount in cents.
                    format: int64
                    minimum: 0
                    type: integer
            required:
                - contact_id
                - date
                - amount
            type: object
        TransactionBundle:
            additionalProperties: true
            properties:
                CreatedAt:
                    description: Creation timestamp.
                    format: date-time
                    type: string
                UpdatedAt:
                    description: Last update timestamp.
                    format: date-time
                    type: string
                donations:
                    description: Array of donations in the bundle. Optional - only include if the bundle contains donations.
                    items:
                        $ref: '#/components/schemas/Donation'
                    type:
                        - array
                        - "null"
                group_id:
                    description: ID of the group (espace) the transaction bundle belongs to.
                    format: int64
                    minimum: 0
                    readOnly: true
                    type: integer
                id:
                    description: Unique identifier.
                    format: int64
                    minimum: 0
                    type: integer
                memberships:
                    description: Array of memberships in the bundle. Optional - only include if the bundle contains memberships.
                    items:
                        $ref: '#/components/schemas/Membership'
                    type:
                        - array
                        - "null"
                summary:
                    additionalProperties: {}
                    description: Summary object (read-only, automatically calculated).
                    type: object
                transactions:
                    description: Array of transactions in the bundle. At least one transaction is typically required.
                    items:
                        $ref: '#/components/schemas/Transaction'
                    type:
                        - array
                        - "null"
            type: object
        TransactionBundleHistoryEntry:
            additionalProperties: true
            properties:
                created_at:
                    description: Creation timestamp.
                    format: date-time
                    type: string
                id:
                    description: Unique identifier.
                    format: int64
                    minimum: 0
                    type: integer
                kind:
                    description: Updated entity kind.
                    enum:
                        - transaction
                        - transaction_status
                        - donation
                        - membership
                    type: string
                new:
                    additionalProperties: {}
                    description: New values snapshot.
                    type: object
                old:
                    additionalProperties: {}
                    description: Previous values snapshot.
                    type: object
                source:
                    additionalProperties: {}
                    description: Source metadata.
                    type: object
                target_id:
                    description: Target record identifier.
                    format: int64
                    minimum: 0
                    type: integer
                transaction_bundle_id:
                    description: Transaction bundle identifier.
                    format: int64
                    minimum: 0
                    type: integer
                user:
                    $ref: '#/components/schemas/UserForTransaction'
                    description: User responsible for the change.
            required:
                - id
                - created_at
                - transaction_bundle_id
                - target_id
                - kind
                - user
            type: object
        TransactionSettings:
            additionalProperties: true
            properties:
                additional_settings:
                    additionalProperties: {}
                    type: object
                batch_prefix:
                    type: string
                batch_serial:
                    format: int64
                    minimum: 0
                    type: integer
                batch_serial_updated_at:
                    format: date-time
                    type: string
                currency:
                    examples:
                        - EUR
                    type: string
                default_donation_price_id:
                    format: int64
                    minimum: 0
                    type: integer
                default_membership_price_id:
                    format: int64
                    minimum: 0
                    type: integer
                default_status_id:
                    format: int64
                    minimum: 0
                    type: integer
                max_batch_size:
                    format: int64
                    minimum: 0
                    type: integer
                membership_prefix:
                    type: string
                membership_serial:
                    format: int64
                    minimum: 0
                    type: integer
                open_periods:
                    additionalProperties: {}
                    type: object
                payment_method_kinds:
                    items:
                        type: string
                    type:
                        - array
                        - "null"
            required:
                - payment_method_kinds
                - max_batch_size
                - default_status_id
                - default_membership_price_id
                - default_donation_price_id
                - batch_prefix
                - batch_serial_updated_at
                - batch_serial
                - membership_serial
                - membership_prefix
                - currency
            type: object
        TransactionStatus:
            additionalProperties: true
            properties:
                archived:
                    type: boolean
                color:
                    type: string
                created_at:
                    format: date-time
                    type: string
                id:
                    format: int64
                    minimum: 0
                    type: integer
                kind:
                    description: Valid values are valid, unpaid, reimbursed, bank_error, other.
                    type: string
                name:
                    type: string
                updated_at:
                    format: date-time
                    type: string
            required:
                - id
                - created_at
                - updated_at
                - name
                - color
                - kind
                - archived
            type: object
        UpdateUserRoleData:
            additionalProperties: true
            properties:
                role_id:
                    description: Role identifier.
                    examples:
                        - 8
                    format: int64
                    minimum: 0
                    type: integer
                user_id:
                    description: User identifier.
                    examples:
                        - 111
                    format: int64
                    minimum: 0
                    type: integer
            required:
                - user_id
                - role_id
            type: object
        User:
            additionalProperties: true
            properties:
                CreatedAt:
                    description: Timestamp when the user was created.
                    format: date-time
                    readOnly: true
                    type: string
                UpdatedAt:
                    description: Timestamp when the user was last updated.
                    format: date-time
                    readOnly: true
                    type: string
                address:
                    description: Street address.
                    examples:
                        - 1 rue de la paix
                    type: string
                avatar:
                    description: Avatar URL.
                    examples:
                        - https://example.com/avatar.png
                    format: uri
                    type: string
                birthdate:
                    description: Birthdate.
                    format: date-time
                    type: string
                city:
                    description: City.
                    examples:
                        - Paris
                    type: string
                contacts:
                    description: Contacts (fiches) linked to this user account.
                    items:
                        $ref: '#/components/schemas/ContactRef'
                    type:
                        - array
                        - "null"
                created:
                    description: Legacy creation timestamp returned by the upstream service.
                    format: date-time
                    readOnly: true
                    type: string
                firstname:
                    description: First name.
                    examples:
                        - John
                    type: string
                group_id:
                    description: IDs of groups the user belongs to.
                    items:
                        format: int64
                        type: integer
                    type:
                        - array
                        - "null"
                id:
                    description: Unique identifier of the user.
                    examples:
                        - 101
                    format: int64
                    readOnly: true
                    type: integer
                locale:
                    description: Locale language.
                    examples:
                        - en
                    type: string
                location:
                    description: Geographic position as lat,lon string.
                    examples:
                        - 1.826483,-1.549486
                    type: string
                mail:
                    description: Email address.
                    examples:
                        - john.doe@example.com
                    format: email
                    type: string
                phone:
                    description: Phone number.
                    examples:
                        - "0123456789"
                    type: string
                postal:
                    description: Postal code.
                    examples:
                        - "75000"
                    type: string
                role_data:
                    $ref: '#/components/schemas/Role'
                    description: User role.
                status:
                    description: 'User status. Comma-separated list of strings. Values: ''available_week_morning,available_week_night,available_holidays,available_weekend,not_set''.'
                    examples:
                        - available_week_morning,available_weekend
                    type: string
                surname:
                    description: Last name.
                    examples:
                        - Doe
                    type: string
                two_factor_enable:
                    description: Indicates if two-factor authentication is enabled.
                    type: boolean
                two_factor_method:
                    description: Two-factor authentication method.
                    enum:
                        - email
                        - totp
                    type: string
            type: object
        UserForTransaction:
            additionalProperties: true
            properties:
                avatar:
                    description: Avatar URL.
                    type: string
                firstname:
                    description: User first name.
                    type: string
                id:
                    description: Unique identifier.
                    format: int64
                    minimum: 0
                    type: integer
                surname:
                    description: User surname.
                    type: string
            required:
                - id
            type: object
        UserInfo:
            additionalProperties: true
            properties:
                CreatedAt:
                    description: Timestamp when the user was created.
                    format: date-time
                    readOnly: true
                    type: string
                UpdatedAt:
                    description: Timestamp when the user was last updated.
                    format: date-time
                    readOnly: true
                    type: string
                address:
                    description: Street address.
                    examples:
                        - 1 rue de la paix
                    type: string
                avatar:
                    description: Avatar URL.
                    examples:
                        - https://example.com/avatar.png
                    format: uri
                    type: string
                birthdate:
                    description: Birthdate.
                    format: date-time
                    type: string
                city:
                    description: City.
                    examples:
                        - Paris
                    type: string
                created:
                    description: Legacy creation timestamp returned by the upstream service.
                    format: date-time
                    readOnly: true
                    type: string
                firstname:
                    description: First name.
                    examples:
                        - John
                    type: string
                group_id:
                    description: IDs of groups the user belongs to.
                    items:
                        format: int64
                        type: integer
                    type:
                        - array
                        - "null"
                id:
                    description: Unique identifier of the user.
                    examples:
                        - 101
                    format: int64
                    readOnly: true
                    type: integer
                locale:
                    description: Locale language.
                    examples:
                        - en
                    type: string
                location:
                    description: Geographic position as lat,lon string.
                    examples:
                        - 1.826483,-1.549486
                    type: string
                mail:
                    description: Email address.
                    examples:
                        - john.doe@example.com
                    format: email
                    type: string
                phone:
                    description: Phone number.
                    examples:
                        - "0123456789"
                    type: string
                postal:
                    description: Postal code.
                    examples:
                        - "75000"
                    type: string
                status:
                    description: 'User status. Comma-separated list of strings. Values: ''available_week_morning,available_week_night,available_holidays,available_weekend,not_set''.'
                    examples:
                        - available_week_morning,available_weekend
                    type: string
                surname:
                    description: Last name.
                    examples:
                        - Doe
                    type: string
                two_factor_enable:
                    description: Indicates if two-factor authentication is enabled.
                    type: boolean
                two_factor_method:
                    description: Two-factor authentication method.
                    enum:
                        - email
                        - totp
                    type: string
            type: object
        UserPatch:
            additionalProperties: true
            properties:
                address:
                    description: Street address.
                    examples:
                        - 1 rue de la paix
                    type: string
                avatar:
                    description: Avatar URL.
                    examples:
                        - https://example.com/avatar.png
                    format: uri
                    type: string
                birthdate:
                    description: Birthdate.
                    format: date-time
                    type: string
                city:
                    description: City.
                    examples:
                        - Paris
                    type: string
                firstname:
                    description: First name.
                    examples:
                        - John
                    type: string
                location:
                    description: Geographic position as lat,lon string.
                    examples:
                        - 1.826483,-1.549486
                    type: string
                mail:
                    description: Email address.
                    examples:
                        - john.doe@example.com
                    format: email
                    type: string
                phone:
                    description: Phone number.
                    examples:
                        - "0123456789"
                    type: string
                postal:
                    description: Postal code.
                    examples:
                        - "75000"
                    type: string
                surname:
                    description: Last name.
                    examples:
                        - Doe
                    type: string
            required:
                - mail
            type: object
        UserRef:
            additionalProperties: true
            properties:
                id:
                    description: User ID.
                    examples:
                        - 7
                    format: int64
                    minimum: 0
                    type: integer
            required:
                - id
            type: object
    securitySchemes:
        bearerAuth:
            bearerFormat: opaque
            description: OAuth2 access token. Pass the token in the Authorization header as `Bearer <token>`. The token is looked up in Redis to resolve the caller identity.
            scheme: bearer
            type: http
info:
    description: This OpenAPI 3.1 specification describes the public API of the Qomon platform. It is generated from the code and serves both as documentation for API consumers and as a contract for future development.
    title: Qomon API Reference
    version: ""
openapi: 3.1.0
security:
    - bearerAuth: []
servers:
    - description: Production
      url: https://incoming.qomon.app
paths:
    /v1/contacts/{contactId}/interactions:
        get:
            description: Returns every interaction logged against a contact.
            operationId: list-interactions
            parameters:
                - description: Contact ID.
                  in: path
                  name: contactId
                  required: true
                  schema:
                    description: Contact ID.
                    examples:
                        - 42
                    format: int64
                    minimum: 0
                    type: integer
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                items:
                                    $ref: '#/components/schemas/Interaction'
                                type:
                                    - array
                                    - "null"
                    description: OK
                default:
                    content:
                        application/problem+json:
                            schema:
                                $ref: '#/components/schemas/ErrorModel'
                    description: Error
            summary: List a contact's interactions
            tags:
                - Interactions
        post:
            description: Creates an interaction (call, letter, meeting, sms, email, donation, ...) logged against a contact.
            operationId: create-interaction
            parameters:
                - description: Contact ID.
                  in: path
                  name: contactId
                  required: true
                  schema:
                    description: Contact ID.
                    examples:
                        - 42
                    format: int64
                    minimum: 0
                    type: integer
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/InteractionWrite'
                required: true
            responses:
                "201":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Interaction'
                    description: Created
                default:
                    content:
                        application/problem+json:
                            schema:
                                $ref: '#/components/schemas/ErrorModel'
                    description: Error
            summary: Log an interaction on a contact
            tags:
                - Interactions
    /v1/contacts/{contactId}/interactions/{interactionId}:
        delete:
            operationId: delete-interaction
            parameters:
                - description: Contact ID.
                  in: path
                  name: contactId
                  required: true
                  schema:
                    description: Contact ID.
                    examples:
                        - 42
                    format: int64
                    minimum: 0
                    type: integer
                - description: Interaction ID.
                  in: path
                  name: interactionId
                  required: true
                  schema:
                    description: Interaction ID.
                    examples:
                        - 501
                    format: int64
                    minimum: 0
                    type: integer
            responses:
                "204":
                    description: No Content
                default:
                    content:
                        application/problem+json:
                            schema:
                                $ref: '#/components/schemas/ErrorModel'
                    description: Error
            summary: Delete an interaction
            tags:
                - Interactions
        patch:
            description: Fully replaces an existing interaction (behaves like PUT).
            operationId: update-interaction
            parameters:
                - description: Contact ID.
                  in: path
                  name: contactId
                  required: true
                  schema:
                    description: Contact ID.
                    examples:
                        - 42
                    format: int64
                    minimum: 0
                    type: integer
                - description: Interaction ID.
                  in: path
                  name: interactionId
                  required: true
                  schema:
                    description: Interaction ID.
                    examples:
                        - 501
                    format: int64
                    minimum: 0
                    type: integer
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/InteractionWrite'
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Interaction'
                    description: OK
                default:
                    content:
                        application/problem+json:
                            schema:
                                $ref: '#/components/schemas/ErrorModel'
                    description: Error
            summary: Update an interaction
            tags:
                - Interactions
            x-mint:
                content: <Warning>This endpoint uses the PATCH verb but behaves like a PUT (full replacement). Any fields that are NOT included in the payload will be cleared/removed, including `tags`. Always send the full interaction object if you don't want to lose existing data.</Warning>
    /v1/interactions/tags:
        get:
            description: Returns every interaction tag defined in the sender-selected space, with how many interactions use each one.
            operationId: list-interaction-tags
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                items:
                                    $ref: '#/components/schemas/InteractionTagCount'
                                type:
                                    - array
                                    - "null"
                    description: OK
                default:
                    content:
                        application/problem+json:
                            schema:
                                $ref: '#/components/schemas/ErrorModel'
                    description: Error
            summary: List interaction tags
            tags:
                - Interactions
        post:
            operationId: create-interaction-tag
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/InteractionTagWrite'
                required: true
            responses:
                "201":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/InteractionTag'
                    description: Created
                default:
                    content:
                        application/problem+json:
                            schema:
                                $ref: '#/components/schemas/ErrorModel'
                    description: Error
            summary: Create an interaction tag
            tags:
                - Interactions
    /v1/interactions/tags/{tagId}:
        delete:
            operationId: delete-interaction-tag
            parameters:
                - description: Interaction tag ID.
                  in: path
                  name: tagId
                  required: true
                  schema:
                    description: Interaction tag ID.
                    examples:
                        - 7
                    format: int64
                    minimum: 0
                    type: integer
            responses:
                "204":
                    description: No Content
                default:
                    content:
                        application/problem+json:
                            schema:
                                $ref: '#/components/schemas/ErrorModel'
                    description: Error
            summary: Delete an interaction tag
            tags:
                - Interactions
        patch:
            operationId: update-interaction-tag
            parameters:
                - description: Interaction tag ID.
                  in: path
                  name: tagId
                  required: true
                  schema:
                    description: Interaction tag ID.
                    examples:
                        - 7
                    format: int64
                    minimum: 0
                    type: integer
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/InteractionTagWrite'
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/InteractionTag'
                    description: OK
                default:
                    content:
                        application/problem+json:
                            schema:
                                $ref: '#/components/schemas/ErrorModel'
                    description: Error
            summary: Update an interaction tag
            tags:
                - Interactions
tags:
    - description: |-
        Log and manage interactions (calls, letters, meetings, sms, emails, donations) against a contact.

        **Operations:**
        - `/v1/contacts/{contactId}/interactions` — create or list interactions for a contact
        - `/v1/contacts/{contactId}/interactions/{interactionId}` — update or delete a single interaction
        - `/v1/interactions/tags` — list or create interaction tags
      name: Interactions
