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

# Set workspace contact

> Change the workspace contact email, or request a change with an API key

Changes the workspace's **Administrative Contact Email**, which Macroscope uses for policy updates, support issues and important account information. The address must be verified on the GitHub account of the person who makes the change. Macroscope does not send a verification message: it checks the address against that person's verified GitHub email addresses, as the app does. Each attempt, including a refused or invalid one, is recorded in the workspace audit log with its outcome and the API key, or the person and connected app, that made it. Requests rejected before they reach the operation, such as malformed requests, invalid credentials and rate-limited requests, may have no entry.

How the change happens depends on the credential:

* **OAuth sign-in** by a workspace admin changes the contact right away, to one of your own GitHub-verified addresses other than a GitHub `noreply` address. The response returns `contact`, with whether the address was verified and whether it was your primary address. The new address replaces the current contact.
* **An Admin API key** only requests the change, and the response returns `pendingChange`. The contact does not change until a workspace admin whose GitHub account has verified the address selects **Confirm** under **Administrative Contact Email** in workspace settings, within 24 hours. Any workspace admin can **Decline** it there. Calling again with the same address returns the same pending request; another address replaces it. The request lapses if it expires or the key is revoked or expires first.

Each request, confirmation and refusal is recorded in the workspace audit log.

## Authorization

Requires an **Admin** API key, or an [OAuth sign-in](https://docs.macroscope.com/api-reference/mcp.md#permissions) with **Admin** access by a person who is a workspace admin. Read and Write keys get `403`, and a sign-in with Read or Write access gets an `insufficient_scope` challenge for `macroscope:admin`.

**Authorization** `string` *required*

`Bearer <key>`. See [Authentication](https://docs.macroscope.com/api#authentication).

**X-Macroscope-Initiation** `string`

How your client identifies the source of the request in the workspace audit log. Use `human` or `agent`. Macroscope records the client's value without verifying it. Other values are treated as unspecified.

## Path parameters

**workspaceType** `string` *required*

`GITHUB_ORGANIZATION` or `GITHUB_USER`.

**workspaceId** `string` *required*

Numeric GitHub ID of the organization or user.

## Body

**email** `string` *required*

The new contact address: a valid email address of up to 320 characters. With OAuth sign-in, one of your own GitHub-verified addresses other than a GitHub `noreply` address. With an API key, an address that the confirming workspace admin has verified on GitHub.

## Response

Exactly one of `contact` and `pendingChange` is set.

**contact** `WorkspaceContact`

The new contact. Present only when a signed-in person changed it.

**properties**

**email** `string`

The address.

**verified** `boolean`

Whether GitHub had verified the address when it was set. Omitted when `false`.

**primary** `boolean`

Whether it was the primary GitHub address of the person who set it. Omitted when `false`.

**pendingChange** `object`

The change awaiting confirmation. Present only when an API key requested it.

**properties**

**email** `string`

The requested address.

**expiresAt** `string`

When the request expires unless a workspace admin confirms it (RFC 3339).

## Errors

<table>
  <colgroup>
    <col width="100" />

    <col width="698" />
  </colgroup>

  <thead>
    <tr>
      <th>HTTP</th>
      <th>Meaning</th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>`400`</td>
      <td>The address is not a valid email address, or Macroscope needs you to sign in with GitHub again to check your email addresses</td>
    </tr>

    <tr>
      <td>`403`</td>
      <td>The address is not one of your verified GitHub addresses, or your credential or permissions do not allow changing the contact</td>
    </tr>

    <tr>
      <td>`404`</td>
      <td>The workspace does not have this setting</td>
    </tr>

    <tr>
      <td>`409`</td>
      <td>The contact, or a pending contact change request, changed at the same time. Nothing was changed; read the contact again and retry</td>
    </tr>
  </tbody>
</table>

See [Errors](https://docs.macroscope.com/api#errors) for the rest.

```bash cURL theme={null}
curl -X PUT https://api.macroscope.com/api/v1/workspaces/GITHUB_ORGANIZATION/12345678/contact \
  -H "Authorization: Bearer $MACROSCOPE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"email": "it@acme.com"}'
```

```json 200 theme={null}
{
  "pendingChange": {
    "email": "it@acme.com",
    "expiresAt": "2026-11-30T09:15:00Z"
  }
}
```

```json 401 theme={null}
{ "code": 16, "message": "unauthenticated" }
```


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