{"components":{"schemas":{"BatchBody":{"additionalProperties":false,"properties":{"products":{"items":{"$ref":"#/components/schemas/ProductUpsertBody"},"maxItems":500,"minItems":1,"type":["array","null"]}},"required":["products"],"type":"object"},"BatchResultBody":{"additionalProperties":false,"properties":{"results":{"description":"In the order of the request","items":{"$ref":"#/components/schemas/UpsertResultBody"},"type":"array"}},"required":["results"],"type":"object"},"CallNoteBody":{"additionalProperties":false,"properties":{"callId":{"format":"uuid","type":"string"},"missed":{"description":"Nobody answered the call","type":"boolean"},"reason":{"description":"How the call ended, such as no_answer or cancelled","type":"string"}},"required":["callId","missed"],"type":"object"},"CatalogBody":{"additionalProperties":false,"properties":{"errorCode":{"type":"string"},"errorMessage":{"type":"string"},"metaCatalogId":{"type":"string"},"status":{"description":"pending: not set up with Meta yet; no_number: the store has no WhatsApp number connected; failed: it could not be set up, errorCode and errorMessage say why","enum":["pending","no_number","active","failed"],"type":"string"}},"required":["status"],"type":"object"},"CategoriesBody":{"additionalProperties":false,"properties":{"categories":{"items":{"$ref":"#/components/schemas/CategoryBody"},"type":"array"}},"required":["categories"],"type":"object"},"CategoriesInputBody":{"additionalProperties":false,"properties":{"categories":{"description":"In display order; categories left out keep their names and follow these","items":{"$ref":"#/components/schemas/CategoryInputBody"},"maxItems":500,"minItems":1,"type":["array","null"]}},"required":["categories"],"type":"object"},"CategoryBody":{"additionalProperties":false,"properties":{"externalId":{"type":"string"},"name":{"type":"string"},"position":{"description":"Display order, from 0","format":"int32","type":"integer"}},"required":["externalId","name","position"],"type":"object"},"CategoryInputBody":{"additionalProperties":false,"properties":{"externalId":{"maxLength":100,"minLength":1,"pattern":"^[A-Za-z0-9._:-]+$","type":"string"},"name":{"maxLength":120,"minLength":1,"type":"string"}},"required":["externalId","name"],"type":"object"},"CategoryRefBody":{"additionalProperties":false,"properties":{"externalId":{"type":"string"},"name":{"type":"string"}},"required":["externalId","name"],"type":"object"},"ChoiceBody":{"additionalProperties":false,"properties":{"description":{"type":"string"},"id":{"type":"string"},"title":{"type":"string"}},"required":["title"],"type":"object"},"ContactBody":{"additionalProperties":false,"properties":{"externalRef":{"description":"The business's own id for this contact","type":"string"},"id":{"format":"uuid","type":"string"},"language":{"description":"Language of the automatic menu","enum":["en","so","ar"],"type":"string"},"name":{"type":"string"},"phone":{"description":"E.164","type":"string"},"tags":{"items":{"type":"string"},"type":"array"},"whatsappName":{"description":"The name on the customer's WhatsApp profile","type":"string"}},"required":["id","phone","name","language","tags"],"type":"object"},"ConversationBody":{"additionalProperties":false,"properties":{"assigneeMemberId":{"format":"uuid","type":"string"},"closedAt":{"format":"date-time","type":"string"},"contact":{"$ref":"#/components/schemas/ContactBody"},"createdAt":{"format":"date-time","type":"string"},"id":{"format":"uuid","type":"string"},"lastMessage":{"$ref":"#/components/schemas/LastMessageBody"},"lastMessageAt":{"format":"date-time","type":"string"},"numberId":{"description":"The business WhatsApp number the customer wrote to","format":"uuid","type":"string"},"pinned":{"type":"boolean"},"routingDeadline":{"description":"When a chat waiting for a menu choice goes to the default team","format":"date-time","type":"string"},"routingState":{"enum":["awaiting_menu","routed"],"type":"string"},"snoozedUntil":{"format":"date-time","type":"string"},"status":{"enum":["open","closed","snoozed"],"type":"string"},"teamId":{"description":"Absent while the customer has not chosen a team from the menu","format":"uuid","type":"string"},"unreadCount":{"format":"int64","type":"integer"},"updatedAt":{"format":"date-time","type":"string"},"windowExpiresAt":{"description":"Until then any message can be sent; after it only an approved template","format":"date-time","type":"string"}},"required":["id","numberId","contact","routingState","status","unreadCount","lastMessageAt","pinned","createdAt","updatedAt"],"type":"object"},"ConversationListOutputBody":{"additionalProperties":false,"properties":{"conversations":{"items":{"$ref":"#/components/schemas/ConversationBody"},"type":"array"},"next":{"description":"Pass as cursor for the next page; absent on the last page","type":"string"}},"required":["conversations"],"type":"object"},"CreateInputBody2":{"additionalProperties":false,"properties":{"category":{"enum":["marketing","utility","authentication"],"type":"string"},"definition":{"$ref":"#/components/schemas/TemplateDefinitionBody"},"language":{"description":"A WhatsApp language code, such as en_US, so or ar","maxLength":16,"minLength":2,"type":"string"},"name":{"description":"Lowercase letters, digits and underscores","maxLength":512,"minLength":1,"pattern":"^[a-z0-9_]+$","type":"string"}},"required":["name","language","category","definition"],"type":"object"},"CreatePartnerEndpointInputBody":{"additionalProperties":false,"properties":{"description":{"maxLength":200,"type":"string"},"events":{"description":"Event types from GET /partner/webhook-event-types","items":{"type":"string"},"maxItems":64,"minItems":1,"type":"array"},"url":{"description":"An https URL on the public internet","maxLength":2048,"minLength":8,"type":"string"}},"required":["url","events"],"type":"object"},"CreateSessionInputBody":{"additionalProperties":false,"properties":{"embedOrigin":{"description":"Sent by the Nexafon embed page: the origin of the page that frames it","maxLength":300,"type":"string"},"publishableKey":{"description":"pk_live_… or pk_test_…, or a partner's ppk_live_… or ppk_test_…","maxLength":128,"minLength":1,"type":"string"},"userToken":{"description":"A JWT (HS256) your server signs with one of the workspace's secret keys of the same mode: sub (your user id), jti (new for each token) and exp (at most 10 minutes ahead) are required; name, email, email_verified (a boolean) and role are optional. The first time a user signs in, email is required and email_verified must be true: that email links the user to the member with the same email, or to a new member. Later sign-ins use that link and ignore the email. With a partner's publishable key, the partner's server signs it with one of the partner's secret keys (psk_…) of the same mode that has the partner.stores:manage scope, and the session acts with no more than that key's store permissions: sub (the partner's user id), name, jti and exp are required, email and locale (en, so or ar) optional, and stores lists 1 to 50 of the partner's stores as {externalRef, role, teams?}: role is one of owner, admin, supervisor, agent or viewer, and teams, when present, the store's team ids the user is in. The user becomes or stays an active member of each store with that role","maxLength":32768,"minLength":1,"type":"string"}},"required":["publishableKey","userToken"],"type":"object"},"CreateWebhookEndpointInputBody":{"additionalProperties":false,"properties":{"description":{"maxLength":200,"type":"string"},"events":{"description":"Event types from GET /webhook-event-types","items":{"type":"string"},"maxItems":64,"minItems":1,"type":"array"},"url":{"description":"An https URL on the public internet","maxLength":2048,"minLength":8,"type":"string"}},"required":["url","events"],"type":"object"},"DayHoursBody":{"additionalProperties":false,"properties":{"closes":{"description":"Closing time, HH:MM, after the opening time","pattern":"^(([01][0-9]|2[0-3]):[0-5][0-9]|24:00)$","type":"string"},"day":{"enum":["sat","sun","mon","tue","wed","thu","fri"],"type":"string"},"opens":{"description":"Opening time, HH:MM in the workspace's time zone","pattern":"^([01][0-9]|2[0-3]):[0-5][0-9]$","type":"string"}},"required":["day","opens","closes"],"type":"object"},"DeliveryAreaBody":{"additionalProperties":false,"properties":{"active":{"description":"Only active areas are offered in checkout","type":"boolean"},"feeCents":{"description":"The delivery fee in US cents","format":"int64","maximum":100000000000,"minimum":0,"type":"integer"},"id":{"description":"Absent for a new area","format":"uuid","type":"string"},"name":{"description":"As the customer picks it in checkout","maxLength":30,"minLength":1,"type":"string"}},"required":["name","feeCents","active"],"type":"object"},"DeliveryBody":{"additionalProperties":false,"properties":{"areas":{"description":"In the order checkout lists them; an area left out is removed","items":{"$ref":"#/components/schemas/DeliveryAreaBody"},"maxItems":100,"type":"array"},"deliveryEnabled":{"type":"boolean"},"freeDeliveryAboveCents":{"description":"Delivery is free from this order amount (after discounts) in cents; never free when absent","format":"int64","maximum":100000000000,"minimum":0,"type":"integer"},"notifyStatuses":{"description":"Order statuses the customer gets a WhatsApp message for: awaiting_payment, paid, preparing, out_for_delivery, delivered, cancelled, refunded","items":{"type":"string"},"maxItems":7,"type":"array"},"pickupAddress":{"description":"Where pickup orders are collected; shown to the customer","maxLength":500,"type":"string"},"pickupEnabled":{"type":"boolean"},"requestLocation":{"description":"Ask the customer for a location pin after checkout when they chose delivery","type":"boolean"},"saved":{"description":"false while the store has not saved its delivery settings and the defaults apply","type":"boolean"}},"required":["saved","deliveryEnabled","pickupEnabled","pickupAddress","requestLocation","notifyStatuses","areas"],"type":"object"},"DeliverySettingsBody":{"additionalProperties":false,"properties":{"areas":{"description":"In the order checkout lists them; an area left out is removed","items":{"$ref":"#/components/schemas/DeliveryAreaBody"},"maxItems":100,"type":"array"},"deliveryEnabled":{"type":"boolean"},"freeDeliveryAboveCents":{"description":"Delivery is free from this order amount (after discounts) in cents; never free when absent","format":"int64","maximum":100000000000,"minimum":0,"type":"integer"},"notifyStatuses":{"description":"Order statuses the customer gets a WhatsApp message for: awaiting_payment, paid, preparing, out_for_delivery, delivered, cancelled, refunded","items":{"type":"string"},"maxItems":7,"type":"array"},"pickupAddress":{"description":"Where pickup orders are collected; shown to the customer","maxLength":500,"type":"string"},"pickupEnabled":{"type":"boolean"},"requestLocation":{"description":"Ask the customer for a location pin after checkout when they chose delivery","type":"boolean"}},"required":["deliveryEnabled","pickupEnabled","pickupAddress","requestLocation","notifyStatuses","areas"],"type":"object"},"EditInputBody":{"additionalProperties":false,"properties":{"category":{"description":"Unchanged when absent","enum":["marketing","utility"],"type":"string"},"definition":{"$ref":"#/components/schemas/TemplateDefinitionBody"}},"required":["definition"],"type":"object"},"FieldError":{"additionalProperties":false,"properties":{"location":{"description":"Where the error occurred, e.g. 'body.name' or 'path.id'","type":"string"},"message":{"description":"What is wrong with the value","type":"string"},"value":{"description":"The value that was rejected"}},"required":["message"],"type":"object"},"FlowButtonBody":{"additionalProperties":false,"properties":{"cta":{"description":"The button that opens the Flow","type":"string"}},"required":["cta"],"type":"object"},"FlowFieldBody":{"additionalProperties":false,"properties":{"name":{"type":"string"},"value":{"description":"Text, a number, true or false, or JSON for a list or group","type":"string"}},"required":["name","value"],"type":"object"},"FlowReplyBody":{"additionalProperties":false,"properties":{"fields":{"description":"The answers, sorted by name","items":{"$ref":"#/components/schemas/FlowFieldBody"},"type":"array"},"name":{"description":"The Flow's name","type":"string"}},"required":["fields"],"type":"object"},"LastMessageBody":{"additionalProperties":false,"properties":{"deleted":{"type":"boolean"},"direction":{"enum":["inbound","outbound","internal"],"type":"string"},"status":{"enum":["received","pending","sent","delivered","read","failed","saved"],"type":"string"},"text":{"description":"Text or caption; empty for a deleted message","type":"string"},"type":{"type":"string"}},"required":["direction","type","text","status","deleted"],"type":"object"},"ListMembersOutputBody":{"additionalProperties":false,"properties":{"members":{"items":{"$ref":"#/components/schemas/MemberBody"},"type":"array"}},"required":["members"],"type":"object"},"ListOutputBody":{"additionalProperties":false,"properties":{"count":{"description":"Recordings that count toward the plan limit; defaults are not counted","format":"int64","type":"integer"},"limit":{"description":"Most recordings the plan allows; 0 when unlimited is true","format":"int64","type":"integer"},"recordings":{"items":{"$ref":"#/components/schemas/RecordingBody"},"type":"array"},"unlimited":{"description":"The plan allows any number of recordings","type":"boolean"}},"required":["recordings","count","limit","unlimited"],"type":"object"},"ListOutputBody3":{"additionalProperties":false,"properties":{"next":{"description":"Pass as cursor for the next page; absent on the last page","type":"string"},"syncError":{"description":"Why the last sync failed","type":"string"},"syncedAt":{"description":"When the templates were last read in full from Meta","format":"date-time","type":"string"},"templates":{"description":"By name, then language","items":{"$ref":"#/components/schemas/TemplateBody"},"type":"array"}},"required":["templates"],"type":"object"},"ListTeamsOutputBody":{"additionalProperties":false,"properties":{"teams":{"items":{"$ref":"#/components/schemas/TeamDetailBody"},"type":"array"}},"required":["teams"],"type":"object"},"MediaBody":{"additionalProperties":false,"properties":{"caption":{"type":"string"},"fileId":{"description":"Set once the file is stored; open it with the message's media link","format":"uuid","type":"string"},"filename":{"type":"string"},"mimeType":{"type":"string"},"status":{"description":"pending while an inbound file is being copied from WhatsApp","enum":["pending","ready","failed"],"type":"string"},"voice":{"description":"A voice note recorded in WhatsApp","type":"boolean"}},"required":["status"],"type":"object"},"MediaSendBody":{"additionalProperties":false,"properties":{"fileId":{"description":"A file uploaded through the files API","format":"uuid","type":"string"},"filename":{"description":"Shown to the customer for documents","maxLength":240,"type":"string"}},"required":["fileId"],"type":"object"},"MemberBody":{"additionalProperties":false,"properties":{"createdAt":{"format":"date-time","type":"string"},"email":{"format":"email","type":"string"},"id":{"format":"uuid","type":"string"},"joinedAt":{"format":"date-time","type":"string"},"lastActiveAt":{"description":"When one of the member's sessions was last refreshed, to the day; absent without a session","format":"date-time","type":"string"},"name":{"description":"The name on the member's account; empty when they have not set one","type":"string"},"role":{"type":"string"},"status":{"enum":["invited","active","disabled"],"type":"string"},"teams":{"description":"The teams the member belongs to; they scope what the member sees","items":{"$ref":"#/components/schemas/TeamBody"},"type":"array"},"userId":{"type":"string"}},"required":["id","userId","email","name","role","status","createdAt","teams"],"type":"object"},"MenuBody":{"additionalProperties":false,"properties":{"body":{"type":"string"},"headerImage":{"description":"An https link to the image shown above the buttons","type":"string"},"listButton":{"description":"Set when the options show as a list instead of buttons","type":"string"},"options":{"items":{"$ref":"#/components/schemas/MenuOptionBody"},"type":"array"}},"required":["body","options"],"type":"object"},"MenuOptionBody":{"additionalProperties":false,"properties":{"id":{"type":"string"},"title":{"type":"string"}},"required":["id","title"],"type":"object"},"MessageBody":{"additionalProperties":false,"properties":{"call":{"$ref":"#/components/schemas/CallNoteBody","description":"A WhatsApp call of the customer's"},"choice":{"$ref":"#/components/schemas/ChoiceBody","description":"The customer's tap on a button or list row"},"clientMsgId":{"type":"string"},"conversationId":{"format":"uuid","type":"string"},"createdAt":{"format":"date-time","type":"string"},"deleted":{"type":"boolean"},"deliveredAt":{"format":"date-time","type":"string"},"direction":{"description":"internal: a note only the team sees","enum":["inbound","outbound","internal"],"type":"string"},"errorCode":{"type":"string"},"errorMessage":{"description":"Why the message failed, written for the agent","type":"string"},"failedAt":{"format":"date-time","type":"string"},"flow":{"$ref":"#/components/schemas/FlowButtonBody","description":"A business message whose button opens a WhatsApp Flow"},"flowReply":{"$ref":"#/components/schemas/FlowReplyBody","description":"The customer's answers to a WhatsApp Flow"},"forwarded":{"type":"boolean"},"id":{"format":"uuid","type":"string"},"location":{"$ref":"#/components/schemas/MessageLocationBody"},"locationRequest":{"description":"A business message asking the customer to share their location","type":"boolean"},"media":{"$ref":"#/components/schemas/MediaBody"},"menu":{"$ref":"#/components/schemas/MenuBody","description":"Buttons or list sent by the business"},"order":{"$ref":"#/components/schemas/OrderBody","description":"A cart the customer sent from the catalog"},"products":{"$ref":"#/components/schemas/MessageProductsBody","description":"Items of the store's catalog the shop sent"},"reactions":{"items":{"$ref":"#/components/schemas/ReactionBody"},"type":"array"},"readAt":{"format":"date-time","type":"string"},"replyToMessageId":{"format":"uuid","type":"string"},"sentAt":{"format":"date-time","type":"string"},"sentByMemberId":{"description":"Absent for the customer's messages and automatic ones","format":"uuid","type":"string"},"status":{"description":"pending until WhatsApp accepts the message; statuses never go back","enum":["received","pending","sent","delivered","read","failed","saved"],"type":"string"},"template":{"$ref":"#/components/schemas/TemplateRefBody"},"text":{"description":"Text, caption or note; empty for a deleted message","type":"string"},"type":{"enum":["text","image","video","audio","document","sticker","location","template","reaction","interactive","contacts","unsupported","note","call","order"],"type":"string"}},"required":["id","conversationId","direction","type","text","status","reactions","deleted","createdAt"],"type":"object"},"MessageLocationBody":{"additionalProperties":false,"properties":{"address":{"type":"string"},"latitude":{"format":"double","type":"number"},"longitude":{"format":"double","type":"number"},"name":{"type":"string"}},"required":["latitude","longitude"],"type":"object"},"MessageProductSectionBody":{"additionalProperties":false,"properties":{"retailerIds":{"description":"The catalog items' retailer ids","items":{"type":"string"},"type":"array"},"title":{"type":"string"}},"required":["retailerIds"],"type":"object"},"MessageProductsBody":{"additionalProperties":false,"properties":{"header":{"type":"string"},"kind":{"description":"product: one item; product_list: sections of items; carousel: a card per item; catalog_message: the whole catalog, with the item shown as its thumbnail","enum":["product","product_list","carousel","catalog_message"],"type":"string"},"sections":{"items":{"$ref":"#/components/schemas/MessageProductSectionBody"},"type":"array"}},"required":["kind","sections"],"type":"object"},"NewStoreBody":{"additionalProperties":false,"properties":{"country":{"description":"ISO 3166-1 alpha-2, such as SO","pattern":"^[A-Za-z]{2}$","type":"string"},"externalRef":{"description":"The partner's own id for the store; creating again with the same value returns the same store","maxLength":255,"minLength":1,"pattern":"^[A-Za-z0-9._:-]+$","type":"string"},"locale":{"enum":["en","so","ar"],"type":"string"},"name":{"maxLength":120,"minLength":1,"type":"string"},"owner":{"$ref":"#/components/schemas/StoreOwnerBody"},"timezone":{"description":"IANA time zone, such as Africa/Mogadishu","maxLength":64,"minLength":1,"type":"string"}},"required":["externalRef","name","owner","country","timezone","locale"],"type":"object"},"NumberListBody":{"additionalProperties":false,"properties":{"createdAt":{"format":"date-time","type":"string"},"id":{"format":"uuid","type":"string"},"kind":{"enum":["uploaded","past_orders"],"type":"string"},"minOrders":{"format":"int32","type":"integer"},"name":{"type":"string"},"phones":{"description":"Only when one list is read","items":{"type":"string"},"type":["array","null"]},"size":{"description":"Numbers in an uploaded list","format":"int32","type":"integer"},"updatedAt":{"format":"date-time","type":"string"},"usedBy":{"description":"Promotions that use the list","format":"int64","type":"integer"}},"required":["id","name","kind","size","usedBy","createdAt","updatedAt"],"type":"object"},"NumberListFields":{"additionalProperties":false,"properties":{"kind":{"description":"uploaded: the numbers given; past_orders: every customer with at least minOrders paid orders","enum":["uploaded","past_orders"],"type":"string"},"minOrders":{"description":"Required for past_orders","format":"int32","maximum":1000,"minimum":1,"type":"integer"},"name":{"maxLength":80,"minLength":1,"type":"string"},"phones":{"description":"International numbers with their country code, for uploaded","items":{"type":"string"},"maxItems":10000,"type":["array","null"]}},"required":["name","kind"],"type":"object"},"NumberListsBody":{"additionalProperties":false,"properties":{"lists":{"description":"By name","items":{"$ref":"#/components/schemas/NumberListBody"},"type":"array"}},"required":["lists"],"type":"object"},"OrderBody":{"additionalProperties":false,"properties":{"catalogId":{"type":"string"},"items":{"items":{"$ref":"#/components/schemas/OrderItemBody"},"type":"array"},"text":{"description":"The customer's note with the cart","type":"string"}},"required":["items"],"type":"object"},"OrderCancelBody":{"additionalProperties":false,"properties":{"reason":{"description":"Why, such as out of stock","maxLength":500,"type":"string"}},"type":"object"},"OrderItemBody":{"additionalProperties":false,"properties":{"currency":{"description":"ISO 4217 code","type":"string"},"itemPrice":{"description":"Decimal price per item as WhatsApp reported it; the order logic prices from the catalog","type":"string"},"productRetailerId":{"description":"The catalog item's retailer id","type":"string"},"quantity":{"format":"int64","type":"integer"}},"required":["productRetailerId","quantity"],"type":"object"},"OrderStatusBody":{"additionalProperties":false,"properties":{"note":{"description":"Kept in the order's history; for cancelled, the reason","maxLength":500,"type":"string"},"status":{"description":"Payment and checkout set the other statuses","enum":["preparing","out_for_delivery","delivered","cancelled"],"type":"string"}},"required":["status"],"type":"object"},"PartnerAppearanceBody":{"additionalProperties":false,"properties":{"colorMode":{"enum":["light","dark","auto"],"type":"string"},"font":{"enum":["ibm_plex_sans","inter","system"],"type":"string"},"primaryColor":{"description":"Brand colour, such as #0f766e","pattern":"^#[0-9a-fA-F]{6}$","type":"string"},"radius":{"description":"Corner radius in pixels","format":"int32","maximum":24,"minimum":0,"type":"integer"}},"required":["primaryColor","radius","font","colorMode"],"type":"object"},"PartnerMemberBody":{"additionalProperties":false,"properties":{"externalRef":{"description":"The partner's own id for the store","type":"string"},"memberId":{"format":"uuid","type":"string"},"partnerUserId":{"description":"The partner's id for the user: the sub of its user tokens","type":"string"},"role":{"type":"string"},"status":{"enum":["active","disabled"],"type":"string"},"teamIds":{"items":{"format":"uuid","type":"string"},"type":"array"},"workspaceId":{"format":"uuid","type":"string"}},"required":["partnerUserId","workspaceId","externalRef","memberId","role","status","teamIds"],"type":"object"},"PartnerPlanBody":{"additionalProperties":false,"properties":{"key":{"type":"string"},"name":{"description":"Empty when the plan no longer exists","type":"string"}},"required":["key","name"],"type":"object"},"PartnerPlanFeatureBody":{"additionalProperties":false,"properties":{"enabled":{"type":"boolean"},"key":{"type":"string"},"limit":{"description":"Limit features: the most allowed; absent means no limit","format":"int64","type":"integer"}},"required":["key","enabled"],"type":"object"},"PartnerProfileBody":{"additionalProperties":false,"properties":{"defaultPlan":{"$ref":"#/components/schemas/PartnerPlanBody","description":"The plan every new store starts on"},"features":{"description":"The features of the default plan's published version","items":{"$ref":"#/components/schemas/PartnerPlanFeatureBody"},"type":"array"},"id":{"format":"uuid","type":"string"},"name":{"type":"string"},"slug":{"type":"string"},"status":{"enum":["active","suspended"],"type":"string"}},"required":["id","name","slug","status","defaultPlan","features"],"type":"object"},"PreviewInputBody":{"additionalProperties":false,"properties":{"components":{"description":"The parameters, exactly as sending the template takes them","items":{"$ref":"#/components/schemas/TemplateComponentBody"},"maxItems":12,"type":"array"}},"type":"object"},"PreviewOutputBody":{"additionalProperties":false,"properties":{"body":{"type":"string"},"buttons":{"items":{"$ref":"#/components/schemas/TemplatePreviewButtonBody"},"type":"array"},"footer":{"type":"string"},"header":{"$ref":"#/components/schemas/TemplatePreviewHeaderBody"},"templateId":{"type":"string"},"text":{"description":"Header, body and footer as plain text","type":"string"}},"required":["templateId","body","buttons","text"],"type":"object"},"Problem":{"additionalProperties":false,"properties":{"code":{"description":"A stable, machine-readable error code","type":"string"},"detail":{"description":"A human-readable explanation of this occurrence","type":"string"},"errors":{"description":"The individual problems, such as one per invalid field","items":{"$ref":"#/components/schemas/FieldError"},"type":["array","null"]},"requestId":{"description":"The request id to quote when reporting the problem","type":"string"},"status":{"description":"The HTTP status code","format":"int64","type":"integer"},"title":{"description":"The HTTP status text","type":"string"},"type":{"description":"A link to the documentation of this error code, or about:blank","format":"uri","type":"string"}},"required":["type","title","status","code"],"type":"object"},"ProductBody":{"additionalProperties":false,"properties":{"active":{"type":"boolean"},"availability":{"enum":["in_stock","out_of_stock"],"type":"string"},"category":{"$ref":"#/components/schemas/CategoryRefBody"},"currency":{"enum":["USD"],"type":"string"},"description":{"type":"string"},"externalId":{"type":"string"},"imageUrls":{"items":{"type":"string"},"type":"array"},"name":{"type":"string"},"priceCents":{"format":"int64","type":"integer"},"saleEndsAt":{"format":"date-time","type":"string"},"salePriceCents":{"format":"int64","type":"integer"},"saleStartsAt":{"format":"date-time","type":"string"},"stock":{"format":"int32","type":"integer"},"sync":{"$ref":"#/components/schemas/SyncBody","description":"The product's worst item: a rejected size shows on the product"},"updatedAt":{"format":"date-time","type":"string"},"variants":{"items":{"$ref":"#/components/schemas/VariantViewBody"},"type":"array"}},"required":["externalId","name","description","imageUrls","priceCents","currency","availability","active","sync","variants","updatedAt"],"type":"object"},"ProductFields":{"additionalProperties":false,"properties":{"active":{"description":"false keeps the product but takes it out of the WhatsApp catalog; true when absent","type":"boolean"},"availability":{"default":"in_stock","enum":["in_stock","out_of_stock"],"type":"string"},"categoryExternalId":{"description":"A category upserted before; none when absent","maxLength":100,"pattern":"^[A-Za-z0-9._:-]*$","type":"string"},"currency":{"default":"USD","enum":["USD"],"type":"string"},"description":{"maxLength":5000,"type":"string"},"imageUrls":{"description":"HTTPS URLs on the public internet; Meta fetches them, Nexafon does not host them. The first is the main image","items":{"type":"string"},"maxItems":10,"minItems":1,"type":["array","null"]},"name":{"maxLength":200,"minLength":1,"type":"string"},"priceCents":{"description":"In US cents","format":"int64","maximum":100000000000,"minimum":0,"type":"integer"},"saleEndsAt":{"description":"Open-ended when absent","format":"date-time","type":"string"},"salePriceCents":{"description":"Below priceCents; shown while the sale window is open","format":"int64","maximum":100000000000,"minimum":0,"type":"integer"},"saleStartsAt":{"description":"Open from now when absent","format":"date-time","type":"string"},"stock":{"description":"Absent when the partner does not count stock; 0 shows the product out of stock","format":"int32","minimum":0,"type":"integer"},"variants":{"description":"Sizes or colours, each its own catalog item grouped under the product; the product itself is the one item when absent","items":{"$ref":"#/components/schemas/VariantBody"},"maxItems":50,"type":["array","null"]}},"required":["name","imageUrls","priceCents"],"type":"object"},"ProductUpsertBody":{"additionalProperties":false,"properties":{"active":{"description":"false keeps the product but takes it out of the WhatsApp catalog; true when absent","type":"boolean"},"availability":{"default":"in_stock","enum":["in_stock","out_of_stock"],"type":"string"},"categoryExternalId":{"description":"A category upserted before; none when absent","maxLength":100,"pattern":"^[A-Za-z0-9._:-]*$","type":"string"},"currency":{"default":"USD","enum":["USD"],"type":"string"},"description":{"maxLength":5000,"type":"string"},"externalId":{"description":"The partner's own id for the product","maxLength":100,"minLength":1,"pattern":"^[A-Za-z0-9._:-]+$","type":"string"},"imageUrls":{"description":"HTTPS URLs on the public internet; Meta fetches them, Nexafon does not host them. The first is the main image","items":{"type":"string"},"maxItems":10,"minItems":1,"type":["array","null"]},"name":{"maxLength":200,"minLength":1,"type":"string"},"priceCents":{"description":"In US cents","format":"int64","maximum":100000000000,"minimum":0,"type":"integer"},"saleEndsAt":{"description":"Open-ended when absent","format":"date-time","type":"string"},"salePriceCents":{"description":"Below priceCents; shown while the sale window is open","format":"int64","maximum":100000000000,"minimum":0,"type":"integer"},"saleStartsAt":{"description":"Open from now when absent","format":"date-time","type":"string"},"stock":{"description":"Absent when the partner does not count stock; 0 shows the product out of stock","format":"int32","minimum":0,"type":"integer"},"variants":{"description":"Sizes or colours, each its own catalog item grouped under the product; the product itself is the one item when absent","items":{"$ref":"#/components/schemas/VariantBody"},"maxItems":50,"type":["array","null"]}},"required":["externalId","name","imageUrls","priceCents"],"type":"object"},"ProductsBody":{"additionalProperties":false,"properties":{"catalog":{"$ref":"#/components/schemas/CatalogBody"},"next":{"description":"Pass as cursor for the next page; absent on the last page","type":"string"},"products":{"description":"By name","items":{"$ref":"#/components/schemas/ProductBody"},"type":"array"}},"required":["catalog","products"],"type":"object"},"PromotionBody":{"additionalProperties":false,"properties":{"active":{"type":"boolean"},"amountOffCents":{"description":"In US cents: per unit for a flash sale, off the products in scope otherwise","format":"int64","maximum":100000000000,"minimum":1,"type":"integer"},"categoryExternalIds":{"items":{"type":"string"},"type":"array"},"code":{"description":"The coupon code; compared without case","maxLength":32,"type":"string"},"combinable":{"description":"Adds to the other combinable promotions; otherwise only the best discount applies","type":"boolean"},"createdAt":{"format":"date-time","type":"string"},"endsAt":{"description":"Open-ended when absent","format":"date-time","type":"string"},"id":{"format":"uuid","type":"string"},"kind":{"description":"flash_sale: lowers the price of the products in scope inside its window and shows in the WhatsApp catalog; number_list: a discount for the numbers of a list; coupon: applies when the customer enters its code at checkout","enum":["flash_sale","number_list","coupon"],"type":"string"},"maxPerCustomer":{"description":"A coupon's or number-list discount's uses per customer number","format":"int32","minimum":1,"type":"integer"},"maxRedemptions":{"description":"A coupon's or number-list discount's uses across all customers","format":"int32","minimum":1,"type":"integer"},"minSubtotalCents":{"description":"Applies only from this cart subtotal in cents","format":"int64","maximum":100000000000,"minimum":0,"type":"integer"},"name":{"maxLength":120,"minLength":1,"type":"string"},"numberListId":{"description":"Only the numbers of this list get it; required for number_list","format":"uuid","type":"string"},"open":{"description":"Active and inside its window now","type":"boolean"},"percentOff":{"description":"Exactly one of percentOff and amountOffCents","format":"int32","maximum":100,"minimum":1,"type":"integer"},"productExternalIds":{"items":{"type":"string"},"type":"array"},"redemptions":{"description":"Orders that used the coupon","format":"int64","type":"integer"},"scope":{"enum":["all","products","categories"],"type":"string"},"startsAt":{"description":"Open from now when absent","format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"}},"required":["id","scope","productExternalIds","categoryExternalIds","active","open","redemptions","createdAt","updatedAt","name","kind"],"type":"object"},"PromotionFields":{"additionalProperties":false,"properties":{"active":{"description":"true when absent","type":"boolean"},"amountOffCents":{"description":"In US cents: per unit for a flash sale, off the products in scope otherwise","format":"int64","maximum":100000000000,"minimum":1,"type":"integer"},"categoryExternalIds":{"description":"The categories' external ids when scope is categories","items":{"type":"string"},"maxItems":100,"type":["array","null"]},"code":{"description":"The coupon code; compared without case","maxLength":32,"type":"string"},"combinable":{"description":"Adds to the other combinable promotions; otherwise only the best discount applies","type":"boolean"},"endsAt":{"description":"Open-ended when absent","format":"date-time","type":"string"},"kind":{"description":"flash_sale: lowers the price of the products in scope inside its window and shows in the WhatsApp catalog; number_list: a discount for the numbers of a list; coupon: applies when the customer enters its code at checkout","enum":["flash_sale","number_list","coupon"],"type":"string"},"maxPerCustomer":{"description":"A coupon's or number-list discount's uses per customer number","format":"int32","minimum":1,"type":"integer"},"maxRedemptions":{"description":"A coupon's or number-list discount's uses across all customers","format":"int32","minimum":1,"type":"integer"},"minSubtotalCents":{"description":"Applies only from this cart subtotal in cents","format":"int64","maximum":100000000000,"minimum":0,"type":"integer"},"name":{"maxLength":120,"minLength":1,"type":"string"},"numberListId":{"description":"Only the numbers of this list get it; required for number_list","format":"uuid","type":"string"},"percentOff":{"description":"Exactly one of percentOff and amountOffCents","format":"int32","maximum":100,"minimum":1,"type":"integer"},"productExternalIds":{"description":"The products' external ids when scope is products","items":{"type":"string"},"maxItems":500,"type":["array","null"]},"scope":{"default":"all","enum":["all","products","categories"],"type":"string"},"startsAt":{"description":"Open from now when absent","format":"date-time","type":"string"}},"required":["name","kind"],"type":"object"},"PromotionsBody":{"additionalProperties":false,"properties":{"promotions":{"description":"Newest first","items":{"$ref":"#/components/schemas/PromotionBody"},"type":"array"}},"required":["promotions"],"type":"object"},"ReactionBody":{"additionalProperties":false,"properties":{"by":{"enum":["contact","member"],"type":"string"},"emoji":{"type":"string"},"memberId":{"format":"uuid","type":"string"}},"required":["by","emoji"],"type":"object"},"RecordingBody":{"additionalProperties":false,"properties":{"createdAt":{"format":"date-time","type":"string"},"createdBy":{"type":"string"},"durationMs":{"description":"Length of the playable audio, measured by the server","format":"int64","type":"integer"},"failureCode":{"enum":["too_short","too_long","unreadable","processing_error"],"type":"string"},"failureReason":{"description":"Why the last upload failed, in English","type":"string"},"id":{"format":"uuid","type":"string"},"isDefault":{"description":"The workspace's fallback for its kind and language; it can be replaced but not deleted","type":"boolean"},"kind":{"enum":["greeting","option","fallback_closed","fallback_prayer","fallback_missed","hold","custom"],"type":"string"},"language":{"description":"Absent when it plays for callers of any language","enum":["en","so","ar"],"type":"string"},"name":{"type":"string"},"playable":{"description":"Calls can play it. A replacement that is processing or failed leaves the previous audio playing.","type":"boolean"},"size":{"description":"Size in bytes of the playable audio as uploaded","format":"int64","type":"integer"},"source":{"enum":["recorded","uploaded","default"],"type":"string"},"status":{"description":"State of the last upload","enum":["processing","ready","failed"],"type":"string"},"updatedAt":{"format":"date-time","type":"string"},"uses":{"description":"Where it plays; a recording in use can't be deleted","items":{"$ref":"#/components/schemas/UseBody"},"type":"array"}},"required":["id","name","kind","source","isDefault","status","playable","uses","createdBy","createdAt","updatedAt"],"type":"object"},"SDKSessionBody":{"additionalProperties":false,"properties":{"appearance":{"$ref":"#/components/schemas/PartnerAppearanceBody","description":"An exchange with a partner's key: the partner's default appearance for its stores' embeds"},"expiresAt":{"description":"Refresh the session before this","format":"date-time","type":"string"},"memberId":{"description":"A workspace's session: the member it acts as","format":"uuid","type":"string"},"mode":{"enum":["live","test"],"type":"string"},"name":{"description":"An exchange only: the user's name from the user token","type":"string"},"refreshUntil":{"description":"Refreshes keep the session going until this; then exchange a new user token","format":"date-time","type":"string"},"sessionId":{"format":"uuid","type":"string"},"stores":{"description":"An exchange with a partner's key: the stores the session opens, in the user token's order; GET /api/v1/me/workspaces lists them at any time","items":{"$ref":"#/components/schemas/SDKSessionStoreBody"},"type":"array"},"token":{"description":"The session token. Keep it in memory (web) or in the Keychain or Keystore (mobile), never in localStorage, and send it as Authorization: Bearer","type":"string"},"userId":{"type":"string"},"workspaceId":{"description":"A workspace's session: its workspace","format":"uuid","type":"string"}},"required":["token","expiresAt","refreshUntil","sessionId","userId","mode"],"type":"object"},"SDKSessionStoreBody":{"additionalProperties":false,"properties":{"externalRef":{"description":"The partner's own id for the store","type":"string"},"memberId":{"format":"uuid","type":"string"},"name":{"type":"string"},"role":{"description":"The user's role key in the store, such as agent","type":"string"},"workspaceId":{"format":"uuid","type":"string"}},"required":["workspaceId","externalRef","name","memberId","role"],"type":"object"},"SendBody":{"additionalProperties":false,"properties":{"clientMsgId":{"description":"Your id for this message: sending it again returns the message already queued instead of sending twice","maxLength":64,"minLength":1,"pattern":"^[A-Za-z0-9._:-]+$","type":"string"},"media":{"$ref":"#/components/schemas/MediaSendBody"},"replyToMessageId":{"description":"Quote this message","format":"uuid","type":"string"},"template":{"$ref":"#/components/schemas/TemplateSendBody","description":"The only kind of message allowed outside the 24-hour window"},"text":{"description":"The message, or the caption of an image, video or document","maxLength":4096,"type":"string"},"type":{"enum":["text","image","video","audio","document","sticker","template"],"type":"string"}},"required":["clientMsgId","type"],"type":"object"},"StartInputBody":{"additionalProperties":false,"properties":{"message":{"$ref":"#/components/schemas/SendBody","description":"An approved template"},"phone":{"description":"The customer's number with its country code","maxLength":32,"minLength":3,"type":"string"},"teamId":{"description":"The team the conversation belongs to; the routing's default team when it is one of yours","format":"uuid","type":"string"}},"required":["phone","message"],"type":"object"},"StartOutputBody":{"additionalProperties":false,"properties":{"conversation":{"$ref":"#/components/schemas/ConversationBody"},"message":{"$ref":"#/components/schemas/MessageBody"}},"required":["conversation","message"],"type":"object"},"StoreBody":{"additionalProperties":false,"properties":{"closedAt":{"description":"Set while the partner has closed the store","format":"date-time","type":"string"},"country":{"description":"ISO 3166-1 alpha-2","type":"string"},"createdAt":{"format":"date-time","type":"string"},"externalRef":{"description":"The partner's own id for the store","type":"string"},"locale":{"enum":["en","so","ar"],"type":"string"},"name":{"type":"string"},"owner":{"$ref":"#/components/schemas/StoreOwnerBody"},"status":{"enum":["trialing","active","past_due","suspended","cancelled"],"type":"string"},"timezone":{"type":"string"},"workspaceId":{"description":"Use it in /api/v1/workspaces/{workspaceId}/… to act in the store","format":"uuid","type":"string"}},"required":["workspaceId","externalRef","name","status","owner","country","timezone","locale","createdAt"],"type":"object"},"StoreChangeBody":{"additionalProperties":false,"properties":{"name":{"maxLength":120,"minLength":1,"type":"string"},"status":{"description":"suspended closes the store and keeps its data; active reopens a store the partner closed","enum":["active","suspended"],"type":"string"}},"type":"object"},"StoreOrderBody":{"additionalProperties":false,"properties":{"address":{"type":"string"},"cancelReason":{"type":"string"},"checkedOutAt":{"format":"date-time","type":"string"},"contactPhone":{"type":"string"},"conversationId":{"format":"uuid","type":"string"},"couponCode":{"type":"string"},"createdAt":{"format":"date-time","type":"string"},"currency":{"enum":["USD"],"type":"string"},"customerName":{"type":"string"},"customerPhone":{"type":"string"},"deliveryArea":{"type":"string"},"deliveryFeeCents":{"format":"int64","type":"integer"},"discountCents":{"format":"int64","type":"integer"},"discountReason":{"description":"The promotions that make up the discount","type":"string"},"events":{"description":"The order's history, oldest first; on a single order","items":{"$ref":"#/components/schemas/StoreOrderEventBody"},"type":["array","null"]},"fulfilment":{"description":"Chosen in checkout","enum":["delivery","pickup"],"type":"string"},"id":{"format":"uuid","type":"string"},"itemCount":{"format":"int64","type":"integer"},"items":{"description":"On a single order","items":{"$ref":"#/components/schemas/StoreOrderItemBody"},"type":["array","null"]},"location":{"$ref":"#/components/schemas/StoreOrderLocationBody","description":"The pin the customer shared after checkout"},"nextStatuses":{"description":"The statuses the store may set now","items":{"type":"string"},"type":"array"},"note":{"description":"Cart items that were left out, and why","type":"string"},"number":{"description":"The store's own order number","format":"int64","type":"integer"},"status":{"enum":["new","awaiting_payment","paid","preparing","out_for_delivery","delivered","cancelled","refunded"],"type":"string"},"subtotalCents":{"format":"int64","type":"integer"},"teamId":{"format":"uuid","type":"string"},"totalCents":{"description":"subtotalCents - discountCents + deliveryFeeCents, computed by Nexafon","format":"int64","type":"integer"},"updatedAt":{"format":"date-time","type":"string"}},"required":["id","number","status","nextStatuses","customerPhone","currency","subtotalCents","discountCents","deliveryFeeCents","totalCents","itemCount","createdAt","updatedAt"],"type":"object"},"StoreOrderEventBody":{"additionalProperties":false,"properties":{"actorId":{"type":"string"},"actorType":{"enum":["member","partner_key","api_key","customer","system"],"type":"string"},"at":{"format":"date-time","type":"string"},"fromStatus":{"type":"string"},"kind":{"enum":["created","summary_sent","status_changed","checkout","location","customer_notified","customer_not_notified","payment_failed"],"type":"string"},"note":{"type":"string"},"toStatus":{"type":"string"}},"required":["kind","actorType","at"],"type":"object"},"StoreOrderItemBody":{"additionalProperties":false,"properties":{"color":{"type":"string"},"name":{"type":"string"},"productExternalId":{"type":"string"},"quantity":{"format":"int32","type":"integer"},"retailerId":{"description":"The WhatsApp retailer_id the customer ordered","type":"string"},"size":{"type":"string"},"unitPriceCents":{"description":"The store's price when the order was priced, in US cents","format":"int64","type":"integer"}},"required":["retailerId","productExternalId","name","quantity","unitPriceCents"],"type":"object"},"StoreOrderLocationBody":{"additionalProperties":false,"properties":{"latitude":{"format":"double","type":"number"},"longitude":{"format":"double","type":"number"}},"required":["latitude","longitude"],"type":"object"},"StoreOrdersBody":{"additionalProperties":false,"properties":{"next":{"description":"Pass as cursor for the next page; absent on the last page","type":"string"},"orders":{"description":"Newest first","items":{"$ref":"#/components/schemas/StoreOrderBody"},"type":"array"}},"required":["orders"],"type":"object"},"StoreOwnerBody":{"additionalProperties":false,"properties":{"email":{"format":"email","maxLength":320,"type":"string"},"name":{"maxLength":120,"minLength":1,"type":"string"}},"required":["name","email"],"type":"object"},"StorePayPointBody":{"additionalProperties":false,"properties":{"available":{"description":"PayPoint is configured on this server; without it no store takes payments","type":"boolean"},"last4":{"description":"The saved key's last four characters, all of it that is ever shown","type":"string"},"merchantId":{"type":"string"},"options":{"description":"Every wallet a store can take, in the order customers see them","items":{"$ref":"#/components/schemas/StoreWalletBody"},"type":"array"},"saved":{"description":"The store's own PayPoint key is saved","type":"boolean"},"updatedAt":{"description":"When the key was last saved","format":"date-time","type":"string"},"wallets":{"description":"The wallets customers may pay with, in the order they see them","items":{"enum":["evc_plus","zaad","sahal","jeeb","edahab","premier_wallet"],"type":"string"},"type":"array"}},"required":["available","saved","last4","merchantId","wallets","options"],"type":"object"},"StorePayPointKeyBody":{"additionalProperties":false,"properties":{"apiKey":{"description":"The store's own PayPoint API key. It is stored encrypted and never returned.","maxLength":512,"minLength":1,"type":"string","writeOnly":true},"merchantId":{"description":"The store's PayPoint merchant id","maxLength":100,"minLength":1,"pattern":"^[A-Za-z0-9_.-]+$","type":"string"}},"required":["apiKey","merchantId"],"type":"object"},"StorePayPointKeySavedBody":{"additionalProperties":false,"properties":{"last4":{"description":"The key's last four characters, all of it that is ever shown","type":"string"},"saved":{"type":"boolean"}},"required":["saved","last4"],"type":"object"},"StorePayPointKeyTestBody":{"additionalProperties":false,"properties":{"ok":{"description":"PayPoint accepted the key; nobody was charged","type":"boolean"},"reason":{"description":"refused: PayPoint does not accept the key; unreachable: PayPoint did not answer, try again","enum":["refused","unreachable"],"type":"string"}},"required":["ok"],"type":"object"},"StorePayPointWalletsBody":{"additionalProperties":false,"properties":{"wallets":{"description":"The wallets customers may pay with in the WhatsApp checkout","items":{"enum":["evc_plus","zaad","sahal","jeeb","edahab","premier_wallet"],"type":"string"},"maxItems":6,"type":"array","uniqueItems":true}},"required":["wallets"],"type":"object"},"StoreWalletBody":{"additionalProperties":false,"properties":{"id":{"enum":["evc_plus","zaad","sahal","jeeb","edahab","premier_wallet"],"type":"string"},"name":{"description":"The wallet's brand name, the same in every language","type":"string"}},"required":["id","name"],"type":"object"},"StoresBody":{"additionalProperties":false,"properties":{"next":{"description":"Pass as cursor for the next page; absent on the last page","type":"string"},"stores":{"description":"Newest first","items":{"$ref":"#/components/schemas/StoreBody"},"type":"array"}},"required":["stores"],"type":"object"},"SyncBody":{"additionalProperties":false,"properties":{"lastSyncedAt":{"description":"When the item was last pushed to Meta","format":"date-time","type":"string"},"reason":{"description":"Meta's rejection reason, or why the push failed","type":"string"},"status":{"description":"queued: waiting for the next push, within a minute; in_review: Meta is reviewing; failed: Meta refused the push; inactive: not in the catalog","enum":["queued","in_review","approved","rejected","failed","inactive"],"type":"string"}},"required":["status"],"type":"object"},"SyncOutputBody":{"additionalProperties":false,"properties":{"syncError":{"type":"string"},"syncedAt":{"description":"When the templates were last read in full from Meta","format":"date-time","type":"string"}},"type":"object"},"TeamBody":{"additionalProperties":false,"properties":{"id":{"format":"uuid","type":"string"},"role":{"enum":["member","lead"],"type":"string"}},"required":["id","role"],"type":"object"},"TeamDetailBody":{"additionalProperties":false,"properties":{"color":{"description":"Theme token shown next to the team's conversations","enum":["chart-1","chart-2","chart-3","chart-4","chart-5"],"type":"string"},"createdAt":{"format":"date-time","type":"string"},"id":{"format":"uuid","type":"string"},"isDefault":{"description":"Routing sends everything it does not route elsewhere to this team","type":"boolean"},"members":{"description":"Members in ring order","items":{"$ref":"#/components/schemas/TeamMemberBody"},"maxItems":200,"minItems":1,"type":"array"},"name":{"maxLength":80,"minLength":1,"type":"string"},"queue":{"$ref":"#/components/schemas/TeamQueueBody"},"updatedAt":{"format":"date-time","type":"string"},"workingHours":{"description":"Open days; a day that is not listed is closed. null means always open.","items":{"$ref":"#/components/schemas/DayHoursBody"},"maxItems":7,"type":["array","null"]}},"required":["id","isDefault","createdAt","updatedAt","name","color","members","queue","workingHours"],"type":"object"},"TeamMemberBody":{"additionalProperties":false,"properties":{"lead":{"description":"Team leads see this team's reports and can pick up its queued calls","type":"boolean"},"memberId":{"format":"uuid","type":"string"}},"required":["memberId"],"type":"object"},"TeamQueueBody":{"additionalProperties":false,"properties":{"announcePositionSeconds":{"description":"How often a waiting caller hears their place in the queue, shorter than the longest wait; no announcements when unset","format":"int64","maximum":300,"minimum":30,"type":"integer"},"closedRecordingId":{"description":"Recording played outside working hours; the workspace's default closed message when unset","format":"uuid","type":"string"},"holdRecordingId":{"description":"Recording played while the caller waits; silence when unset","format":"uuid","type":"string"},"maxWaitSeconds":{"description":"Longest wait in the queue","format":"int64","maximum":600,"minimum":60,"type":"integer"},"missedRecordingId":{"description":"Recording played when nobody answers within the longest wait; the workspace's default missed-call message when unset","format":"uuid","type":"string"},"ringTimeoutSeconds":{"description":"After this the caller waits in the queue","format":"int64","maximum":60,"minimum":30,"type":"integer"},"secondsPerPerson":{"description":"How long each member rings with the priority strategy","format":"int64","maximum":60,"minimum":5,"type":"integer"},"strategy":{"description":"all rings every member at once; priority rings one member at a time in the members' order","enum":["all","priority"],"type":"string"}},"required":["strategy","secondsPerPerson","ringTimeoutSeconds","maxWaitSeconds"],"type":"object"},"TemplateBody":{"additionalProperties":false,"properties":{"category":{"enum":["marketing","utility","authentication"],"type":"string"},"createdAt":{"format":"date-time","type":"string"},"definition":{"$ref":"#/components/schemas/TemplateDefinitionBody"},"editPending":{"description":"An edit is on its way to Meta","type":"boolean"},"errorCode":{"description":"Why the last submission, edit or deletion failed","type":"string"},"errorMessage":{"type":"string"},"id":{"type":"string"},"language":{"type":"string"},"name":{"type":"string"},"parameterFormat":{"enum":["positional","named"],"type":"string"},"quality":{"description":"Meta's quality rating, such as GREEN","type":"string"},"rejectedReason":{"description":"Meta's reason, for rejected templates","type":"string"},"status":{"enum":["submitting","submit_failed","pending","approved","rejected","paused","disabled","in_appeal","pending_deletion","limit_exceeded","archived","deleting"],"type":"string"},"syncedAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"},"usage":{"$ref":"#/components/schemas/TemplateUsageBody"}},"required":["id","name","language","category","status","parameterFormat","definition","editPending","createdAt","updatedAt"],"type":"object"},"TemplateButtonBody":{"additionalProperties":false,"properties":{"example":{"description":"url: an example end of the address; copy_code: an example code","maxLength":200,"type":"string"},"phoneNumber":{"description":"For phone_number buttons, with its country code","maxLength":32,"type":"string"},"text":{"maxLength":25,"type":"string"},"type":{"description":"voice_call_request asks the customer for permission to call them (Meta's call permission request); it is always the last button","enum":["quick_reply","url","phone_number","copy_code","otp","voice_call_request"],"type":"string"},"url":{"description":"For url buttons; may end with {{1}}, filled in when sending","maxLength":2000,"type":"string"}},"required":["type"],"type":"object"},"TemplateComponentBody":{"additionalProperties":false,"properties":{"index":{"description":"For buttons: the button's position","format":"int64","maximum":9,"minimum":0,"type":"integer"},"parameters":{"items":{"$ref":"#/components/schemas/TemplateParameterBody"},"maxItems":20,"type":["array","null"]},"subType":{"description":"For buttons: url also fills a one-time password button","enum":["quick_reply","url","copy_code"],"type":"string"},"type":{"enum":["header","body","button"],"type":"string"}},"required":["type"],"type":"object"},"TemplateCurrencyBody":{"additionalProperties":false,"properties":{"amount1000":{"description":"The amount times 1000: 12500 is 12.50","format":"int64","type":"integer"},"code":{"description":"ISO 4217 currency code, such as USD","maxLength":3,"type":"string"},"fallbackValue":{"description":"Shown where WhatsApp cannot format the amount, such as $12.50","maxLength":64,"type":"string"}},"required":["fallbackValue","code","amount1000"],"type":"object"},"TemplateDateTimeBody":{"additionalProperties":false,"properties":{"fallbackValue":{"description":"The date or time as the customer reads it","maxLength":64,"type":"string"}},"required":["fallbackValue"],"type":"object"},"TemplateDefinitionBody":{"additionalProperties":false,"properties":{"body":{"$ref":"#/components/schemas/TemplateTextBody"},"buttons":{"items":{"$ref":"#/components/schemas/TemplateButtonBody"},"maxItems":11,"type":"array"},"footer":{"$ref":"#/components/schemas/TemplateFooterBody"},"header":{"$ref":"#/components/schemas/TemplateHeaderBody"},"unsupported":{"description":"Parts Nexafon shows but cannot edit or send, such as carousels","items":{"type":"string"},"readOnly":true,"type":"array"}},"required":["body"],"type":"object"},"TemplateExampleBody":{"additionalProperties":false,"properties":{"name":{"description":"The variable, for named variables; numbered ones take their examples in order","maxLength":64,"type":"string"},"value":{"maxLength":200,"type":"string"}},"required":["value"],"type":"object"},"TemplateFooterBody":{"additionalProperties":false,"properties":{"codeExpirationMinutes":{"description":"Authentication templates only","format":"int64","maximum":90,"minimum":0,"type":"integer"},"text":{"maxLength":60,"type":"string"}},"type":"object"},"TemplateHeaderBody":{"additionalProperties":false,"properties":{"examples":{"items":{"$ref":"#/components/schemas/TemplateExampleBody"},"maxItems":1,"type":"array"},"format":{"enum":["text","image","video","document","location"],"type":"string"},"sampleFileId":{"description":"For image, video and document headers: an uploaded file (files API, kind media) Meta reviews the header with","format":"uuid","type":"string"},"text":{"description":"For text headers; at most one variable","maxLength":60,"type":"string"}},"required":["format"],"type":"object"},"TemplateLocationBody":{"additionalProperties":false,"properties":{"address":{"maxLength":200,"type":"string"},"latitude":{"format":"double","maximum":90,"minimum":-90,"type":"number"},"longitude":{"format":"double","maximum":180,"minimum":-180,"type":"number"},"name":{"maxLength":100,"type":"string"}},"required":["latitude","longitude"],"type":"object"},"TemplateMediaBody":{"additionalProperties":false,"properties":{"filename":{"description":"For documents","maxLength":240,"type":"string"},"link":{"description":"A public https link WhatsApp downloads the file from","format":"uri","maxLength":2048,"type":"string"}},"required":["link"],"type":"object"},"TemplateParameterBody":{"additionalProperties":false,"properties":{"couponCode":{"maxLength":15,"type":"string"},"currency":{"$ref":"#/components/schemas/TemplateCurrencyBody"},"dateTime":{"$ref":"#/components/schemas/TemplateDateTimeBody"},"document":{"$ref":"#/components/schemas/TemplateMediaBody"},"image":{"$ref":"#/components/schemas/TemplateMediaBody"},"location":{"$ref":"#/components/schemas/TemplateLocationBody"},"parameterName":{"description":"For templates with named variables","maxLength":64,"type":"string"},"payload":{"maxLength":1024,"type":"string"},"text":{"maxLength":1024,"type":"string"},"type":{"description":"text, currency and date_time fill a variable; image, video, document and location fill a media or location header; payload is a quick-reply button's payload; coupon_code fills a copy-code button","enum":["text","currency","date_time","image","video","document","location","payload","coupon_code"],"type":"string"},"video":{"$ref":"#/components/schemas/TemplateMediaBody"}},"required":["type"],"type":"object"},"TemplatePreviewButtonBody":{"additionalProperties":false,"properties":{"code":{"description":"The code a copy-code or one-time password button copies","type":"string"},"phoneNumber":{"type":"string"},"text":{"type":"string"},"type":{"type":"string"},"url":{"description":"The full address, with the parameter filled in","type":"string"}},"required":["type"],"type":"object"},"TemplatePreviewHeaderBody":{"additionalProperties":false,"properties":{"address":{"type":"string"},"filename":{"type":"string"},"format":{"type":"string"},"latitude":{"type":"string"},"link":{"type":"string"},"longitude":{"type":"string"},"place":{"type":"string"},"text":{"type":"string"}},"required":["format"],"type":"object"},"TemplateRefBody":{"additionalProperties":false,"properties":{"category":{"type":"string"},"language":{"type":"string"},"name":{"type":"string"}},"required":["name","language"],"type":"object"},"TemplateSendBody":{"additionalProperties":false,"properties":{"components":{"items":{"$ref":"#/components/schemas/TemplateComponentBody"},"maxItems":10,"type":["array","null"]},"language":{"description":"Such as en_US","maxLength":16,"type":"string"},"name":{"description":"An approved template of the workspace","maxLength":512,"type":"string"}},"required":["name","language"],"type":"object"},"TemplateTextBody":{"additionalProperties":false,"properties":{"examples":{"items":{"$ref":"#/components/schemas/TemplateExampleBody"},"maxItems":100,"type":"array"},"securityRecommendation":{"description":"Authentication templates: add Meta's do-not-share line","type":"boolean"},"text":{"description":"Variables are {{1}}, {{2}}, … or lowercase names such as {{order_id}}; empty for authentication templates","maxLength":1024,"type":"string"}},"type":"object"},"TemplateUsageBody":{"additionalProperties":false,"properties":{"delivered":{"format":"int64","type":"integer"},"failed":{"format":"int64","type":"integer"},"pending":{"description":"Queued and not yet accepted by WhatsApp","format":"int64","type":"integer"},"read":{"format":"int64","type":"integer"},"sent":{"format":"int64","type":"integer"},"since":{"format":"date-time","type":"string"}},"required":["since","sent","delivered","read","failed","pending"],"type":"object"},"ThreadOutputBody":{"additionalProperties":false,"properties":{"messages":{"description":"The latest first","items":{"$ref":"#/components/schemas/MessageBody"},"type":"array"},"next":{"description":"Pass as cursor for older messages; absent at the start of the conversation","type":"string"}},"required":["messages"],"type":"object"},"TokenInputBody":{"additionalProperties":false,"properties":{"token":{"description":"The current session token","maxLength":128,"minLength":1,"type":"string"}},"required":["token"],"type":"object"},"UpdatePartnerEndpointInputBody":{"additionalProperties":false,"properties":{"description":{"maxLength":200,"type":"string"},"events":{"items":{"type":"string"},"maxItems":64,"minItems":1,"type":["array","null"]},"status":{"description":"active turns a disabled endpoint back on","enum":["active","disabled"],"type":"string"},"url":{"maxLength":2048,"minLength":8,"type":"string"}},"type":"object"},"UpdatePartnerMemberInputBody":{"additionalProperties":false,"properties":{"role":{"description":"owner, admin, supervisor, agent or viewer","maxLength":64,"minLength":1,"type":"string"},"teams":{"description":"The store's team ids the user is in; absent leaves the teams as they are","items":{"type":"string"},"maxItems":50,"type":"array"}},"required":["role"],"type":"object"},"UpdateWebhookEndpointInputBody":{"additionalProperties":false,"properties":{"description":{"maxLength":200,"type":"string"},"events":{"items":{"type":"string"},"maxItems":64,"minItems":1,"type":["array","null"]},"status":{"description":"active turns a disabled endpoint back on","enum":["active","disabled"],"type":"string"},"url":{"maxLength":2048,"minLength":8,"type":"string"}},"type":"object"},"UpsertResultBody":{"additionalProperties":false,"properties":{"externalId":{"type":"string"},"result":{"description":"unchanged: the product was the same, nothing is pushed to Meta","enum":["created","updated","unchanged"],"type":"string"}},"required":["externalId","result"],"type":"object"},"UseBody":{"additionalProperties":false,"properties":{"digit":{"description":"The key of the IVR option","format":"int64","type":"integer"},"label":{"description":"Where it plays, in English","type":"string"},"teamId":{"description":"The team whose settings play it; for an IVR option, the team the option routes to","format":"uuid","type":"string"},"teamName":{"type":"string"},"type":{"enum":["workspace_default","routing_greeting","ivr_option","team_hold","team_closed","team_missed","prayer_message","team_prayer"],"type":"string"}},"required":["type","label"],"type":"object"},"VariantBody":{"additionalProperties":false,"properties":{"availability":{"description":"The product's when absent","enum":["in_stock","out_of_stock"],"type":"string"},"color":{"maxLength":100,"type":"string"},"externalId":{"description":"The partner's id for the variant, such as a size id; it is the WhatsApp retailer_id of the variant's catalog item","maxLength":100,"minLength":1,"pattern":"^[A-Za-z0-9._:-]+$","type":"string"},"priceCents":{"description":"The variant's own price in cents; the product's when absent","format":"int64","maximum":100000000000,"minimum":0,"type":"integer"},"salePriceCents":{"description":"The variant's own sale price in cents; the product's when absent","format":"int64","maximum":100000000000,"minimum":0,"type":"integer"},"size":{"maxLength":100,"type":"string"},"stock":{"description":"The variant's own stock; the product's when absent. 0 shows it out of stock","format":"int32","minimum":0,"type":"integer"}},"required":["externalId"],"type":"object"},"VariantViewBody":{"additionalProperties":false,"properties":{"availability":{"enum":["in_stock","out_of_stock"],"type":"string"},"color":{"type":"string"},"externalId":{"description":"The WhatsApp retailer_id","type":"string"},"priceCents":{"format":"int64","type":"integer"},"salePriceCents":{"format":"int64","type":"integer"},"size":{"type":"string"},"stock":{"format":"int32","type":"integer"},"sync":{"$ref":"#/components/schemas/SyncBody"}},"required":["externalId","sync"],"type":"object"},"WebhookDeliveriesOutputBody":{"additionalProperties":false,"properties":{"deliveries":{"description":"Every attempt, the latest first","items":{"$ref":"#/components/schemas/WebhookDeliveryBody"},"type":"array"},"next":{"description":"Pass as cursor for the next page; absent on the last page","type":"string"}},"required":["deliveries"],"type":"object"},"WebhookDeliveryBody":{"additionalProperties":false,"properties":{"attempt":{"description":"1 for the first attempt of this delivery","format":"int64","type":"integer"},"attemptedAt":{"format":"date-time","type":"string"},"error":{"description":"Why the attempt failed, when the response code does not say","type":"string"},"eventId":{"description":"The id in the delivered body; receivers dedupe on it","format":"uuid","type":"string"},"eventType":{"type":"string"},"id":{"format":"uuid","type":"string"},"latencyMs":{"format":"int64","type":"integer"},"nextRetryAt":{"description":"When the next attempt runs; absent after a success or the last attempt","format":"date-time","type":"string"},"responseCode":{"description":"Absent when no response arrived","format":"int64","type":"integer"},"status":{"enum":["succeeded","failed"],"type":"string"},"trigger":{"enum":["event","replay","test"],"type":"string"}},"required":["id","eventId","eventType","trigger","attempt","status","latencyMs","attemptedAt"],"type":"object"},"WebhookEndpointBody":{"additionalProperties":false,"properties":{"createdAt":{"format":"date-time","type":"string"},"createdBy":{"description":"User id of who created the endpoint","type":"string"},"description":{"type":"string"},"disabledAt":{"format":"date-time","type":"string"},"disabledReason":{"description":"failing: Nexafon turned it off after every delivery failed for 3 days","enum":["failing","manual"],"type":"string"},"events":{"description":"Event types the endpoint receives","items":{"type":"string"},"type":"array"},"failingSince":{"description":"Deliveries have failed since then without a success","format":"date-time","type":"string"},"id":{"format":"uuid","type":"string"},"lastSuccessAt":{"format":"date-time","type":"string"},"previousSecretExpiresAt":{"description":"After a rotation, deliveries are also signed with the previous secret until then","format":"date-time","type":"string"},"secretMasked":{"description":"The signing secret's prefix and last four characters, such as whsec_…WXYZ","type":"string"},"status":{"enum":["active","disabled"],"type":"string"},"updatedAt":{"format":"date-time","type":"string"},"url":{"type":"string"}},"required":["id","url","description","events","status","secretMasked","createdBy","createdAt","updatedAt"],"type":"object"},"WebhookEndpointsOutputBody":{"additionalProperties":false,"properties":{"endpoints":{"items":{"$ref":"#/components/schemas/WebhookEndpointBody"},"type":"array"}},"required":["endpoints"],"type":"object"},"WebhookEventTypeBody":{"additionalProperties":false,"properties":{"description":{"type":"string"},"emitted":{"description":"False while the module that sends it is not available yet; subscribing already is allowed","type":"boolean"},"type":{"type":"string"}},"required":["type","description","emitted"],"type":"object"},"WebhookEventTypesOutputBody":{"additionalProperties":false,"properties":{"eventTypes":{"items":{"$ref":"#/components/schemas/WebhookEventTypeBody"},"type":"array"}},"required":["eventTypes"],"type":"object"},"WebhookSecretOutputBody":{"additionalProperties":false,"properties":{"endpoint":{"$ref":"#/components/schemas/WebhookEndpointBody"},"secret":{"description":"The signing secret. It is shown only in this response and cannot be retrieved again; a replay of the request for the same Idempotency-Key leaves it out.","type":"string"}},"required":["endpoint"],"type":"object"},"WebhookTestOutputBody":{"additionalProperties":false,"properties":{"eventId":{"description":"The webhook.test event; its attempt shows in the delivery log","format":"uuid","type":"string"}},"required":["eventId"],"type":"object"}},"securitySchemes":{"bearer":{"description":"A secret API key (sk_live_… or sk_test_…) from a server, an SDK session token from a web or mobile app, or a secret partner key (psk_live_… or psk_test_…) from a partner's server, for the Partner API and the partner's own stores.","scheme":"bearer","type":"http"}}},"info":{"title":"Nexafon API (public)","version":"v1"},"openapi":"3.1.0","paths":{"/api/v1/partner":{"get":{"operationId":"getPartnerProfile","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerProfileBody"}}},"description":"OK"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Error"}},"summary":"Get the partner of the key","tags":["partner"],"x-feature":"workspace.core","x-permission":"partner.account:view","x-realm":"partner"}},"/api/v1/partner/stores":{"get":{"operationId":"listPartnerApiStores","parameters":[{"description":"The next value of the previous page","explode":false,"in":"query","name":"cursor","schema":{"description":"The next value of the previous page","maxLength":200,"type":"string"}},{"explode":false,"in":"query","name":"limit","schema":{"default":50,"format":"int64","maximum":100,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StoresBody"}}},"description":"OK"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Error"}},"summary":"List the partner's stores","tags":["partner"],"x-feature":"workspace.core","x-permission":"partner.stores:view","x-realm":"partner"},"post":{"description":"Creates a workspace for the store on the partner's default plan and answers 201; when the partner already has a store with this externalRef it answers 200 with that store and changes nothing.","operationId":"createPartnerStore","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NewStoreBody"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StoreBody"}}},"description":"Created"},"409":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Conflict"},"422":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unprocessable Entity"},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Internal Server Error"}},"summary":"Create a store, or return the one with this externalRef","tags":["partner"],"x-feature":"workspace.core","x-permission":"partner.stores:manage","x-realm":"partner"}},"/api/v1/partner/stores/{externalRef}":{"get":{"operationId":"getPartnerStore","parameters":[{"description":"The partner's own id for the store","in":"path","name":"externalRef","required":true,"schema":{"description":"The partner's own id for the store","maxLength":255,"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StoreBody"}}},"description":"OK"},"404":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Not Found"},"422":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unprocessable Entity"},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Internal Server Error"}},"summary":"Get a store by its externalRef","tags":["partner"],"x-feature":"workspace.core","x-permission":"partner.stores:view","x-realm":"partner"},"patch":{"operationId":"updatePartnerStore","parameters":[{"description":"The partner's own id for the store","in":"path","name":"externalRef","required":true,"schema":{"description":"The partner's own id for the store","maxLength":255,"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StoreChangeBody"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StoreBody"}}},"description":"OK"},"404":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Not Found"},"409":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Conflict"},"422":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unprocessable Entity"},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Internal Server Error"}},"summary":"Rename, close or reopen a store","tags":["partner"],"x-feature":"workspace.core","x-permission":"partner.stores:manage","x-realm":"partner"}},"/api/v1/partner/stores/{externalRef}/close":{"post":{"description":"Suspends the store: it becomes read-only and keeps its data. PATCH status active reopens it.","operationId":"closePartnerStore","parameters":[{"description":"The partner's own id for the store","in":"path","name":"externalRef","required":true,"schema":{"description":"The partner's own id for the store","maxLength":255,"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StoreBody"}}},"description":"OK"},"404":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Not Found"},"409":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Conflict"},"422":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unprocessable Entity"},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Internal Server Error"}},"summary":"Close a store","tags":["partner"],"x-feature":"workspace.core","x-permission":"partner.stores:manage","x-realm":"partner"}},"/api/v1/partner/stores/{externalRef}/members/{partnerUserId}":{"delete":{"description":"The user can no longer open the store: requests to it are refused at once and its live updates stop within seconds; a session left with no store it can open ends. Leaving a store out of the user tokens does not do this, and a later user token that lists the store enables the membership again.","operationId":"disablePartnerStoreMember","parameters":[{"description":"The partner's own id for the store","in":"path","name":"externalRef","required":true,"schema":{"description":"The partner's own id for the store","maxLength":255,"type":"string"}},{"description":"The partner's id for the user: the sub of its user tokens","in":"path","name":"partnerUserId","required":true,"schema":{"description":"The partner's id for the user: the sub of its user tokens","maxLength":255,"type":"string"}}],"responses":{"204":{"description":"No Content"},"404":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Not Found"},"409":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Conflict"},"422":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unprocessable Entity"},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Internal Server Error"}},"summary":"Disable a user's membership of a store","tags":["partner"],"x-feature":"workspace.core","x-permission":"partner.stores:manage","x-realm":"partner"},"put":{"description":"The user must have signed in to the store through a partner session. Their open screens fetch their access again at once. A store keeps at least one owner, and a role that needs a seat takes one (no_free_seat when the store has none).","operationId":"updatePartnerStoreMember","parameters":[{"description":"The partner's own id for the store","in":"path","name":"externalRef","required":true,"schema":{"description":"The partner's own id for the store","maxLength":255,"type":"string"}},{"description":"The partner's id for the user: the sub of its user tokens","in":"path","name":"partnerUserId","required":true,"schema":{"description":"The partner's id for the user: the sub of its user tokens","maxLength":255,"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdatePartnerMemberInputBody"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerMemberBody"}}},"description":"OK"},"403":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Forbidden"},"404":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Not Found"},"409":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Conflict"},"422":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unprocessable Entity"},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Internal Server Error"}},"summary":"Change a user's role and teams in a store","tags":["partner"],"x-feature":"workspace.core","x-permission":"partner.stores:manage","x-realm":"partner"}},"/api/v1/partner/webhook-endpoints":{"get":{"operationId":"listPartnerWebhookEndpoints","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpointsOutputBody"}}},"description":"OK"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Error"}},"summary":"List the partner's webhook endpoints","tags":["partner"],"x-feature":"workspace.core","x-permission":"partner.webhooks:manage","x-realm":"partner"},"post":{"description":"It receives the subscribed events of every store of the partner; the envelope's partner.storeExternalRef names the store. Every delivery is signed like a store's own: Nexafon-Signature: t=<unix seconds>,v1=<hex HMAC-SHA256 of \"<t>.<body>\" keyed with the secret>. The secret is in this response only.","operationId":"createPartnerWebhookEndpoint","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePartnerEndpointInputBody"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookSecretOutputBody"}}},"description":"Created"},"409":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Conflict"},"422":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unprocessable Entity"},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Internal Server Error"}},"summary":"Register a partner-wide webhook endpoint","tags":["partner"],"x-feature":"workspace.core","x-permission":"partner.webhooks:manage","x-realm":"partner"}},"/api/v1/partner/webhook-endpoints/{endpointId}":{"delete":{"operationId":"deletePartnerWebhookEndpoint","parameters":[{"description":"Webhook endpoint id (UUID)","in":"path","name":"endpointId","required":true,"schema":{"description":"Webhook endpoint id (UUID)","type":"string"}}],"responses":{"204":{"description":"No Content"},"404":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Not Found"},"422":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unprocessable Entity"},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Internal Server Error"}},"summary":"Delete a partner webhook endpoint and its delivery log","tags":["partner"],"x-feature":"workspace.core","x-permission":"partner.webhooks:manage","x-realm":"partner"},"get":{"operationId":"getPartnerWebhookEndpoint","parameters":[{"description":"Webhook endpoint id (UUID)","in":"path","name":"endpointId","required":true,"schema":{"description":"Webhook endpoint id (UUID)","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpointBody"}}},"description":"OK"},"404":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Not Found"},"422":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unprocessable Entity"},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Internal Server Error"}},"summary":"Get a partner webhook endpoint","tags":["partner"],"x-feature":"workspace.core","x-permission":"partner.webhooks:manage","x-realm":"partner"},"patch":{"operationId":"updatePartnerWebhookEndpoint","parameters":[{"description":"Webhook endpoint id (UUID)","in":"path","name":"endpointId","required":true,"schema":{"description":"Webhook endpoint id (UUID)","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdatePartnerEndpointInputBody"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpointBody"}}},"description":"OK"},"404":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Not Found"},"422":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unprocessable Entity"},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Internal Server Error"}},"summary":"Change a partner webhook endpoint, or turn it off or back on","tags":["partner"],"x-feature":"workspace.core","x-permission":"partner.webhooks:manage","x-realm":"partner"}},"/api/v1/partner/webhook-endpoints/{endpointId}/deliveries":{"get":{"operationId":"listPartnerWebhookDeliveries","parameters":[{"description":"Webhook endpoint id (UUID)","in":"path","name":"endpointId","required":true,"schema":{"description":"Webhook endpoint id (UUID)","type":"string"}},{"description":"Only this event's attempts","explode":false,"in":"query","name":"eventId","schema":{"description":"Only this event's attempts","format":"uuid","type":"string"}},{"explode":false,"in":"query","name":"status","schema":{"enum":["succeeded","failed"],"type":"string"}},{"description":"The next value of the previous page","explode":false,"in":"query","name":"cursor","schema":{"description":"The next value of the previous page","maxLength":200,"type":"string"}},{"explode":false,"in":"query","name":"limit","schema":{"default":30,"format":"int64","maximum":100,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookDeliveriesOutputBody"}}},"description":"OK"},"404":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Not Found"},"422":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unprocessable Entity"},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Internal Server Error"}},"summary":"List every delivery attempt to a partner endpoint","tags":["partner"],"x-feature":"workspace.core","x-permission":"partner.webhooks:manage","x-realm":"partner"}},"/api/v1/partner/webhook-endpoints/{endpointId}/events/{eventId}/replay":{"post":{"description":"The event keeps its id. It is retried on the usual schedule; the delivery log shows every attempt.","operationId":"replayPartnerWebhookEndpointEvent","parameters":[{"description":"Webhook endpoint id (UUID)","in":"path","name":"endpointId","required":true,"schema":{"description":"Webhook endpoint id (UUID)","type":"string"}},{"description":"Event id (UUID) from the delivery log","in":"path","name":"eventId","required":true,"schema":{"description":"Event id (UUID) from the delivery log","type":"string"}}],"responses":{"202":{"description":"Accepted"},"404":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Not Found"},"409":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Conflict"},"422":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unprocessable Entity"},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Internal Server Error"}},"summary":"Send an event to a partner endpoint again","tags":["partner"],"x-feature":"workspace.core","x-permission":"partner.webhooks:manage","x-realm":"partner"}},"/api/v1/partner/webhook-endpoints/{endpointId}/rotate-secret":{"post":{"description":"Until previousSecretExpiresAt deliveries carry a v1 signature for each secret. The new secret is in this response only.","operationId":"rotatePartnerWebhookEndpointSecret","parameters":[{"description":"Webhook endpoint id (UUID)","in":"path","name":"endpointId","required":true,"schema":{"description":"Webhook endpoint id (UUID)","type":"string"}},{"description":"How long deliveries are also signed with the replaced secret","explode":false,"in":"query","name":"keepPreviousHours","schema":{"default":24,"description":"How long deliveries are also signed with the replaced secret","format":"int64","maximum":168,"minimum":0,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookSecretOutputBody"}}},"description":"OK"},"404":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Not Found"},"422":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unprocessable Entity"},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Internal Server Error"}},"summary":"Replace a partner webhook endpoint's signing secret","tags":["partner"],"x-feature":"workspace.core","x-permission":"partner.webhooks:manage","x-realm":"partner"}},"/api/v1/partner/webhook-endpoints/{endpointId}/test":{"post":{"description":"Works on a disabled endpoint too. It is tried once; the delivery log shows the result.","operationId":"sendPartnerWebhookTest","parameters":[{"description":"Webhook endpoint id (UUID)","in":"path","name":"endpointId","required":true,"schema":{"description":"Webhook endpoint id (UUID)","type":"string"}}],"responses":{"202":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookTestOutputBody"}}},"description":"Accepted"},"404":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Not Found"},"422":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unprocessable Entity"},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Internal Server Error"}},"summary":"Send a webhook.test event to a partner endpoint","tags":["partner"],"x-feature":"workspace.core","x-permission":"partner.webhooks:manage","x-realm":"partner"}},"/api/v1/partner/webhook-event-types":{"get":{"operationId":"listPartnerWebhookEventTypes","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEventTypesOutputBody"}}},"description":"OK"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Error"}},"summary":"List the events a partner endpoint can subscribe to","tags":["partner"],"x-feature":"workspace.core","x-permission":"partner.webhooks:manage","x-realm":"partner"}},"/api/v1/sdk/sessions":{"post":{"description":"The publishable key's origin and app restrictions apply, and each user token is accepted once. The session acts as the workspace member the user maps to, within the scopes of the secret key that signed the token. A partner's publishable key is exchanged only on the partner's sites; its session acts as the user's membership of each store the token lists, and each new membership takes a seat in its store (no_free_seat names a store without one).","operationId":"createSdkSession","parameters":[{"in":"header","name":"Origin","schema":{"type":"string"}},{"description":"iOS apps: the app's bundle id, checked against the key's allowed bundle ids","in":"header","name":"X-Ios-Bundle-Identifier","schema":{"description":"iOS apps: the app's bundle id, checked against the key's allowed bundle ids","type":"string"}},{"description":"Android apps: the app's package name, checked against the key's allowed packages","in":"header","name":"X-Android-Package","schema":{"description":"Android apps: the app's package name, checked against the key's allowed packages","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSessionInputBody"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SDKSessionBody"}}},"description":"Created"},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unauthorized"},"403":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Forbidden"},"409":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Conflict"},"422":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unprocessable Entity"},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Internal Server Error"}},"security":[],"summary":"Exchange a publishable key and a user token for an SDK session","tags":["sdk"],"x-public":true}},"/api/v1/sdk/sessions/refresh":{"post":{"description":"Returns a new token; the one sent stops working at once.","operationId":"refreshSdkSession","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenInputBody"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SDKSessionBody"}}},"description":"OK"},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unauthorized"},"422":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unprocessable Entity"},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Internal Server Error"}},"security":[],"summary":"Refresh an SDK session","tags":["sdk"],"x-public":true}},"/api/v1/sdk/sessions/revoke":{"post":{"description":"Its realtime connections close.","operationId":"revokeSdkSession","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenInputBody"}}},"required":true},"responses":{"204":{"description":"No Content"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Error"}},"security":[],"summary":"End an SDK session","tags":["sdk"],"x-public":true}},"/api/v1/workspaces/{workspaceId}/commerce/categories":{"get":{"operationId":"listProductCategories","parameters":[{"description":"The store's workspace id (UUID)","in":"path","name":"workspaceId","required":true,"schema":{"description":"The store's workspace id (UUID)","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CategoriesBody"}}},"description":"OK"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Error"}},"summary":"List the store's product categories in order","tags":["commerce"],"x-feature":"commerce.catalog","x-permission":"commerce:manage","x-realm":"tenant"},"put":{"operationId":"upsertProductCategories","parameters":[{"description":"The store's workspace id (UUID)","in":"path","name":"workspaceId","required":true,"schema":{"description":"The store's workspace id (UUID)","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CategoriesInputBody"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CategoriesBody"}}},"description":"OK"},"422":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unprocessable Entity"},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Internal Server Error"}},"summary":"Create or rename categories and set their order","tags":["commerce"],"x-feature":"commerce.catalog","x-permission":"commerce:manage","x-realm":"tenant"}},"/api/v1/workspaces/{workspaceId}/commerce/delivery":{"get":{"operationId":"getDeliverySettings","parameters":[{"description":"The store's workspace id (UUID)","in":"path","name":"workspaceId","required":true,"schema":{"description":"The store's workspace id (UUID)","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeliveryBody"}}},"description":"OK"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Error"}},"summary":"Get the store's delivery areas, fees and customer updates","tags":["commerce"],"x-feature":"commerce.orders","x-permission":"commerce:manage","x-realm":"tenant"},"put":{"description":"Orders already placed keep the area name and fee they were priced with. Delivery needs at least one active area.","operationId":"saveDeliverySettings","parameters":[{"description":"The store's workspace id (UUID)","in":"path","name":"workspaceId","required":true,"schema":{"description":"The store's workspace id (UUID)","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeliverySettingsBody"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeliveryBody"}}},"description":"OK"},"422":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unprocessable Entity"},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Internal Server Error"}},"summary":"Replace the store's delivery areas, fees and customer updates","tags":["commerce"],"x-feature":"commerce.orders","x-permission":"commerce:manage","x-realm":"tenant"}},"/api/v1/workspaces/{workspaceId}/commerce/number-lists":{"get":{"operationId":"listNumberLists","parameters":[{"description":"The store's workspace id (UUID)","in":"path","name":"workspaceId","required":true,"schema":{"description":"The store's workspace id (UUID)","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NumberListsBody"}}},"description":"OK"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Error"}},"summary":"List the store's number lists","tags":["commerce"],"x-feature":"commerce.orders","x-permission":"commerce:manage","x-realm":"tenant"},"post":{"operationId":"createNumberList","parameters":[{"description":"The store's workspace id (UUID)","in":"path","name":"workspaceId","required":true,"schema":{"description":"The store's workspace id (UUID)","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NumberListFields"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NumberListBody"}}},"description":"Created"},"409":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Conflict"},"422":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unprocessable Entity"},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Internal Server Error"}},"summary":"Create a number list from uploaded numbers or a past-orders rule","tags":["commerce"],"x-feature":"commerce.orders","x-permission":"commerce:manage","x-realm":"tenant"}},"/api/v1/workspaces/{workspaceId}/commerce/number-lists/{listId}":{"delete":{"description":"Answers 409 promotion_in_use while a promotion uses it.","operationId":"deleteNumberList","parameters":[{"description":"The store's workspace id (UUID)","in":"path","name":"workspaceId","required":true,"schema":{"description":"The store's workspace id (UUID)","type":"string"}},{"description":"Number list id (UUID)","in":"path","name":"listId","required":true,"schema":{"description":"Number list id (UUID)","type":"string"}}],"responses":{"204":{"description":"No Content"},"404":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Not Found"},"409":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Conflict"},"422":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unprocessable Entity"},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Internal Server Error"}},"summary":"Delete a number list","tags":["commerce"],"x-feature":"commerce.orders","x-permission":"commerce:manage","x-realm":"tenant"},"get":{"operationId":"getNumberList","parameters":[{"description":"The store's workspace id (UUID)","in":"path","name":"workspaceId","required":true,"schema":{"description":"The store's workspace id (UUID)","type":"string"}},{"description":"Number list id (UUID)","in":"path","name":"listId","required":true,"schema":{"description":"Number list id (UUID)","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NumberListBody"}}},"description":"OK"},"404":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Not Found"},"422":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unprocessable Entity"},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Internal Server Error"}},"summary":"Get a number list with its numbers","tags":["commerce"],"x-feature":"commerce.orders","x-permission":"commerce:manage","x-realm":"tenant"},"put":{"operationId":"updateNumberList","parameters":[{"description":"The store's workspace id (UUID)","in":"path","name":"workspaceId","required":true,"schema":{"description":"The store's workspace id (UUID)","type":"string"}},{"description":"Number list id (UUID)","in":"path","name":"listId","required":true,"schema":{"description":"Number list id (UUID)","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NumberListFields"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NumberListBody"}}},"description":"OK"},"404":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Not Found"},"409":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Conflict"},"422":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unprocessable Entity"},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Internal Server Error"}},"summary":"Replace a number list","tags":["commerce"],"x-feature":"commerce.orders","x-permission":"commerce:manage","x-realm":"tenant"}},"/api/v1/workspaces/{workspaceId}/commerce/orders":{"get":{"description":"Newest first. Members who do not see every team see the orders of their teams.","operationId":"listOrders","parameters":[{"description":"The store's workspace id (UUID)","in":"path","name":"workspaceId","required":true,"schema":{"description":"The store's workspace id (UUID)","type":"string"}},{"description":"Only orders in these statuses, comma-separated","explode":false,"in":"query","name":"status","schema":{"description":"Only orders in these statuses, comma-separated","items":{"enum":["new","awaiting_payment","paid","preparing","out_for_delivery","delivered","cancelled","refunded"],"type":"string"},"type":["array","null"]}},{"explode":false,"in":"query","name":"fulfilment","schema":{"enum":["delivery","pickup"],"type":"string"}},{"description":"Only the orders of this customer number","explode":false,"in":"query","name":"phone","schema":{"description":"Only the orders of this customer number","maxLength":32,"type":"string"}},{"description":"The order with this number","explode":false,"in":"query","name":"number","schema":{"description":"The order with this number","format":"int64","minimum":0,"type":"integer"}},{"description":"Created at or after","explode":false,"in":"query","name":"from","schema":{"description":"Created at or after","format":"date-time","type":"string"}},{"description":"Created before","explode":false,"in":"query","name":"to","schema":{"description":"Created before","format":"date-time","type":"string"}},{"explode":false,"in":"query","name":"cursor","schema":{"maxLength":200,"type":"string"}},{"explode":false,"in":"query","name":"limit","schema":{"default":50,"format":"int64","maximum":100,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StoreOrdersBody"}}},"description":"OK"},"422":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unprocessable Entity"},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Internal Server Error"}},"summary":"List the store's orders","tags":["commerce"],"x-feature":"commerce.orders","x-permission":"orders:view","x-realm":"tenant"}},"/api/v1/workspaces/{workspaceId}/commerce/orders/{orderId}":{"get":{"operationId":"getOrder","parameters":[{"description":"The store's workspace id (UUID)","in":"path","name":"workspaceId","required":true,"schema":{"description":"The store's workspace id (UUID)","type":"string"}},{"description":"Order id (UUID)","in":"path","name":"orderId","required":true,"schema":{"description":"Order id (UUID)","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StoreOrderBody"}}},"description":"OK"},"404":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Not Found"},"422":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unprocessable Entity"},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Internal Server Error"}},"summary":"Get an order with its items and history","tags":["commerce"],"x-feature":"commerce.orders","x-permission":"orders:view","x-realm":"tenant"}},"/api/v1/workspaces/{workspaceId}/commerce/orders/{orderId}/cancel":{"post":{"description":"Stock is not reserved for orders: a partner rejects an order it cannot fill by cancelling it.","operationId":"cancelOrder","parameters":[{"description":"The store's workspace id (UUID)","in":"path","name":"workspaceId","required":true,"schema":{"description":"The store's workspace id (UUID)","type":"string"}},{"description":"Order id (UUID)","in":"path","name":"orderId","required":true,"schema":{"description":"Order id (UUID)","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderCancelBody"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StoreOrderBody"}}},"description":"OK"},"404":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Not Found"},"409":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Conflict"},"422":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unprocessable Entity"},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Internal Server Error"}},"summary":"Cancel an order","tags":["commerce"],"x-feature":"commerce.orders","x-permission":"orders:manage","x-realm":"tenant"}},"/api/v1/workspaces/{workspaceId}/commerce/orders/{orderId}/status":{"post":{"description":"Statuses only move forward; 409 order_status_not_allowed otherwise. The customer gets a WhatsApp message for the statuses the store chose, and the store's endpoints get order.status_changed.","operationId":"setOrderStatus","parameters":[{"description":"The store's workspace id (UUID)","in":"path","name":"workspaceId","required":true,"schema":{"description":"The store's workspace id (UUID)","type":"string"}},{"description":"Order id (UUID)","in":"path","name":"orderId","required":true,"schema":{"description":"Order id (UUID)","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderStatusBody"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StoreOrderBody"}}},"description":"OK"},"404":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Not Found"},"409":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Conflict"},"422":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unprocessable Entity"},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Internal Server Error"}},"summary":"Move an order to preparing, out for delivery, delivered or cancelled","tags":["commerce"],"x-feature":"commerce.orders","x-permission":"orders:manage","x-realm":"tenant"}},"/api/v1/workspaces/{workspaceId}/commerce/products":{"get":{"operationId":"listProducts","parameters":[{"description":"The store's workspace id (UUID)","in":"path","name":"workspaceId","required":true,"schema":{"description":"The store's workspace id (UUID)","type":"string"}},{"description":"Only the products of this category's externalId","explode":false,"in":"query","name":"category","schema":{"description":"Only the products of this category's externalId","maxLength":100,"type":"string"}},{"description":"Only products whose catalog status is this","explode":false,"in":"query","name":"status","schema":{"description":"Only products whose catalog status is this","enum":["queued","in_review","approved","rejected","failed","inactive"],"type":"string"}},{"description":"The next value of the previous page","explode":false,"in":"query","name":"cursor","schema":{"description":"The next value of the previous page","maxLength":400,"type":"string"}},{"explode":false,"in":"query","name":"limit","schema":{"default":50,"format":"int64","maximum":100,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductsBody"}}},"description":"OK"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Error"}},"summary":"List the store's products with their WhatsApp catalog status","tags":["commerce"],"x-feature":"commerce.catalog","x-permission":"commerce:manage","x-realm":"tenant"}},"/api/v1/workspaces/{workspaceId}/commerce/products/batch":{"post":{"description":"All or nothing: one product that is not valid fails the request and stores none. Each result says whether the product was created, updated or unchanged.","operationId":"upsertProducts","parameters":[{"description":"The store's workspace id (UUID)","in":"path","name":"workspaceId","required":true,"schema":{"description":"The store's workspace id (UUID)","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchBody"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchResultBody"}}},"description":"OK"},"409":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Conflict"},"422":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unprocessable Entity"},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Internal Server Error"}},"summary":"Create or update up to 500 products","tags":["commerce"],"x-feature":"commerce.catalog","x-permission":"commerce:manage","x-realm":"tenant"}},"/api/v1/workspaces/{workspaceId}/commerce/products/{externalId}":{"delete":{"description":"Its items leave the store's WhatsApp catalog within a minute.","operationId":"deleteProduct","parameters":[{"description":"The store's workspace id (UUID)","in":"path","name":"workspaceId","required":true,"schema":{"description":"The store's workspace id (UUID)","type":"string"}},{"description":"The partner's own id for the product","in":"path","name":"externalId","required":true,"schema":{"description":"The partner's own id for the product","maxLength":100,"type":"string"}}],"responses":{"204":{"description":"No Content"},"404":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Not Found"},"422":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unprocessable Entity"},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Internal Server Error"}},"summary":"Delete a product","tags":["commerce"],"x-feature":"commerce.catalog","x-permission":"commerce:manage","x-realm":"tenant"},"put":{"description":"Answers 201 when the product is new and 200 otherwise. Sending the same product again changes nothing. Changes reach the store's WhatsApp catalog within a minute. A new product counts against commerce.products.max (403 plan_limit_reached).","operationId":"upsertProduct","parameters":[{"description":"The store's workspace id (UUID)","in":"path","name":"workspaceId","required":true,"schema":{"description":"The store's workspace id (UUID)","type":"string"}},{"description":"The partner's own id for the product","in":"path","name":"externalId","required":true,"schema":{"description":"The partner's own id for the product","maxLength":100,"pattern":"^[A-Za-z0-9._:-]+$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductFields"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpsertResultBody"}}},"description":"OK"},"409":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Conflict"},"422":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unprocessable Entity"},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Internal Server Error"}},"summary":"Create or update a product by its external id","tags":["commerce"],"x-feature":"commerce.catalog","x-permission":"commerce:manage","x-realm":"tenant"}},"/api/v1/workspaces/{workspaceId}/commerce/promotions":{"get":{"operationId":"listPromotions","parameters":[{"description":"The store's workspace id (UUID)","in":"path","name":"workspaceId","required":true,"schema":{"description":"The store's workspace id (UUID)","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromotionsBody"}}},"description":"OK"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Error"}},"summary":"List the store's promotions","tags":["commerce"],"x-feature":"commerce.orders","x-permission":"commerce:manage","x-realm":"tenant"},"post":{"description":"Only the best discount applies to an order unless promotions are combinable. A flash sale reaches the store's WhatsApp catalog as the items' sale price within a minute.","operationId":"createPromotion","parameters":[{"description":"The store's workspace id (UUID)","in":"path","name":"workspaceId","required":true,"schema":{"description":"The store's workspace id (UUID)","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromotionFields"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromotionBody"}}},"description":"Created"},"409":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Conflict"},"422":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unprocessable Entity"},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Internal Server Error"}},"summary":"Create a flash sale, a number-list discount or a coupon","tags":["commerce"],"x-feature":"commerce.orders","x-permission":"commerce:manage","x-realm":"tenant"}},"/api/v1/workspaces/{workspaceId}/commerce/promotions/{promotionId}":{"delete":{"description":"Orders that used it keep their discount.","operationId":"deletePromotion","parameters":[{"description":"The store's workspace id (UUID)","in":"path","name":"workspaceId","required":true,"schema":{"description":"The store's workspace id (UUID)","type":"string"}},{"description":"Promotion id (UUID)","in":"path","name":"promotionId","required":true,"schema":{"description":"Promotion id (UUID)","type":"string"}}],"responses":{"204":{"description":"No Content"},"404":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Not Found"},"422":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unprocessable Entity"},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Internal Server Error"}},"summary":"Delete a promotion","tags":["commerce"],"x-feature":"commerce.orders","x-permission":"commerce:manage","x-realm":"tenant"},"get":{"operationId":"getPromotion","parameters":[{"description":"The store's workspace id (UUID)","in":"path","name":"workspaceId","required":true,"schema":{"description":"The store's workspace id (UUID)","type":"string"}},{"description":"Promotion id (UUID)","in":"path","name":"promotionId","required":true,"schema":{"description":"Promotion id (UUID)","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromotionBody"}}},"description":"OK"},"404":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Not Found"},"422":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unprocessable Entity"},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Internal Server Error"}},"summary":"Get a promotion","tags":["commerce"],"x-feature":"commerce.orders","x-permission":"commerce:manage","x-realm":"tenant"},"put":{"operationId":"updatePromotion","parameters":[{"description":"The store's workspace id (UUID)","in":"path","name":"workspaceId","required":true,"schema":{"description":"The store's workspace id (UUID)","type":"string"}},{"description":"Promotion id (UUID)","in":"path","name":"promotionId","required":true,"schema":{"description":"Promotion id (UUID)","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromotionFields"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromotionBody"}}},"description":"OK"},"404":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Not Found"},"409":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Conflict"},"422":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unprocessable Entity"},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Internal Server Error"}},"summary":"Replace a promotion","tags":["commerce"],"x-feature":"commerce.orders","x-permission":"commerce:manage","x-realm":"tenant"}},"/api/v1/workspaces/{workspaceId}/conversations":{"get":{"description":"Conversations of your teams, pinned first, then the latest first.","operationId":"listConversations","parameters":[{"description":"Workspace id (UUID)","in":"path","name":"workspaceId","required":true,"schema":{"description":"Workspace id (UUID)","type":"string"}},{"description":"active: open and snoozed","explode":false,"in":"query","name":"status","schema":{"default":"active","description":"active: open and snoozed","enum":["active","open","snoozed","closed"],"type":"string"}},{"description":"Only this team's conversations","explode":false,"in":"query","name":"teamId","schema":{"description":"Only this team's conversations","format":"uuid","type":"string"}},{"description":"me, none, or a member id (UUID)","explode":false,"in":"query","name":"assignee","schema":{"description":"me, none, or a member id (UUID)","type":"string"}},{"description":"The next value of the previous page","explode":false,"in":"query","name":"cursor","schema":{"description":"The next value of the previous page","maxLength":200,"type":"string"}},{"explode":false,"in":"query","name":"limit","schema":{"default":30,"format":"int64","maximum":100,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationListOutputBody"}}},"description":"OK"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Error"}},"summary":"List conversations","tags":["inbox"],"x-feature":"whatsapp.number","x-permission":"inbox:reply","x-realm":"tenant"},"post":{"description":"Opens the customer's conversation, or reuses it, and queues the template. Outside the 24-hour window WhatsApp allows only templates.","operationId":"startConversation","parameters":[{"description":"Workspace id (UUID)","in":"path","name":"workspaceId","required":true,"schema":{"description":"Workspace id (UUID)","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StartInputBody"}}},"required":true},"responses":{"202":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StartOutputBody"}}},"description":"Accepted"},"403":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Forbidden"},"404":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Not Found"},"409":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Conflict"},"422":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unprocessable Entity"},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Internal Server Error"},"503":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Service Unavailable"}},"summary":"Message a customer with a template","tags":["inbox"],"x-feature":"whatsapp.number","x-permission":"inbox:reply","x-realm":"tenant"}},"/api/v1/workspaces/{workspaceId}/conversations/{conversationId}":{"get":{"operationId":"getConversation","parameters":[{"description":"Workspace id (UUID)","in":"path","name":"workspaceId","required":true,"schema":{"description":"Workspace id (UUID)","type":"string"}},{"description":"Conversation id (UUID)","in":"path","name":"conversationId","required":true,"schema":{"description":"Conversation id (UUID)","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationBody"}}},"description":"OK"},"404":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Not Found"},"422":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unprocessable Entity"},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Internal Server Error"}},"summary":"Get a conversation","tags":["inbox"],"x-feature":"whatsapp.number","x-permission":"inbox:reply","x-realm":"tenant"}},"/api/v1/workspaces/{workspaceId}/conversations/{conversationId}/messages":{"get":{"operationId":"listMessages","parameters":[{"description":"Workspace id (UUID)","in":"path","name":"workspaceId","required":true,"schema":{"description":"Workspace id (UUID)","type":"string"}},{"description":"Conversation id (UUID)","in":"path","name":"conversationId","required":true,"schema":{"description":"Conversation id (UUID)","type":"string"}},{"description":"The next value of the previous page","explode":false,"in":"query","name":"cursor","schema":{"description":"The next value of the previous page","maxLength":200,"type":"string"}},{"explode":false,"in":"query","name":"limit","schema":{"default":30,"format":"int64","maximum":100,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ThreadOutputBody"}}},"description":"OK"},"404":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Not Found"},"422":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unprocessable Entity"},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Internal Server Error"}},"summary":"List a conversation's messages","tags":["inbox"],"x-feature":"whatsapp.number","x-permission":"inbox:reply","x-realm":"tenant"},"post":{"description":"Queues the message and returns it pending; status updates follow as message.updated events. Repeating clientMsgId returns the same message.","operationId":"sendMessage","parameters":[{"description":"Workspace id (UUID)","in":"path","name":"workspaceId","required":true,"schema":{"description":"Workspace id (UUID)","type":"string"}},{"description":"Conversation id (UUID)","in":"path","name":"conversationId","required":true,"schema":{"description":"Conversation id (UUID)","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendBody"}}},"required":true},"responses":{"202":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageBody"}}},"description":"Accepted"},"403":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Forbidden"},"404":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Not Found"},"409":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Conflict"},"422":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unprocessable Entity"},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Internal Server Error"},"503":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Service Unavailable"}},"summary":"Send a message","tags":["inbox"],"x-feature":"whatsapp.number","x-permission":"inbox:reply","x-realm":"tenant"}},"/api/v1/workspaces/{workspaceId}/members":{"get":{"operationId":"listMembers","parameters":[{"description":"Workspace id (UUID)","in":"path","name":"workspaceId","required":true,"schema":{"description":"Workspace id (UUID)","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListMembersOutputBody"}}},"description":"OK"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Error"}},"summary":"List the workspace's members","tags":["members"],"x-feature":"seats","x-permission":"team:view","x-realm":"tenant"}},"/api/v1/workspaces/{workspaceId}/payments/paypoint":{"delete":{"description":"The workspace's owners and payment managers are told. A dashboard session needs a sign-in within the last 10 minutes; otherwise it answers 401 reauthentication_required. An SDK session is refused with 403 dashboard_sign_in_required.","operationId":"deleteStorePayPointKey","parameters":[{"description":"Workspace id (UUID)","in":"path","name":"workspaceId","required":true,"schema":{"description":"Workspace id (UUID)","type":"string"}}],"responses":{"204":{"description":"No Content"},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unauthorized"},"404":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Not Found"},"422":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unprocessable Entity"},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Internal Server Error"}},"summary":"Remove the store's PayPoint key","tags":["payments"],"x-feature":"commerce.payments","x-permission":"payments:manage","x-realm":"tenant"},"get":{"description":"Whether the store's own PayPoint key is saved (never the key) and the wallets customers may pay with.","operationId":"getStorePayPoint","parameters":[{"description":"Workspace id (UUID)","in":"path","name":"workspaceId","required":true,"schema":{"description":"Workspace id (UUID)","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StorePayPointBody"}}},"description":"OK"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Error"}},"summary":"Get the store's PayPoint connection","tags":["payments"],"x-feature":"commerce.payments","x-permission":"payments:manage","x-realm":"tenant"},"put":{"description":"Replaces any saved key. The key is write-only: no response, now or later, contains more than its last four characters. The workspace's owners and payment managers are told. A dashboard session needs a sign-in within the last 10 minutes; otherwise it answers 401 reauthentication_required. An SDK session is refused with 403 dashboard_sign_in_required.","operationId":"saveStorePayPointKey","parameters":[{"description":"Workspace id (UUID)","in":"path","name":"workspaceId","required":true,"schema":{"description":"Workspace id (UUID)","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StorePayPointKeyBody"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StorePayPointKeySavedBody"}}},"description":"OK"},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unauthorized"},"422":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unprocessable Entity"},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Internal Server Error"},"503":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Service Unavailable"}},"summary":"Save the store's PayPoint key","tags":["payments"],"x-feature":"commerce.payments","x-permission":"payments:manage","x-realm":"tenant"}},"/api/v1/workspaces/{workspaceId}/payments/paypoint/test":{"post":{"description":"Asks PayPoint whether it accepts the saved key, without charging anyone.","operationId":"testStorePayPointKey","parameters":[{"description":"Workspace id (UUID)","in":"path","name":"workspaceId","required":true,"schema":{"description":"Workspace id (UUID)","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StorePayPointKeyTestBody"}}},"description":"OK"},"404":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Not Found"},"422":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unprocessable Entity"},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Internal Server Error"},"503":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Service Unavailable"}},"summary":"Check the store's PayPoint key with PayPoint","tags":["payments"],"x-feature":"commerce.payments","x-permission":"payments:manage","x-realm":"tenant"}},"/api/v1/workspaces/{workspaceId}/payments/paypoint/wallets":{"put":{"description":"A dashboard session needs a sign-in within the last 10 minutes; otherwise it answers 401 reauthentication_required. An SDK session is refused with 403 dashboard_sign_in_required.","operationId":"setStorePayPointWallets","parameters":[{"description":"Workspace id (UUID)","in":"path","name":"workspaceId","required":true,"schema":{"description":"Workspace id (UUID)","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StorePayPointWalletsBody"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StorePayPointBody"}}},"description":"OK"},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unauthorized"},"422":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unprocessable Entity"},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Internal Server Error"}},"summary":"Choose the wallets customers may pay the store with","tags":["payments"],"x-feature":"commerce.payments","x-permission":"payments:manage","x-realm":"tenant"}},"/api/v1/workspaces/{workspaceId}/recordings":{"get":{"description":"Recordings that a team's settings play are listed only for that team's members, Owner and Admin.","operationId":"listRecordings","parameters":[{"description":"Workspace id (UUID)","in":"path","name":"workspaceId","required":true,"schema":{"description":"Workspace id (UUID)","type":"string"}},{"description":"Only recordings of this kind","explode":false,"in":"query","name":"kind","schema":{"description":"Only recordings of this kind","enum":["greeting","option","fallback_closed","fallback_prayer","fallback_missed","hold","custom"],"type":"string"}},{"description":"Only recordings in this language","explode":false,"in":"query","name":"language","schema":{"description":"Only recordings in this language","enum":["en","so","ar"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListOutputBody"}}},"description":"OK"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Error"}},"summary":"List the call audio library","tags":["recordings"],"x-feature":"recordings.library","x-permission":"recordings:view","x-realm":"tenant"}},"/api/v1/workspaces/{workspaceId}/recordings/{recordingId}":{"get":{"operationId":"getRecording","parameters":[{"description":"Workspace id (UUID)","in":"path","name":"workspaceId","required":true,"schema":{"description":"Workspace id (UUID)","type":"string"}},{"description":"Recording id (UUID)","in":"path","name":"recordingId","required":true,"schema":{"description":"Recording id (UUID)","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecordingBody"}}},"description":"OK"},"404":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Not Found"},"422":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unprocessable Entity"},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Internal Server Error"}},"summary":"Get a recording","tags":["recordings"],"x-feature":"recordings.library","x-permission":"recordings:view","x-realm":"tenant"}},"/api/v1/workspaces/{workspaceId}/teams":{"get":{"operationId":"listTeams","parameters":[{"description":"Workspace id (UUID)","in":"path","name":"workspaceId","required":true,"schema":{"description":"Workspace id (UUID)","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListTeamsOutputBody"}}},"description":"OK"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Error"}},"summary":"List the workspace's teams","tags":["teams"],"x-feature":"seats","x-permission":"team:view","x-realm":"tenant"}},"/api/v1/workspaces/{workspaceId}/teams/{teamId}":{"get":{"operationId":"getTeam","parameters":[{"description":"Workspace id (UUID)","in":"path","name":"workspaceId","required":true,"schema":{"description":"Workspace id (UUID)","type":"string"}},{"description":"Team id (UUID)","in":"path","name":"teamId","required":true,"schema":{"description":"Team id (UUID)","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamDetailBody"}}},"description":"OK"},"404":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Not Found"},"422":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unprocessable Entity"},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Internal Server Error"}},"summary":"Get a team","tags":["teams"],"x-feature":"seats","x-permission":"team:view","x-realm":"tenant"}},"/api/v1/workspaces/{workspaceId}/templates":{"get":{"description":"The templates of the workspace's WhatsApp Business Account, as Meta last reported them.","operationId":"listTemplates","parameters":[{"description":"Workspace id (UUID)","in":"path","name":"workspaceId","required":true,"schema":{"description":"Workspace id (UUID)","type":"string"}},{"description":"Only templates with this status, such as approved for the send picker","explode":false,"in":"query","name":"status","schema":{"description":"Only templates with this status, such as approved for the send picker","enum":["submitting","submit_failed","pending","approved","rejected","paused","disabled","in_appeal","pending_deletion","limit_exceeded","archived","deleting"],"type":"string"}},{"explode":false,"in":"query","name":"category","schema":{"enum":["marketing","utility","authentication"],"type":"string"}},{"description":"Only names starting with this","explode":false,"in":"query","name":"prefix","schema":{"description":"Only names starting with this","maxLength":512,"pattern":"^[a-z0-9_]*$","type":"string"}},{"description":"The next value of the previous page","explode":false,"in":"query","name":"cursor","schema":{"description":"The next value of the previous page","maxLength":600,"type":"string"}},{"explode":false,"in":"query","name":"limit","schema":{"default":50,"format":"int64","maximum":200,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListOutputBody3"}}},"description":"OK"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Error"}},"summary":"List WhatsApp templates","tags":["templates"],"x-feature":"whatsapp.number","x-permission":"templates:send","x-realm":"tenant"},"post":{"description":"Checks the template against Meta's rules, then queues it for Meta's review: it starts as submitting, and template.updated events follow as Meta reviews it.","operationId":"createTemplate","parameters":[{"description":"Workspace id (UUID)","in":"path","name":"workspaceId","required":true,"schema":{"description":"Workspace id (UUID)","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateInputBody2"}}},"required":true},"responses":{"202":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TemplateBody"}}},"description":"Accepted"},"409":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Conflict"},"422":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unprocessable Entity"},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Internal Server Error"}},"summary":"Submit a new WhatsApp template","tags":["templates"],"x-feature":"whatsapp.number","x-permission":"templates:manage","x-realm":"tenant"}},"/api/v1/workspaces/{workspaceId}/templates/sync":{"post":{"description":"Queues a read of every template from Meta; only templates that changed are written. A template.synced event follows.","operationId":"syncTemplates","parameters":[{"description":"Workspace id (UUID)","in":"path","name":"workspaceId","required":true,"schema":{"description":"Workspace id (UUID)","type":"string"}}],"responses":{"202":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SyncOutputBody"}}},"description":"Accepted"},"409":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Conflict"},"422":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unprocessable Entity"},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Internal Server Error"}},"summary":"Sync templates from Meta","tags":["templates"],"x-feature":"whatsapp.number","x-permission":"templates:manage","x-realm":"tenant"}},"/api/v1/workspaces/{workspaceId}/templates/{templateId}":{"delete":{"description":"Deletes this language of the template at Meta; a template.deleted event follows.","operationId":"deleteTemplate","parameters":[{"description":"Workspace id (UUID)","in":"path","name":"workspaceId","required":true,"schema":{"description":"Workspace id (UUID)","type":"string"}},{"description":"Template id (UUID)","in":"path","name":"templateId","required":true,"schema":{"description":"Template id (UUID)","type":"string"}}],"responses":{"202":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TemplateBody"}}},"description":"Accepted"},"404":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Not Found"},"409":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Conflict"},"422":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unprocessable Entity"},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Internal Server Error"}},"summary":"Delete a WhatsApp template","tags":["templates"],"x-feature":"whatsapp.number","x-permission":"templates:manage","x-realm":"tenant"},"get":{"operationId":"getTemplate","parameters":[{"description":"Workspace id (UUID)","in":"path","name":"workspaceId","required":true,"schema":{"description":"Workspace id (UUID)","type":"string"}},{"description":"Template id (UUID)","in":"path","name":"templateId","required":true,"schema":{"description":"Template id (UUID)","type":"string"}},{"description":"Count usage from this time; the last 30 days by default","explode":false,"in":"query","name":"since","schema":{"description":"Count usage from this time; the last 30 days by default","format":"date-time","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TemplateBody"}}},"description":"OK"},"404":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Not Found"},"422":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unprocessable Entity"},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Internal Server Error"}},"summary":"Get a WhatsApp template with its usage","tags":["templates"],"x-feature":"whatsapp.number","x-permission":"templates:send","x-realm":"tenant"},"put":{"description":"Approved, rejected and paused templates go back to Meta's review; a template Meta refused to create is submitted again.","operationId":"editTemplate","parameters":[{"description":"Workspace id (UUID)","in":"path","name":"workspaceId","required":true,"schema":{"description":"Workspace id (UUID)","type":"string"}},{"description":"Template id (UUID)","in":"path","name":"templateId","required":true,"schema":{"description":"Template id (UUID)","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EditInputBody"}}},"required":true},"responses":{"202":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TemplateBody"}}},"description":"Accepted"},"404":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Not Found"},"409":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Conflict"},"422":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unprocessable Entity"},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Internal Server Error"}},"summary":"Edit a WhatsApp template","tags":["templates"],"x-feature":"whatsapp.number","x-permission":"templates:manage","x-realm":"tenant"}},"/api/v1/workspaces/{workspaceId}/templates/{templateId}/preview":{"post":{"description":"Checks the parameters exactly as sending does, and returns the message the customer will see. Invalid parameters get 422 with the field of each problem.","operationId":"previewTemplate","parameters":[{"description":"Workspace id (UUID)","in":"path","name":"workspaceId","required":true,"schema":{"description":"Workspace id (UUID)","type":"string"}},{"description":"Template id (UUID)","in":"path","name":"templateId","required":true,"schema":{"description":"Template id (UUID)","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreviewInputBody"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreviewOutputBody"}}},"description":"OK"},"404":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Not Found"},"422":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unprocessable Entity"},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Internal Server Error"}},"summary":"Preview a template with parameters","tags":["templates"],"x-feature":"whatsapp.number","x-permission":"templates:send","x-realm":"tenant"}},"/api/v1/workspaces/{workspaceId}/webhook-endpoints":{"get":{"operationId":"listWebhookEndpoints","parameters":[{"description":"Workspace id (UUID)","in":"path","name":"workspaceId","required":true,"schema":{"description":"Workspace id (UUID)","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpointsOutputBody"}}},"description":"OK"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Error"}},"summary":"List the workspace's webhook endpoints","tags":["webhook-endpoints"],"x-feature":"workspace.core","x-permission":"developers:manage","x-realm":"tenant"},"post":{"description":"Every delivery is a POST with the event as JSON and a Nexafon-Signature header: t=<unix seconds>,v1=<hex HMAC-SHA256 of \"<t>.<body>\" keyed with the secret>. Reject a timestamp more than 5 minutes old. The secret is in this response only. A dashboard session needs a sign-in within the last 10 minutes; otherwise it answers 401 reauthentication_required. An SDK session is refused with 403 dashboard_sign_in_required.","operationId":"createWebhookEndpoint","parameters":[{"description":"Workspace id (UUID)","in":"path","name":"workspaceId","required":true,"schema":{"description":"Workspace id (UUID)","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateWebhookEndpointInputBody"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookSecretOutputBody"}}},"description":"Created"},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unauthorized"},"409":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Conflict"},"422":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unprocessable Entity"},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Internal Server Error"}},"summary":"Register a webhook endpoint","tags":["webhook-endpoints"],"x-feature":"workspace.core","x-permission":"developers:manage","x-realm":"tenant"}},"/api/v1/workspaces/{workspaceId}/webhook-endpoints/{endpointId}":{"delete":{"operationId":"deleteWebhookEndpoint","parameters":[{"description":"Workspace id (UUID)","in":"path","name":"workspaceId","required":true,"schema":{"description":"Workspace id (UUID)","type":"string"}},{"description":"Webhook endpoint id (UUID)","in":"path","name":"endpointId","required":true,"schema":{"description":"Webhook endpoint id (UUID)","type":"string"}}],"responses":{"204":{"description":"No Content"},"404":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Not Found"},"422":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unprocessable Entity"},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Internal Server Error"}},"summary":"Delete a webhook endpoint and its delivery log","tags":["webhook-endpoints"],"x-feature":"workspace.core","x-permission":"developers:manage","x-realm":"tenant"},"get":{"operationId":"getWebhookEndpoint","parameters":[{"description":"Workspace id (UUID)","in":"path","name":"workspaceId","required":true,"schema":{"description":"Workspace id (UUID)","type":"string"}},{"description":"Webhook endpoint id (UUID)","in":"path","name":"endpointId","required":true,"schema":{"description":"Webhook endpoint id (UUID)","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpointBody"}}},"description":"OK"},"404":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Not Found"},"422":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unprocessable Entity"},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Internal Server Error"}},"summary":"Get a webhook endpoint","tags":["webhook-endpoints"],"x-feature":"workspace.core","x-permission":"developers:manage","x-realm":"tenant"},"patch":{"description":"A dashboard session needs a sign-in within the last 10 minutes; otherwise it answers 401 reauthentication_required. An SDK session is refused with 403 dashboard_sign_in_required.","operationId":"updateWebhookEndpoint","parameters":[{"description":"Workspace id (UUID)","in":"path","name":"workspaceId","required":true,"schema":{"description":"Workspace id (UUID)","type":"string"}},{"description":"Webhook endpoint id (UUID)","in":"path","name":"endpointId","required":true,"schema":{"description":"Webhook endpoint id (UUID)","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateWebhookEndpointInputBody"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpointBody"}}},"description":"OK"},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unauthorized"},"404":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Not Found"},"422":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unprocessable Entity"},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Internal Server Error"}},"summary":"Change a webhook endpoint, or turn it off or back on","tags":["webhook-endpoints"],"x-feature":"workspace.core","x-permission":"developers:manage","x-realm":"tenant"}},"/api/v1/workspaces/{workspaceId}/webhook-endpoints/{endpointId}/deliveries":{"get":{"operationId":"listWebhookDeliveries","parameters":[{"description":"Workspace id (UUID)","in":"path","name":"workspaceId","required":true,"schema":{"description":"Workspace id (UUID)","type":"string"}},{"description":"Webhook endpoint id (UUID)","in":"path","name":"endpointId","required":true,"schema":{"description":"Webhook endpoint id (UUID)","type":"string"}},{"description":"Only this event's attempts","explode":false,"in":"query","name":"eventId","schema":{"description":"Only this event's attempts","format":"uuid","type":"string"}},{"explode":false,"in":"query","name":"status","schema":{"enum":["succeeded","failed"],"type":"string"}},{"description":"The next value of the previous page","explode":false,"in":"query","name":"cursor","schema":{"description":"The next value of the previous page","maxLength":200,"type":"string"}},{"explode":false,"in":"query","name":"limit","schema":{"default":30,"format":"int64","maximum":100,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookDeliveriesOutputBody"}}},"description":"OK"},"404":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Not Found"},"422":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unprocessable Entity"},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Internal Server Error"}},"summary":"List every delivery attempt to an endpoint","tags":["webhook-endpoints"],"x-feature":"workspace.core","x-permission":"developers:manage","x-realm":"tenant"}},"/api/v1/workspaces/{workspaceId}/webhook-endpoints/{endpointId}/events/{eventId}/replay":{"post":{"description":"The event keeps its id. It is retried on the usual schedule; the delivery log shows every attempt.","operationId":"replayWebhookEndpointEvent","parameters":[{"description":"Workspace id (UUID)","in":"path","name":"workspaceId","required":true,"schema":{"description":"Workspace id (UUID)","type":"string"}},{"description":"Webhook endpoint id (UUID)","in":"path","name":"endpointId","required":true,"schema":{"description":"Webhook endpoint id (UUID)","type":"string"}},{"description":"Event id (UUID) from the delivery log","in":"path","name":"eventId","required":true,"schema":{"description":"Event id (UUID) from the delivery log","type":"string"}}],"responses":{"202":{"description":"Accepted"},"404":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Not Found"},"409":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Conflict"},"422":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unprocessable Entity"},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Internal Server Error"}},"summary":"Send an event to an endpoint again","tags":["webhook-endpoints"],"x-feature":"workspace.core","x-permission":"developers:manage","x-realm":"tenant"}},"/api/v1/workspaces/{workspaceId}/webhook-endpoints/{endpointId}/rotate-secret":{"post":{"description":"Until previousSecretExpiresAt the Nexafon-Signature header carries a v1 signature for each secret, so the receiver can switch over without missing an event. The new secret is in this response only. A dashboard session needs a sign-in within the last 10 minutes; otherwise it answers 401 reauthentication_required. An SDK session is refused with 403 dashboard_sign_in_required.","operationId":"rotateWebhookEndpointSecret","parameters":[{"description":"Workspace id (UUID)","in":"path","name":"workspaceId","required":true,"schema":{"description":"Workspace id (UUID)","type":"string"}},{"description":"Webhook endpoint id (UUID)","in":"path","name":"endpointId","required":true,"schema":{"description":"Webhook endpoint id (UUID)","type":"string"}},{"description":"How long deliveries are also signed with the replaced secret","explode":false,"in":"query","name":"keepPreviousHours","schema":{"default":24,"description":"How long deliveries are also signed with the replaced secret","format":"int64","maximum":168,"minimum":0,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookSecretOutputBody"}}},"description":"OK"},"401":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unauthorized"},"404":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Not Found"},"422":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unprocessable Entity"},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Internal Server Error"}},"summary":"Replace a webhook endpoint's signing secret","tags":["webhook-endpoints"],"x-feature":"workspace.core","x-permission":"developers:manage","x-realm":"tenant"}},"/api/v1/workspaces/{workspaceId}/webhook-endpoints/{endpointId}/test":{"post":{"description":"Works on a disabled endpoint too. It is tried once; the delivery log shows the result.","operationId":"sendWebhookTest","parameters":[{"description":"Workspace id (UUID)","in":"path","name":"workspaceId","required":true,"schema":{"description":"Workspace id (UUID)","type":"string"}},{"description":"Webhook endpoint id (UUID)","in":"path","name":"endpointId","required":true,"schema":{"description":"Webhook endpoint id (UUID)","type":"string"}}],"responses":{"202":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookTestOutputBody"}}},"description":"Accepted"},"404":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Not Found"},"422":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unprocessable Entity"},"500":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Internal Server Error"}},"summary":"Send a webhook.test event to an endpoint","tags":["webhook-endpoints"],"x-feature":"workspace.core","x-permission":"developers:manage","x-realm":"tenant"}},"/api/v1/workspaces/{workspaceId}/webhook-event-types":{"get":{"operationId":"listWebhookEventTypes","parameters":[{"description":"Workspace id (UUID)","in":"path","name":"workspaceId","required":true,"schema":{"description":"Workspace id (UUID)","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEventTypesOutputBody"}}},"description":"OK"},"default":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Error"}},"summary":"List the events an endpoint can subscribe to","tags":["webhook-endpoints"],"x-feature":"workspace.core","x-permission":"developers:manage","x-realm":"tenant"}}},"security":[{"bearer":[]}],"servers":[{"url":"https://api.nexafone.so","description":"Nexafon API"}]}