Quickstart
Four calls take you from a fresh API key to a gift landing in someone’s inbox.
-
Check your key works
Section titled “Check your key works”GET /metells you which customer the key belongs to, which service account it acts as, and which environment it is valid in. If this works, everything else will.Terminal window curl https://api.1up.gift/me \-H "Authorization: Bearer $API_KEY"const res = await fetch('https://api.1up.gift/me', {headers: { Authorization: `Bearer ${process.env.API_KEY}` },})console.log(await res.json())using var http = new HttpClient { BaseAddress = new Uri("https://api.1up.gift") };http.DefaultRequestHeaders.Authorization =new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("API_KEY"));var me = await http.GetFromJsonAsync<JsonElement>("/me");Response {"customerId": 412,"customerName": "Northwind Ltd","serviceAccountId": 9031,"serviceAccountName": "Zapier integration","environment": "production"} -
Find something to send
Section titled “Find something to send”GET /productslists the gifts available to you. The fields you care about areid, which you send, andrequiresAmount, which tells you whether you must choose a value.Terminal window curl "https://api.1up.gift/products?country=GB&keyword=amazon" \-H "Authorization: Bearer $API_KEY"Response (trimmed) [{"id": 184,"name": "Amazon.co.uk","isDigital": true,"currency": "GBP","requiresAmount": true,"minAmount": 5.00,"maxAmount": 500.00,"label": "Amazon.co.uk - £5.00–£500.00"}] -
Choose how to pay
Section titled “Choose how to pay”If you pay for orders from a balance you top up, every send names the account to pay from.
GET /funding-accountslists the accounts your key can use; pick one in the gift’s currency and keep itsid. If you’re invoiced for orders instead, skip this step and leaveaccountIdout of the send.Terminal window curl https://api.1up.gift/funding-accounts \-H "Authorization: Bearer $API_KEY"Response [{"id": 5,"name": "Master float","isMaster": true,"currency": "GBP","balance": 12400.00,"label": "Master float (master float) (GBP): £12400.00"}] -
Send it
Section titled “Send it”POST /send/giftplaces the order, issues a code per recipient and emails each of them.Terminal window curl -X POST https://api.1up.gift/send/gift \-H "Authorization: Bearer $API_KEY" \-H "Content-Type: application/json" \-d '{"productId": 184,"value": 25.00,"country": "GB","accountId": 5,"fromName": "The Northwind team","message": "Thanks for a great quarter.","externalReference": "q4-bonus-2026-aisha","recipients": [{ "email": "aisha@example.com", "name": "Aisha" }]}'const res = await fetch('https://api.1up.gift/send/gift', {method: 'POST',headers: {Authorization: `Bearer ${process.env.API_KEY}`,'Content-Type': 'application/json',},body: JSON.stringify({productId: 184,value: 25.0,country: 'GB',accountId: 5,fromName: 'The Northwind team',message: 'Thanks for a great quarter.',externalReference: 'q4-bonus-2026-aisha',recipients: [{ email: 'aisha@example.com', name: 'Aisha' }],}),})const order = await res.json()var response = await http.PostAsJsonAsync("/send/gift", new{productId = 184,value = 25.00m,country = "GB",accountId = 5,fromName = "The Northwind team",message = "Thanks for a great quarter.",externalReference = "q4-bonus-2026-aisha",recipients = new[] { new { email = "aisha@example.com", name = "Aisha" } }});Response {"reference": "8KQ2-WRMT-9P4D","giftSelectionType": "gift","value": 25.00,"currency": "GBP","codeCount": 1,"recipientCount": 1,"totalCost": 25.00,"deliveryMode": "send","scheduledFor": null,"externalReference": "q4-bonus-2026-aisha","codes": []}
Where to next
Section titled “Where to next”- Authentication — getting and rotating a key
- Sending gifts — recipients, code batches and scheduling
- Paying for an order — which account the money comes from
- Webhooks — have orders pushed to you
