AttendBeacon
Åbn arbejdsområdet

Begreber

Fejl

Hver afvisning er et RFC 9457-problem med en stabil kode. Forgren på koden; vis detaljen til et menneske.

Sådan ser et problem ud

Når API'et afviser et kald, svarer det med en status på 400 eller mere og en application/problem+json-body, som RFC 9457 beskriver det:

JSON
{
  "type": "https://attendbeacon.com/developers/errors#moduleOff",
  "title": "The module is switched off",
  "status": 409,
  "detail": "The Sponsors module is switched off for this event. Its organiser can switch it on under the event's Modules; nothing was deleted.",
  "instance": "/api/v1/events/b3ac0000-0000-4000-8000-000000000001/sponsors",
  "code": "moduleOff",
  "traceId": "00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01",
  "module": "sponsors",
  "error": "The Sponsors module is switched off for this event. ..."
}
  • code er det, din software forgrener på. Koderne er stabile: når de først er udgivet, omdøbes de aldrig.
  • detail er en sætning til et menneske: vis den i din log eller din brugerflade.
  • type linker til kodens række i tabellen nedenfor.
  • traceId hjælper AttendBeacons support med at finde kaldet; send det med, når du spørger.
  • Nogle koder har mere med: scope (det scope, en nøgle mangler), module, errors (hvert felt, der ikke er i orden), etag, taken, sessions.
  • error gentager detail for flows, der er bygget før problem details. Det bliver i v1; ny kode bør læse detail.

Felter, der ikke er i orden

invalidRequest angiver hvert felt med det, der er galt, så en formular kan vise beskeden ved siden af feltet:

JSON
{
  "status": 400,
  "code": "invalidRequest",
  "detail": "Some fields are not right; errors names each.",
  "errors": [
    { "field": "startDate", "message": "startDate is a date such as 2026-11-12." },
    { "field": "timeZone", "message": "timeZone is an IANA zone such as Europe/Amsterdam." }
  ]
}

En afvist tilmelding angiver også deltageren, talt fra 0, med en kode for det, der er galt: { "attendee": 0, "field": "email", "code": "notEmail" }.

Hvad du skal prøve igen

StatusPrøv igen?
400, 401, 403, 404, 409, 412, 422Nej: den samme forespørgsel afvises igen. Ret den først.
429Ja, efter det antal sekunder, der står i Retry-After. Se Kaldgrænser.
500, 502, 503, 504Ja, et par gange med stigende ventetid, og med den samme Idempotency-Key ved en POST. Se Idempotens.

Alle koder

