openapi: 3.2.0 info: title: Ad Seller System Sessions API description: IAB OpenDirect 2.1 compliant seller agent for programmatic advertising. Supports product discovery, tiered pricing, proposal evaluation, multi-round negotiation, deal execution, order management, and change requests. contact: name: IAB Tech Lab url: https://iabtechlab.com/ license: name: Apache 2.0 url: https://www.apache.org/licenses/LICENSE-2.0 version: 1.0.0 tags: - name: Sessions description: Multi-turn buyer conversation sessions paths: /sessions: post: tags: - Sessions summary: Create Session description: Create a new buyer conversation session. operationId: create_session_sessions_post parameters: - name: authorization in: header required: false schema: anyOf: - type: string - type: 'null' title: Authorization - name: X-Api-Key in: header required: false schema: anyOf: - type: string - type: 'null' title: X-Api-Key requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/CreateSessionRequest' responses: '200': description: Successful Response content: application/json: schema: {} '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' get: tags: - Sessions summary: List Sessions description: List sessions, optionally filtered by buyer identity or status. operationId: list_sessions_sessions_get parameters: - name: buyer_key in: query required: false schema: anyOf: - type: string - type: 'null' title: Buyer Key - name: status in: query required: false schema: anyOf: - type: string - type: 'null' title: Status responses: '200': description: Successful Response content: application/json: schema: {} '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /sessions/{session_id}: get: tags: - Sessions summary: Get Session description: Get session details and conversation history. operationId: get_session_sessions__session_id__get parameters: - name: session_id in: path required: true schema: type: string title: Session Id responses: '200': description: Successful Response content: application/json: schema: {} '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /sessions/{session_id}/messages: post: tags: - Sessions summary: Send Session Message description: Send a message within a session and get a response. operationId: send_session_message_sessions__session_id__messages_post parameters: - name: session_id in: path required: true schema: type: string title: Session Id requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/SessionMessageRequest' responses: '200': description: Successful Response content: application/json: schema: {} '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /sessions/{session_id}/close: post: tags: - Sessions summary: Close Session Endpoint description: Close a session. operationId: close_session_endpoint_sessions__session_id__close_post parameters: - name: session_id in: path required: true schema: type: string title: Session Id responses: '200': description: Successful Response content: application/json: schema: {} '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' components: schemas: ValidationError: properties: loc: items: anyOf: - type: string - type: integer type: array title: Location msg: type: string title: Message type: type: string title: Error Type input: title: Input ctx: type: object title: Context type: object required: - loc - msg - type title: ValidationError HTTPValidationError: properties: detail: items: $ref: '#/components/schemas/ValidationError' type: array title: Detail type: object title: HTTPValidationError CreateSessionRequest: properties: seat_id: anyOf: - type: string - type: 'null' title: Seat Id agency_id: anyOf: - type: string - type: 'null' title: Agency Id advertiser_id: anyOf: - type: string - type: 'null' title: Advertiser Id is_authenticated: type: boolean title: Is Authenticated default: false agent_url: anyOf: - type: string - type: 'null' title: Agent Url type: object title: CreateSessionRequest description: Request to create a new session. SessionMessageRequest: properties: message: type: string title: Message type: object required: - message title: SessionMessageRequest description: Request to send a message within a session.