RelayAPI
Guides

Signatures

Auto-append or prepend text blocks to your posts.

Overview

Signatures are short text blocks that can be automatically added to every new post. RelayAPI injects signatures server-side, so they work for both dashboard-created and API-created posts.

Each organization can have multiple signatures, but only one can be the default. The default signature is automatically applied to new posts unless explicitly skipped.

How It Works

  1. Create a signature with a name, content, and position (append or prepend)
  2. Set one as default — it will automatically be added to new posts
  3. Skip per-post by passing skip_signature: true when creating a post via the API
# Create a signature and set it as default
curl -X POST https://api.relayapi.dev/v1/signatures \
  -H "Authorization: Bearer $RELAY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Company Footer",
    "content": "\n---\nPowered by Acme Corp | acme.com",
    "position": "append",
    "is_default": true
  }'

Position

The position field controls where the signature is injected:

PositionBehavior
appendAdded after the post content (default)
prependAdded before the post content

The signature is separated from the post content by a double newline (\n\n).

Default Signature Mutex

Only one signature per organization can be the default. When you set a signature as default, all others are automatically cleared:

# Set a specific signature as default
curl -X POST https://api.relayapi.dev/v1/signatures/sig_abc123/set-default \
  -H "Authorization: Bearer $RELAY_API_KEY"

You can also set is_default: true when creating or updating a signature — the mutex is enforced automatically.

Skipping Signatures

Server-side signature injection is active during post creation. Pass skip_signature: true on POST /v1/posts to prevent the applicable default signature from being added to that post.

When skip_signature is omitted or false, RelayAPI looks up the organization's default signature and applies it to the shared text and each non-empty platform-specific text variant before publishing. Media-only variants with no text remain media-only.

SDK Usage

import Relay from "@relayapi/sdk";

const client = new Relay({ apiKey: "rlay_live_..." });

// Create a signature
const sig = await client.signatures.create({
  name: "Brand Footer",
  content: "\n---\nFollow us @acmecorp",
  position: "append",
  is_default: true,
});

// List all signatures
const { data } = await client.signatures.list();

// Get the default signature
const defaultSig = await client.signatures.getDefault();

// Set a different signature as default
await client.signatures.setDefault("sig_xyz789");

// Update a signature
await client.signatures.update("sig_abc123", {
  content: "\n---\nFollow us @newhandle",
});

// Delete a signature
await client.signatures.delete("sig_abc123");

API Endpoints

MethodEndpointDescription
POST/v1/signaturesCreate a signature
GET/v1/signaturesList signatures (paginated)
GET/v1/signatures/:idGet signature details
PATCH/v1/signatures/:idUpdate a signature
DELETE/v1/signatures/:idDelete a signature
GET/v1/signatures/defaultGet the default signature
POST/v1/signatures/:id/set-defaultSet as default (clears others)

Found something wrong? Help us improve this page.

On this page