Pickaxe Learn

API Reference

Email Templates

Endpoints for listing and customizing studio email templates.


Related In Learn

Access Overview

Control who can use your tools with public and member access groups.

Open Learn

Email template endpoints list and customize the emails sent by the current studio.

Endpoints

GET /studio/emails/list

List the email templates for the studio associated with the authenticated workspace. The response always contains magicLink, emailVerification, passwordReset, and invitation. Templates or fields that have not been customized use Pickaxe's defaults; saved subject and body values take precedence.

  • Full URL: https://api.pickaxe.co/v1/studio/emails/list

Request Fields

This endpoint does not define request body fields.

Examples

curl -X GET https://api.pickaxe.co/v1/studio/emails/list \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_TOKEN"

Response Shape

{
  "success": true,
  "data": {
    "studioId": "studio-123",
    "emails": {
      "magicLink": {
        "subject": "Log in to {{studio.name}}",
        "body": "<!doctype html>..."
      },
      "emailVerification": {
        "subject": "Verify your email for {{studio.name}}",
        "body": "<!doctype html>..."
      },
      "passwordReset": {
        "subject": "Reset your password for {{studio.name}}",
        "body": "<!doctype html>..."
      },
      "invitation": {
        "subject": "Invitation from {{studio.name}}",
        "body": "<!doctype html>..."
      }
    }
  }
}

GET /studio/emails/<template_type>

Get one authentication email template for the studio associated with the authenticated workspace. If the selected template or either of its fields has not been customized, the response uses Pickaxe's default value.

  • Full URL: https://api.pickaxe.co/v1/studio/emails/<template_type>

Request Fields

  • template_type ("magicLink" | "emailVerification" | "passwordReset" | "invitation", required): The email template type to retrieve. This is a URL path parameter.

Examples

curl -X GET https://api.pickaxe.co/v1/studio/emails/magicLink \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_TOKEN"

Response Shape

{
  "success": true,
  "data": {
    "studioId": "studio-123",
    "type": "magicLink",
    "subject": "Log in to {{studio.name}}",
    "body": "<!doctype html>..."
  }
}

PATCH /studio/emails/<template_type>

Update the subject, HTML body, or both for one authentication email template in the current studio. At least one field is required. A partial update preserves the template's other saved value, or uses its Pickaxe default when that value has not been customized. Template content may use {{studio.name}}, {{studio.image}}, and {{url}} variables.

  • Full URL: https://api.pickaxe.co/v1/studio/emails/<template_type>

Request Fields

  • template_type ("magicLink" | "emailVerification" | "passwordReset" | "invitation", required): The email template type to update. This is a URL path parameter.
  • subject (string, optional): A non-empty email subject. Supply subject, body, or both. May also be nested under a data object for compatibility with other Studio API requests. Example: Log in to {{studio.name}}
  • body (string, optional): A non-empty HTML email body. Supply subject, body, or both. May also be nested under a data object for compatibility with other Studio API requests. Example: <p>Use <a href='{{url}}'>this link</a> to continue.</p>

Examples

curl -X PATCH https://api.pickaxe.co/v1/studio/emails/magicLink \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-d '{
  "subject": "Log in to {{studio.name}}",
  "body": "<p>Use <a href='{{url}}'>this link</a> to continue.</p>"
}'

Response Shape

{
  "success": true,
  "data": {
    "studioId": "studio-123",
    "type": "magicLink",
    "subject": "Log in to {{studio.name}}",
    "body": "<p>Use <a href='{{url}}'>this link</a> to continue.</p>"
  }
}