Marqeta · Capability

Core API — users

Core API — users. 4 operations. Lead operation: Lists all users who match a phone number. Self-contained Naftiko capability covering one Marqeta business surface.

Run with Naftiko Marqetausers

What You Can Do

GET
Getusersphonenumberphonenumber — Lists all users who match a phone number
/v1/users/phonenumber/{phone-number}
GET
Getuserstokennotes — Lists cardholder notes
/v1/users/{token}/notes
POST
Postuserstokennotes — Creates a note for the cardholder
/v1/users/{token}/notes
PUT
Putuserstokennotesnotestoken — Updates a specific note for a cardholder
/v1/users/{token}/notes/{notes-token}

MCP Tools

lists-all-users-who-match

Lists all users who match a phone number

read-only idempotent
lists-cardholder-notes

Lists cardholder notes

read-only idempotent
creates-note-cardholder

Creates a note for the cardholder

updates-specific-note-cardholder

Updates a specific note for a cardholder

idempotent

Capability Spec

core-users-2.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: Core API — users
  description: 'Core API — users. 4 operations. Lead operation: Lists all users who match a phone number. Self-contained Naftiko
    capability covering one Marqeta business surface.'
  tags:
  - Marqeta
  - users
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    MARQETA_API_KEY: MARQETA_API_KEY
capability:
  consumes:
  - type: http
    namespace: core-users-2
    baseUri: ''
    description: Core API — users business capability. Self-contained, no shared references.
    resources:
    - name: users-phonenumber-phone_number
      path: /users/phonenumber/{phone_number}
      operations:
      - name: getusersphonenumberphonenumber
        method: GET
        description: Lists all users who match a phone number
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: phone_number
          in: path
          type: string
          description: Phone number
          required: true
        - name: count
          in: query
          type: integer
          description: Number of users to retrieve
        - name: start_index
          in: query
          type: integer
          description: Start index
        - name: fields
          in: query
          type: string
          description: Comma-delimited list of fields to return (e.g. field_1,field_2,..). Leave blank to return all fields.
        - name: sort_by
          in: query
          type: string
          description: Sort order
    - name: users-token-notes
      path: /users/{token}/notes
      operations:
      - name: getuserstokennotes
        method: GET
        description: Lists cardholder notes
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: token
          in: path
          type: string
          description: User token
          required: true
        - name: start_index
          in: query
          type: integer
          description: Start index
        - name: count
          in: query
          type: integer
          description: Number of notes to retrieve
        - name: created_by
          in: query
          type: string
          description: Created by
        - name: created_by_user_role
          in: query
          type: string
          description: Comma-delimited list of created by user roles
        - name: include_private
          in: query
          type: boolean
          description: Include private notes and private fields in note response
        - name: search_type
          in: query
          type: string
          description: Search type
        - name: fields
          in: query
          type: string
          description: Comma-delimited list of fields to return (e.g. field_1,field_2,..). Leave blank to return all fields.
        - name: sort_by
          in: query
          type: string
          description: Sort order
      - name: postuserstokennotes
        method: POST
        description: Creates a note for the cardholder
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: token
          in: path
          type: string
          description: User token
          required: true
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: false
    - name: users-token-notes-notes_token
      path: /users/{token}/notes/{notes_token}
      operations:
      - name: putuserstokennotesnotestoken
        method: PUT
        description: Updates a specific note for a cardholder
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: token
          in: path
          type: string
          description: User token
          required: true
        - name: notes_token
          in: path
          type: string
          description: Notes token
          required: true
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: false
    authentication:
      type: basic
      username: '{{env.MARQETA_USER}}'
      password: '{{env.MARQETA_PASS}}'
  exposes:
  - type: rest
    namespace: core-users-2-rest
    port: 8080
    description: REST adapter for Core API — users. One Spectral-compliant resource per consumed operation, prefixed with
      /v1.
    resources:
    - path: /v1/users/phonenumber/{phone-number}
      name: users-phonenumber-phone-number
      description: REST surface for users-phonenumber-phone_number.
      operations:
      - method: GET
        name: getusersphonenumberphonenumber
        description: Lists all users who match a phone number
        call: core-users-2.getusersphonenumberphonenumber
        with:
          phone_number: rest.phone_number
          count: rest.count
          start_index: rest.start_index
          fields: rest.fields
          sort_by: rest.sort_by
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/users/{token}/notes
      name: users-token-notes
      description: REST surface for users-token-notes.
      operations:
      - method: GET
        name: getuserstokennotes
        description: Lists cardholder notes
        call: core-users-2.getuserstokennotes
        with:
          token: rest.token
          start_index: rest.start_index
          count: rest.count
          created_by: rest.created_by
          created_by_user_role: rest.created_by_user_role
          include_private: rest.include_private
          search_type: rest.search_type
          fields: rest.fields
          sort_by: rest.sort_by
        outputParameters:
        - type: object
          mapping: $.
      - method: POST
        name: postuserstokennotes
        description: Creates a note for the cardholder
        call: core-users-2.postuserstokennotes
        with:
          token: rest.token
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/users/{token}/notes/{notes-token}
      name: users-token-notes-notes-token
      description: REST surface for users-token-notes-notes_token.
      operations:
      - method: PUT
        name: putuserstokennotesnotestoken
        description: Updates a specific note for a cardholder
        call: core-users-2.putuserstokennotesnotestoken
        with:
          token: rest.token
          notes_token: rest.notes_token
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: core-users-2-mcp
    port: 9090
    transport: http
    description: MCP adapter for Core API — users. One tool per consumed operation, routed inline through this capability's
      consumes block.
    tools:
    - name: lists-all-users-who-match
      description: Lists all users who match a phone number
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: core-users-2.getusersphonenumberphonenumber
      with:
        phone_number: tools.phone_number
        count: tools.count
        start_index: tools.start_index
        fields: tools.fields
        sort_by: tools.sort_by
      outputParameters:
      - type: object
        mapping: $.
    - name: lists-cardholder-notes
      description: Lists cardholder notes
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: core-users-2.getuserstokennotes
      with:
        token: tools.token
        start_index: tools.start_index
        count: tools.count
        created_by: tools.created_by
        created_by_user_role: tools.created_by_user_role
        include_private: tools.include_private
        search_type: tools.search_type
        fields: tools.fields
        sort_by: tools.sort_by
      outputParameters:
      - type: object
        mapping: $.
    - name: creates-note-cardholder
      description: Creates a note for the cardholder
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: core-users-2.postuserstokennotes
      with:
        token: tools.token
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: updates-specific-note-cardholder
      description: Updates a specific note for a cardholder
      hints:
        readOnly: false
        destructive: false
        idempotent: true
      call: core-users-2.putuserstokennotesnotestoken
      with:
        token: tools.token
        notes_token: tools.notes_token
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.