> ## Documentation Index
> Fetch the complete documentation index at: https://docs.getprimo.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Email an admin a recap

> Send the admins of your company a recap email, by default the digest of one AI dashboard. Primo draws its fixed recap email from the blocks you fill in (numbers, actions, list, breakdown, insight, agents); the title and the footer are added by Primo, and the dashboard button appears when dashboardId is given. It goes to one admin of your own company, the one adminId names (as getAdmins returns them): one recap per admin, never a mailing list. There is no address field and no URL field: the email links to the dashboard (when given) and to your agent only. Every value is plain text, no HTML and no markdown. getAiDashboardData gives the dashboard's numbers to put in the blocks.

Key: WriteScope: Company


## OpenAPI

````yaml https://api.getprimo.com/openapi.json post /admins/recap-email
openapi: 3.1.1
info:
  title: Public API - BETA
  description: Read docs on https://docs.getprimo.com/
  version: '1.0'
  contact: {}
servers:
  - url: https://api.getprimo.com
security:
  - apikey: []
tags: []
paths:
  /admins/recap-email:
    post:
      tags:
        - Admins
      summary: Email an admin a recap
      description: >-
        Send the admins of your company a recap email, by default the digest of
        one AI dashboard. Primo draws its fixed recap email from the blocks you
        fill in (numbers, actions, list, breakdown, insight, agents); the title
        and the footer are added by Primo, and the dashboard button appears when
        dashboardId is given. It goes to one admin of your own company, the one
        adminId names (as getAdmins returns them): one recap per admin, never a
        mailing list. There is no address field and no URL field: the email
        links to the dashboard (when given) and to your agent only. Every value
        is plain text, no HTML and no markdown. getAiDashboardData gives the
        dashboard's numbers to put in the blocks.
      operationId: sendRecapEmail
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SendRecapEmailBody'
      responses:
        default:
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SendEmailToAdmins_Output'
components:
  schemas:
    SendRecapEmailBody:
      type: object
      properties:
        language:
          description: >-
            The language of the text, as a BCP 47 tag: "en", "fr". It formats
            the dates.
          type: string
          pattern: ^[a-z]{2}(-[A-Za-z]{2})?$
        subject:
          description: >-
            The subject of the recap, then the period in a few words: "Today · 3
            actions this week".
          type: string
          minLength: 1
          maxLength: 60
        preheader:
          description: The period's most important change, in one sentence.
          type: string
          minLength: 1
          maxLength: 140
        headline:
          description: The admin's first name and the period's verdict, in one sentence.
          type: string
          minLength: 1
          maxLength: 120
        period:
          description: The days the recap covers, as YYYY-MM-DD dates.
          type: object
          properties:
            from:
              type: string
              format: date
              pattern: >-
                ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))$
            to:
              type: string
              format: date
              pattern: >-
                ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))$
          required:
            - from
            - to
        dashboardId:
          description: >-
            The id of the dashboard the recap is about, as getAiDashboardData
            returns it; null when the recap is not about one AI dashboard.
          anyOf:
            - type: string
              pattern: ^[0-9a-fA-F]{24}$
            - type: 'null'
        dashboardName:
          description: >-
            The dashboard's name as getAiDashboardData returns it, "Today" for
            the first one; null when the recap is not about one AI dashboard.
          anyOf:
            - type: string
              minLength: 1
              maxLength: 80
            - type: 'null'
        agentId:
          description: Your own agent id, as your instructions give it.
          type: string
          pattern: ^[A-Za-z0-9-]{1,64}$
        blocks:
          description: >-
            1 to 5 blocks, in display order. Values only: no HTML, no markup, no
            URL.
          minItems: 1
          maxItems: 5
          type: array
          items:
            anyOf:
              - type: object
                properties:
                  type:
                    type: string
                    const: numbers
                  title:
                    description: The dashboard section the numbers come from.
                    type: string
                    minLength: 1
                    maxLength: 80
                  items:
                    description: >-
                      1 to 4 numbers. With one item, the number takes the whole
                      card.
                    minItems: 1
                    maxItems: 4
                    type: array
                    items:
                      type: object
                      properties:
                        label:
                          description: The KPI widget's title.
                          type: string
                          minLength: 1
                          maxLength: 80
                        value:
                          description: >-
                            The number as the dashboard shows it, digits only:
                            "7", "87 %".
                          type: string
                          minLength: 1
                          maxLength: 20
                        unit:
                          description: >-
                            The word after the number: "devices", "problems";
                            null for none.
                          anyOf:
                            - type: string
                              minLength: 1
                              maxLength: 30
                            - type: 'null'
                        delta:
                          description: >-
                            The change since the previous run, as a chip shows
                            it: "+4", "−6", "+4 pts", or "stable". Null on a
                            first run. Real minus sign.
                          anyOf:
                            - type: string
                              minLength: 1
                              maxLength: 12
                            - type: 'null'
                        tone:
                          description: >-
                            better when the change is good news for the admin,
                            worse when it is not; null without a delta.
                          anyOf:
                            - type: string
                              enum:
                                - better
                                - worse
                                - neutral
                            - type: 'null'
                      required:
                        - label
                        - value
                        - unit
                        - delta
                        - tone
                required:
                  - type
                  - title
                  - items
              - type: object
                properties:
                  type:
                    type: string
                    const: actions
                  items:
                    description: 1 to 5 actions, most urgent first.
                    minItems: 1
                    maxItems: 5
                    type: array
                    items:
                      type: object
                      properties:
                        priority:
                          description: >-
                            critical for a security exposure, deadline for a
                            date in the next days, week otherwise.
                          type: string
                          enum:
                            - critical
                            - deadline
                            - week
                        priorityLabel:
                          description: >-
                            The chip text in the email language: "Critical",
                            "Before 3 Nov", "This week".
                          type: string
                          minLength: 1
                          maxLength: 30
                        title:
                          description: >-
                            A verb and its object, with the count: "Re-enroll 3
                            devices out of MDM".
                          type: string
                          minLength: 1
                          maxLength: 120
                        why:
                          description: One sentence on what waiting costs.
                          type: string
                          minLength: 1
                          maxLength: 200
                        section:
                          description: The dashboard section it comes from; null when none.
                          anyOf:
                            - type: string
                              minLength: 1
                              maxLength: 80
                            - type: 'null'
                      required:
                        - priority
                        - priorityLabel
                        - title
                        - why
                        - section
                required:
                  - type
                  - items
              - type: object
                properties:
                  type:
                    type: string
                    const: list
                  title:
                    type: string
                    minLength: 1
                    maxLength: 80
                  icon:
                    description: The icon beside the title; null for none.
                    anyOf:
                      - type: string
                        enum:
                          - devices
                          - security
                          - apps
                          - people
                          - tickets
                      - type: 'null'
                  total:
                    description: >-
                      How many items there are in all, when the rows are a
                      sample.
                    anyOf:
                      - type: integer
                        minimum: 0
                        maximum: 9007199254740991
                      - type: 'null'
                  rows:
                    minItems: 1
                    maxItems: 8
                    type: array
                    items:
                      type: object
                      properties:
                        title:
                          type: string
                          minLength: 1
                          maxLength: 120
                        subtitle:
                          anyOf:
                            - type: string
                              minLength: 1
                              maxLength: 160
                            - type: 'null'
                        badge:
                          anyOf:
                            - type: object
                              properties:
                                tone:
                                  type: string
                                  enum:
                                    - success
                                    - warning
                                    - critical
                                    - neutral
                                label:
                                  type: string
                                  minLength: 1
                                  maxLength: 30
                              required:
                                - tone
                                - label
                            - type: 'null'
                        meta:
                          description: 'A short right-aligned figure: "1 device", "CVSS 10".'
                          anyOf:
                            - type: string
                              minLength: 1
                              maxLength: 40
                            - type: 'null'
                      required:
                        - title
                        - subtitle
                        - badge
                        - meta
                required:
                  - type
                  - title
                  - icon
                  - total
                  - rows
              - type: object
                properties:
                  type:
                    type: string
                    const: breakdown
                  title:
                    type: string
                    minLength: 1
                    maxLength: 80
                  value:
                    description: 'The headline figure: "87 %".'
                    type: string
                    minLength: 1
                    maxLength: 20
                  valueLabel:
                    description: 'The word after the headline figure: "succeeded".'
                    type: string
                    minLength: 1
                    maxLength: 60
                  status:
                    description: >-
                      A chip in the header for the worst segment: "6 failed";
                      null for none.
                    anyOf:
                      - type: object
                        properties:
                          tone:
                            type: string
                            enum:
                              - success
                              - warning
                              - critical
                              - neutral
                          label:
                            type: string
                            minLength: 1
                            maxLength: 30
                        required:
                          - tone
                          - label
                      - type: 'null'
                  segments:
                    minItems: 2
                    maxItems: 4
                    type: array
                    items:
                      type: object
                      properties:
                        label:
                          type: string
                          minLength: 1
                          maxLength: 60
                        value:
                          type: integer
                          minimum: 0
                          maximum: 9007199254740991
                        share:
                          description: Whole percent; the shares add up to 100.
                          type: integer
                          minimum: 0
                          maximum: 100
                        tone:
                          type: string
                          enum:
                            - success
                            - warning
                            - critical
                            - neutral
                      required:
                        - label
                        - value
                        - share
                        - tone
                required:
                  - type
                  - title
                  - value
                  - valueLabel
                  - status
                  - segments
              - type: object
                properties:
                  type:
                    type: string
                    const: insight
                  title:
                    type: string
                    minLength: 1
                    maxLength: 120
                  body:
                    description: Two sentences at most.
                    type: string
                    minLength: 1
                    maxLength: 400
                required:
                  - type
                  - title
                  - body
              - type: object
                properties:
                  type:
                    type: string
                    const: agents
                  items:
                    description: >-
                      1 to 5 agents and what their runs produced over the
                      period. Leave out an agent that did nothing.
                    minItems: 1
                    maxItems: 5
                    type: array
                    items:
                      type: object
                      properties:
                        name:
                          description: The agent's name as listAgents returns it.
                          type: string
                          minLength: 1
                          maxLength: 80
                        label:
                          description: >-
                            What its runs produced, as an outcome: "Apps
                            sorted", "Tickets assigned".
                          type: string
                          minLength: 1
                          maxLength: 80
                        count:
                          type: integer
                          minimum: 0
                          maximum: 9007199254740991
                      required:
                        - name
                        - label
                        - count
                required:
                  - type
                  - items
        adminId:
          description: >-
            The one admin to email, as returned by getAdmins (an employee `id`
            or an external `userId`).
          type: string
          minLength: 1
      required:
        - language
        - subject
        - preheader
        - headline
        - period
        - dashboardId
        - dashboardName
        - agentId
        - blocks
        - adminId
    SendEmailToAdmins_Output:
      type: object
      properties:
        recipientCount:
          type: integer
          minimum: -9007199254740991
          maximum: 9007199254740991
      required:
        - recipientCount
      additionalProperties: false
  securitySchemes:
    apikey:
      scheme: bearer
      bearerFormat: API key
      type: http
      description: >-
        Use your Primo API key in the Authorization header as `Bearer
        <API_KEY>`.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.