{"openapi":"3.1.0","info":{"title":"Activities in Amman Public API","version":"1.0.0","description":"Versioned, bearer-key REST API backed by PostgreSQL. All five endpoints require an explicit API key; no browser cookies or Admin credentials are accepted.\n\nCreate/revoke named keys at [Organizer account settings → API Keys](/account/settings#api-keys) using your Organizer login and current password. Choose activities:read (mandatory), optionally activities:write, and an expiration up to 366 days away. The secret appears once; only its SHA-256 hash is stored. Revocation is immediate. Frozen/deleted/non-Organizer accounts cannot use keys. Never embed secrets in public browser code, URLs, or source control.\n\nRead-only consumers see only PUBLISHED activities whose linked submission is APPROVED (or manually published Admin activities). Write-enabled Organizers can additionally GET their own submission by its canonical ID to inspect status, rejection reason, editable fields, and revision. Contact information, review notes, credentials and other Organizers' private submissions are never returned.\n\nPOST submits for Admin review (PENDING); it never publishes. PUT is full replacement of event fields plus an expected revision, and unpublishes any approved activity pending renewed review. DELETE withdraws with an If-Match revision; it does not erase data. UNDER_REVIEW submissions cannot be edited; withdrawal follows the dashboard policy. Admin review operations are not exposed.\n\nLimits: 60 requests/key/fixed minute stored atomically in PostgreSQL, plus a process-local address safety limit of 300/minute. Successful resource responses include quota headers; 429 includes Retry-After. JSON bodies are limited to 64 KiB; there are at most 10 active keys per Organizer. Requests with valid scope consume quota even if validation fails. No CORS credentials; bearer clients may call from any origin. Use HTTPS.\n\nResponses use {data, meta?, requestId} or {error: {code, message, details?}, requestId}. Version 1 is /api/v1; future breaking changes will use a new version. Swagger Try it out uses the real database. Authorize with a key explicitly; secrets are not persisted by this documentation."},"servers":[{"url":"/","description":"This HTTPS deployment"}],"tags":[{"name":"Activities","description":"Published activities and Organizer-owned submissions."}],"components":{"securitySchemes":{"ApiKey":{"type":"http","scheme":"bearer","bearerFormat":"aia_<64 hexadecimal characters>","description":"Paste the entire API key (without the Bearer prefix). activities:read is required for GET; activities:write for POST/PUT/DELETE."}},"schemas":{"ActivityInput":{"type":"object","properties":{"activityName":{"type":"string","minLength":3,"maxLength":50},"activityDescription":{"type":"string","minLength":20,"maxLength":500},"eventTitle":{"default":"","anyOf":[{"type":"string","maxLength":50},{"type":"string","const":""}]},"isFree":{"default":false,"type":"boolean"},"priceAmount":{"anyOf":[{"type":"number","exclusiveMinimum":0,"maximum":1000000,"multipleOf":0.01},{"type":"null"}]},"website":{"type":"string","maxLength":2048,"format":"uri"},"regWebsite":{"default":"","anyOf":[{"type":"string","maxLength":2048,"format":"uri"},{"type":"string","const":""}]},"startDate":{"type":"string","minLength":1,"format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"startTime":{"type":"string","minLength":1,"pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"endDate":{"type":"string","minLength":1,"format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"endTime":{"type":"string","minLength":1,"pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"isRecurring":{"default":false,"type":"boolean"},"locationName":{"type":"string","minLength":1,"maxLength":100},"venueAddress":{"type":"string","minLength":1,"maxLength":250},"lat":{"type":"number","minimum":31.82,"maximum":32.08},"lng":{"type":"number","minimum":35.77,"maximum":36.03},"isAccessible":{"default":false,"type":"boolean"},"sensoryFriendly":{"default":false,"type":"boolean"},"familyFriendly":{"default":false,"type":"boolean"},"requireRsvp":{"default":false,"type":"boolean"},"capacity":{"default":"","anyOf":[{"type":"string","maxLength":300},{"type":"string","const":""}]},"publicDatasetUrl":{"default":"","anyOf":[{"type":"string","maxLength":2048,"format":"uri"},{"type":"string","const":""}]},"moreInfo":{"default":"","anyOf":[{"type":"string","maxLength":1000},{"type":"string","const":""}]},"minAge":{"default":0,"type":"integer","minimum":0,"maximum":99},"maxAge":{"default":99,"type":"integer","minimum":0,"maximum":99},"categories":{"minItems":1,"maxItems":17,"type":"array","items":{"type":"string","enum":["soccer","basketball","swimming","tennis","dancing","track","volleyball","arts","games","writing","books","music","movies","museums","science","liveShows","nature"]}},"otherCategories":{"default":"","anyOf":[{"type":"string","maxLength":150},{"type":"string","const":""}]},"fileIds":{"maxItems":20,"type":"array","items":{"type":"string","minLength":1,"maxLength":64}},"removeFileIds":{"maxItems":0,"type":"array","items":{"type":"string","minLength":1,"maxLength":64}}},"required":["activityName","activityDescription","website","startDate","startTime","endDate","endTime","locationName","venueAddress","lat","lng","categories"],"additionalProperties":false,"description":"Full event data in Asia/Amman local dates/times. End must follow start. Coordinates must be within Amman. Paid events require priceAmount (JOD, positive, at most 1,000,000, cent precision); free events normalize it to null. minAge must not exceed maxAge. Contact/owner/moderation fields are forbidden and are taken from the authenticated Organizer. Attachments use existing Organizer-owned upload IDs: upload files through the Organizer browser form first. Omit fileIds/removeFileIds on PUT to preserve attachments; fileIds attaches available uploads and removeFileIds explicitly removes existing attachments on PUT only (POST must omit removals or supply an empty array), with existing type/size/count limits. This API does not accept binary uploads."},"ActivityUpdate":{"type":"object","properties":{"activityName":{"type":"string","minLength":3,"maxLength":50},"activityDescription":{"type":"string","minLength":20,"maxLength":500},"eventTitle":{"default":"","anyOf":[{"type":"string","maxLength":50},{"type":"string","const":""}]},"isFree":{"default":false,"type":"boolean"},"priceAmount":{"anyOf":[{"type":"number","exclusiveMinimum":0,"maximum":1000000,"multipleOf":0.01},{"type":"null"}]},"website":{"type":"string","maxLength":2048,"format":"uri"},"regWebsite":{"default":"","anyOf":[{"type":"string","maxLength":2048,"format":"uri"},{"type":"string","const":""}]},"startDate":{"type":"string","minLength":1,"format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"startTime":{"type":"string","minLength":1,"pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"endDate":{"type":"string","minLength":1,"format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"endTime":{"type":"string","minLength":1,"pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"isRecurring":{"default":false,"type":"boolean"},"locationName":{"type":"string","minLength":1,"maxLength":100},"venueAddress":{"type":"string","minLength":1,"maxLength":250},"lat":{"type":"number","minimum":31.82,"maximum":32.08},"lng":{"type":"number","minimum":35.77,"maximum":36.03},"isAccessible":{"default":false,"type":"boolean"},"sensoryFriendly":{"default":false,"type":"boolean"},"familyFriendly":{"default":false,"type":"boolean"},"requireRsvp":{"default":false,"type":"boolean"},"capacity":{"default":"","anyOf":[{"type":"string","maxLength":300},{"type":"string","const":""}]},"publicDatasetUrl":{"default":"","anyOf":[{"type":"string","maxLength":2048,"format":"uri"},{"type":"string","const":""}]},"moreInfo":{"default":"","anyOf":[{"type":"string","maxLength":1000},{"type":"string","const":""}]},"minAge":{"default":0,"type":"integer","minimum":0,"maximum":99},"maxAge":{"default":99,"type":"integer","minimum":0,"maximum":99},"categories":{"minItems":1,"maxItems":17,"type":"array","items":{"type":"string","enum":["soccer","basketball","swimming","tennis","dancing","track","volleyball","arts","games","writing","books","music","movies","museums","science","liveShows","nature"]}},"otherCategories":{"default":"","anyOf":[{"type":"string","maxLength":150},{"type":"string","const":""}]},"fileIds":{"maxItems":20,"type":"array","items":{"type":"string","minLength":1,"maxLength":64}},"removeFileIds":{"maxItems":20,"type":"array","items":{"type":"string","minLength":1,"maxLength":64}},"revision":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["activityName","activityDescription","website","startDate","startTime","endDate","endTime","locationName","venueAddress","lat","lng","categories","revision"],"additionalProperties":false,"description":"Full event data in Asia/Amman local dates/times. End must follow start. Coordinates must be within Amman. Paid events require priceAmount (JOD, positive, at most 1,000,000, cent precision); free events normalize it to null. minAge must not exceed maxAge. Contact/owner/moderation fields are forbidden and are taken from the authenticated Organizer. Attachments use existing Organizer-owned upload IDs: upload files through the Organizer browser form first. Omit fileIds/removeFileIds on PUT to preserve attachments; fileIds attaches available uploads and removeFileIds explicitly removes existing attachments on PUT only (POST must omit removals or supply an empty array), with existing type/size/count limits. This API does not accept binary uploads."},"PublicActivity":{"type":"object","properties":{"kind":{"const":"activity","type":"string"},"id":{"type":"string"},"status":{"const":"PUBLISHED","type":"string"},"slug":{"type":"string"},"title":{"type":"object","properties":{"en":{"type":"string"},"ar":{"type":"string"}},"required":["en","ar"],"additionalProperties":false},"description":{"type":"object","properties":{"en":{"type":"string"},"ar":{"type":"string"}},"required":["en","ar"],"additionalProperties":false},"organizerId":{"type":"string"},"organizer":{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"object","properties":{"en":{"type":"string"},"ar":{"type":"string"}},"required":["en","ar"],"additionalProperties":false},"website":{"type":["string","null"]}},"required":["id","name","website"],"additionalProperties":false},{"type":"null"}]},"category":{"type":"string","enum":["soccer","basketball","swimming","tennis","dancing","track","volleyball","arts","games","writing","books","music","movies","museums","science","liveShows","nature"]},"location":{"type":"object","properties":{"name":{"type":"object","properties":{"en":{"type":"string"},"ar":{"type":"string"}},"required":["en","ar"],"additionalProperties":false},"district":{"type":"object","properties":{"en":{"type":"string"},"ar":{"type":"string"}},"required":["en","ar"],"additionalProperties":false},"coords":{"type":"object","properties":{"lat":{"type":"number"},"lng":{"type":"number"}},"required":["lat","lng"],"additionalProperties":false}},"required":["name","district","coords"],"additionalProperties":false},"distanceKm":{"type":"number","description":"Approximate Haversine kilometres from supplied coordinates or Amman centre, rounded to one decimal place; available in list results."},"date":{"type":"string","format":"date"},"alwaysAvailable":{"type":"boolean"},"time":{"type":"object","properties":{"en":{"type":"string"},"ar":{"type":"string"},"es":{"type":"string"}},"required":["en","ar"],"additionalProperties":false},"schedule":{"type":"object","properties":{"startAt":{"type":"string","format":"date-time"},"endAt":{"type":"string","format":"date-time"}},"required":["startAt","endAt"],"additionalProperties":false},"ageMin":{"type":"integer"},"ageMax":{"type":"integer"},"price":{"type":"string","enum":["free","paid"]},"priceAmount":{"type":"number"},"accessibility":{"type":"object","properties":{"wheelchair":{"type":"boolean"},"sensory":{"type":"boolean"},"family":{"type":"boolean"}},"required":["wheelchair","sensory","family"],"additionalProperties":false},"images":{"type":"array","items":{"type":"string"}},"featured":{"type":"boolean"}},"required":["kind","id","status","slug","title","description","organizerId","organizer","category","location","date","time","ageMin","ageMax","price","accessibility","images"],"additionalProperties":false},"OwnedSubmission":{"type":"object","properties":{"kind":{"const":"submission","type":"string"},"id":{"type":"string"},"status":{"type":"string","enum":["PENDING","UNDER_REVIEW","APPROVED","REJECTED","WITHDRAWN"]},"revision":{"type":"integer","minimum":0},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"rejectionReason":{"type":["string","null"]},"fields":{"type":"object","properties":{"activityName":{"type":"string","minLength":3,"maxLength":50},"activityDescription":{"type":"string","minLength":20,"maxLength":500},"eventTitle":{"default":"","anyOf":[{"type":"string","maxLength":50},{"type":"string","const":""}]},"isFree":{"default":false,"type":"boolean"},"priceAmount":{"anyOf":[{"type":"number","exclusiveMinimum":0,"maximum":1000000,"multipleOf":0.01},{"type":"null"}]},"website":{"type":"string","maxLength":2048,"format":"uri"},"regWebsite":{"default":"","anyOf":[{"type":"string","maxLength":2048,"format":"uri"},{"type":"string","const":""}]},"startDate":{"type":"string","minLength":1,"format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"startTime":{"type":"string","minLength":1,"pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"endDate":{"type":"string","minLength":1,"format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"endTime":{"type":"string","minLength":1,"pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"isRecurring":{"default":false,"type":"boolean"},"locationName":{"type":"string","minLength":1,"maxLength":100},"venueAddress":{"type":"string","minLength":1,"maxLength":250},"lat":{"type":"number","minimum":31.82,"maximum":32.08},"lng":{"type":"number","minimum":35.77,"maximum":36.03},"isAccessible":{"default":false,"type":"boolean"},"sensoryFriendly":{"default":false,"type":"boolean"},"familyFriendly":{"default":false,"type":"boolean"},"requireRsvp":{"default":false,"type":"boolean"},"capacity":{"default":"","anyOf":[{"type":"string","maxLength":300},{"type":"string","const":""}]},"publicDatasetUrl":{"default":"","anyOf":[{"type":"string","maxLength":2048,"format":"uri"},{"type":"string","const":""}]},"moreInfo":{"default":"","anyOf":[{"type":"string","maxLength":1000},{"type":"string","const":""}]},"minAge":{"default":0,"type":"integer","minimum":0,"maximum":99},"maxAge":{"default":99,"type":"integer","minimum":0,"maximum":99},"categories":{"minItems":1,"maxItems":17,"type":"array","items":{"type":"string","enum":["soccer","basketball","swimming","tennis","dancing","track","volleyball","arts","games","writing","books","music","movies","museums","science","liveShows","nature"]}},"otherCategories":{"default":"","anyOf":[{"type":"string","maxLength":150},{"type":"string","const":""}]}},"required":["activityName","activityDescription","website","startDate","startTime","endDate","endTime","locationName","venueAddress","lat","lng","categories"],"additionalProperties":false}},"required":["kind","id","status","revision","createdAt","updatedAt","rejectionReason","fields"],"additionalProperties":false},"SingleResponse":{"type":"object","properties":{"data":{"oneOf":[{"$ref":"#/components/schemas/PublicActivity"},{"$ref":"#/components/schemas/OwnedSubmission"}],"discriminator":{"propertyName":"kind","mapping":{"activity":"#/components/schemas/PublicActivity","submission":"#/components/schemas/OwnedSubmission"}}},"requestId":{"type":"string","format":"uuid"}},"required":["data","requestId"],"additionalProperties":false},"SubmissionResponse":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/OwnedSubmission"},"requestId":{"type":"string","format":"uuid"}},"required":["data","requestId"],"additionalProperties":false},"ListResponse":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/PublicActivity"}},"meta":{"type":"object","properties":{"page":{"type":"integer"},"pageSize":{"type":"integer"},"total":{"type":"integer"},"pages":{"type":"integer"},"timeZone":{"const":"Asia/Amman","type":"string"}},"required":["page","pageSize","total","pages","timeZone"],"additionalProperties":false},"requestId":{"type":"string","format":"uuid"}},"required":["data","meta","requestId"],"additionalProperties":false},"Error":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["code","message"],"additionalProperties":false},"requestId":{"type":"string","format":"uuid"}},"required":["error","requestId"],"additionalProperties":false}}},"paths":{"/api/v1/activities":{"get":{"operationId":"listActivities","summary":"List published activities","description":"Paginated shared database search. Unknown/repeated query parameters are rejected. Lists never include private submissions, including your own.","tags":["Activities"],"security":[{"ApiKey":[]}],"x-required-scope":"activities:read","responses":{"200":{"description":"Published activities and pagination.","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per key per fixed minute.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Remaining requests in this window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Window reset, Unix seconds.","schema":{"type":"integer"}},"X-Request-ID":{"description":"Request correlation ID; never contains credentials.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListResponse"},"examples":{"published":{"value":{"data":[{"kind":"activity","id":"cmexample_submission","status":"PUBLISHED","slug":"amman-art-workshop","title":{"en":"Amman art workshop","ar":"ورشة فنون عمّان"},"description":{"en":"A creative workshop for families in Amman, led by local artists.","ar":"ورشة إبداعية للعائلات في عمّان"},"organizerId":"cmexample_directory","organizer":{"id":"cmexample_directory","name":{"en":"Amman arts centre","ar":"مركز عمّان للفنون"},"website":"https://example.com/events"},"category":"arts","location":{"name":{"en":"Amman arts centre","ar":"مركز عمّان للفنون"},"district":{"en":"Jabal Amman","ar":"جبل عمّان"},"coords":{"lat":31.9539,"lng":35.9106}},"date":"2027-01-10","alwaysAvailable":false,"time":{"en":"10:00 – 12:00","ar":"١٠:٠٠ – ١٢:٠٠","es":"10:00 – 12:00"},"schedule":{"startAt":"2027-01-10T07:00:00.000Z","endAt":"2027-01-10T09:00:00.000Z"},"ageMin":6,"ageMax":99,"price":"free","accessibility":{"wheelchair":false,"sensory":false,"family":true},"images":[],"featured":false,"distanceKm":0}],"meta":{"page":1,"pageSize":12,"total":1,"pages":1,"timeZone":"Asia/Amman"},"requestId":"00000000-0000-4000-8000-000000000000"}}}}}},"401":{"description":"Missing, invalid, expired or revoked API key. Browser cookies do not authenticate this API.","headers":{"WWW-Authenticate":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"failure":{"value":{"error":{"code":"INVALID_API_KEY","message":"Missing, invalid, expired or revoked API key. Browser cookies do not authenticate this API."},"requestId":"00000000-0000-4000-8000-000000000000"}}}}}},"403":{"description":"Insufficient scope or a frozen/restricted/non-Organizer account.","headers":{},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"failure":{"value":{"error":{"code":"SCOPE_REQUIRED","message":"Insufficient scope or a frozen/restricted/non-Organizer account."},"requestId":"00000000-0000-4000-8000-000000000000"}}}}}},"422":{"description":"Invalid JSON, unknown fields, invalid filters, invalid schedule/location/price or unavailable attachments.","headers":{},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"failure":{"value":{"error":{"code":"VALIDATION_ERROR","message":"Invalid JSON, unknown fields, invalid filters, invalid schedule/location/price or unavailable attachments."},"requestId":"00000000-0000-4000-8000-000000000000"}}}}}},"429":{"description":"Key limit 60/minute or address safety limit exceeded. Retry after the indicated delay.","headers":{"Retry-After":{"description":"Seconds before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"failure":{"value":{"error":{"code":"RATE_LIMITED","message":"Key limit 60/minute or address safety limit exceeded. Retry after the indicated delay."},"requestId":"00000000-0000-4000-8000-000000000000"}}}}}},"503":{"description":"Database or service temporarily unavailable. A failed response after commit can be retried: exact POSTs are deduplicated; PUT/DELETE revisions prevent repeated mutations.","headers":{},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"failure":{"value":{"error":{"code":"UNAVAILABLE","message":"Database or service temporarily unavailable. A failed response after commit can be retried: exact POSTs are deduplicated; PUT/DELETE revisions prevent repeated mutations."},"requestId":"00000000-0000-4000-8000-000000000000"}}}}}}},"parameters":[{"name":"search","in":"query","required":false,"description":"Search English/Arabic titles and descriptions.","schema":{"default":"","type":"string","maxLength":200}},{"name":"category","in":"query","required":false,"description":"Comma-separated category IDs: soccer, basketball, swimming, tennis, dancing, track, volleyball, arts, games, writing, books, music, movies, museums, science, liveShows, nature","schema":{"default":"","type":"string"}},{"name":"age","in":"query","required":false,"description":"Only activities suitable for this age; omitted means all ages.","schema":{"type":"integer","minimum":0,"maximum":99}},{"name":"ageMin","in":"query","required":false,"description":"Minimum age boundary for inclusive interval overlap search.","schema":{"type":"integer","minimum":0,"maximum":99}},{"name":"ageMax","in":"query","required":false,"description":"Maximum age boundary for inclusive interval overlap search.","schema":{"type":"integer","minimum":0,"maximum":99}},{"name":"date","in":"query","required":false,"description":"Asia/Amman calendar filter.","schema":{"default":"any","type":"string","enum":["any","today","tomorrow","thisWeek","thisWeekend"]}},{"name":"price","in":"query","required":false,"description":"Free, paid, or both.","schema":{"default":"both","type":"string","enum":["both","free","paid"]}},{"name":"distance","in":"query","required":false,"description":"Maximum distance in km; requires lat and lng unless any.","schema":{"default":"any","type":"string","enum":["5","10","15","25","any"]}},{"name":"lat","in":"query","required":false,"description":"User latitude; must accompany lng.","schema":{"type":"number","minimum":-90,"maximum":90}},{"name":"lng","in":"query","required":false,"description":"User longitude; must accompany lat.","schema":{"type":"number","minimum":-180,"maximum":180}},{"name":"location","in":"query","required":false,"description":"Venue/district search when coordinates are omitted; coordinate mode uses distance.","schema":{"default":"","type":"string","maxLength":200}},{"name":"wheelchair","in":"query","required":false,"description":"Require wheelchair access.","schema":{"default":"false","type":"string","enum":["true","false"]}},{"name":"sensory","in":"query","required":false,"description":"Require sensory-friendly activities.","schema":{"default":"false","type":"string","enum":["true","false"]}},{"name":"family","in":"query","required":false,"description":"Require family-friendly activities.","schema":{"default":"false","type":"string","enum":["true","false"]}},{"name":"sort","in":"query","required":false,"description":"Stable ID tie-breaker. nearest requires lat/lng.","schema":{"default":"newest","type":"string","enum":["newest","oldest","alphabetical","nearest"]}},{"name":"page","in":"query","required":false,"description":"1-based page; clamped to the last available page.","schema":{"default":1,"type":"integer","minimum":1,"maximum":1000000}},{"name":"pageSize","in":"query","required":false,"description":"12, 24 or 48 records.","schema":{"default":12,"anyOf":[{"type":"number","const":12},{"type":"number","const":24},{"type":"number","const":48}]}},{"name":"language","in":"query","required":false,"description":"Alphabetical sorting language. Stored activity translations are English/Arabic; Spanish time labels are provided.","schema":{"default":"en","type":"string","enum":["en","ar","es"]}}]},"post":{"operationId":"createActivity","summary":"Submit an activity for review","description":"Full event data in Asia/Amman local dates/times. End must follow start. Coordinates must be within Amman. Paid events require priceAmount (JOD, positive, at most 1,000,000, cent precision); free events normalize it to null. minAge must not exceed maxAge. Contact/owner/moderation fields are forbidden and are taken from the authenticated Organizer. Attachments use existing Organizer-owned upload IDs: upload files through the Organizer browser form first. Omit fileIds/removeFileIds on PUT to preserve attachments; fileIds attaches available uploads and removeFileIds explicitly removes existing attachments on PUT only (POST must omit removals or supply an empty array), with existing type/size/count limits. This API does not accept binary uploads. Exact repeat submissions are deduplicated per Organizer while the creation fingerprint is unchanged; edits and withdrawals clear it. 200 means existing, 201 newly created. A duplicate POST may reference only files already attached to that submission; use PUT to change attachments. Returned ID remains stable after approval.","tags":["Activities"],"security":[{"ApiKey":[]}],"x-required-scope":"activities:write","responses":{"200":{"description":"Identical existing submission.","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per key per fixed minute.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Remaining requests in this window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Window reset, Unix seconds.","schema":{"type":"integer"}},"X-Request-ID":{"description":"Request correlation ID; never contains credentials.","schema":{"type":"string"}},"ETag":{"description":"Quoted integer revision, e.g. \"0\".","schema":{"type":"string"}},"Location":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubmissionResponse"},"examples":{"submission":{"value":{"data":{"kind":"submission","id":"cmexample_submission","status":"PENDING","revision":0,"createdAt":"2026-11-13T09:00:00.000Z","updatedAt":"2026-11-13T09:00:00.000Z","rejectionReason":null,"fields":{"activityName":"Amman art workshop","activityDescription":"A creative workshop for families in Amman, led by local artists.","eventTitle":"","isFree":true,"website":"https://example.com/events","regWebsite":"","startDate":"2027-01-10","startTime":"10:00","endDate":"2027-01-10","endTime":"12:00","isRecurring":false,"locationName":"Amman arts centre","venueAddress":"Jabal Amman","lat":31.9539,"lng":35.9106,"isAccessible":false,"sensoryFriendly":false,"familyFriendly":true,"requireRsvp":false,"capacity":"","publicDatasetUrl":"","moreInfo":"","minAge":6,"maxAge":99,"categories":["arts"],"otherCategories":"","priceAmount":null}},"requestId":"00000000-0000-4000-8000-000000000000"}}}}}},"201":{"description":"New PENDING submission.","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per key per fixed minute.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Remaining requests in this window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Window reset, Unix seconds.","schema":{"type":"integer"}},"X-Request-ID":{"description":"Request correlation ID; never contains credentials.","schema":{"type":"string"}},"ETag":{"description":"Quoted integer revision, e.g. \"0\".","schema":{"type":"string"}},"Location":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubmissionResponse"},"examples":{"submission":{"value":{"data":{"kind":"submission","id":"cmexample_submission","status":"PENDING","revision":0,"createdAt":"2026-11-13T09:00:00.000Z","updatedAt":"2026-11-13T09:00:00.000Z","rejectionReason":null,"fields":{"activityName":"Amman art workshop","activityDescription":"A creative workshop for families in Amman, led by local artists.","eventTitle":"","isFree":true,"website":"https://example.com/events","regWebsite":"","startDate":"2027-01-10","startTime":"10:00","endDate":"2027-01-10","endTime":"12:00","isRecurring":false,"locationName":"Amman arts centre","venueAddress":"Jabal Amman","lat":31.9539,"lng":35.9106,"isAccessible":false,"sensoryFriendly":false,"familyFriendly":true,"requireRsvp":false,"capacity":"","publicDatasetUrl":"","moreInfo":"","minAge":6,"maxAge":99,"categories":["arts"],"otherCategories":"","priceAmount":null}},"requestId":"00000000-0000-4000-8000-000000000000"}}}}}},"401":{"description":"Missing, invalid, expired or revoked API key. Browser cookies do not authenticate this API.","headers":{"WWW-Authenticate":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"failure":{"value":{"error":{"code":"INVALID_API_KEY","message":"Missing, invalid, expired or revoked API key. Browser cookies do not authenticate this API."},"requestId":"00000000-0000-4000-8000-000000000000"}}}}}},"403":{"description":"Insufficient scope or a frozen/restricted/non-Organizer account.","headers":{},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"failure":{"value":{"error":{"code":"SCOPE_REQUIRED","message":"Insufficient scope or a frozen/restricted/non-Organizer account."},"requestId":"00000000-0000-4000-8000-000000000000"}}}}}},"404":{"description":"No accessible resource with this ID. Foreign private submissions are concealed.","headers":{},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"failure":{"value":{"error":{"code":"NOT_FOUND","message":"No accessible resource with this ID. Foreign private submissions are concealed."},"requestId":"00000000-0000-4000-8000-000000000000"}}}}}},"409":{"description":"Stale revision, concurrent change, or a submission currently under review. Fetch the latest revision.","headers":{},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"failure":{"value":{"error":{"code":"CONFLICT","message":"Stale revision, concurrent change, or a submission currently under review. Fetch the latest revision."},"requestId":"00000000-0000-4000-8000-000000000000"}}}}}},"413":{"description":"Body exceeds 65,536 UTF-8 bytes.","headers":{},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"failure":{"value":{"error":{"code":"PAYLOAD_TOO_LARGE","message":"Body exceeds 65,536 UTF-8 bytes."},"requestId":"00000000-0000-4000-8000-000000000000"}}}}}},"415":{"description":"Send Content-Type: application/json.","headers":{},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"failure":{"value":{"error":{"code":"UNSUPPORTED_MEDIA_TYPE","message":"Send Content-Type: application/json."},"requestId":"00000000-0000-4000-8000-000000000000"}}}}}},"422":{"description":"Invalid JSON, unknown fields, invalid filters, invalid schedule/location/price or unavailable attachments.","headers":{},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"failure":{"value":{"error":{"code":"VALIDATION_ERROR","message":"Invalid JSON, unknown fields, invalid filters, invalid schedule/location/price or unavailable attachments."},"requestId":"00000000-0000-4000-8000-000000000000"}}}}}},"429":{"description":"Key limit 60/minute or address safety limit exceeded. Retry after the indicated delay.","headers":{"Retry-After":{"description":"Seconds before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"failure":{"value":{"error":{"code":"RATE_LIMITED","message":"Key limit 60/minute or address safety limit exceeded. Retry after the indicated delay."},"requestId":"00000000-0000-4000-8000-000000000000"}}}}}},"503":{"description":"Database or service temporarily unavailable. A failed response after commit can be retried: exact POSTs are deduplicated; PUT/DELETE revisions prevent repeated mutations.","headers":{},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"failure":{"value":{"error":{"code":"UNAVAILABLE","message":"Database or service temporarily unavailable. A failed response after commit can be retried: exact POSTs are deduplicated; PUT/DELETE revisions prevent repeated mutations."},"requestId":"00000000-0000-4000-8000-000000000000"}}}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActivityInput"},"example":{"activityName":"Amman art workshop","activityDescription":"A creative workshop for families in Amman, led by local artists.","isFree":true,"website":"https://example.com/events","startDate":"2027-01-10","startTime":"10:00","endDate":"2027-01-10","endTime":"12:00","locationName":"Amman arts centre","venueAddress":"Jabal Amman","lat":31.9539,"lng":35.9106,"minAge":6,"maxAge":99,"categories":["arts"],"familyFriendly":true}}}}}},"/api/v1/activities/{id}":{"get":{"operationId":"getActivity","summary":"Retrieve an activity or your submission","description":"Read-only keys receive only public activity data. A write-enabled key receives its own submission representation (including revision and editable fields), even after approval. Other unpublished resources return 404.","tags":["Activities"],"security":[{"ApiKey":[]}],"x-required-scope":"activities:read","responses":{"200":{"description":"Public activity or owned submission.","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per key per fixed minute.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Remaining requests in this window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Window reset, Unix seconds.","schema":{"type":"integer"}},"X-Request-ID":{"description":"Request correlation ID; never contains credentials.","schema":{"type":"string"}},"ETag":{"description":"Quoted integer revision, e.g. \"0\".","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SingleResponse"},"examples":{"published":{"value":{"data":{"kind":"activity","id":"cmexample_submission","status":"PUBLISHED","slug":"amman-art-workshop","title":{"en":"Amman art workshop","ar":"ورشة فنون عمّان"},"description":{"en":"A creative workshop for families in Amman, led by local artists.","ar":"ورشة إبداعية للعائلات في عمّان"},"organizerId":"cmexample_directory","organizer":{"id":"cmexample_directory","name":{"en":"Amman arts centre","ar":"مركز عمّان للفنون"},"website":"https://example.com/events"},"category":"arts","location":{"name":{"en":"Amman arts centre","ar":"مركز عمّان للفنون"},"district":{"en":"Jabal Amman","ar":"جبل عمّان"},"coords":{"lat":31.9539,"lng":35.9106}},"date":"2027-01-10","alwaysAvailable":false,"time":{"en":"10:00 – 12:00","ar":"١٠:٠٠ – ١٢:٠٠","es":"10:00 – 12:00"},"schedule":{"startAt":"2027-01-10T07:00:00.000Z","endAt":"2027-01-10T09:00:00.000Z"},"ageMin":6,"ageMax":99,"price":"free","accessibility":{"wheelchair":false,"sensory":false,"family":true},"images":[],"featured":false},"requestId":"00000000-0000-4000-8000-000000000000"}},"owned":{"value":{"data":{"kind":"submission","id":"cmexample_submission","status":"PENDING","revision":0,"createdAt":"2026-11-13T09:00:00.000Z","updatedAt":"2026-11-13T09:00:00.000Z","rejectionReason":null,"fields":{"activityName":"Amman art workshop","activityDescription":"A creative workshop for families in Amman, led by local artists.","eventTitle":"","isFree":true,"website":"https://example.com/events","regWebsite":"","startDate":"2027-01-10","startTime":"10:00","endDate":"2027-01-10","endTime":"12:00","isRecurring":false,"locationName":"Amman arts centre","venueAddress":"Jabal Amman","lat":31.9539,"lng":35.9106,"isAccessible":false,"sensoryFriendly":false,"familyFriendly":true,"requireRsvp":false,"capacity":"","publicDatasetUrl":"","moreInfo":"","minAge":6,"maxAge":99,"categories":["arts"],"otherCategories":"","priceAmount":null}},"requestId":"00000000-0000-4000-8000-000000000000"}}}}}},"401":{"description":"Missing, invalid, expired or revoked API key. Browser cookies do not authenticate this API.","headers":{"WWW-Authenticate":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"failure":{"value":{"error":{"code":"INVALID_API_KEY","message":"Missing, invalid, expired or revoked API key. Browser cookies do not authenticate this API."},"requestId":"00000000-0000-4000-8000-000000000000"}}}}}},"403":{"description":"Insufficient scope or a frozen/restricted/non-Organizer account.","headers":{},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"failure":{"value":{"error":{"code":"SCOPE_REQUIRED","message":"Insufficient scope or a frozen/restricted/non-Organizer account."},"requestId":"00000000-0000-4000-8000-000000000000"}}}}}},"404":{"description":"No accessible resource with this ID. Foreign private submissions are concealed.","headers":{},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"failure":{"value":{"error":{"code":"NOT_FOUND","message":"No accessible resource with this ID. Foreign private submissions are concealed."},"requestId":"00000000-0000-4000-8000-000000000000"}}}}}},"422":{"description":"Invalid JSON, unknown fields, invalid filters, invalid schedule/location/price or unavailable attachments.","headers":{},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"failure":{"value":{"error":{"code":"VALIDATION_ERROR","message":"Invalid JSON, unknown fields, invalid filters, invalid schedule/location/price or unavailable attachments."},"requestId":"00000000-0000-4000-8000-000000000000"}}}}}},"429":{"description":"Key limit 60/minute or address safety limit exceeded. Retry after the indicated delay.","headers":{"Retry-After":{"description":"Seconds before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"failure":{"value":{"error":{"code":"RATE_LIMITED","message":"Key limit 60/minute or address safety limit exceeded. Retry after the indicated delay."},"requestId":"00000000-0000-4000-8000-000000000000"}}}}}},"503":{"description":"Database or service temporarily unavailable. A failed response after commit can be retried: exact POSTs are deduplicated; PUT/DELETE revisions prevent repeated mutations.","headers":{},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"failure":{"value":{"error":{"code":"UNAVAILABLE","message":"Database or service temporarily unavailable. A failed response after commit can be retried: exact POSTs are deduplicated; PUT/DELETE revisions prevent repeated mutations."},"requestId":"00000000-0000-4000-8000-000000000000"}}}}}}},"parameters":[{"name":"id","in":"path","required":true,"description":"Canonical ID: submission ID for an Organizer activity (stable through approval), otherwise the public Activity ID. Use the returned id/Location, never a browser slug.","schema":{"type":"string","pattern":"^[a-zA-Z0-9_-]{1,100}$"}}]},"put":{"operationId":"updateActivity","summary":"Replace and resubmit your activity","description":"Full event data in Asia/Amman local dates/times. End must follow start. Coordinates must be within Amman. Paid events require priceAmount (JOD, positive, at most 1,000,000, cent precision); free events normalize it to null. minAge must not exceed maxAge. Contact/owner/moderation fields are forbidden and are taken from the authenticated Organizer. Attachments use existing Organizer-owned upload IDs: upload files through the Organizer browser form first. Omit fileIds/removeFileIds on PUT to preserve attachments; fileIds attaches available uploads and removeFileIds explicitly removes existing attachments on PUT only (POST must omit removals or supply an empty array), with existing type/size/count limits. This API does not accept binary uploads. Full replacement: every required event field, including dates/times, and the latest revision must be sent. Optional omitted fields reset to their schema defaults; attachments are preserved unless explicitly changed. Published records are unpublished and resubmitted PENDING. A stale revision or UNDER_REVIEW returns 409.","tags":["Activities"],"security":[{"ApiKey":[]}],"x-required-scope":"activities:write","responses":{"200":{"description":"Updated PENDING submission.","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per key per fixed minute.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Remaining requests in this window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Window reset, Unix seconds.","schema":{"type":"integer"}},"X-Request-ID":{"description":"Request correlation ID; never contains credentials.","schema":{"type":"string"}},"ETag":{"description":"Quoted integer revision, e.g. \"0\".","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubmissionResponse"},"examples":{"submission":{"value":{"data":{"kind":"submission","id":"cmexample_submission","status":"PENDING","revision":0,"createdAt":"2026-11-13T09:00:00.000Z","updatedAt":"2026-11-13T09:00:00.000Z","rejectionReason":null,"fields":{"activityName":"Amman art workshop","activityDescription":"A creative workshop for families in Amman, led by local artists.","eventTitle":"","isFree":true,"website":"https://example.com/events","regWebsite":"","startDate":"2027-01-10","startTime":"10:00","endDate":"2027-01-10","endTime":"12:00","isRecurring":false,"locationName":"Amman arts centre","venueAddress":"Jabal Amman","lat":31.9539,"lng":35.9106,"isAccessible":false,"sensoryFriendly":false,"familyFriendly":true,"requireRsvp":false,"capacity":"","publicDatasetUrl":"","moreInfo":"","minAge":6,"maxAge":99,"categories":["arts"],"otherCategories":"","priceAmount":null}},"requestId":"00000000-0000-4000-8000-000000000000"}}}}}},"401":{"description":"Missing, invalid, expired or revoked API key. Browser cookies do not authenticate this API.","headers":{"WWW-Authenticate":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"failure":{"value":{"error":{"code":"INVALID_API_KEY","message":"Missing, invalid, expired or revoked API key. Browser cookies do not authenticate this API."},"requestId":"00000000-0000-4000-8000-000000000000"}}}}}},"403":{"description":"Insufficient scope or a frozen/restricted/non-Organizer account.","headers":{},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"failure":{"value":{"error":{"code":"SCOPE_REQUIRED","message":"Insufficient scope or a frozen/restricted/non-Organizer account."},"requestId":"00000000-0000-4000-8000-000000000000"}}}}}},"404":{"description":"No accessible resource with this ID. Foreign private submissions are concealed.","headers":{},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"failure":{"value":{"error":{"code":"NOT_FOUND","message":"No accessible resource with this ID. Foreign private submissions are concealed."},"requestId":"00000000-0000-4000-8000-000000000000"}}}}}},"409":{"description":"Stale revision, concurrent change, or a submission currently under review. Fetch the latest revision.","headers":{},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"failure":{"value":{"error":{"code":"CONFLICT","message":"Stale revision, concurrent change, or a submission currently under review. Fetch the latest revision."},"requestId":"00000000-0000-4000-8000-000000000000"}}}}}},"413":{"description":"Body exceeds 65,536 UTF-8 bytes.","headers":{},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"failure":{"value":{"error":{"code":"PAYLOAD_TOO_LARGE","message":"Body exceeds 65,536 UTF-8 bytes."},"requestId":"00000000-0000-4000-8000-000000000000"}}}}}},"415":{"description":"Send Content-Type: application/json.","headers":{},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"failure":{"value":{"error":{"code":"UNSUPPORTED_MEDIA_TYPE","message":"Send Content-Type: application/json."},"requestId":"00000000-0000-4000-8000-000000000000"}}}}}},"422":{"description":"Invalid JSON, unknown fields, invalid filters, invalid schedule/location/price or unavailable attachments.","headers":{},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"failure":{"value":{"error":{"code":"VALIDATION_ERROR","message":"Invalid JSON, unknown fields, invalid filters, invalid schedule/location/price or unavailable attachments."},"requestId":"00000000-0000-4000-8000-000000000000"}}}}}},"429":{"description":"Key limit 60/minute or address safety limit exceeded. Retry after the indicated delay.","headers":{"Retry-After":{"description":"Seconds before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"failure":{"value":{"error":{"code":"RATE_LIMITED","message":"Key limit 60/minute or address safety limit exceeded. Retry after the indicated delay."},"requestId":"00000000-0000-4000-8000-000000000000"}}}}}},"503":{"description":"Database or service temporarily unavailable. A failed response after commit can be retried: exact POSTs are deduplicated; PUT/DELETE revisions prevent repeated mutations.","headers":{},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"failure":{"value":{"error":{"code":"UNAVAILABLE","message":"Database or service temporarily unavailable. A failed response after commit can be retried: exact POSTs are deduplicated; PUT/DELETE revisions prevent repeated mutations."},"requestId":"00000000-0000-4000-8000-000000000000"}}}}}}},"parameters":[{"name":"id","in":"path","required":true,"description":"Canonical ID: submission ID for an Organizer activity (stable through approval), otherwise the public Activity ID. Use the returned id/Location, never a browser slug.","schema":{"type":"string","pattern":"^[a-zA-Z0-9_-]{1,100}$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActivityUpdate"},"example":{"activityName":"Amman art workshop","activityDescription":"A creative workshop for families in Amman, led by local artists.","isFree":true,"website":"https://example.com/events","startDate":"2027-01-10","startTime":"10:00","endDate":"2027-01-10","endTime":"12:00","locationName":"Amman arts centre","venueAddress":"Jabal Amman","lat":31.9539,"lng":35.9106,"minAge":6,"maxAge":99,"categories":["arts"],"familyFriendly":true,"revision":0}}}}},"delete":{"operationId":"withdrawActivity","summary":"Withdraw your activity","description":"Requires If-Match containing the quoted latest integer revision (e.g. \"0\"). Unpublishes any linked activity and sets WITHDRAWN without deleting records, files, or schedules. Repeating with the current revision is safe. Foreign resources return 404.","tags":["Activities"],"security":[{"ApiKey":[]}],"x-required-scope":"activities:write","responses":{"200":{"description":"WITHDRAWN submission.","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per key per fixed minute.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Remaining requests in this window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Window reset, Unix seconds.","schema":{"type":"integer"}},"X-Request-ID":{"description":"Request correlation ID; never contains credentials.","schema":{"type":"string"}},"ETag":{"description":"Quoted integer revision, e.g. \"0\".","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubmissionResponse"},"examples":{"withdrawn":{"value":{"data":{"kind":"submission","id":"cmexample_submission","status":"WITHDRAWN","revision":1,"createdAt":"2026-11-13T09:00:00.000Z","updatedAt":"2026-11-13T09:00:00.000Z","rejectionReason":null,"fields":{"activityName":"Amman art workshop","activityDescription":"A creative workshop for families in Amman, led by local artists.","eventTitle":"","isFree":true,"website":"https://example.com/events","regWebsite":"","startDate":"2027-01-10","startTime":"10:00","endDate":"2027-01-10","endTime":"12:00","isRecurring":false,"locationName":"Amman arts centre","venueAddress":"Jabal Amman","lat":31.9539,"lng":35.9106,"isAccessible":false,"sensoryFriendly":false,"familyFriendly":true,"requireRsvp":false,"capacity":"","publicDatasetUrl":"","moreInfo":"","minAge":6,"maxAge":99,"categories":["arts"],"otherCategories":"","priceAmount":null}},"requestId":"00000000-0000-4000-8000-000000000000"}}}}}},"401":{"description":"Missing, invalid, expired or revoked API key. Browser cookies do not authenticate this API.","headers":{"WWW-Authenticate":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"failure":{"value":{"error":{"code":"INVALID_API_KEY","message":"Missing, invalid, expired or revoked API key. Browser cookies do not authenticate this API."},"requestId":"00000000-0000-4000-8000-000000000000"}}}}}},"403":{"description":"Insufficient scope or a frozen/restricted/non-Organizer account.","headers":{},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"failure":{"value":{"error":{"code":"SCOPE_REQUIRED","message":"Insufficient scope or a frozen/restricted/non-Organizer account."},"requestId":"00000000-0000-4000-8000-000000000000"}}}}}},"404":{"description":"No accessible resource with this ID. Foreign private submissions are concealed.","headers":{},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"failure":{"value":{"error":{"code":"NOT_FOUND","message":"No accessible resource with this ID. Foreign private submissions are concealed."},"requestId":"00000000-0000-4000-8000-000000000000"}}}}}},"409":{"description":"Stale revision, concurrent change, or a submission currently under review. Fetch the latest revision.","headers":{},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"failure":{"value":{"error":{"code":"CONFLICT","message":"Stale revision, concurrent change, or a submission currently under review. Fetch the latest revision."},"requestId":"00000000-0000-4000-8000-000000000000"}}}}}},"422":{"description":"Invalid JSON, unknown fields, invalid filters, invalid schedule/location/price or unavailable attachments.","headers":{},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"failure":{"value":{"error":{"code":"VALIDATION_ERROR","message":"Invalid JSON, unknown fields, invalid filters, invalid schedule/location/price or unavailable attachments."},"requestId":"00000000-0000-4000-8000-000000000000"}}}}}},"429":{"description":"Key limit 60/minute or address safety limit exceeded. Retry after the indicated delay.","headers":{"Retry-After":{"description":"Seconds before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"failure":{"value":{"error":{"code":"RATE_LIMITED","message":"Key limit 60/minute or address safety limit exceeded. Retry after the indicated delay."},"requestId":"00000000-0000-4000-8000-000000000000"}}}}}},"503":{"description":"Database or service temporarily unavailable. A failed response after commit can be retried: exact POSTs are deduplicated; PUT/DELETE revisions prevent repeated mutations.","headers":{},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"failure":{"value":{"error":{"code":"UNAVAILABLE","message":"Database or service temporarily unavailable. A failed response after commit can be retried: exact POSTs are deduplicated; PUT/DELETE revisions prevent repeated mutations."},"requestId":"00000000-0000-4000-8000-000000000000"}}}}}}},"parameters":[{"name":"id","in":"path","required":true,"description":"Canonical ID: submission ID for an Organizer activity (stable through approval), otherwise the public Activity ID. Use the returned id/Location, never a browser slug.","schema":{"type":"string","pattern":"^[a-zA-Z0-9_-]{1,100}$"}},{"name":"If-Match","in":"header","required":true,"description":"Quoted current revision from your owned GET response/ETag.","schema":{"type":"string","pattern":"^\"[0-9]{1,9}\"$"},"example":"\"0\""}]}}}}