KodeStatusHvad det betyder, og hvad du skal gøre
invalidKey401No working API key. No key was sent, or it is not one this platform made. Send it as Authorization: Bearer abk_... or in X-Api-Key.
keyExpired401The key has expired. The key's expiry date has passed. Make a new key in the workspace under Integrations, API & MCP.
keyRevoked401The key was revoked. Somebody revoked the key in the workspace. Make a new key.
wrongAudience401A token for another resource. A token an assistant got by signing in works where it was issued for: the MCP server (/mcp) or the REST API (/api/v1).
invalidOrigin403Not from this origin. The MCP server takes browser requests from AttendBeacon's own origin only; servers and command-line clients send no Origin.
missingScope403The key lacks a scope. The key works but may not do this; scope names the scope it needs. Scopes are chosen when a key is made.
peopleScope403Personal data needs people:read. This call is about people by name or address, which needs the people:read scope as well.
notFound404Not found. There is no such resource in this key's workspace. Another workspace's ids read as not found.
eventNotFound404No such event. There is no such event in this key's workspace.
attendeeNotFound404No such attendee. There is no such attendee at this event.
noDoor404No such door. There is no such door at this event.
moduleOff409The module is switched off. The event's organiser switched this feature off under the event's Modules; module names it. Nothing was deleted: switched on again, its data is back.
onlineEvent409An online event has no doors. Check-in and other door features do not apply to an online event.
alreadyCancelled409Already cancelled. The ticket is already cancelled.
clash409The room is taken. Another session is in the room at that time; sessions names it. Send allowClash: true to place it anyway.
slugTaken409The address is taken. Another event already has this slug.
historyNeedsLicence409A licence is needed first. Reopening an earlier edition above the free limit needs its licence, bought in the workspace.
endsCommunity409This would end the community status. A paid ticket ends an event's free community status above the free limit; confirm in the workspace.
codeTaken409The code exists. The event already has a discount code with these letters.
capacityBelowTaken409Capacity below what is sold. The capacity would be lower than the places already taken; taken says how many.
idempotencyKeyInUse409The same request is still running. A request with this Idempotency-Key is still being handled. Wait a moment and send it again.
preconditionFailed412Changed since you read it. If-Match does not name the resource as it is now: somebody changed it. Read it again, then send the change.
idempotencyKeyReused422Idempotency-Key used for another request. This Idempotency-Key was used within 24 hours for a request with another method, path or body. Use a new key for a new request.
invalidRequest400The request is not valid. A field or parameter is missing or wrong; errors names each, with what is wrong.
invalidBody400The body is not readable. The body is not JSON, or a field has the wrong type.
invalidCursor400The cursor is not valid. Pass nextCursor exactly as a list returned it, with the same filters.
invalidUpdatedSince400updatedSince is not a moment. updatedSince is an ISO 8601 moment such as 2026-10-09T08:00:00Z.
invalidSort400Unknown sort. sort is changed (oldest change first, the default) or -created (newest first).
invalidIdempotencyKey400Idempotency-Key is not valid. An Idempotency-Key is 1 to 255 visible ASCII characters; a UUID is a good one.
invalid400An attendee's details are not right. errors names which attendee (from 0) and which field: firstName, lastName, email, company, jobTitle or a question id, with what is wrong (required, tooLong, notEmail, notOption).
soldOut400Sold out. The ticket type has no places left; ticketTypeId names it. Sent as 400 since v1 began, kept so for flows that branch on it.
unknownTicket400No such ticket type. ticketTypeId is not a ticket type of this event.
empty400Nobody to register. Send at least one attendee.
tooMany400Too many at once. At most 50 attendees in one request; send more requests.
registrationRefused400The registration was refused. Another reason the order was refused; reason says which, such as addOnSoldOut or namesLaterNotOffered.
eventType400Not an event type. event is one of the webhook event types (GET /webhooks/event-types).
webhookUrl400Not an address. url is an absolute https address without user name or fragment, at most 2,000 characters.
webhookHttps400Not https. url must be https.
webhookPrivate400Not a public address. url points at a private, loopback or link-local address, which AttendBeacon never calls.
tooManyHooks400Too many subscriptions. A workspace has at most 200 automation subscriptions. Switch off flows or Zaps it no longer needs.
tooManyEndpoints400Too many webhook endpoints. A workspace has at most 20 webhook endpoints. Remove one it no longer needs.
webhooksUnavailable503Webhooks are not available here. This deployment keeps no signing secrets, so endpoints cannot be added or given a new secret.
demoWorkspace403The demonstration is read-only. The demonstration workspace cannot be changed through the API.
rateLimited429Too many requests. The key made more than its calls a minute. Retry-After says when to try again; RateLimit says what is left.
serverError500Something went wrong here. An error on AttendBeacon's side. Retry with the same Idempotency-Key; traceId helps support find it.

Sådan håndterer du dem

const response = await fetch(url, { headers });
if (!response.ok) {
  const problem = await response.json();
  switch (problem.code) {
    case "rateLimited":
      await new Promise((resolve) => setTimeout(resolve, Number(response.headers.get("Retry-After")) * 1000));
      break; // and try again
    case "moduleOff":
      console.warn(`Skipping: ${problem.module} is switched off for this event.`);
      break;
    default:
      throw new Error(`${problem.code}: ${problem.detail} (trace ${problem.traceId})`);
  }
}

Guiderne og dette site er på dit sprog. API-referencens egne beskrivelser er på engelsk, ligesom API'et selv.