Mail API reference

Mail API · Integrations

put/v1/workspaces/{workspace_id}/integrations/github/settingsAuth

Set the repo + branch + templates path to sync from.

Path parameters

workspace_id*string · uuid

Id of the workspace.

Headers

Idempotency-Keystring

Opaque client-generated string (1–256 chars, `[A-Za-z0-9._:-]`) used to deduplicate retries within a 24h window. A retry with the same key and body returns the original response with `Idempotent-Replay: true`.

Request body

repo_full_name*string

Repository to sync templates from, as `<owner>/<repo>`.

Example: "octocat/templates"

branch*string

Branch to sync from.

Example: "main"

templates_path*string

Directory in the repository that holds the templates (`/` for the root).

Example: "/"

Response · 204

Saved.

Example

Request

PUT https://api.mail.productcraft.co/v1/workspaces/{workspace_id}/integrations/github/settings
Authorization: Bearer YOUR_TOKEN
Content-Type: application/json

{
  "repo_full_name": "octocat/templates",
  "branch": "main",
  "templates_path": "/"
}