---
title: "Approvals, notifications, and schedules"
description: "Decide approvals, read notifications, and create or cancel schedules."
canonical_url: "https://docs.vettero.com/developer-api/activity"
---
# Approvals, notifications, and schedules

> Decide approvals, read notifications, and create or cancel schedules.

Paths are under `/api/developer/v1`.

## Approvals

Scope: `approvals`. The key owner's user is the actor unless you send `asUserId` for a workspace member who is allowed to decide.

<table>
<thead>
  <tr>
    <th>
      Call
    </th>
    
    <th>
      What it does
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        GET /approvals
      </code>
    </td>
    
    <td>
      Lists approvals for that user. Query: <code>
        status
      </code>
      
      , <code>
        cursor
      </code>
      
      , <code>
        limit
      </code>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        GET /approvals/{id}
      </code>
    </td>
    
    <td>
      Reads one
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        POST /approvals/{id}/approve
      </code>
    </td>
    
    <td>
      Optional <code>
        note
      </code>
      
       and <code>
        asUserId
      </code>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        POST /approvals/{id}/reject
      </code>
    </td>
    
    <td>
      Optional <code>
        note
      </code>
      
       and <code>
        asUserId
      </code>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        POST /approvals/{id}/submit
      </code>
    </td>
    
    <td>
      <code>
        answers
      </code>
      
       object, optional <code>
        asUserId
      </code>
    </td>
  </tr>
</tbody>
</table>

### Fields that trip people up

<table>
<thead>
  <tr>
    <th>
      Field
    </th>
    
    <th>
      Meaning
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        kind
      </code>
    </td>
    
    <td>
      <code>
        approval
      </code>
      
       → use approve/reject. <code>
        information
      </code>
      
       → use submit
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        asUserId
      </code>
    </td>
    
    <td>
      Act as that workspace user. Use when the API key owner is a service account
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        answers
      </code>
    </td>
    
    <td>
      Map of <strong>
        infoField id
      </strong>
      
       → answer (typically <code>
        { "value": "..." }
      </code>
      
      )
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        canApprove
      </code>
      
       / <code>
        canRevoke
      </code>
    </td>
    
    <td>
      What the current actor may do
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        mode
      </code>
    </td>
    
    <td>
      <code>
        roles
      </code>
      
       or <code>
        current_user
      </code>
      
       — who is allowed to decide
    </td>
  </tr>
</tbody>
</table>

## Notifications

Scope: `notifications`.

<table>
<thead>
  <tr>
    <th>
      Call
    </th>
    
    <th>
      What it does
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        GET /notifications
      </code>
    </td>
    
    <td>
      Short list: id, message, workspaceId, createdAt. Query: <code>
        cursor
      </code>
      
      , <code>
        limit
      </code>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        POST /notifications/{id}/read
      </code>
    </td>
    
    <td>
      Marks one read for the key owner. Returns the <strong>
        full
      </strong>
      
       notification
    </td>
  </tr>
</tbody>
</table>

## Schedules

Scope: `schedules`.

<table>
<thead>
  <tr>
    <th>
      Call
    </th>
    
    <th>
      What it does
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        POST /schedules
      </code>
    </td>
    
    <td>
      Creates a one-time schedule for an agent or workflow
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        GET /schedules/{id}
      </code>
    </td>
    
    <td>
      Reads it (<code>
        {id}
      </code>
      
       is the schedule string id, not Mongo <code>
        _id
      </code>
      
      )
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        DELETE /schedules/{id}
      </code>
    </td>
    
    <td>
      Cancels it. Returns <code>
        { ok: true }
      </code>
    </td>
  </tr>
</tbody>
</table>

### Fields that trip people up

<table>
<thead>
  <tr>
    <th>
      Field
    </th>
    
    <th>
      Meaning
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        mode
      </code>
    </td>
    
    <td>
      <code>
        specificTime
      </code>
      
       needs <code>
        scheduledAt
      </code>
      
       (Unix timestamp). <code>
        timeoutMinutes
      </code>
      
       needs <code>
        timeoutMinutes
      </code>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        targetType
      </code>
      
       + <code>
        targetRef
      </code>
    </td>
    
    <td>
      <code>
        agent
      </code>
      
       or <code>
        workflow
      </code>
      
      , plus that resource's id
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        inputData
      </code>
    </td>
    
    <td>
      Start input passed when the schedule fires
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        agendaJobId
      </code>
    </td>
    
    <td>
      Internal scheduler id. Clients can ignore it
    </td>
  </tr>
</tbody>
</table>


## Sitemap

See the full [sitemap](https://docs.vettero.com/sitemap.md) for all pages.
