---
title: "Save Cloudflare API token"
method: PUT
path: "/integrations/cloudflare"
tags: ["Integrations"]
---

# Save Cloudflare API token

`PUT /integrations/cloudflare`

## Request

- Base URL: `https://api.groundmail.dev`
- URL: `https://api.groundmail.dev/integrations/cloudflare`
- Auth: none declared

Session cookie auth. Token is encrypted at rest.

## Request body

- object
  - `apiToken` string, required: Cloudflare API token with Zone DNS Edit

## Response `200`

Token saved

- CloudflareIntegrationResponse
  - `cloudflare` CloudflareIntegrationStatus, required
    - `connected` boolean, required
    - `hint` string, nullable, required: Last 4 characters of the stored token
    - `connectedAt` string, date-time, nullable, required

## Other responses

- `400`: Missing token
- `401`: Unauthorized
- `503`: Encryption key not configured

---

[API](https://skmtc.dev/groundmail/apis/groundmail-api.md) · [All operations](https://skmtc.dev/groundmail/apis/groundmail-api/llms.txt) · [OpenAPI document](https://skmtc.dev/groundmail/apis/groundmail-api/revisions/479821c9fecf?raw)
