Skip to main content
PATCH
/
groups
/
{groupId}
Update a group
curl --request PATCH \
  --url https://www.getprescience.com/api/partner/v1/groups/{groupId} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "contact": {
    "name": "Dana Park",
    "email": "dana@acme.com",
    "title": "VP People"
  }
}
'
import requests

url = "https://www.getprescience.com/api/partner/v1/groups/{groupId}"

payload = { "contact": {
"name": "Dana Park",
"email": "dana@acme.com",
"title": "VP People"
} }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}

response = requests.patch(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({contact: {name: 'Dana Park', email: 'dana@acme.com', title: 'VP People'}})
};

fetch('https://www.getprescience.com/api/partner/v1/groups/{groupId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://www.getprescience.com/api/partner/v1/groups/{groupId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'contact' => [
'name' => 'Dana Park',
'email' => 'dana@acme.com',
'title' => 'VP People'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"strings"
"net/http"
"io"
)

func main() {

url := "https://www.getprescience.com/api/partner/v1/groups/{groupId}"

payload := strings.NewReader("{\n \"contact\": {\n \"name\": \"Dana Park\",\n \"email\": \"dana@acme.com\",\n \"title\": \"VP People\"\n }\n}")

req, _ := http.NewRequest("PATCH", url, payload)

req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.patch("https://www.getprescience.com/api/partner/v1/groups/{groupId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"contact\": {\n \"name\": \"Dana Park\",\n \"email\": \"dana@acme.com\",\n \"title\": \"VP People\"\n }\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://www.getprescience.com/api/partner/v1/groups/{groupId}")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"contact\": {\n \"name\": \"Dana Park\",\n \"email\": \"dana@acme.com\",\n \"title\": \"VP People\"\n }\n}"

response = http.request(request)
puts response.read_body
{
  "id": "grp_8c2f41d09a3e",
  "mode": "test",
  "status": "created",
  "companyName": "Acme Inc",
  "domain": "acme.com",
  "externalId": "co_4821",
  "address": {
    "line1": "548 Market St",
    "city": "San Francisco",
    "state": "CA",
    "zip": "94104"
  },
  "contact": {
    "name": "Dana Park",
    "email": "dana@acme.com",
    "title": "VP People"
  },
  "currentCoverage": {
    "planType": "fully_insured",
    "carrier": "Anthem",
    "pepmCents": 80000,
    "renewalDate": "2026-09-01"
  },
  "censusMemberCount": 0,
  "companyState": null,
  "createdAt": "2026-06-10T17:04:11Z",
  "updatedAt": "2026-06-11T08:30:12Z"
}
{
"error": "invalid_request",
"message": "domain must be a valid domain.",
"details": [
{
"field": "domain",
"message": "domain must be a valid domain"
}
]
}
{
"error": "unauthorized",
"message": "Provide a valid partner API key as `Authorization: Bearer psk_...`."
}
{
"error": "not_found",
"message": "No group grp_8c2f41d09a3e found."
}
{
"error": "rate_limited",
"message": "Rate limit exceeded. Retry after 12 seconds."
}
{
"error": "server_error",
"message": "Internal error. The request was not applied."
}

Authorizations

Authorization
string
header
required

Partner API key. psk_test_<32 hex> for test mode, psk_live_<32 hex> for live mode. Keys are stored hashed and cannot be recovered; store them in your secrets manager on issue.

Path Parameters

groupId
string
required

Group ID, e.g. grp_8c2f41d09a3e.

Pattern: ^grp_[0-9a-f]{12}$

Body

application/json
companyName
string
required
Example:

"Acme Inc"

domain
string
required

Primary company domain. One enrolled group per domain per mode.

Example:

"acme.com"

externalId
string

Your internal employer ID. Echoed back on the group and useful for reconciliation.

Example:

"co_4821"

Example:

"Acme Incorporated"

ein
string
Example:

"94-2404110"

address
object
contact
object
currentCoverage
object

The employer's coverage today. pepmCents is used as the savings baseline when quoting unless overridden per-quote.

Response

Updated group.

id
string
required
Example:

"grp_8c2f41d09a3e"

mode
enum<string>
required
Available options:
test,
live
status
enum<string>
required

Lifecycle: created -> census_received -> quoted -> enrolled -> active (active = company flipped to prod by Prescience).

Available options:
created,
census_received,
quoted,
enrolled,
active
companyName
string
required
Example:

"Acme Inc"

domain
string
required
Example:

"acme.com"

censusMemberCount
integer
required
Example:

12

createdAt
string<date-time>
required
updatedAt
string<date-time>
required
externalId
string | null

Your internal employer ID.

Example:

"co_4821"

address
object
contact
object
currentCoverage
object

The employer's coverage today. pepmCents is used as the savings baseline when quoting unless overridden per-quote.

companyState
enum<string> | null

null until enrolled, then sandbox, then prod once Prescience activates the group.

Available options:
sandbox,
prod,
null