Policies API

You may want to programmatically access your company's policies, rather than reading them manually from your Policy Dashboard. You can fetch your policies through our Policies API.

Fetching Your Policies

To send a request to the Policies API, you can simply send a GET HTTP request to https://getcove.com/api/v1/policies with your API Key in the request header.

Example Response

Here is an example response:

{
  policies: [
    {
      id: 'abc123',
      name: 'Hate Speech',
      parentId: null
    },
    {
      id: 'def456',
      name: 'Transphobia',
      parentId: 'abc123'
    },
    {
      id: 'ghi789',
      name: 'Spam',
      parentId: null
    }
  ]
}

The response will contain one top-level property called policies, which will be an array that contains all of your company's policies. Each policy will have the following shape:

PropertyTypeDescription
idStringOur unique identifier for this policy
nameStringThe name that you assigned to this policy.
parentIdString or nullPolicies are structured as a tree, so policies can have children (which we call "sub-policies") and/or a parent. For example, if you create a Violence policy, you might also create sub-policies under that policy called Graphic Violence, Threats, Celebration of Violence, etc. In this case, Violence is the "parent" of those three sub-policies.

We use the parentId field to let you know what the parent of this policy is, if it has one. That way, you can see the entire policy tree structure.

Note: We strongly recommend that you avoid building any critical logic into your code that relies on policy names staying the same. Anyone with access to your company's Cove instance can change policy names at any time. Instead, we recommend using policy IDs, which are immutable.