Building an Integration
Sync contacts, gifts, and consent from another system into Simply360 with a Team API key: key setup, writes that are safe to retry, duplicate handling, consent import, webhooks, rate limits, and how gifts taken elsewhere are billed.
Overview
This guide walks through a typical server-to-server integration: a system outside Simply360, such as an online giving platform, sends its contacts and gifts into a Team's Collections, and listens for changes made in Simply360. Everything here uses the public /v1 API with a Team API key. The same patterns apply to any record you sync.
The sections below follow the order you build it in:
- Prepare the Team and create a dedicated API key with only the scopes, data role, admin permissions, and IP addresses it needs.
- Write each contact and gift as a record, keyed by the other system's own ID so a record is never created twice, and retry safely after timeouts and temporary errors.
- Handle the Team's duplicate rules.
- Record gifts taken elsewhere without charging anyone again.
- Bring in consent answers people gave in the other system, if it collects any.
- Optionally register your own webhooks to hear about changes made in Simply360, and ignore the ones your own writes cause.
- Stay within the rate limits and wait as told when you go over them.
Prepare the Team
A Team Admin sets up the following once, in Simply360:
- Collections and fields. For example, a People Collection and a Gifts Collection linked to it. Give each one a plain text field for the other system's ID (for example External ID), and turn on its Unique value setting. A unique plain text field must have translations turned off. Simply360 then refuses a second record with the same value, which is what keeps retries and parallel workers from creating duplicates.
- A Team Role for the integration. It decides which Collections and fields the key can read and write. Grant view, create, and update on the Collections you sync, and nothing else.
Create the API key
In Team Administration → API Keys, a Team Admin creates a key for this integration only (see Authentication and API Keys):
- Scopes:
schema:read,records:read, andrecords:write. Record and consent routes check them; webhook management does not use scopes yet and relies on the admin permission below. - Data role: the Team Role above. A key without a data role cannot read or write records.
- Admin permissions: only the ones the integration uses. Team Administration → Integrations (
TEAM_ADMIN_INTEGRATIONS) lets it register and manage its own webhooks (see Receive changes with webhooks). Integrations → Consent Import (CONSENT_IMPORT) lets it bring in consent answers (see Bring in consent given elsewhere). Leave both off if you don't need them. These routes accept an API key only when the key itself holds the permission: the data role's feature permissions do not count, and a new key holds none. - IP allowlist: the addresses or CIDR ranges your servers send from. Requests from anywhere else are refused with
403 IP_NOT_ALLOWED. - Expiration date: optional. Plan the rotation before it.
Rate limits are not a key setting: every key gets the same fixed limits (see Rate limits and retries).
Creating the key asks the admin for an action code, and the full key (s360_live_...) is shown once. Store it in your secrets manager and send it as Authorization: Bearer <key>. Rotating the key later issues a new secret for the same key, so its settings, its retry keys, and its webhook subscriptions carry over; the old secret stops working immediately.
Read the schema
Field values are keyed by each field's Simply ID. Look them up once and keep them in your configuration rather than matching field names at run time:
import { Simply360, ApiError } from '@simply360/sdk';
const s360 = new Simply360({ apiKey: process.env.S360_API_KEY! });
// Every readable field, whether the key may write it, and the exact value shape to send.
const profile = await s360.dataCollections.getWriteProfile(process.env.GIFTS_COLLECTION_ID!);
See Data Collections and Data Records for the full read and write contracts.
Write records safely
Write each item from the other system as "find by external ID, then update or create". Three tools make this safe to repeat:
- Unique external ID. A create whose external ID already exists is refused with
409 DUPLICATE_ENTRY. Treat that as "someone already created it": search again and update instead. Idempotency-Key. Send a new random UUIDv4 with each create or update, and send the same key again only when you resend the same request after a timeout, a lost response, or a503. Record writes compare the body: the same key and body replays the original result without writing again, a retry that arrives while the first attempt is still running waits for it, and the same key with a different body returns409 IDEMPOTENCY_CONFLICT. Keys are kept for 90 days, for that API key. See Error Handling.expectedUpdatedAt. Pass theupdatedAtyou just read when you update. If someone changed the record since, the update is refused with409 RECORD_CONFLICTand nothing is written; read it again and decide.
const PEOPLE = process.env.PEOPLE_COLLECTION_ID!;
const EXTERNAL_ID = process.env.PEOPLE_EXTERNAL_ID_FIELD!;
async function findByExternalId(externalId: string, archived = false) {
const result = await s360.dataRecords.search({
dataCollectionSimplyId: PEOPLE,
filters: [
{ field: EXTERNAL_ID, operator: 'eq', value: externalId },
...(archived ? [{ field: 'isArchived', operator: 'eq', value: true }] : []),
],
limit: 1,
});
return result.data[0] ?? null;
}
function updatePerson(existing: { dataRecordSimplyId: string; updatedAt: string }, fields: Record<string, unknown>) {
return s360.dataRecords.update(existing.dataRecordSimplyId, {
dataCollectionSimplyId: PEOPLE,
fields,
expectedUpdatedAt: existing.updatedAt,
idempotencyKey: crypto.randomUUID(), // keep it if you resend this exact request
});
}
async function upsertPerson(externalId: string, fields: Record<string, unknown>) {
const existing = await findByExternalId(externalId);
if (existing) return updatePerson(existing, fields);
try {
return await s360.dataRecords.create({
dataCollectionSimplyId: PEOPLE,
fields: { ...fields, [EXTERNAL_ID]: externalId },
idempotencyKey: crypto.randomUUID(), // keep it if you resend this exact request
});
} catch (error) {
if (!(error instanceof ApiError) || error.code !== 'DUPLICATE_ENTRY') throw error;
// Another worker created it first: update that record.
const created = await findByExternalId(externalId);
if (created) return updatePerson(created, fields);
// Unique values also count archived records. An archived match needs a person to restore it;
// with no match at all, another unique field refused the create.
if (await findByExternalId(externalId, true)) throw new Error(`Person ${externalId} is archived in Simply360.`);
throw error;
}
}
Each lookup is a search, and searches have their own limit of 30 a minute per key. To sync more than that, keep a local map from external ID to dataRecordSimplyId, or look up a page of items at once with the in operator (up to 100 values) before writing them.
For backfills, batch create takes up to 100 records per request, each with its own UUIDv4 idempotencyKey. Results are per record: resend only the failed and NOT_ATTEMPTED entries with their original keys.
Duplicate rules
A Team can also have duplicate rules that compare other fields, such as name and email. They apply to API creates too:
409 CREATE_POLICY_REJECTED: a Block rule matched an existing record. The response does not say which record; search for it by the fields the rule compares and link or update it instead, or ask the Team Admin to review the rule.503 DUPLICATE_CHECK_UNAVAILABLEor503 DUPLICATE_REVIEW_UNAVAILABLE: the rules could not be checked or the match could not be queued. Nothing was written; resend the same request later with the sameIdempotency-Key.- Warn rules never block an API create, and Queue for review rules create the record and add the pair to the Team's review queue.
In a batch create, a record a rule or a unique field refuses is reported as RECORD_CREATE_FAILED with the reason in its message.
Record gifts taken elsewhere
A gift that was charged in another system is written to Simply360 as an ordinary record in your gifts Collection, with its amount, date, donor link, and the other system's transaction ID as field values. Simply360 does not charge, refund, or re-process it.
- No Simply360 payment platform fee. The payment platform fee applies only to payments processed through Simply360. A gift record written through the API is not a Simply360 payment, so it adds nothing to the platform fee; the other system's own fees are between you and that system.
- It is still a record. It is counted for the Team's plan the same way as any other record in that Collection. A create the plan can't accept is refused and writes nothing:
402 BILLING_RECORD_LIMIT_EXCEEDEDwhen the plan is full, or a403or409billing code (such asBILLING_RECORD_CREATION_TERMS_NOT_ACCEPTED) that a Team Admin has to resolve. Treat these as "stop and tell the Team", not as errors to retry. - Do not use Simply360 checkout or payment endpoints to record a gift that was already charged elsewhere; that would charge the donor again.
Bring in consent given elsewhere
When a person answers a consent question in the other system, for example a "keep me updated" checkbox at checkout, the integration can record that answer on the person's CONSENT field. A CONSENT field can't be set by a record write; use the consent action in Consent Fields. The key needs:
- the Integrations → Consent Import admin permission, which only an API key can use and which nothing else implies (without it,
403 CONSENT_IMPORT_PERMISSION_REQUIRED); - the
records:writescope, and a data role that can update the People Collection and itsCONSENTfield (the permission adds no data access); - for a grant or decline, a field whose allowed methods include Import and whose who-may-grant setting is for adults (
SELF_IF_ADULT) or minors (GUARDIAN_FOR_MINOR); a field set to staff-attested only refuses every import. A withdrawal needs neither.
Send the request with the key itself: a session token minted from the key cannot write consent.
await s360.dataRecordConsent.recordConsent(personId, MARKETING_CONSENT_FIELD, {
status: checkout.marketingOptIn ? 'GRANTED' : 'DECLINED',
grantor: { role: 'SELF', name: checkout.donorName },
method: 'IMPORT',
effectiveAt: checkout.completedAt, // when the person answered, not when you sync
sourceReference: checkout.paymentId,
sourceLabel: 'Spring gala checkout',
});
// An unsubscribe in the other system:
await s360.dataRecordConsent.withdrawConsent(personId, MARKETING_CONSENT_FIELD, {
method: 'IMPORT',
effectiveAt: unsubscribe.createdAt, // when the person opted out
sourceReference: unsubscribe.id,
});
- Method
IMPORTonly. Any other method from a key is refused with403 CONSENT_IMPORT_METHOD_REQUIRED, and a key cannot attach evidence.sourceReferenceis required on both actions andeffectiveAton a record; send the opt-out's owneffectiveAton a withdrawal too. Neither can be in the future. Leave outexpiresAtto use the field's default duration. - Only forward in time. A grant or decline is recorded only when it is dated after everything already in the person's consent history for that field: every grant, decline, withdrawal, and expiry, made in Simply360 or imported earlier (a grant counts no later than about when it was saved). On a tie the history wins. An unsubscribe sent without
effectiveAtmeans now and is never refused; one dated witheffectiveAtis refused only by a newer grant, and wins a tie. Otherwise nothing is recorded and you get409 CONSENT_SUPERSEDED_BY_NEWER_EVENT. Treat it as done, not as an error to retry. A grant that would already have expired gets400 CONSENT_IMPORT_ALREADY_EXPIRED. - Recorded as the key. The history shows the API client as the source, and the event's
recordedBynames the key, not a person. - Retries. Resending a grant or decline with the same
effectiveAtafter it was recorded gets409 CONSENT_SUPERSEDED_BY_NEWER_EVENT, which you already treat as done. Resending a withdrawal records it a second time. To resend either after a timeout without that, send anIdempotency-Keywith each consent request and reuse it only for the same request: a successful response is replayed for up to 24 hours. Unlike record writes, the body is not compared and a retry that arrives while the first attempt is still running is not held back (see Error Handling).
Receive changes with webhooks
To hear about records created, changed, or deleted in Simply360, register your own record webhooks with the integration's key. The key needs the Team Administration → Integrations admin permission, and its data role must be able to read every Collection you name (or have full data access for a subscription with no Collection filter). See Webhooks and Webhook Event Payloads.
A key manages only its own webhooks. It lists only the subscriptions it created, and any other subscription answers 404 NOT_FOUND, so two integrations on the same Team cannot see, change, or delete each other's. A session token minted from your key has the same view. People signed in to Simply360 with the Integrations permission see and manage every subscription, yours included. Rotating the key keeps its subscriptions; revoking it does not delete them, so ask a Team Admin to remove them when the integration is retired. A subscription made before Simply360 recorded which key created it (November 2026), or made in the app, belongs to no key: to manage it from the integration, have a Team Admin delete it and register it again with the key.
const webhook = await s360.webhooks.create({
eventType: 'DATA_RECORD_UPDATED',
targetUrl: 'https://sync.example.com/webhooks/simply360',
filterCriteria: { dataCollectionIds: [PEOPLE] },
});
// The signing secret is returned once. Store it with the API key.
const signingSecret = webhook.data.secret;
Create one subscription per event type you need: DATA_RECORD_CREATED, DATA_RECORD_UPDATED, DATA_RECORD_DELETED, and, for bulk operations, DATA_RECORDS_BULK_SYNCED. Then, in your receiver:
- Verify the signature.
X-S360-Signatureis the hex HMAC-SHA-256 of the raw request body with the subscription's secret. Compute it over the exact bytes you received, before parsing, and compare in constant time. - Acknowledge quickly. Return a
2xxwithin the subscription's timeout (30 seconds unless you change it) and do the work afterward. Anything else is retried. - Deduplicate. Delivery is at least once: failed deliveries are retried, so the same event can arrive more than once. Store each
X-Simply360-Event-Id(the same value aseventIdin the body) and skip ones you have seen. Applying an event to the other system by its external ID, rather than creating something new each time, makes a repeat harmless too. - Fetch what changed. Record events carry IDs, not field values. Read the record by
dataRecordSimplyIdwhen you need its current values.
Webhooks tell you about changes quickly, but they are not a complete log: an event can be lost, for example if your endpoint keeps failing until its retries run out. Reconcile on a schedule as well, by searching each Collection for records whose updatedAt is after your last successful sync.
Your own writes come back
Records written through the API are ordinary writes: they run the Team's Automations and send record webhooks exactly as edits made in Simply360 do, including to your own subscriptions. There is no option to skip either. Two consequences:
- Avoid sync loops. When a webhook arrives for a record you just wrote, compare the record's current values with what you last sent, or its
updatedAtwith the one your write returned, and ignore it if nothing new changed. A payload'smetadata.source(for exampleAPI_CREATE) tells you the change came through the API, but not which credential made it. - Check Automations with the Team. An Automation that, for example, emails a thank-you on each new gift will also run for gifts you import. Agree with the Team Admin which Automations should run before a backfill.
Rate limits and retries
Every API key gets the same fixed limits, counted separately for each key and each kind of request: 300 reads, 60 writes, 30 searches, and 10 batch requests a minute (see Rate Limiting). They cannot be raised for one key, and the deprecated rateLimitRequestsPerMinute setting on a key has no effect on /v1 requests. Session tokens minted from the key share its counters. A refused request returns 429 RATE_LIMIT_EXCEEDED and was not carried out.
429: wait the number of seconds inRetry-After, then resend the same request. WatchingX-RateLimit-Remainingon every response lets you slow down before you get there.503: resend the same request, with the sameIdempotency-Key, after the seconds inRetry-Afterwhen it is present, otherwise after an exponential backoff with jitter.NOT_ATTEMPTEDmeans nothing was written.- Timeouts and lost responses: resend with the same
Idempotency-Key; a write that already succeeded replays instead of running again. - Other
4xx: do not retry unchanged. Fix the request, or record the item for a person to look at.
Use batch endpoints for backfills and space out large jobs rather than sending bursts.
Checklist
- A dedicated API key with only the scopes, data role, admin permissions, and IP addresses the integration needs.
- A unique external ID field on every Collection you write, and "find, then update or create" for every item.
- A new
Idempotency-Keyper write, reused only to resend that exact write. expectedUpdatedAton updates where someone else may edit the record.- Handling for
409 DUPLICATE_ENTRY,409 CREATE_POLICY_REJECTED,409 RECORD_CONFLICT,429, and503. - Webhooks registered with the integration's own key, and receivers that verify
X-S360-Signature, answer quickly, deduplicate by event ID, and ignore their own writes, plus a scheduled reconciliation byupdatedAt. - Automations agreed with the Team Admin before a backfill, since API writes run them.
- Lookups that stay within the search limit, through a local ID map or
insearches, and a wait ofRetry-Afterseconds after a429. - Gifts taken elsewhere written as records, never through Simply360 checkout.
- Consent answers given elsewhere imported with method
IMPORT, the answer's own time, and its source ID, with409 CONSENT_SUPERSEDED_BY_NEWER_EVENTtreated as done.