{"openapi":"3.1.0","jsonSchemaDialect":"https://json-schema.org/draft/2020-12/schema","info":{"title":"SignaGenius API","version":"1.0.0","description":"Tenant-scoped REST API for managed users, generated signatures, governed change requests, analytics, reusable audiences, secret-free workspace exports, and signed webhook subscriptions."},"servers":[{"url":"https://panel.signagenius.com/api/v1"}],"tags":[{"name":"Users"},{"name":"Signatures"},{"name":"Change requests"},{"name":"Analytics"},{"name":"Audiences"},{"name":"Webhooks"},{"name":"Migration"}],"paths":{"/users":{"get":{"tags":["Users"],"operationId":"listUsers","summary":"List managed users","parameters":[{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":200,"default":50}},{"name":"offset","in":"query","schema":{"type":"integer","minimum":0,"maximum":1000000,"default":0}}],"responses":{"200":{"description":"Paginated managed users.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserList"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"422":{"$ref":"#/components/responses/ValidationError"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}},"security":[{"bearerAuth":[]}],"x-required-scope":"users:read"},"post":{"tags":["Users"],"operationId":"createUser","summary":"Create a managed user","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserCreate"}}}},"responses":{"201":{"description":"Created user.","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/User"}},"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"description":"Duplicate email or licensed-seat conflict.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"422":{"$ref":"#/components/responses/ValidationError"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}},"security":[{"bearerAuth":[]}],"x-required-scope":"users:write"}},"/users/{id}":{"parameters":[{"name":"id","in":"path","required":true,"description":"Tenant-scoped record identifier.","schema":{"type":"string","format":"uuid"}}],"get":{"tags":["Users"],"operationId":"getUser","summary":"Get a managed user","responses":{"200":{"description":"Managed user.","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/User"}},"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"User not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"422":{"$ref":"#/components/responses/ValidationError"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}},"security":[{"bearerAuth":[]}],"x-required-scope":"users:read"},"patch":{"tags":["Users"],"operationId":"updateUser","summary":"Update a managed user","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserPatch"}}}},"responses":{"200":{"description":"Updated user.","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/User"}},"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"User not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"422":{"$ref":"#/components/responses/ValidationError"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}},"security":[{"bearerAuth":[]}],"x-required-scope":"users:write"},"delete":{"tags":["Users"],"operationId":"disableUser","summary":"Soft-disable a managed user","description":"Sets the user status to disabled. The record is retained for audit and referential integrity.","responses":{"200":{"description":"Disabled user.","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/User"}},"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"User not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"422":{"$ref":"#/components/responses/ValidationError"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}},"security":[{"bearerAuth":[]}],"x-required-scope":"users:write"}},"/users/batch":{"post":{"tags":["Users"],"operationId":"batchUsers","summary":"Apply up to 100 user mutations","description":"Returns 200 when every operation succeeds and 207 with a per-operation result when at least one operation fails. Reusing the same idempotency key with the same request returns the stored response.","parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{8,200}$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserBatchRequest"}}}},"responses":{"200":{"description":"Every operation succeeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserBatchResponse"}}}},"207":{"description":"Mixed per-operation results.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserBatchResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"description":"Idempotency key conflict or an identical request is still processing.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"422":{"$ref":"#/components/responses/ValidationError"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}},"security":[{"bearerAuth":[]}],"x-required-scope":"users:write"}},"/signatures":{"get":{"tags":["Signatures"],"operationId":"listGeneratedSignatures","summary":"List generated signatures","parameters":[{"name":"user_id","in":"query","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Up to 200 newest generated signatures.","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/GeneratedSignature"}}},"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"422":{"$ref":"#/components/responses/ValidationError"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}},"security":[{"bearerAuth":[]}],"x-required-scope":"signatures:read"}},"/change-requests":{"get":{"tags":["Change requests"],"operationId":"listChangeRequests","summary":"List governed profile change requests","parameters":[{"name":"status","in":"query","schema":{"type":"string","enum":["pending","approved","rejected"]}}],"responses":{"200":{"description":"Up to 500 newest change requests.","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ChangeRequest"}}},"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"422":{"$ref":"#/components/responses/ValidationError"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}},"security":[{"bearerAuth":[]}],"x-required-scope":"requests:read"}},"/analytics":{"get":{"tags":["Analytics"],"operationId":"getAnalytics","summary":"Get daily signature analytics","parameters":[{"name":"days","in":"query","schema":{"type":"integer","minimum":1,"maximum":365,"default":30}}],"responses":{"200":{"description":"Daily workspace metrics.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnalyticsResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"422":{"$ref":"#/components/responses/ValidationError"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}},"security":[{"bearerAuth":[]}],"x-required-scope":"analytics:read"}},"/audiences":{"get":{"tags":["Audiences"],"operationId":"listAudiences","summary":"List reusable campaign audiences","responses":{"200":{"description":"Audience lists with resolved members.","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Audience"}}},"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"422":{"$ref":"#/components/responses/ValidationError"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}},"security":[{"bearerAuth":[]}],"x-required-scope":"audiences:read"},"post":{"tags":["Audiences"],"operationId":"createOrReplaceAudience","summary":"Create or idempotently replace an API audience","description":"When source_external_id matches an existing API audience, its name and complete membership are replaced and the response status is 200.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AudienceInput"}}}},"responses":{"200":{"description":"Existing API audience replaced.","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Audience"}},"additionalProperties":false}}}},"201":{"description":"Audience created.","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Audience"}},"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"description":"Audience name conflict.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"422":{"$ref":"#/components/responses/ValidationError"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}},"security":[{"bearerAuth":[]}],"x-required-scope":"audiences:write"}},"/audiences/{id}":{"parameters":[{"name":"id","in":"path","required":true,"description":"Tenant-scoped record identifier.","schema":{"type":"string","format":"uuid"}}],"get":{"tags":["Audiences"],"operationId":"getAudience","summary":"Get an audience","responses":{"200":{"description":"Audience and members.","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Audience"}},"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"Audience not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"422":{"$ref":"#/components/responses/ValidationError"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}},"security":[{"bearerAuth":[]}],"x-required-scope":"audiences:read"},"put":{"tags":["Audiences"],"operationId":"replaceAudience","summary":"Replace an audience and its complete membership","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AudienceInput"}}}},"responses":{"200":{"description":"Replaced audience.","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Audience"}},"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"Audience not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"422":{"$ref":"#/components/responses/ValidationError"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}},"security":[{"bearerAuth":[]}],"x-required-scope":"audiences:write"},"delete":{"tags":["Audiences"],"operationId":"deleteAudience","summary":"Delete an audience","responses":{"200":{"description":"Deleted audience.","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/DeleteResult"}},"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"Audience not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"422":{"$ref":"#/components/responses/ValidationError"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}},"security":[{"bearerAuth":[]}],"x-required-scope":"audiences:write"}},"/webhooks":{"get":{"tags":["Webhooks"],"operationId":"listWebhooks","summary":"List webhook subscriptions","responses":{"200":{"description":"Webhook subscriptions without signing secrets.","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Webhook"}}},"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"422":{"$ref":"#/components/responses/ValidationError"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}},"security":[{"bearerAuth":[]}],"x-required-scope":"webhooks:write"},"post":{"tags":["Webhooks"],"operationId":"createWebhook","summary":"Create a signed webhook subscription","description":"The signing_secret is returned once and cannot be retrieved later.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookCreate"}}}},"responses":{"201":{"description":"Created subscription with one-time signing secret.","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/WebhookCreated"}},"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"422":{"$ref":"#/components/responses/ValidationError"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}},"security":[{"bearerAuth":[]}],"x-required-scope":"webhooks:write"}},"/webhooks/{id}":{"parameters":[{"name":"id","in":"path","required":true,"description":"Tenant-scoped record identifier.","schema":{"type":"string","format":"uuid"}}],"patch":{"tags":["Webhooks"],"operationId":"updateWebhook","summary":"Update or pause a webhook subscription","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookPatch"}}}},"responses":{"200":{"description":"Updated subscription.","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Webhook"}},"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"Webhook not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"422":{"$ref":"#/components/responses/ValidationError"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}},"security":[{"bearerAuth":[]}],"x-required-scope":"webhooks:write"},"delete":{"tags":["Webhooks"],"operationId":"deleteWebhook","summary":"Delete a webhook subscription","responses":{"200":{"description":"Deleted subscription.","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/DeleteResult"}},"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"Webhook not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"422":{"$ref":"#/components/responses/ValidationError"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}},"security":[{"bearerAuth":[]}],"x-required-scope":"webhooks:write"}},"/export":{"get":{"tags":["Migration"],"operationId":"exportWorkspace","summary":"Download a versioned secret-free workspace export","description":"Returns configuration and migration data while excluding authentication sessions, credentials, billing secrets, event history, audit logs, and rebuildable generated artifacts.","responses":{"200":{"description":"Workspace export.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspaceExport"}}},"headers":{"Content-Disposition":{"schema":{"type":"string"},"description":"Attachment filename."}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"422":{"$ref":"#/components/responses/ValidationError"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"}},"security":[{"bearerAuth":[]}],"x-required-scope":"exports:read"}}},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"sg_live_…","description":"Workspace API key. Keys are shown once, stored as hashes, scoped, expirable, revocable, and rate-limited."}},"responses":{"BadRequest":{"description":"Malformed JSON or request syntax.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Unauthorized":{"description":"Missing, invalid, expired, or revoked API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Forbidden":{"description":"The API key lacks the required scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"PayloadTooLarge":{"description":"The request body exceeds the endpoint's byte limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"ValidationError":{"description":"A request field or query parameter is invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"RateLimited":{"description":"Credential rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"schema":{"type":"integer","const":60},"description":"Seconds before retrying."}}},"ServerError":{"description":"The operation could not be completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"schemas":{"Error":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["message","status"],"properties":{"message":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599}},"additionalProperties":false}},"additionalProperties":false},"UserStatus":{"type":"string","enum":["active","disabled","invited","suspended"]},"User":{"type":"object","required":["id","email","status"],"properties":{"id":{"type":"string","format":"uuid"},"email":{"type":"string","format":"email","maxLength":320},"first_name":{"type":["string","null"],"maxLength":160},"last_name":{"type":["string","null"],"maxLength":160},"full_name":{"type":["string","null"],"maxLength":320},"job_title":{"type":["string","null"],"maxLength":320},"department":{"type":["string","null"],"maxLength":320},"phone":{"type":["string","null"],"maxLength":80},"mobile":{"type":["string","null"],"maxLength":80},"status":{"$ref":"#/components/schemas/UserStatus"},"primary_entity_id":{"type":["string","null"],"format":"uuid"},"custom_fields":{"type":"object","additionalProperties":true},"aliases":{"type":"array","items":{"type":"string","format":"email"}},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"additionalProperties":false},"UserCreate":{"type":"object","required":["email"],"properties":{"email":{"type":"string","format":"email","maxLength":320},"first_name":{"type":["string","null"],"maxLength":160},"last_name":{"type":["string","null"],"maxLength":160},"full_name":{"type":["string","null"],"maxLength":320},"job_title":{"type":["string","null"],"maxLength":320},"department":{"type":["string","null"],"maxLength":320},"phone":{"type":["string","null"],"maxLength":80},"mobile":{"type":["string","null"],"maxLength":80},"primary_entity_id":{"type":["string","null"],"format":"uuid"},"custom_fields":{"type":"object","additionalProperties":true}},"additionalProperties":false},"UserPatch":{"type":"object","minProperties":1,"properties":{"email":{"type":"string","format":"email","maxLength":320},"first_name":{"type":["string","null"],"maxLength":160},"last_name":{"type":["string","null"],"maxLength":160},"full_name":{"type":["string","null"],"maxLength":320},"job_title":{"type":["string","null"],"maxLength":320},"department":{"type":["string","null"],"maxLength":320},"phone":{"type":["string","null"],"maxLength":80},"mobile":{"type":["string","null"],"maxLength":80},"status":{"$ref":"#/components/schemas/UserStatus"},"primary_entity_id":{"type":["string","null"],"format":"uuid"},"custom_fields":{"type":"object","additionalProperties":true}},"additionalProperties":false},"UserList":{"type":"object","required":["data","meta"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/User"}},"meta":{"type":"object","required":["total","limit","offset"],"properties":{"total":{"type":"integer","minimum":0},"limit":{"type":"integer","minimum":1,"maximum":200},"offset":{"type":"integer","minimum":0}},"additionalProperties":false}},"additionalProperties":false},"UserBatchRequest":{"type":"object","required":["operations"],"properties":{"operations":{"type":"array","minItems":1,"maxItems":100,"items":{"oneOf":[{"type":"object","required":["operation","data"],"properties":{"operation":{"type":"string","const":"create"},"data":{"$ref":"#/components/schemas/UserCreate"}},"additionalProperties":false},{"type":"object","required":["operation","id","data"],"properties":{"operation":{"type":"string","const":"update"},"id":{"type":"string","format":"uuid"},"data":{"$ref":"#/components/schemas/UserPatch"}},"additionalProperties":false},{"type":"object","required":["operation","id"],"properties":{"operation":{"type":"string","enum":["disable","delete"]},"id":{"type":"string","format":"uuid"}},"additionalProperties":false}]}}},"additionalProperties":false},"UserBatchResponse":{"type":"object","required":["data","meta"],"properties":{"data":{"type":"array","items":{"type":"object","required":["index","operation","ok"],"properties":{"index":{"type":"integer","minimum":0},"operation":{"type":"string"},"ok":{"type":"boolean"},"data":{"type":"object","additionalProperties":true},"error":{"type":"string"}}}},"meta":{"type":"object","required":["total","succeeded","failed"],"properties":{"total":{"type":"integer","minimum":1,"maximum":100},"succeeded":{"type":"integer","minimum":0},"failed":{"type":"integer","minimum":0}}}}},"GeneratedSignature":{"type":"object","required":["id","user_id","scenario","html_content","content_hash","generated_at"],"properties":{"id":{"type":"string","format":"uuid"},"user_id":{"type":"string","format":"uuid"},"template_id":{"type":["string","null"],"format":"uuid"},"template_version":{"type":"integer","minimum":1},"scenario":{"type":"string","enum":["new_external","new_internal","reply_external","reply_internal"]},"html_content":{"type":"string"},"content_hash":{"type":"string","pattern":"^[a-f0-9]{64}$"},"generated_at":{"type":"string","format":"date-time"}}},"ChangeRequest":{"type":"object","required":["id","user_id","submitted_values","previous_values","status","created_at","updated_at"],"properties":{"id":{"type":"string","format":"uuid"},"user_id":{"type":"string","format":"uuid"},"submitted_values":{"type":"object","additionalProperties":true},"previous_values":{"type":"object","additionalProperties":true},"status":{"type":"string","enum":["pending","approved","rejected"]},"submitter_note":{"type":["string","null"]},"reviewer_note":{"type":["string","null"]},"reviewed_at":{"type":["string","null"],"format":"date-time"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}},"AnalyticsResponse":{"type":"object","required":["data","meta"],"properties":{"data":{"type":"array","items":{"type":"object","required":["day","impressions","clicks","unique_users"],"properties":{"day":{"type":"string","format":"date"},"impressions":{"type":"integer","minimum":0},"clicks":{"type":"integer","minimum":0},"unique_users":{"type":"integer","minimum":0}}}},"meta":{"type":"object","required":["days"],"properties":{"days":{"type":"integer","minimum":1,"maximum":365}}}}},"AudienceInput":{"type":"object","required":["name"],"anyOf":[{"required":["user_ids"]},{"required":["emails"]}],"properties":{"name":{"type":"string","minLength":1,"maxLength":120},"source_external_id":{"type":["string","null"],"maxLength":320},"user_ids":{"type":"array","items":{"type":"string","format":"uuid"},"minItems":1,"maxItems":10000},"emails":{"type":"array","items":{"type":"string","format":"email"},"minItems":1,"maxItems":10000}},"additionalProperties":false},"Audience":{"type":"object","required":["id","name","source","campaign_audience_list_members"],"properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"source":{"type":"string"},"source_external_id":{"type":["string","null"]},"campaign_audience_list_members":{"type":"array","items":{"type":"object","required":["user_id"],"properties":{"user_id":{"type":"string","format":"uuid"},"workspace_users":{"type":["object","null"],"properties":{"email":{"type":"string","format":"email"},"full_name":{"type":["string","null"]}}}}}},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}},"WebhookEvent":{"type":"string","enum":["user.created","user.updated","user.deleted","change_request.created","change_request.updated","signature.generated","lead.created","sync.completed","sync.failed"]},"Webhook":{"type":"object","required":["id","name","endpoint_url","events","enabled"],"properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string","minLength":1,"maxLength":160},"endpoint_url":{"type":"string","format":"uri","pattern":"^https://"},"events":{"type":"array","minItems":1,"items":{"$ref":"#/components/schemas/WebhookEvent"}},"enabled":{"type":"boolean"},"consecutive_failures":{"type":"integer","minimum":0},"last_delivery_at":{"type":["string","null"],"format":"date-time"},"created_at":{"type":"string","format":"date-time"}}},"WebhookCreate":{"type":"object","required":["name","endpoint_url","events"],"properties":{"name":{"type":"string","minLength":1,"maxLength":160},"endpoint_url":{"type":"string","format":"uri","pattern":"^https://"},"events":{"type":"array","minItems":1,"uniqueItems":true,"items":{"$ref":"#/components/schemas/WebhookEvent"}},"enabled":{"type":"boolean","default":true}},"additionalProperties":false},"WebhookPatch":{"type":"object","minProperties":1,"properties":{"name":{"type":"string","minLength":1,"maxLength":160},"endpoint_url":{"type":"string","format":"uri","pattern":"^https://"},"events":{"type":"array","minItems":1,"uniqueItems":true,"items":{"$ref":"#/components/schemas/WebhookEvent"}},"enabled":{"type":"boolean"}},"additionalProperties":false},"WebhookCreated":{"allOf":[{"$ref":"#/components/schemas/Webhook"},{"type":"object","required":["signing_secret"],"properties":{"signing_secret":{"type":"string"}}}]},"DeleteResult":{"type":"object","required":["id","deleted"],"properties":{"id":{"type":"string","format":"uuid"},"deleted":{"type":"boolean","const":true}},"additionalProperties":false},"WorkspaceExport":{"type":"object","required":["format","version","exportedAt","organization","entities","users","exclusions"],"properties":{"format":{"type":"string","const":"signagenius-workspace-export"},"version":{"type":"integer","const":1},"exportedAt":{"type":"string","format":"date-time"},"organization":{"type":"object","additionalProperties":true},"entities":{"type":"array","items":{"type":"object"}},"users":{"type":"array","items":{"type":"object"}},"entityMemberships":{"type":"array","items":{"type":"object"}},"signatureTemplates":{"type":"array","items":{"type":"object"}},"signatureBlocks":{"type":"array","items":{"type":"object"}},"signatureAssignments":{"type":"array","items":{"type":"object"}},"campaigns":{"type":"array","items":{"type":"object"}},"banners":{"type":"array","items":{"type":"object"}},"campaignTargets":{"type":"array","items":{"type":"object"}},"audienceLists":{"type":"array","items":{"type":"object"}},"audienceMembers":{"type":"array","items":{"type":"object"}},"attributeDefinitions":{"type":"array","items":{"type":"object"}},"workspacePolicy":{"type":["object","null"]},"securityPolicy":{"type":["object","null"]},"connectors":{"type":"array","items":{"type":"object"}},"physicalCards":{"type":"array","items":{"type":"object"}},"exclusions":{"type":"array","items":{"type":"string"}}}}}}}