AgentMail pods > lists API

The pods > lists API from AgentMail — 2 operation(s) for pods > lists.

OpenAPI Specification

agentmail-pods-lists-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: API Reference agent pods > lists API
  version: 1.0.0
servers:
- url: https://api.agentmail.to
  description: prod
- url: https://x402.api.agentmail.to
  description: prod-x402
- url: https://mpp.api.agentmail.to
  description: prod-mpp
- url: https://api.agentmail.eu
  description: eu-prod
tags:
- name: pods > lists
paths:
  /v0/pods/{pod_id}/lists/{direction}/{type}:
    get:
      operationId: list
      summary: List Entries
      description: '**CLI:**

        ```bash

        agentmail pods:lists list --pod-id <pod_id> --direction <direction> --type <type>

        ```'
      tags:
      - pods > lists
      parameters:
      - name: pod_id
        in: path
        required: true
        schema:
          $ref: '#/components/schemas/type_pods:PodId'
      - name: direction
        in: path
        required: true
        schema:
          $ref: '#/components/schemas/type_lists:Direction'
      - name: type
        in: path
        required: true
        schema:
          $ref: '#/components/schemas/type_lists:ListType'
      - name: limit
        in: query
        required: false
        schema:
          $ref: '#/components/schemas/type_:Limit'
      - name: page_token
        in: query
        required: false
        schema:
          $ref: '#/components/schemas/type_:PageToken'
      - name: Authorization
        in: header
        description: Bearer authentication
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Response with status 200
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/type_lists:PodListListEntriesResponse'
    post:
      operationId: create
      summary: Create List Entry
      description: '**CLI:**

        ```bash

        agentmail pods:lists create --pod-id <pod_id> --direction <direction> --type <type> --entry user@example.com

        ```'
      tags:
      - pods > lists
      parameters:
      - name: pod_id
        in: path
        required: true
        schema:
          $ref: '#/components/schemas/type_pods:PodId'
      - name: direction
        in: path
        required: true
        schema:
          $ref: '#/components/schemas/type_lists:Direction'
      - name: type
        in: path
        required: true
        schema:
          $ref: '#/components/schemas/type_lists:ListType'
      - name: Authorization
        in: header
        description: Bearer authentication
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Response with status 200
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/type_lists:PodListEntry'
        '400':
          description: Error response with status 400
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/type_:ValidationErrorResponse'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/type_lists:CreateListEntryRequest'
  /v0/pods/{pod_id}/lists/{direction}/{type}/{entry}:
    get:
      operationId: get
      summary: Get List Entry
      description: '**CLI:**

        ```bash

        agentmail pods:lists get --pod-id <pod_id> --direction <direction> --type <type> --entry <entry>

        ```'
      tags:
      - pods > lists
      parameters:
      - name: pod_id
        in: path
        required: true
        schema:
          $ref: '#/components/schemas/type_pods:PodId'
      - name: direction
        in: path
        required: true
        schema:
          $ref: '#/components/schemas/type_lists:Direction'
      - name: type
        in: path
        required: true
        schema:
          $ref: '#/components/schemas/type_lists:ListType'
      - name: entry
        in: path
        description: Email address or domain.
        required: true
        schema:
          type: string
      - name: Authorization
        in: header
        description: Bearer authentication
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Response with status 200
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/type_lists:PodListEntry'
        '404':
          description: Error response with status 404
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/type_:ErrorResponse'
    delete:
      operationId: delete
      summary: Delete List Entry
      description: '**CLI:**

        ```bash

        agentmail pods:lists delete --pod-id <pod_id> --direction <direction> --type <type> --entry <entry>

        ```'
      tags:
      - pods > lists
      parameters:
      - name: pod_id
        in: path
        required: true
        schema:
          $ref: '#/components/schemas/type_pods:PodId'
      - name: direction
        in: path
        required: true
        schema:
          $ref: '#/components/schemas/type_lists:Direction'
      - name: type
        in: path
        required: true
        schema:
          $ref: '#/components/schemas/type_lists:ListType'
      - name: entry
        in: path
        description: Email address or domain.
        required: true
        schema:
          type: string
      - name: Authorization
        in: header
        description: Bearer authentication
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Successful response
        '404':
          description: Error response with status 404
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/type_:ErrorResponse'
components:
  schemas:
    type_:Count:
      type: integer
      description: Number of items returned.
      title: Count
    type_:ErrorFix:
      type: string
      description: The concrete next action that resolves the error.
      title: ErrorFix
    type_:ErrorMessage:
      type: string
      description: Error message.
      title: ErrorMessage
    type_lists:ListType:
      type: string
      enum:
      - allow
      - block
      description: Type of list entry.
      title: ListType
    type_lists:PodListListEntriesResponse:
      type: object
      properties:
        count:
          $ref: '#/components/schemas/type_:Count'
        limit:
          $ref: '#/components/schemas/type_:Limit'
        next_page_token:
          $ref: '#/components/schemas/type_:PageToken'
        entries:
          type: array
          items:
            $ref: '#/components/schemas/type_lists:PodListEntry'
          description: Ordered by entry ascending.
      required:
      - count
      - entries
      title: PodListListEntriesResponse
    type_:ErrorDocs:
      type: string
      description: Link to the error reference entry for this code.
      title: ErrorDocs
    type_lists:EntryType:
      type: string
      enum:
      - email
      - domain
      description: Whether the entry is an email address or domain.
      title: EntryType
    type_:ErrorCode:
      type: string
      description: Stable, machine-readable error code in snake_case (for example, not_found or missing_permission). Branch on this rather than the message text.
      title: ErrorCode
    type_:ErrorResponse:
      type: object
      properties:
        name:
          $ref: '#/components/schemas/type_:ErrorName'
        code:
          $ref: '#/components/schemas/type_:ErrorCode'
        message:
          $ref: '#/components/schemas/type_:ErrorMessage'
        fix:
          $ref: '#/components/schemas/type_:ErrorFix'
        docs:
          $ref: '#/components/schemas/type_:ErrorDocs'
      required:
      - name
      - message
      title: ErrorResponse
    type_lists:PodListEntry:
      type: object
      properties:
        entry:
          type: string
          description: Email address or domain of list entry.
        organization_id:
          $ref: '#/components/schemas/type_:OrganizationId'
        reason:
          type: string
          description: Reason for adding the entry.
        direction:
          $ref: '#/components/schemas/type_lists:Direction'
        list_type:
          $ref: '#/components/schemas/type_lists:ListType'
        entry_type:
          $ref: '#/components/schemas/type_lists:EntryType'
        created_at:
          type: string
          format: date-time
          description: Time at which entry was created.
        read_only:
          type: boolean
          description: Whether the entry is read-only and cannot be deleted via the API.
        pod_id:
          type: string
          description: ID of pod.
        inbox_id:
          type: string
          description: ID of inbox, if entry is inbox-scoped.
      required:
      - entry
      - organization_id
      - direction
      - list_type
      - entry_type
      - created_at
      - pod_id
      title: PodListEntry
    type_:Limit:
      type: integer
      description: Limit of number of items returned.
      title: Limit
    type_pods:PodId:
      type: string
      description: ID of pod.
      title: PodId
    type_lists:Direction:
      type: string
      enum:
      - send
      - receive
      - reply
      description: Direction of list entry.
      title: Direction
    type_lists:CreateListEntryRequest:
      type: object
      properties:
        entry:
          type: string
          description: Email address or domain to add.
        reason:
          type: string
          description: Reason for adding the entry.
      required:
      - entry
      title: CreateListEntryRequest
    type_:ValidationErrorResponse:
      type: object
      properties:
        name:
          $ref: '#/components/schemas/type_:ErrorName'
        code:
          $ref: '#/components/schemas/type_:ErrorCode'
        message:
          $ref: '#/components/schemas/type_:ErrorMessage'
        errors:
          description: Validation errors. Each entry has a path and a message identifying the invalid field.
        fix:
          $ref: '#/components/schemas/type_:ErrorFix'
        docs:
          $ref: '#/components/schemas/type_:ErrorDocs'
      required:
      - name
      - errors
      title: ValidationErrorResponse
    type_:PageToken:
      type: string
      description: Page token for pagination.
      title: PageToken
    type_:ErrorName:
      type: string
      description: Name of error.
      title: ErrorName
    type_:OrganizationId:
      type: string
      description: ID of organization.
      title: OrganizationId
  securitySchemes:
    Bearer:
      type: http
      scheme: bearer