openapi: 3.2.0 info: title: WordPress.com REST API — wpcom/v2 namespace Odie API version: v2 description: Derived by API Evangelist from the WordPress.com REST API route index published at https://public-api.wordpress.com/wpcom/v2/. Paths, HTTP methods, and parameter names/types/descriptions/defaults are taken verbatim from that index. Response schemas are not published in the route index, so successful responses are described but not schematised; the error envelope was observed live on public-api.wordpress.com. contact: name: Automattic url: https://developer.wordpress.com/docs/api/ x-derived-from: https://public-api.wordpress.com/wpcom/v2/ x-derived-by: API Evangelist enrichment pipeline servers: - url: https://public-api.wordpress.com security: - bearerAuth: [] tags: - name: odie paths: /wpcom/v2/odie/chat/{bot_id}: get: operationId: getWpcomV2OdieChatbyBotId summary: GET /wpcom/v2/odie/chat/{bot_id} tags: - odie responses: '200': description: OK '401': description: Authentication required content: application/json: schema: $ref: '#/components/schemas/WPRestError' '404': description: Not found content: application/json: schema: $ref: '#/components/schemas/WPRestError' parameters: - name: bot_id in: path required: true schema: type: string post: operationId: postWpcomV2OdieChatbyBotId summary: POST /wpcom/v2/odie/chat/{bot_id} tags: - odie responses: '200': description: OK '401': description: Authentication required content: application/json: schema: $ref: '#/components/schemas/WPRestError' '404': description: Not found content: application/json: schema: $ref: '#/components/schemas/WPRestError' parameters: - name: bot_id in: path required: true schema: type: string requestBody: content: application/json: schema: type: object properties: context: type: object description: The context to continue the chat with. message: type: string description: The message to add to the chat source: type: string enum: - big-sky - profiler - aifficiency - gpt description: The source of the request. Typically omitted. source_user: type: string description: An id identifying the user at the source. Typically omitted. test: type: boolean description: Whether to mark this as a test chat (a11n-only). role: type: string enum: - user - navigation default: user description: Whether to mark this as a navigation message. required: - message /wpcom/v2/odie/chat/{bot_id}/{chat_id}: get: operationId: getWpcomV2OdieChatbyBotIdbyChatId summary: GET /wpcom/v2/odie/chat/{bot_id}/{chat_id} tags: - odie responses: '200': description: OK '401': description: Authentication required content: application/json: schema: $ref: '#/components/schemas/WPRestError' '404': description: Not found content: application/json: schema: $ref: '#/components/schemas/WPRestError' parameters: - name: bot_id in: path required: true schema: type: string - name: chat_id in: path required: true schema: type: string - name: page_number in: query required: false schema: type: integer default: 1 description: The number of the page to retrieve, limited to 100 - name: items_per_page in: query required: false schema: type: integer default: 10 description: The number of items per page. - name: include_feedback in: query required: false schema: type: boolean description: If true, include the feedback rating value for each message in the response. post: operationId: postWpcomV2OdieChatbyBotIdbyChatId summary: POST /wpcom/v2/odie/chat/{bot_id}/{chat_id} tags: - odie responses: '200': description: OK '401': description: Authentication required content: application/json: schema: $ref: '#/components/schemas/WPRestError' '404': description: Not found content: application/json: schema: $ref: '#/components/schemas/WPRestError' parameters: - name: bot_id in: path required: true schema: type: string - name: chat_id in: path required: true schema: type: string requestBody: content: application/json: schema: type: object properties: role: type: string enum: - user - navigation default: user description: Whether to mark this as a navigation message. message: type: string description: The message to add to the chat context: type: object description: The context to continue the chat with. required: - message /wpcom/v2/odie/chat/{bot_id}/{chat_id}/{message_id}/feedback: post: operationId: postWpcomV2OdieChatbyBotIdbyChatIdbyMessageIdFeedback summary: POST /wpcom/v2/odie/chat/{bot_id}/{chat_id}/{message_id}/feedback tags: - odie responses: '200': description: OK '401': description: Authentication required content: application/json: schema: $ref: '#/components/schemas/WPRestError' '404': description: Not found content: application/json: schema: $ref: '#/components/schemas/WPRestError' parameters: - name: bot_id in: path required: true schema: type: string - name: chat_id in: path required: true schema: type: string - name: message_id in: path required: true schema: type: string requestBody: content: application/json: schema: type: object properties: rating_value: type: integer description: The feedback rating value. required: - rating_value /wpcom/v2/odie/conversations/{bot_ids}: get: operationId: getWpcomV2OdieConversationsbyBotIds summary: GET /wpcom/v2/odie/conversations/{bot_ids} tags: - odie responses: '200': description: OK '401': description: Authentication required content: application/json: schema: $ref: '#/components/schemas/WPRestError' '404': description: Not found content: application/json: schema: $ref: '#/components/schemas/WPRestError' parameters: - name: bot_ids in: path required: true schema: type: string - name: truncation_method in: query required: false schema: type: string enum: - first_message - last_message default: last_message description: The method to use for truncating the conversations. Either "first_message" or "last_message". Defaults to "last_message". Note that this parameter affects the response shape. If it is set to `last_message`, the response will include the last message from each chat, while `first_message` will include the first message. - name: page_number in: query required: false schema: type: integer default: 1 description: The 1-indexed page number to retrieve. Each page contains up to 10 conversations. /wpcom/v2/odie/conversations/{bot_id}: get: operationId: getWpcomV2OdieConversationsbyBotId summary: GET /wpcom/v2/odie/conversations/{bot_id} tags: - odie responses: '200': description: OK '401': description: Authentication required content: application/json: schema: $ref: '#/components/schemas/WPRestError' '404': description: Not found content: application/json: schema: $ref: '#/components/schemas/WPRestError' parameters: - name: bot_id in: path required: true schema: type: string - name: truncation_method in: query required: false schema: type: string enum: - first_message - last_message default: last_message description: The method to use for truncating the conversations. Either "first_message" or "last_message". Defaults to "last_message". Note that this parameter affects the response shape. If it is set to `last_message`, the response will include the last message from each chat, while `first_message` will include the first message. - name: page_number in: query required: false schema: type: integer default: 1 description: The 1-indexed page number to retrieve. Each page contains up to 10 conversations. components: schemas: WPRestError: type: object description: WordPress REST API error envelope (observed on public-api.wordpress.com). properties: code: type: string example: rest_unauthorized message: type: string example: Authentication required. data: type: object properties: status: type: integer example: 401 securitySchemes: oauth2: type: oauth2 description: WordPress.com OAuth 2.1, per https://public-api.wordpress.com/.well-known/openid-configuration flows: authorizationCode: authorizationUrl: https://public-api.wordpress.com/oauth2-1/authorize tokenUrl: https://public-api.wordpress.com/oauth2-1/token refreshUrl: https://public-api.wordpress.com/oauth2-1/token scopes: global: '' auth: '' openid: '' profile: '' email: '' users: '' sites: '' posts: '' comments: '' taxonomy: '' follow: '' sharing: '' freshly-pressed: '' notifications: '' insights: '' read: '' stats: '' media: '' menus: '' batch: '' videos: '' bearerAuth: type: http scheme: bearer