Skip to content

Send a saved template

POST
/send/template
curl --request POST \
--url https://api.1up.gift/send/template \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "templateId": 1, "source": "example", "recipients": [ { "email": "example", "name": "example", "quantity": 1 } ], "codeQuantity": 1, "wrappingKey": "example", "fromName": "example", "message": "example", "sendAt": "2026-04-15T12:00:00Z", "accountId": 1, "expiryAfterDays": 1, "externalReference": "example" }'

The template supplies the gift, value, country and expiry; you supply who it goes to and how it is paid for. The greeting fields — wrappingKey, fromName and message — act as optional per-send overrides, falling back to the template’s when omitted.

Send a saved template.

object
templateId

The template to send, from GET /templates.

integer format: int32
source

Where this order came from, for your own reporting — for example zapier. Optional; defaults to api. Normalised to a short lower-case token.

null | string
recipients

Who receives the gift. Each recipient is emailed their code. Mutually exclusive with codeQuantity.

Array<object> | null

One recipient of a send. Each recipient produces quantity codes, each its own order line, and is emailed their code or codes.

object
email
required

The address the gift is emailed to.

null | string
name

The recipient’s name, used to address the gift. Optional.

null | string
quantity

How many codes this recipient gets, 1–1000. Defaults to 1.

integer format: int32
>= 1 <= 1000
codeQuantity

How many anonymous codes to generate, 1–5000. Nothing is emailed and no recipients are recorded. Mutually exclusive with recipients.

null | integer format: int32
wrappingKey

The gift wrapping — the box colours and emoji the recipient sees. Defaults to default. A template send falls back to the template’s wrapping when this is omitted.

null | string
fromName

Who the gift is from, as shown to the recipient. At most 32 characters.

null | string
0 <= 32 characters
message

A personal message shown with the gift. At most 256 characters.

null | string
0 <= 256 characters
sendAt

When to deliver, as an absolute UTC instant. Omit to send immediately. Must be in the future when supplied, and is ignored for a code batch, which is always generated straight away.

null | string format: date-time
accountId

The account to fund the order from, from GET /funding-accounts, in the order’s currency. Required if you pay for orders from a balance you top up. Omit it if you’re invoiced for orders instead.

null | integer format: int32
expiryAfterDays

Days after claiming that gifts expire. Enterprise plans only; ignored on every other plan, which use the default expiry policy.

null | integer format: int32
externalReference

An idempotency key from your own system, at most 128 characters. When supplied it is stamped on the order and must be unique for your customer: reusing a value — whatever else the request carries — is rejected with 409 Conflict, so a retried request cannot place the same gift twice. Omit it, or send blank, to opt out. It is echoed back on the response.

null | string
0 <= 128 characters
Examplegenerated
{
"templateId": 1,
"source": "example",
"recipients": [
{
"email": "example",
"name": "example",
"quantity": 1
}
],
"codeQuantity": 1,
"wrappingKey": "example",
"fromName": "example",
"message": "example",
"sendAt": "2026-04-15T12:00:00Z",
"accountId": 1,
"expiryAfterDays": 1,
"externalReference": "example"
}

The order was placed and the codes issued.

A placed order. All three send endpoints return this shape.

object
reference

The order’s public reference — an opaque, non-sequential key used to identify it everywhere else.

null | string
giftSelectionType

gift for a single product, or gifts for a collection.

null | string
value

The per-code face value.

number format: double
currency

The ISO code of the currency the order is priced in — the gift’s own currency.

null | string
codeCount

How many codes were issued.

integer format: int32
recipientCount

How many distinct recipients the codes went to. Zero for a code batch.

integer format: int32
totalCost

What the order cost you, in the order’s currency.

number format: double
deliveryMode

send when recipients were notified, or manual for an anonymous code batch.

null | string
scheduledFor

When the send is scheduled to go out, or null when it went immediately.

null | string format: date-time
externalReference

The idempotency key you stamped on this order, echoed back, or null if you sent none.

null | string
codes

The issued codes. Returned for a code batch; empty when recipients were emailed directly.

Array<object> | null

One issued gift code.

object
code

The code the recipient enters to claim their gift.

null | string
pin

The PIN that goes with the code.

null | string
redemptionUrl

A ready-to-share link that opens the claim page for this code.

null | string

The request is invalid — see the error field.

object
type
null | string
title
null | string
status
null | integer format: int32
detail
null | string
instance
null | string

The funding account has insufficient balance.

object
type
null | string
title
null | string
status
null | integer format: int32
detail
null | string
instance
null | string

The externalReference has already been used on another order.

object
type
null | string
title
null | string
status
null | integer format: int32
detail
null | string
instance
null | string