{"openapi":"3.1.0","info":{"title":"Worbo API","version":"1.0.0","description":"The Worbo API: contacts, objects and events, WhatsApp messages and templates, segments, automations, campaigns, the inbox, catalogs and webhooks.","contact":{"name":"Worbo","email":"hello@worbo.app"}},"servers":[{"url":"https://api.worbo.app/v1"}],"security":[{"apiKey":[]}],"tags":[{"name":"workspace","x-displayName":"Workspace","description":"The key in use, the WhatsApp numbers, the usage of the month and the audit log."},{"name":"contacts","x-displayName":"Contacts","description":"People, found by any of their identities: phone, email, BSUID or the ID at a source."},{"name":"consents","x-displayName":"Consent","description":"The append-only consent history, by purpose and topic, with the proof of each consent."},{"name":"schema","x-displayName":"Data model","description":"The fields of the contacts, the object types and the event types of the organization, with their JSON Schema."},{"name":"objects","x-displayName":"Objects","description":"Memberships, bookings, orders: the records of each object type, linked to contacts in roles."},{"name":"files","x-displayName":"Files","description":"The files of the file fields: uploaded first, then given by ID as the value of the field."},{"name":"events","x-displayName":"Events","description":"What happened at the source; events start automations and update objects."},{"name":"messages","x-displayName":"Messages","description":"WhatsApp messages sent and received, through the same rules as in the dashboard."},{"name":"vault","x-displayName":"Document vault","description":"Files given to a contact through a link that expires, announced on WhatsApp and opened only with a code sent to the phone of the contact."},{"name":"otp","x-displayName":"Verification codes","description":"One-time codes sent on WhatsApp with the authentication template of the number, checked by Worbo or by the organization."},{"name":"recommendations","x-displayName":"Recommendations","description":"The rules of the recommendation engine and what one of them would recommend now to a contact, with the reason of each item."},{"name":"templates","x-displayName":"Templates","description":"WhatsApp templates: drafts checked by the linter, submission to Meta and status."},{"name":"offers","x-displayName":"Offers","description":"Offers found by their code and redeemed, at the front desk or in the software of the source."},{"name":"segments","x-displayName":"Segments","description":"Dynamic segments of contacts, counted live."},{"name":"automations","x-displayName":"Automations","description":"Reading automations, starting one for a contact and taking a contact out of a run."},{"name":"campaigns","x-displayName":"Campaigns","description":"Campaign drafts and their estimate; the launch is approved in the dashboard."},{"name":"conversations","x-displayName":"Conversations","description":"The inbox: conversations, their messages, replies, assignment and closing."},{"name":"catalogs","x-displayName":"Catalogs","description":"Products, services, classes, plans and locations, written one by one or in batches."},{"name":"webhooks","x-displayName":"Webhooks","description":"The endpoints that receive the events of Worbo, their deliveries and replays."},{"name":"analytics","x-displayName":"Reports","description":"The results of a period and the conversions of the automations."}],"paths":{"/audit-logs":{"get":{"operationId":"listAuditLogs","tags":["workspace"],"summary":"List the audit log of the organization","description":"Needs the scope workspace:read. Reads data, so it needs a live key.","x-worbo-scopes":["workspace:read"],"x-worbo-live-key":true,"parameters":[{"name":"action","in":"query","description":"Only the entries of this action.","schema":{"type":"string","examples":["contact.created"]}},{"name":"since","in":"query","description":"Only what changed at or after this moment.","schema":{"type":"string","format":"date-time","examples":["2026-10-01T00:00:00+03:00"]}},{"$ref":"#/components/parameters/Limit"},{"$ref":"#/components/parameters/Cursor"},{"$ref":"#/components/parameters/WorboVersion"}],"responses":{"200":{"description":"OK","headers":{"Worbo-Version":{"$ref":"#/components/headers/WorboVersion"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/AuditLogEntry"}},"next_cursor":{"type":["string","null"],"description":"The cursor of the next page; null on the last one."},"has_more":{"type":"boolean"}},"required":["data","next_cursor","has_more"]}}}},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/automations":{"get":{"operationId":"listAutomations","tags":["automations"],"summary":"List the automations","description":"Needs the scope automations:read.","x-worbo-scopes":["automations:read"],"x-worbo-live-key":false,"parameters":[{"$ref":"#/components/parameters/Limit"},{"$ref":"#/components/parameters/Cursor"},{"$ref":"#/components/parameters/WorboVersion"}],"responses":{"200":{"description":"OK","headers":{"Worbo-Version":{"$ref":"#/components/headers/WorboVersion"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Automation"}},"next_cursor":{"type":["string","null"],"description":"The cursor of the next page; null on the last one."},"has_more":{"type":"boolean"}},"required":["data","next_cursor","has_more"]}}}},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/automations/{automation}":{"get":{"operationId":"getAutomation","tags":["automations"],"summary":"Read an automation, with its definition and its figures","description":"Needs the scope automations:read.","x-worbo-scopes":["automations:read"],"x-worbo-live-key":false,"parameters":[{"name":"automation","in":"path","required":true,"description":"The ID of the automation.","schema":{"type":"integer","examples":[8]}},{"$ref":"#/components/parameters/WorboVersion"}],"responses":{"200":{"description":"OK","headers":{"Worbo-Version":{"$ref":"#/components/headers/WorboVersion"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/AutomationDetail"}},"required":["data"]}}}},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/automations/{automation}/runs":{"post":{"operationId":"startAutomation","tags":["automations"],"summary":"Start an automation for a contact","description":"Only an active automation started by hand. The run takes the newest object of the contact of the type chosen in the trigger; the same Idempotency-Key starts it only once. Needs the scope automations:run.","x-worbo-scopes":["automations:run"],"x-worbo-live-key":false,"parameters":[{"name":"automation","in":"path","required":true,"description":"The ID of the automation.","schema":{"type":"integer","examples":[8]}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/DryRun"},{"$ref":"#/components/parameters/WorboVersion"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunStart"}}}},"responses":{"201":{"description":"Created","headers":{"Worbo-Version":{"$ref":"#/components/headers/WorboVersion"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/AutomationRun"}},"required":["data"]}}}},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/automations/{automation}/runs/{run}":{"delete":{"operationId":"exitAutomationRun","tags":["automations"],"summary":"Take a contact out of a run","description":"Needs the scope automations:run.","x-worbo-scopes":["automations:run"],"x-worbo-live-key":false,"parameters":[{"name":"automation","in":"path","required":true,"description":"The ID of the automation.","schema":{"type":"integer","examples":[8]}},{"name":"run","in":"path","required":true,"description":"The ID of the run.","schema":{"type":"integer","examples":[3301]}},{"$ref":"#/components/parameters/DryRun"},{"$ref":"#/components/parameters/WorboVersion"}],"responses":{"200":{"description":"OK","headers":{"Worbo-Version":{"$ref":"#/components/headers/WorboVersion"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/AutomationRun"}},"required":["data"]}}}},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/campaigns":{"get":{"operationId":"listCampaigns","tags":["campaigns"],"summary":"List the campaigns","description":"Needs the scope campaigns:read.","x-worbo-scopes":["campaigns:read"],"x-worbo-live-key":false,"parameters":[{"$ref":"#/components/parameters/Limit"},{"$ref":"#/components/parameters/Cursor"},{"$ref":"#/components/parameters/WorboVersion"}],"responses":{"200":{"description":"OK","headers":{"Worbo-Version":{"$ref":"#/components/headers/WorboVersion"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Campaign"}},"next_cursor":{"type":["string","null"],"description":"The cursor of the next page; null on the last one."},"has_more":{"type":"boolean"}},"required":["data","next_cursor","has_more"]}}}},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}}},"post":{"operationId":"draftCampaign","tags":["campaigns"],"summary":"Create a campaign draft","description":"The moments come in ISO 8601, with their time zone. The launch is approved in the dashboard. Needs the scope campaigns:write.","x-worbo-scopes":["campaigns:write"],"x-worbo-live-key":false,"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/DryRun"},{"$ref":"#/components/parameters/WorboVersion"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignWrite"}}}},"responses":{"201":{"description":"Created","headers":{"Worbo-Version":{"$ref":"#/components/headers/WorboVersion"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Campaign"}},"required":["data"]}}}},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/campaigns/{campaign}":{"get":{"operationId":"getCampaign","tags":["campaigns"],"summary":"Read a campaign, with the report of its messages and the cost","description":"Needs the scope campaigns:read.","x-worbo-scopes":["campaigns:read"],"x-worbo-live-key":false,"parameters":[{"name":"campaign","in":"path","required":true,"description":"The ID of the campaign.","schema":{"type":"integer","examples":[21]}},{"$ref":"#/components/parameters/WorboVersion"}],"responses":{"200":{"description":"OK","headers":{"Worbo-Version":{"$ref":"#/components/headers/WorboVersion"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/CampaignDetail"}},"required":["data"]}}}},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/campaigns/{campaign}/estimate":{"post":{"operationId":"estimateCampaign","tags":["campaigns"],"summary":"Estimate the audience and the cost of a campaign","description":"With the same exclusions as at launch: no WhatsApp, no consent, undeliverable, the frequency cap. Needs the scope campaigns:write.","x-worbo-scopes":["campaigns:write"],"x-worbo-live-key":false,"parameters":[{"name":"campaign","in":"path","required":true,"description":"The ID of the campaign.","schema":{"type":"integer","examples":[21]}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/DryRun"},{"$ref":"#/components/parameters/WorboVersion"}],"responses":{"200":{"description":"OK","headers":{"Worbo-Version":{"$ref":"#/components/headers/WorboVersion"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/CampaignEstimate"}},"required":["data"]}}}},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/catalogs":{"get":{"operationId":"listCatalogs","tags":["catalogs"],"summary":"List the catalogs","description":"Needs the scope catalogs:read.","x-worbo-scopes":["catalogs:read"],"x-worbo-live-key":false,"parameters":[{"$ref":"#/components/parameters/WorboVersion"}],"responses":{"200":{"description":"OK","headers":{"Worbo-Version":{"$ref":"#/components/headers/WorboVersion"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Catalog"}}},"required":["data"]}}}},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/catalogs/{catalog}/items":{"get":{"operationId":"listCatalogItems","tags":["catalogs"],"summary":"List the items of a catalog","description":"Needs the scope catalogs:read.","x-worbo-scopes":["catalogs:read"],"x-worbo-live-key":false,"parameters":[{"name":"catalog","in":"path","required":true,"description":"The key of the catalog, such as fit.classes.","schema":{"type":"string","examples":["fit.classes"],"pattern":"^[a-z0-9][a-z0-9._-]*$"}},{"$ref":"#/components/parameters/Limit"},{"$ref":"#/components/parameters/Cursor"},{"$ref":"#/components/parameters/WorboVersion"}],"responses":{"200":{"description":"OK","headers":{"Worbo-Version":{"$ref":"#/components/headers/WorboVersion"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/CatalogItem"}},"next_cursor":{"type":["string","null"],"description":"The cursor of the next page; null on the last one."},"has_more":{"type":"boolean"}},"required":["data","next_cursor","has_more"]}}}},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}},"post":{"operationId":"upsertCatalogItem","tags":["catalogs"],"summary":"Create or update an item by its ID at the source","description":"Needs the scope catalogs:write.","x-worbo-scopes":["catalogs:write"],"x-worbo-live-key":false,"parameters":[{"name":"catalog","in":"path","required":true,"description":"The key of the catalog, such as fit.classes.","schema":{"type":"string","examples":["fit.classes"],"pattern":"^[a-z0-9][a-z0-9._-]*$"}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/DryRun"},{"$ref":"#/components/parameters/WorboVersion"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CatalogItemWrite"}}}},"responses":{"200":{"description":"OK","headers":{"Worbo-Version":{"$ref":"#/components/headers/WorboVersion"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/CatalogItem"}},"required":["data"]}}}},"201":{"description":"Created","headers":{"Worbo-Version":{"$ref":"#/components/headers/WorboVersion"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/CatalogItem"}},"required":["data"]}}}},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/catalogs/{catalog}/items/batch":{"post":{"operationId":"upsertCatalogItems","tags":["catalogs"],"summary":"Create or update up to 100 items","description":"Needs the scope catalogs:write.","x-worbo-scopes":["catalogs:write"],"x-worbo-live-key":false,"parameters":[{"name":"catalog","in":"path","required":true,"description":"The key of the catalog, such as fit.classes.","schema":{"type":"string","examples":["fit.classes"],"pattern":"^[a-z0-9][a-z0-9._-]*$"}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/DryRun"},{"$ref":"#/components/parameters/WorboVersion"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/BatchRequest"},{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/CatalogItemWrite"}}}}]}}}},"responses":{"200":{"description":"OK","headers":{"Worbo-Version":{"$ref":"#/components/headers/WorboVersion"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"allOf":[{"$ref":"#/components/schemas/BatchResult"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/CatalogItem"}}}]}}},"required":["data"]}}}},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/contacts":{"get":{"operationId":"listContacts","tags":["contacts"],"summary":"List and search contacts","description":"Needs the scope contacts:read. Reads data, so it needs a live key.","x-worbo-scopes":["contacts:read"],"x-worbo-live-key":true,"parameters":[{"name":"search","in":"query","description":"Text in the name, the phone or the email.","schema":{"type":"string","examples":["Ana"]}},{"name":"phone","in":"query","description":"The contact with this phone.","schema":{"type":"string","examples":["+40722123456"]}},{"name":"email","in":"query","description":"The contact with this email.","schema":{"type":"string","format":"email","examples":["ana@example.com"]}},{"name":"external_id","in":"query","description":"The contact with this ID at the source given in source.","schema":{"type":"string","examples":["crm-1001"]}},{"name":"source","in":"query","description":"The source of the external ID or of the contacts.","schema":{"type":"string","examples":["crm"]}},{"name":"tag","in":"query","description":"Only the contacts with this tag.","schema":{"type":"string","examples":["vip"]}},{"name":"updated_since","in":"query","description":"Only what changed at or after this moment.","schema":{"type":"string","format":"date-time","examples":["2026-10-01T00:00:00+03:00"]}},{"$ref":"#/components/parameters/Limit"},{"$ref":"#/components/parameters/Cursor"},{"$ref":"#/components/parameters/WorboVersion"}],"responses":{"200":{"description":"OK","headers":{"Worbo-Version":{"$ref":"#/components/headers/WorboVersion"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Contact"}},"next_cursor":{"type":["string","null"],"description":"The cursor of the next page; null on the last one."},"has_more":{"type":"boolean"}},"required":["data","next_cursor","has_more"]}}}},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"}}},"post":{"operationId":"upsertContact","tags":["contacts"],"summary":"Create or update a contact by any of its identities","description":"The contact is found by any of the identities sent; the others are attached to it. With update_existing_only, an unknown contact is not created. Needs the scope contacts:write.","x-worbo-scopes":["contacts:write"],"x-worbo-live-key":false,"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/DryRun"},{"$ref":"#/components/parameters/WorboVersion"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactWrite"}}}},"responses":{"200":{"description":"OK","headers":{"Worbo-Version":{"$ref":"#/components/headers/WorboVersion"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Contact"}},"required":["data"]}}}},"201":{"description":"Created","headers":{"Worbo-Version":{"$ref":"#/components/headers/WorboVersion"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Contact"}},"required":["data"]}}}},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/contacts/batch":{"post":{"operationId":"upsertContacts","tags":["contacts"],"summary":"Create or update up to 100 contacts","description":"Needs the scope contacts:write.","x-worbo-scopes":["contacts:write"],"x-worbo-live-key":false,"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/DryRun"},{"$ref":"#/components/parameters/WorboVersion"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/BatchRequest"},{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/ContactWrite"}}}}]}}}},"responses":{"200":{"description":"OK","headers":{"Worbo-Version":{"$ref":"#/components/headers/WorboVersion"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"allOf":[{"$ref":"#/components/schemas/BatchResult"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Contact"}}}]}}},"required":["data"]}}}},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/contacts/schema":{"get":{"operationId":"getContactSchema","tags":["schema"],"summary":"Read the JSON Schema of the body that writes a contact","description":"With the custom fields of the organization; any key reads it. Any key of the organization can call it.","x-worbo-scopes":[],"x-worbo-live-key":false,"parameters":[{"$ref":"#/components/parameters/WorboVersion"}],"responses":{"200":{"description":"OK","headers":{"Worbo-Version":{"$ref":"#/components/headers/WorboVersion"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/JsonSchema"}},"required":["data"]}}}},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/contacts/{contact}":{"get":{"operationId":"getContact","tags":["contacts"],"summary":"Read a contact","description":"Needs the scope contacts:read. Reads data, so it needs a live key.","x-worbo-scopes":["contacts:read"],"x-worbo-live-key":true,"parameters":[{"name":"contact","in":"path","required":true,"description":"The ID of the contact.","schema":{"type":"integer","examples":[123]}},{"$ref":"#/components/parameters/WorboVersion"}],"responses":{"200":{"description":"OK","headers":{"Worbo-Version":{"$ref":"#/components/headers/WorboVersion"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Contact"}},"required":["data"]}}}},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}},"patch":{"operationId":"updateContact","tags":["contacts"],"summary":"Change the fields and the tags of a contact","description":"Needs the scope contacts:write.","x-worbo-scopes":["contacts:write"],"x-worbo-live-key":false,"parameters":[{"name":"contact","in":"path","required":true,"description":"The ID of the contact.","schema":{"type":"integer","examples":[123]}},{"$ref":"#/components/parameters/DryRun"},{"$ref":"#/components/parameters/WorboVersion"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactUpdate"}}}},"responses":{"200":{"description":"OK","headers":{"Worbo-Version":{"$ref":"#/components/headers/WorboVersion"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Contact"}},"required":["data"]}}}},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"}}},"delete":{"operationId":"eraseContact","tags":["contacts"],"summary":"Erase a contact, at the request of the person (GDPR)","description":"The data of the contact is erased for good; the audit log keeps only that the erasure happened. Needs the scope contacts:delete.","x-worbo-scopes":["contacts:delete"],"x-worbo-live-key":false,"parameters":[{"name":"contact","in":"path","required":true,"description":"The ID of the contact.","schema":{"type":"integer","examples":[123]}},{"$ref":"#/components/parameters/DryRun"},{"$ref":"#/components/parameters/WorboVersion"}],"responses":{"204":{"description":"No content","headers":{"Worbo-Version":{"$ref":"#/components/headers/WorboVersion"}}},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/contacts/{contact}/bot":{"post":{"operationId":"switchContactBot","tags":["contacts"],"summary":"Turn the keyword bot off or on for a contact","description":"For example when a CRM takes over the conversation. Needs the scope contacts:write.","x-worbo-scopes":["contacts:write"],"x-worbo-live-key":false,"parameters":[{"name":"contact","in":"path","required":true,"description":"The ID of the contact.","schema":{"type":"integer","examples":[123]}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/DryRun"},{"$ref":"#/components/parameters/WorboVersion"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BotSwitch"}}}},"responses":{"200":{"description":"OK","headers":{"Worbo-Version":{"$ref":"#/components/headers/WorboVersion"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/BotState"}},"required":["data"]}}}},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/contacts/{contact}/consents":{"get":{"operationId":"getContactConsents","tags":["consents"],"summary":"Read the consent of a contact, with its history","description":"Needs the scope contacts:read. Reads data, so it needs a live key.","x-worbo-scopes":["contacts:read"],"x-worbo-live-key":true,"parameters":[{"name":"contact","in":"path","required":true,"description":"The ID of the contact.","schema":{"type":"integer","examples":[123]}},{"$ref":"#/components/parameters/WorboVersion"}],"responses":{"200":{"description":"OK","headers":{"Worbo-Version":{"$ref":"#/components/headers/WorboVersion"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Consents"}},"required":["data"]}}}},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}},"post":{"operationId":"recordContactConsent","tags":["consents"],"summary":"Record a consent, with its proof, or a withdrawal","description":"A consent withdrawn by the person can be given back only by the person: through a form, at checkout or through a link. Needs the scope consents:write.","x-worbo-scopes":["consents:write"],"x-worbo-live-key":false,"parameters":[{"name":"contact","in":"path","required":true,"description":"The ID of the contact.","schema":{"type":"integer","examples":[123]}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/DryRun"},{"$ref":"#/components/parameters/WorboVersion"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConsentWrite"}}}},"responses":{"201":{"description":"Created","headers":{"Worbo-Version":{"$ref":"#/components/headers/WorboVersion"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/ConsentsRecorded"}},"required":["data"]}}}},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/contacts/{contact}/identities":{"get":{"operationId":"listContactIdentities","tags":["contacts"],"summary":"List the identities of a contact","description":"Needs the scope contacts:read. Reads data, so it needs a live key.","x-worbo-scopes":["contacts:read"],"x-worbo-live-key":true,"parameters":[{"name":"contact","in":"path","required":true,"description":"The ID of the contact.","schema":{"type":"integer","examples":[123]}},{"$ref":"#/components/parameters/WorboVersion"}],"responses":{"200":{"description":"OK","headers":{"Worbo-Version":{"$ref":"#/components/headers/WorboVersion"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ContactIdentity"}}},"required":["data"]}}}},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}},"post":{"operationId":"attachContactIdentity","tags":["contacts"],"summary":"Attach an identity to a contact","description":"Needs the scope contacts:write.","x-worbo-scopes":["contacts:write"],"x-worbo-live-key":false,"parameters":[{"name":"contact","in":"path","required":true,"description":"The ID of the contact.","schema":{"type":"integer","examples":[123]}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/DryRun"},{"$ref":"#/components/parameters/WorboVersion"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IdentityWrite"}}}},"responses":{"201":{"description":"Created","headers":{"Worbo-Version":{"$ref":"#/components/headers/WorboVersion"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/ContactIdentity"}},"required":["data"]}}}},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/contacts/{contact}/identities/{identity}":{"delete":{"operationId":"detachContactIdentity","tags":["contacts"],"summary":"Detach an identity from a contact","description":"Needs the scope contacts:write.","x-worbo-scopes":["contacts:write"],"x-worbo-live-key":false,"parameters":[{"name":"contact","in":"path","required":true,"description":"The ID of the contact.","schema":{"type":"integer","examples":[123]}},{"name":"identity","in":"path","required":true,"description":"The ID of the identity.","schema":{"type":"integer","examples":[501]}},{"$ref":"#/components/parameters/DryRun"},{"$ref":"#/components/parameters/WorboVersion"}],"responses":{"204":{"description":"No content","headers":{"Worbo-Version":{"$ref":"#/components/headers/WorboVersion"}}},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/contacts/{contact}/merge":{"post":{"operationId":"mergeContacts","tags":["contacts"],"summary":"Merge another contact into this one","description":"The identities, the history and the objects of the other contact move here; the event contact.merged follows. Needs the scope contacts:write.","x-worbo-scopes":["contacts:write"],"x-worbo-live-key":false,"parameters":[{"name":"contact","in":"path","required":true,"description":"The ID of the contact.","schema":{"type":"integer","examples":[123]}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/DryRun"},{"$ref":"#/components/parameters/WorboVersion"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactMerge"}}}},"responses":{"200":{"description":"OK","headers":{"Worbo-Version":{"$ref":"#/components/headers/WorboVersion"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Contact"}},"required":["data"]}}}},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/conversations":{"get":{"operationId":"listConversations","tags":["conversations"],"summary":"List the conversations","description":"Needs the scope conversations:read. Reads data, so it needs a live key.","x-worbo-scopes":["conversations:read"],"x-worbo-live-key":true,"parameters":[{"name":"status","in":"query","description":"Only the conversations with this status.","schema":{"type":"string","enum":["open","pending","resolved"]}},{"name":"contact_id","in":"query","description":"Only the conversations of this contact.","schema":{"type":"integer","examples":[123]}},{"name":"assigned_user_id","in":"query","description":"Only the conversations assigned to this member.","schema":{"type":"integer","examples":[5]}},{"$ref":"#/components/parameters/Limit"},{"$ref":"#/components/parameters/Cursor"},{"$ref":"#/components/parameters/WorboVersion"}],"responses":{"200":{"description":"OK","headers":{"Worbo-Version":{"$ref":"#/components/headers/WorboVersion"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Conversation"}},"next_cursor":{"type":["string","null"],"description":"The cursor of the next page; null on the last one."},"has_more":{"type":"boolean"}},"required":["data","next_cursor","has_more"]}}}},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/conversations/{conversation}/assign":{"post":{"operationId":"assignConversation","tags":["conversations"],"summary":"Assign a conversation to a member","description":"Needs the scope conversations:reply.","x-worbo-scopes":["conversations:reply"],"x-worbo-live-key":false,"parameters":[{"name":"conversation","in":"path","required":true,"description":"The ID of the conversation.","schema":{"type":"integer","examples":[640]}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/DryRun"},{"$ref":"#/components/parameters/WorboVersion"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationAssign"}}}},"responses":{"200":{"description":"OK","headers":{"Worbo-Version":{"$ref":"#/components/headers/WorboVersion"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Conversation"}},"required":["data"]}}}},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/conversations/{conversation}/close":{"post":{"operationId":"closeConversation","tags":["conversations"],"summary":"Close a conversation","description":"Needs the scope conversations:reply.","x-worbo-scopes":["conversations:reply"],"x-worbo-live-key":false,"parameters":[{"name":"conversation","in":"path","required":true,"description":"The ID of the conversation.","schema":{"type":"integer","examples":[640]}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/DryRun"},{"$ref":"#/components/parameters/WorboVersion"}],"responses":{"200":{"description":"OK","headers":{"Worbo-Version":{"$ref":"#/components/headers/WorboVersion"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Conversation"}},"required":["data"]}}}},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/conversations/{conversation}/messages":{"get":{"operationId":"listConversationMessages","tags":["conversations"],"summary":"List the messages of a conversation","description":"Needs the scope conversations:read. Reads data, so it needs a live key.","x-worbo-scopes":["conversations:read"],"x-worbo-live-key":true,"parameters":[{"name":"conversation","in":"path","required":true,"description":"The ID of the conversation.","schema":{"type":"integer","examples":[640]}},{"$ref":"#/components/parameters/Limit"},{"$ref":"#/components/parameters/Cursor"},{"$ref":"#/components/parameters/WorboVersion"}],"responses":{"200":{"description":"OK","headers":{"Worbo-Version":{"$ref":"#/components/headers/WorboVersion"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Message"}},"next_cursor":{"type":["string","null"],"description":"The cursor of the next page; null on the last one."},"has_more":{"type":"boolean"}},"required":["data","next_cursor","has_more"]}}}},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}},"post":{"operationId":"replyToConversation","tags":["conversations"],"summary":"Reply with a free text, in the 24-hour window","description":"Needs the scope conversations:reply.","x-worbo-scopes":["conversations:reply"],"x-worbo-live-key":false,"parameters":[{"name":"conversation","in":"path","required":true,"description":"The ID of the conversation.","schema":{"type":"integer","examples":[640]}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/DryRun"},{"$ref":"#/components/parameters/WorboVersion"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationReply"}}}},"responses":{"202":{"description":"Accepted","headers":{"Worbo-Version":{"$ref":"#/components/headers/WorboVersion"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Message"}},"required":["data"]}}}},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/conversions":{"get":{"operationId":"listConversions","tags":["analytics"],"summary":"List the conversions of the automations","description":"Needs the scope analytics:read.","x-worbo-scopes":["analytics:read"],"x-worbo-live-key":false,"parameters":[{"name":"automation_id","in":"query","description":"Only the conversions of this automation.","schema":{"type":"integer","examples":[8]}},{"name":"since","in":"query","description":"Only what changed at or after this moment.","schema":{"type":"string","format":"date-time","examples":["2026-10-01T00:00:00+03:00"]}},{"$ref":"#/components/parameters/Limit"},{"$ref":"#/components/parameters/Cursor"},{"$ref":"#/components/parameters/WorboVersion"}],"responses":{"200":{"description":"OK","headers":{"Worbo-Version":{"$ref":"#/components/headers/WorboVersion"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Conversion"}},"next_cursor":{"type":["string","null"],"description":"The cursor of the next page; null on the last one."},"has_more":{"type":"boolean"}},"required":["data","next_cursor","has_more"]}}}},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/event-types":{"get":{"operationId":"listEventTypes","tags":["schema"],"summary":"List the event types","description":"Any key of the organization can call it.","x-worbo-scopes":[],"x-worbo-live-key":false,"parameters":[{"$ref":"#/components/parameters/WorboVersion"}],"responses":{"200":{"description":"OK","headers":{"Worbo-Version":{"$ref":"#/components/headers/WorboVersion"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/EventType"}}},"required":["data"]}}}},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/event-types/{type}":{"get":{"operationId":"getEventType","tags":["schema"],"summary":"Read an event type, with its properties","description":"Any key of the organization can call it.","x-worbo-scopes":[],"x-worbo-live-key":false,"parameters":[{"name":"type","in":"path","required":true,"description":"The key of the type, such as fit.membership.","schema":{"type":"string","examples":["fit.membership"],"pattern":"^[a-z0-9][a-z0-9._-]*$"}},{"$ref":"#/components/parameters/WorboVersion"}],"responses":{"200":{"description":"OK","headers":{"Worbo-Version":{"$ref":"#/components/headers/WorboVersion"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/EventType"}},"required":["data"]}}}},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/event-types/{type}/schema":{"get":{"operationId":"getEventTypeSchema","tags":["schema"],"summary":"Read the JSON Schema of the properties of an event type","description":"Any key of the organization can call it.","x-worbo-scopes":[],"x-worbo-live-key":false,"parameters":[{"name":"type","in":"path","required":true,"description":"The key of the type, such as fit.membership.","schema":{"type":"string","examples":["fit.membership"],"pattern":"^[a-z0-9][a-z0-9._-]*$"}},{"$ref":"#/components/parameters/WorboVersion"}],"responses":{"200":{"description":"OK","headers":{"Worbo-Version":{"$ref":"#/components/headers/WorboVersion"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/JsonSchema"}},"required":["data"]}}}},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/events":{"post":{"operationId":"recordEvent","tags":["events"],"summary":"Record an event","description":"The contact and the object of the event are found or created; an event with the same ID from the same source is recorded only once. Needs the scope events:write.","x-worbo-scopes":["events:write"],"x-worbo-live-key":false,"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/DryRun"},{"$ref":"#/components/parameters/WorboVersion"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventWrite"}}}},"responses":{"202":{"description":"Accepted","headers":{"Worbo-Version":{"$ref":"#/components/headers/WorboVersion"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/EventResult"}},"required":["data"]}}}},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/events/batch":{"post":{"operationId":"recordEvents","tags":["events"],"summary":"Record up to 100 events","description":"Needs the scope events:write.","x-worbo-scopes":["events:write"],"x-worbo-live-key":false,"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/DryRun"},{"$ref":"#/components/parameters/WorboVersion"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/BatchRequest"},{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/EventWrite"}}}}]}}}},"responses":{"200":{"description":"OK","headers":{"Worbo-Version":{"$ref":"#/components/headers/WorboVersion"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"allOf":[{"$ref":"#/components/schemas/BatchResult"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/EventResult"}}}]}}},"required":["data"]}}}},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/field-definitions":{"get":{"operationId":"listContactFields","tags":["schema"],"summary":"List the fields of the contacts","description":"Any key of the organization can call it.","x-worbo-scopes":[],"x-worbo-live-key":false,"parameters":[{"$ref":"#/components/parameters/WorboVersion"}],"responses":{"200":{"description":"OK","headers":{"Worbo-Version":{"$ref":"#/components/headers/WorboVersion"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/FieldDefinition"}}},"required":["data"]}}}},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}}},"post":{"operationId":"createField","tags":["schema"],"summary":"Create a field of the contacts or of an object type","description":"Through the same checks and limits as in the dashboard; the key does not change afterwards. Needs the scope schema:write.","x-worbo-scopes":["schema:write"],"x-worbo-live-key":false,"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/DryRun"},{"$ref":"#/components/parameters/WorboVersion"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FieldDefinitionWrite"}}}},"responses":{"201":{"description":"Created","headers":{"Worbo-Version":{"$ref":"#/components/headers/WorboVersion"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/FieldDefinition"}},"required":["data"]}}}},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/files":{"post":{"operationId":"uploadFile","tags":["files"],"summary":"Upload a file for a file field","description":"PDF, images, Office, text or CSV documents, up to 16 MB. A file not used by any field within a day is deleted. Needs the scope files:write.","x-worbo-scopes":["files:write"],"x-worbo-live-key":false,"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/DryRun"},{"$ref":"#/components/parameters/WorboVersion"}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/FileUpload"}}}},"responses":{"201":{"description":"Created","headers":{"Worbo-Version":{"$ref":"#/components/headers/WorboVersion"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/File"}},"required":["data"]}}}},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/files/{file}":{"get":{"operationId":"getFile","tags":["files"],"summary":"Read a file, with the contact or the object that uses it","description":"Needs the scope files:read. Reads data, so it needs a live key.","x-worbo-scopes":["files:read"],"x-worbo-live-key":true,"parameters":[{"name":"file","in":"path","required":true,"description":"The ID of the file.","schema":{"type":"integer","examples":[77]}},{"$ref":"#/components/parameters/WorboVersion"}],"responses":{"200":{"description":"OK","headers":{"Worbo-Version":{"$ref":"#/components/headers/WorboVersion"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/File"}},"required":["data"]}}}},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/files/{file}/content":{"get":{"operationId":"downloadFile","tags":["files"],"summary":"Download the content of a file","description":"Needs the scope files:read. Reads data, so it needs a live key.","x-worbo-scopes":["files:read"],"x-worbo-live-key":true,"parameters":[{"name":"file","in":"path","required":true,"description":"The ID of the file.","schema":{"type":"integer","examples":[77]}},{"$ref":"#/components/parameters/WorboVersion"}],"responses":{"200":{"description":"OK","headers":{"Worbo-Version":{"$ref":"#/components/headers/WorboVersion"}},"content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/me":{"get":{"operationId":"getMe","tags":["workspace"],"summary":"Read the key in use and its organization","description":"Any key of the organization can call it.","x-worbo-scopes":[],"x-worbo-live-key":false,"parameters":[{"$ref":"#/components/parameters/WorboVersion"}],"responses":{"200":{"description":"OK","headers":{"Worbo-Version":{"$ref":"#/components/headers/WorboVersion"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Me"}},"required":["data"]}}}},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/messages":{"get":{"operationId":"listMessages","tags":["messages"],"summary":"List the messages","description":"Needs the scope messages:read. Reads data, so it needs a live key.","x-worbo-scopes":["messages:read"],"x-worbo-live-key":true,"parameters":[{"name":"contact_id","in":"query","description":"Only the messages of this contact.","schema":{"type":"integer","examples":[123]}},{"name":"direction","in":"query","description":"Received or sent.","schema":{"type":"string","enum":["inbound","outbound"]}},{"name":"status","in":"query","description":"Only the messages with this status.","schema":{"type":"string","examples":["delivered"]}},{"name":"since","in":"query","description":"Only what changed at or after this moment.","schema":{"type":"string","format":"date-time","examples":["2026-10-01T00:00:00+03:00"]}},{"$ref":"#/components/parameters/Limit"},{"$ref":"#/components/parameters/Cursor"},{"$ref":"#/components/parameters/WorboVersion"}],"responses":{"200":{"description":"OK","headers":{"Worbo-Version":{"$ref":"#/components/headers/WorboVersion"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Message"}},"next_cursor":{"type":["string","null"],"description":"The cursor of the next page; null on the last one."},"has_more":{"type":"boolean"}},"required":["data","next_cursor","has_more"]}}}},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"}}},"post":{"operationId":"sendMessage","tags":["messages"],"summary":"Send a template, a free text or a form to a contact","description":"The message goes through the same rules as in the dashboard: consent, quiet hours, frequency and limits. A free text or a form needs the 24-hour window open; a refusal comes with the code of the reason, such as window_closed. The answers to a form come with the webhook flow.submitted. Needs the scope messages:send.","x-worbo-scopes":["messages:send"],"x-worbo-live-key":false,"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/DryRun"},{"$ref":"#/components/parameters/WorboVersion"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageSend"}}}},"responses":{"202":{"description":"Accepted","headers":{"Worbo-Version":{"$ref":"#/components/headers/WorboVersion"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Message"}},"required":["data"]}}}},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/messages/{message}":{"get":{"operationId":"getMessage","tags":["messages"],"summary":"Read a message and its status","description":"Needs the scope messages:read. Reads data, so it needs a live key.","x-worbo-scopes":["messages:read"],"x-worbo-live-key":true,"parameters":[{"name":"message","in":"path","required":true,"description":"The ID of the message.","schema":{"type":"integer","examples":[7001]}},{"$ref":"#/components/parameters/WorboVersion"}],"responses":{"200":{"description":"OK","headers":{"Worbo-Version":{"$ref":"#/components/headers/WorboVersion"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Message"}},"required":["data"]}}}},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/messages/{message}/evidence":{"get":{"operationId":"getMessageEvidence","tags":["messages"],"summary":"Read the proof of a message sent with a durable medium candidate template","description":"The exact text the contact got and the document of the header kept by Worbo, with their SHA-256 fingerprints, and the moments Meta reported. It does not replace the email required by law. Needs the scope messages:read. Reads data, so it needs a live key.","x-worbo-scopes":["messages:read"],"x-worbo-live-key":true,"parameters":[{"name":"message","in":"path","required":true,"description":"The ID of the message.","schema":{"type":"integer","examples":[7001]}},{"$ref":"#/components/parameters/WorboVersion"}],"responses":{"200":{"description":"OK","headers":{"Worbo-Version":{"$ref":"#/components/headers/WorboVersion"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/MessageEvidence"}},"required":["data"]}}}},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/messages/{message}/evidence/document":{"get":{"operationId":"downloadMessageEvidenceDocument","tags":["messages"],"summary":"Download the document kept as the proof of a message","description":"Needs the scope messages:read. Reads data, so it needs a live key.","x-worbo-scopes":["messages:read"],"x-worbo-live-key":true,"parameters":[{"name":"message","in":"path","required":true,"description":"The ID of the message.","schema":{"type":"integer","examples":[7001]}},{"$ref":"#/components/parameters/WorboVersion"}],"responses":{"200":{"description":"OK","headers":{"Worbo-Version":{"$ref":"#/components/headers/WorboVersion"}},"content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/numbers":{"get":{"operationId":"listNumbers","tags":["workspace"],"summary":"List the WhatsApp numbers, with quality, tier and warm-up","description":"Needs the scope workspace:read. Reads data, so it needs a live key.","x-worbo-scopes":["workspace:read"],"x-worbo-live-key":true,"parameters":[{"$ref":"#/components/parameters/WorboVersion"}],"responses":{"200":{"description":"OK","headers":{"Worbo-Version":{"$ref":"#/components/headers/WorboVersion"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Number"}}},"required":["data"]}}}},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/object-types":{"get":{"operationId":"listObjectTypes","tags":["schema"],"summary":"List the object types","description":"Any key of the organization can call it.","x-worbo-scopes":[],"x-worbo-live-key":false,"parameters":[{"$ref":"#/components/parameters/WorboVersion"}],"responses":{"200":{"description":"OK","headers":{"Worbo-Version":{"$ref":"#/components/headers/WorboVersion"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ObjectType"}}},"required":["data"]}}}},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}}},"post":{"operationId":"createObjectType","tags":["schema"],"summary":"Create an object type","description":"The type belongs to the organization and counts against its limit of types. Needs the scope schema:write.","x-worbo-scopes":["schema:write"],"x-worbo-live-key":false,"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/DryRun"},{"$ref":"#/components/parameters/WorboVersion"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ObjectTypeWrite"}}}},"responses":{"201":{"description":"Created","headers":{"Worbo-Version":{"$ref":"#/components/headers/WorboVersion"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/ObjectType"}},"required":["data"]}}}},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/object-types/{type}":{"get":{"operationId":"getObjectType","tags":["schema"],"summary":"Read an object type, with its statuses, roles and fields","description":"Any key of the organization can call it.","x-worbo-scopes":[],"x-worbo-live-key":false,"parameters":[{"name":"type","in":"path","required":true,"description":"The key of the type, such as fit.membership.","schema":{"type":"string","examples":["fit.membership"],"pattern":"^[a-z0-9][a-z0-9._-]*$"}},{"$ref":"#/components/parameters/WorboVersion"}],"responses":{"200":{"description":"OK","headers":{"Worbo-Version":{"$ref":"#/components/headers/WorboVersion"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/ObjectType"}},"required":["data"]}}}},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/object-types/{type}/schema":{"get":{"operationId":"getObjectTypeSchema","tags":["schema"],"summary":"Read the JSON Schema of the body that writes an object of the type","description":"Any key of the organization can call it.","x-worbo-scopes":[],"x-worbo-live-key":false,"parameters":[{"name":"type","in":"path","required":true,"description":"The key of the type, such as fit.membership.","schema":{"type":"string","examples":["fit.membership"],"pattern":"^[a-z0-9][a-z0-9._-]*$"}},{"$ref":"#/components/parameters/WorboVersion"}],"responses":{"200":{"description":"OK","headers":{"Worbo-Version":{"$ref":"#/components/headers/WorboVersion"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/JsonSchema"}},"required":["data"]}}}},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/objects/{type}":{"get":{"operationId":"listObjects","tags":["objects"],"summary":"List the objects of a type","description":"Needs the scope objects:read. Reads data, so it needs a live key.","x-worbo-scopes":["objects:read"],"x-worbo-live-key":true,"parameters":[{"name":"type","in":"path","required":true,"description":"The key of the type, such as fit.membership.","schema":{"type":"string","examples":["fit.membership"],"pattern":"^[a-z0-9][a-z0-9._-]*$"}},{"name":"external_id","in":"query","description":"The object with this ID at the source.","schema":{"type":"string","examples":["abn-7781"]}},{"name":"source","in":"query","description":"Only the objects of this source.","schema":{"type":"string","examples":["upfit"]}},{"name":"contact_id","in":"query","description":"Only the objects linked to this contact.","schema":{"type":"integer","examples":[123]}},{"name":"status","in":"query","description":"The status on each axis, such as status[lifecycle]=active.","schema":{"type":"object","additionalProperties":true},"style":"deepObject"},{"name":"updated_since","in":"query","description":"Only what changed at or after this moment.","schema":{"type":"string","format":"date-time","examples":["2026-10-01T00:00:00+03:00"]}},{"$ref":"#/components/parameters/Limit"},{"$ref":"#/components/parameters/Cursor"},{"$ref":"#/components/parameters/WorboVersion"}],"responses":{"200":{"description":"OK","headers":{"Worbo-Version":{"$ref":"#/components/headers/WorboVersion"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Object"}},"next_cursor":{"type":["string","null"],"description":"The cursor of the next page; null on the last one."},"has_more":{"type":"boolean"}},"required":["data","next_cursor","has_more"]}}}},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"}}},"post":{"operationId":"upsertObject","tags":["objects"],"summary":"Create or update an object by its ID at the source","description":"Needs the scope objects:write.","x-worbo-scopes":["objects:write"],"x-worbo-live-key":false,"parameters":[{"name":"type","in":"path","required":true,"description":"The key of the type, such as fit.membership.","schema":{"type":"string","examples":["fit.membership"],"pattern":"^[a-z0-9][a-z0-9._-]*$"}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/DryRun"},{"$ref":"#/components/parameters/WorboVersion"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ObjectWrite"}}}},"responses":{"200":{"description":"OK","headers":{"Worbo-Version":{"$ref":"#/components/headers/WorboVersion"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Object"}},"required":["data"]}}}},"201":{"description":"Created","headers":{"Worbo-Version":{"$ref":"#/components/headers/WorboVersion"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Object"}},"required":["data"]}}}},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/objects/{type}/batch":{"post":{"operationId":"upsertObjects","tags":["objects"],"summary":"Create or update up to 100 objects","description":"Needs the scope objects:write.","x-worbo-scopes":["objects:write"],"x-worbo-live-key":false,"parameters":[{"name":"type","in":"path","required":true,"description":"The key of the type, such as fit.membership.","schema":{"type":"string","examples":["fit.membership"],"pattern":"^[a-z0-9][a-z0-9._-]*$"}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/DryRun"},{"$ref":"#/components/parameters/WorboVersion"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/BatchRequest"},{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/ObjectWrite"}}}}]}}}},"responses":{"200":{"description":"OK","headers":{"Worbo-Version":{"$ref":"#/components/headers/WorboVersion"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"allOf":[{"$ref":"#/components/schemas/BatchResult"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Object"}}}]}}},"required":["data"]}}}},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/objects/{type}/{object}":{"get":{"operationId":"getObject","tags":["objects"],"summary":"Read an object","description":"Needs the scope objects:read. Reads data, so it needs a live key.","x-worbo-scopes":["objects:read"],"x-worbo-live-key":true,"parameters":[{"name":"type","in":"path","required":true,"description":"The key of the type, such as fit.membership.","schema":{"type":"string","examples":["fit.membership"],"pattern":"^[a-z0-9][a-z0-9._-]*$"}},{"name":"object","in":"path","required":true,"description":"The ID of the object.","schema":{"type":"integer","examples":[456]}},{"$ref":"#/components/parameters/WorboVersion"}],"responses":{"200":{"description":"OK","headers":{"Worbo-Version":{"$ref":"#/components/headers/WorboVersion"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Object"}},"required":["data"]}}}},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}},"patch":{"operationId":"updateObject","tags":["objects"],"summary":"Change the fields or the statuses of an object","description":"Needs the scope objects:write.","x-worbo-scopes":["objects:write"],"x-worbo-live-key":false,"parameters":[{"name":"type","in":"path","required":true,"description":"The key of the type, such as fit.membership.","schema":{"type":"string","examples":["fit.membership"],"pattern":"^[a-z0-9][a-z0-9._-]*$"}},{"name":"object","in":"path","required":true,"description":"The ID of the object.","schema":{"type":"integer","examples":[456]}},{"$ref":"#/components/parameters/DryRun"},{"$ref":"#/components/parameters/WorboVersion"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ObjectUpdate"}}}},"responses":{"200":{"description":"OK","headers":{"Worbo-Version":{"$ref":"#/components/headers/WorboVersion"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Object"}},"required":["data"]}}}},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/objects/{type}/{object}/relations":{"post":{"operationId":"relateContact","tags":["objects"],"summary":"Link a contact to an object, in a role","description":"Needs the scope objects:write.","x-worbo-scopes":["objects:write"],"x-worbo-live-key":false,"parameters":[{"name":"type","in":"path","required":true,"description":"The key of the type, such as fit.membership.","schema":{"type":"string","examples":["fit.membership"],"pattern":"^[a-z0-9][a-z0-9._-]*$"}},{"name":"object","in":"path","required":true,"description":"The ID of the object.","schema":{"type":"integer","examples":[456]}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/DryRun"},{"$ref":"#/components/parameters/WorboVersion"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RelationWrite"}}}},"responses":{"201":{"description":"Created","headers":{"Worbo-Version":{"$ref":"#/components/headers/WorboVersion"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/ObjectRelation"}},"required":["data"]}}}},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/objects/{type}/{object}/relations/{relation}":{"delete":{"operationId":"unrelateContact","tags":["objects"],"summary":"Remove the link of a contact to an object","description":"Needs the scope objects:write.","x-worbo-scopes":["objects:write"],"x-worbo-live-key":false,"parameters":[{"name":"type","in":"path","required":true,"description":"The key of the type, such as fit.membership.","schema":{"type":"string","examples":["fit.membership"],"pattern":"^[a-z0-9][a-z0-9._-]*$"}},{"name":"object","in":"path","required":true,"description":"The ID of the object.","schema":{"type":"integer","examples":[456]}},{"name":"relation","in":"path","required":true,"description":"The ID of the relation.","schema":{"type":"integer","examples":[77]}},{"$ref":"#/components/parameters/DryRun"},{"$ref":"#/components/parameters/WorboVersion"}],"responses":{"204":{"description":"No content","headers":{"Worbo-Version":{"$ref":"#/components/headers/WorboVersion"}}},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/offers/{code}":{"get":{"operationId":"getOffer","tags":["offers"],"summary":"Find an offer by its code","description":"Needs the scope objects:read. Reads data, so it needs a live key.","x-worbo-scopes":["objects:read"],"x-worbo-live-key":true,"parameters":[{"name":"code","in":"path","required":true,"description":"The code of the offer.","schema":{"type":"string","examples":["AUTUMN-7KQ2"],"pattern":"^[A-Za-z0-9 #-]{4,40}$"}},{"$ref":"#/components/parameters/WorboVersion"}],"responses":{"200":{"description":"OK","headers":{"Worbo-Version":{"$ref":"#/components/headers/WorboVersion"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Object"}},"required":["data"]}}}},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/offers/{code}/redeem":{"post":{"operationId":"redeemOffer","tags":["offers"],"summary":"Mark an offer as used","description":"Needs the scope objects:write.","x-worbo-scopes":["objects:write"],"x-worbo-live-key":false,"parameters":[{"name":"code","in":"path","required":true,"description":"The code of the offer.","schema":{"type":"string","examples":["AUTUMN-7KQ2"],"pattern":"^[A-Za-z0-9 #-]{4,40}$"}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/DryRun"},{"$ref":"#/components/parameters/WorboVersion"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OfferRedeem"}}}},"responses":{"200":{"description":"OK","headers":{"Worbo-Version":{"$ref":"#/components/headers/WorboVersion"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Object"}},"required":["data"]}}}},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/otp":{"post":{"operationId":"sendOtp","tags":["otp"],"summary":"Send a verification code on WhatsApp","description":"Without code, Worbo makes a 6-digit code, valid for 10 minutes, and checks it with verifyOtp; with code, the organization checks it itself. The message leaves at once, with the authentication template of the number, approved on its page. A phone known to have no WhatsApp gets otp_undeliverable at once, so the site can offer SMS or email; otherwise a failure comes as the status of the message and the webhook message.failed. A phone gets at most 5 codes in 15 minutes and one every 30 seconds (otp_rate_limited, otp_too_soon). The code never appears in answers, webhooks or the inbox. Needs the scope otp:send.","x-worbo-scopes":["otp:send"],"x-worbo-live-key":false,"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/DryRun"},{"$ref":"#/components/parameters/WorboVersion"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OtpSend"}}}},"responses":{"201":{"description":"Created","headers":{"Worbo-Version":{"$ref":"#/components/headers/WorboVersion"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Otp"}},"required":["data"]}}}},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/otp/{otp}/verify":{"post":{"operationId":"verifyOtp","tags":["otp"],"summary":"Check a verification code made by Worbo","description":"A code is used once, within its term, with at most 5 attempts; the answer says why a check failed. A code given by the organization gets 409 otp_not_verifiable. Needs the scope otp:verify.","x-worbo-scopes":["otp:verify"],"x-worbo-live-key":false,"parameters":[{"name":"otp","in":"path","required":true,"description":"The ID of the verification code, from the answer that sent it.","schema":{"type":"integer","examples":[880]}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/DryRun"},{"$ref":"#/components/parameters/WorboVersion"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OtpVerify"}}}},"responses":{"200":{"description":"OK","headers":{"Worbo-Version":{"$ref":"#/components/headers/WorboVersion"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/OtpVerification"}},"required":["data"]}}}},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/preference-links":{"post":{"operationId":"createPreferenceLink","tags":["consents"],"summary":"Create a signed link to the preference center of a contact","description":"The link is valid for 30 days. Needs the scope consents:write.","x-worbo-scopes":["consents:write"],"x-worbo-live-key":false,"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/DryRun"},{"$ref":"#/components/parameters/WorboVersion"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreferenceLinkWrite"}}}},"responses":{"201":{"description":"Created","headers":{"Worbo-Version":{"$ref":"#/components/headers/WorboVersion"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/PreferenceLink"}},"required":["data"]}}}},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/recommendation-rules":{"get":{"operationId":"listRecommendationRules","tags":["recommendations"],"summary":"List the recommendation rules","description":"The active rules, made in the dashboard at Recommendations: the catalog, the types in their order, the number of items and the cooldowns. The automations use them by key. Needs the scope recommendations:read.","x-worbo-scopes":["recommendations:read"],"x-worbo-live-key":false,"parameters":[{"$ref":"#/components/parameters/WorboVersion"}],"responses":{"200":{"description":"OK","headers":{"Worbo-Version":{"$ref":"#/components/headers/WorboVersion"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/RecommendationRule"}}},"required":["data"]}}}},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/recommendation-rules/{rule}/results":{"get":{"operationId":"getRecommendationResults","tags":["recommendations"],"summary":"Read the results of a recommendation rule","description":"On a period, by default the last 30 days: the recommendations sent and their recipients, the steps skipped by reason, the clicks on the items, the conversions within 7 days of the message (an order for the products, a booking for the classes, a membership for the plans), the revenue per recipient, the control group of the automations, the opt-outs after the message and the cost at Meta per conversion. Needs the scope recommendations:read. Reads data, so it needs a live key.","x-worbo-scopes":["recommendations:read"],"x-worbo-live-key":true,"parameters":[{"name":"rule","in":"path","required":true,"description":"The key of the recommendation rule.","schema":{"type":"string","examples":["ecom.cross_sell"],"pattern":"^[a-z0-9._-]+$"}},{"$ref":"#/components/parameters/WorboVersion"}],"responses":{"200":{"description":"OK","headers":{"Worbo-Version":{"$ref":"#/components/headers/WorboVersion"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/RecommendationResults"}},"required":["data"]}}}},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/recommendations/preview":{"post":{"operationId":"previewRecommendations","tags":["recommendations"],"summary":"Preview a recommendation rule on a contact","description":"What the rule would recommend now to the contact, with the reason of each item, the items left out and why, the cooldown of the rule and the consent needed. Nothing is sent and the cooldowns stay as they are. The recommendations from the history of the contact need the purpose recommendations besides marketing. Needs the scope recommendations:read. Reads data, so it needs a live key.","x-worbo-scopes":["recommendations:read"],"x-worbo-live-key":true,"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/DryRun"},{"$ref":"#/components/parameters/WorboVersion"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecommendationPreviewRequest"}}}},"responses":{"200":{"description":"OK","headers":{"Worbo-Version":{"$ref":"#/components/headers/WorboVersion"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/RecommendationPreview"}},"required":["data"]}}}},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/reports/results":{"get":{"operationId":"getPeriodResults","tags":["analytics"],"summary":"Read the results of a period","description":"The automations with the control group, the baseline, the value and the cost, in the days of the organization. Needs the scope analytics:read.","x-worbo-scopes":["analytics:read"],"x-worbo-live-key":false,"parameters":[{"name":"from","in":"query","required":true,"description":"The first day of the period.","schema":{"type":"string","format":"date","examples":["2026-10-01"]}},{"name":"to","in":"query","required":true,"description":"The last day of the period.","schema":{"type":"string","format":"date","examples":["2026-10-15"]}},{"name":"location_id","in":"query","description":"Only the contacts of this home location.","schema":{"type":"integer","examples":[7]}},{"$ref":"#/components/parameters/WorboVersion"}],"responses":{"200":{"description":"OK","headers":{"Worbo-Version":{"$ref":"#/components/headers/WorboVersion"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/PeriodResults"}},"required":["data"]}}}},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/segments":{"get":{"operationId":"listSegments","tags":["segments"],"summary":"List the segments","description":"Needs the scope segments:read. Reads data, so it needs a live key.","x-worbo-scopes":["segments:read"],"x-worbo-live-key":true,"parameters":[{"$ref":"#/components/parameters/Limit"},{"$ref":"#/components/parameters/Cursor"},{"$ref":"#/components/parameters/WorboVersion"}],"responses":{"200":{"description":"OK","headers":{"Worbo-Version":{"$ref":"#/components/headers/WorboVersion"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Segment"}},"next_cursor":{"type":["string","null"],"description":"The cursor of the next page; null on the last one."},"has_more":{"type":"boolean"}},"required":["data","next_cursor","has_more"]}}}},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}}},"post":{"operationId":"createSegment","tags":["segments"],"summary":"Create a segment","description":"Needs the scope segments:write.","x-worbo-scopes":["segments:write"],"x-worbo-live-key":false,"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/DryRun"},{"$ref":"#/components/parameters/WorboVersion"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SegmentWrite"}}}},"responses":{"201":{"description":"Created","headers":{"Worbo-Version":{"$ref":"#/components/headers/WorboVersion"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Segment"}},"required":["data"]}}}},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/segments/count":{"post":{"operationId":"countSegment","tags":["segments"],"summary":"Count the contacts of a definition, without saving it","description":"Needs the scope segments:write.","x-worbo-scopes":["segments:write"],"x-worbo-live-key":false,"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/DryRun"},{"$ref":"#/components/parameters/WorboVersion"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SegmentCountRequest"}}}},"responses":{"200":{"description":"OK","headers":{"Worbo-Version":{"$ref":"#/components/headers/WorboVersion"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/SegmentCount"}},"required":["data"]}}}},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/segments/{segment}":{"get":{"operationId":"getSegment","tags":["segments"],"summary":"Read a segment, with its live count","description":"Needs the scope segments:read. Reads data, so it needs a live key.","x-worbo-scopes":["segments:read"],"x-worbo-live-key":true,"parameters":[{"name":"segment","in":"path","required":true,"description":"The ID of the segment.","schema":{"type":"integer","examples":[12]}},{"$ref":"#/components/parameters/WorboVersion"}],"responses":{"200":{"description":"OK","headers":{"Worbo-Version":{"$ref":"#/components/headers/WorboVersion"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/SegmentDetail"}},"required":["data"]}}}},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/templates":{"get":{"operationId":"listTemplates","tags":["templates"],"summary":"List the templates","description":"Needs the scope templates:read.","x-worbo-scopes":["templates:read"],"x-worbo-live-key":false,"parameters":[{"name":"number_id","in":"query","description":"Only the templates of this number.","schema":{"type":"integer","examples":[3]}},{"name":"status","in":"query","description":"Only the templates with this status.","schema":{"type":"string","examples":["approved"]}},{"name":"name","in":"query","description":"Only the templates with this name.","schema":{"type":"string","examples":["booking_confirmed"]}},{"$ref":"#/components/parameters/Limit"},{"$ref":"#/components/parameters/Cursor"},{"$ref":"#/components/parameters/WorboVersion"}],"responses":{"200":{"description":"OK","headers":{"Worbo-Version":{"$ref":"#/components/headers/WorboVersion"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Template"}},"next_cursor":{"type":["string","null"],"description":"The cursor of the next page; null on the last one."},"has_more":{"type":"boolean"}},"required":["data","next_cursor","has_more"]}}}},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"}}},"post":{"operationId":"draftTemplate","tags":["templates"],"summary":"Draft a template, checked by the linter","description":"Needs the scope templates:write.","x-worbo-scopes":["templates:write"],"x-worbo-live-key":false,"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/DryRun"},{"$ref":"#/components/parameters/WorboVersion"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TemplateWrite"}}}},"responses":{"201":{"description":"Created","headers":{"Worbo-Version":{"$ref":"#/components/headers/WorboVersion"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/TemplateDraft"}},"required":["data"]}}}},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/templates/{template}":{"get":{"operationId":"getTemplate","tags":["templates"],"summary":"Read a template","description":"Needs the scope templates:read.","x-worbo-scopes":["templates:read"],"x-worbo-live-key":false,"parameters":[{"name":"template","in":"path","required":true,"description":"The ID of the template.","schema":{"type":"integer","examples":[31]}},{"$ref":"#/components/parameters/WorboVersion"}],"responses":{"200":{"description":"OK","headers":{"Worbo-Version":{"$ref":"#/components/headers/WorboVersion"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Template"}},"required":["data"]}}}},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/templates/{template}/submit":{"post":{"operationId":"submitTemplate","tags":["templates"],"summary":"Submit a template to Meta","description":"Stopped by the linter, with the reason, or accepted, with the status in review. Needs the scope templates:write.","x-worbo-scopes":["templates:write"],"x-worbo-live-key":false,"parameters":[{"name":"template","in":"path","required":true,"description":"The ID of the template.","schema":{"type":"integer","examples":[31]}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/DryRun"},{"$ref":"#/components/parameters/WorboVersion"}],"responses":{"200":{"description":"OK","headers":{"Worbo-Version":{"$ref":"#/components/headers/WorboVersion"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Template"}},"required":["data"]}}}},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/usage":{"get":{"operationId":"getUsage","tags":["workspace"],"summary":"Read the usage of a month and the limits of the plan","description":"Needs the scope workspace:read. Reads data, so it needs a live key.","x-worbo-scopes":["workspace:read"],"x-worbo-live-key":true,"parameters":[{"name":"month","in":"query","description":"The month, as YYYY-MM; the current month by default.","schema":{"type":"string","examples":["2026-10"]}},{"$ref":"#/components/parameters/WorboVersion"}],"responses":{"200":{"description":"OK","headers":{"Worbo-Version":{"$ref":"#/components/headers/WorboVersion"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Usage"}},"required":["data"]}}}},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/vault":{"post":{"operationId":"shareVaultDocument","tags":["vault"],"summary":"Give a file to a contact through the vault","description":"Upload the file first with uploadFile. The contact gets the template worbo_document on WhatsApp, with the title, the term and the button that opens the link; the link opens only with a code sent to their phone. The answer has the link, the only time it is shown: send it by email too, if needed. The number needs the templates of the vault approved, made on the page of the vault. Needs the scope vault:write.","x-worbo-scopes":["vault:write"],"x-worbo-live-key":false,"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/DryRun"},{"$ref":"#/components/parameters/WorboVersion"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VaultWrite"}}}},"responses":{"201":{"description":"Created","headers":{"Worbo-Version":{"$ref":"#/components/headers/WorboVersion"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/VaultDocument"}},"required":["data"]}}}},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/vault/{vault}":{"get":{"operationId":"getVaultDocument","tags":["vault"],"summary":"Read a document of the vault, with the state of its link and the openings","description":"Needs the scope vault:read. Reads data, so it needs a live key.","x-worbo-scopes":["vault:read"],"x-worbo-live-key":true,"parameters":[{"name":"vault","in":"path","required":true,"description":"The ID of the document in the vault.","schema":{"type":"integer","examples":[15]}},{"$ref":"#/components/parameters/WorboVersion"}],"responses":{"200":{"description":"OK","headers":{"Worbo-Version":{"$ref":"#/components/headers/WorboVersion"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/VaultDocument"}},"required":["data"]}}}},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}},"delete":{"operationId":"revokeVaultDocument","tags":["vault"],"summary":"Revoke the link of a document of the vault","description":"Needs the scope vault:write.","x-worbo-scopes":["vault:write"],"x-worbo-live-key":false,"parameters":[{"name":"vault","in":"path","required":true,"description":"The ID of the document in the vault.","schema":{"type":"integer","examples":[15]}},{"$ref":"#/components/parameters/DryRun"},{"$ref":"#/components/parameters/WorboVersion"}],"responses":{"204":{"description":"No content","headers":{"Worbo-Version":{"$ref":"#/components/headers/WorboVersion"}}},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/webhook-deliveries":{"get":{"operationId":"listWebhookDeliveries","tags":["webhooks"],"summary":"List the deliveries of the events","description":"Needs the scope webhooks:manage.","x-worbo-scopes":["webhooks:manage"],"x-worbo-live-key":false,"parameters":[{"name":"endpoint_id","in":"query","description":"Only the deliveries to this endpoint.","schema":{"type":"integer","examples":[4]}},{"name":"status","in":"query","description":"Only the deliveries with this status.","schema":{"type":"string","enum":["pending","delivered","failed"]}},{"$ref":"#/components/parameters/Limit"},{"$ref":"#/components/parameters/Cursor"},{"$ref":"#/components/parameters/WorboVersion"}],"responses":{"200":{"description":"OK","headers":{"Worbo-Version":{"$ref":"#/components/headers/WorboVersion"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/WebhookDelivery"}},"next_cursor":{"type":["string","null"],"description":"The cursor of the next page; null on the last one."},"has_more":{"type":"boolean"}},"required":["data","next_cursor","has_more"]}}}},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/webhook-deliveries/{delivery}/replay":{"post":{"operationId":"replayWebhookDelivery","tags":["webhooks"],"summary":"Send a delivery again","description":"Needs the scope webhooks:manage.","x-worbo-scopes":["webhooks:manage"],"x-worbo-live-key":false,"parameters":[{"name":"delivery","in":"path","required":true,"description":"The ID of the delivery.","schema":{"type":"integer","examples":[9001]}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/DryRun"},{"$ref":"#/components/parameters/WorboVersion"}],"responses":{"202":{"description":"Accepted","headers":{"Worbo-Version":{"$ref":"#/components/headers/WorboVersion"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/WebhookDelivery"}},"required":["data"]}}}},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/webhook-endpoints":{"get":{"operationId":"listWebhookEndpoints","tags":["webhooks"],"summary":"List the webhook endpoints","description":"Needs the scope webhooks:manage.","x-worbo-scopes":["webhooks:manage"],"x-worbo-live-key":false,"parameters":[{"$ref":"#/components/parameters/WorboVersion"}],"responses":{"200":{"description":"OK","headers":{"Worbo-Version":{"$ref":"#/components/headers/WorboVersion"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/WebhookEndpoint"}}},"required":["data"]}}}},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}}},"post":{"operationId":"createWebhookEndpoint","tags":["webhooks"],"summary":"Add a webhook endpoint","description":"The signing secret is in the response, only now. Needs the scope webhooks:manage.","x-worbo-scopes":["webhooks:manage"],"x-worbo-live-key":false,"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/DryRun"},{"$ref":"#/components/parameters/WorboVersion"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpointWrite"}}}},"responses":{"201":{"description":"Created","headers":{"Worbo-Version":{"$ref":"#/components/headers/WorboVersion"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/WebhookEndpointSecret"}},"required":["data"]}}}},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/webhook-endpoints/{endpoint}":{"patch":{"operationId":"updateWebhookEndpoint","tags":["webhooks"],"summary":"Change the address or the events of an endpoint","description":"Needs the scope webhooks:manage.","x-worbo-scopes":["webhooks:manage"],"x-worbo-live-key":false,"parameters":[{"name":"endpoint","in":"path","required":true,"description":"The ID of the webhook endpoint.","schema":{"type":"integer","examples":[4]}},{"$ref":"#/components/parameters/DryRun"},{"$ref":"#/components/parameters/WorboVersion"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpointWrite"}}}},"responses":{"200":{"description":"OK","headers":{"Worbo-Version":{"$ref":"#/components/headers/WorboVersion"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/WebhookEndpoint"}},"required":["data"]}}}},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"}}},"delete":{"operationId":"deleteWebhookEndpoint","tags":["webhooks"],"summary":"Delete a webhook endpoint","description":"Needs the scope webhooks:manage.","x-worbo-scopes":["webhooks:manage"],"x-worbo-live-key":false,"parameters":[{"name":"endpoint","in":"path","required":true,"description":"The ID of the webhook endpoint.","schema":{"type":"integer","examples":[4]}},{"$ref":"#/components/parameters/DryRun"},{"$ref":"#/components/parameters/WorboVersion"}],"responses":{"200":{"description":"OK","headers":{"Worbo-Version":{"$ref":"#/components/headers/WorboVersion"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Deleted"}},"required":["data"]}}}},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/webhook-endpoints/{endpoint}/rotate":{"post":{"operationId":"rotateWebhookSecret","tags":["webhooks"],"summary":"Rotate the signing secret of an endpoint","description":"The previous secret stays valid for 24 hours; meanwhile, both signatures are sent. Needs the scope webhooks:manage.","x-worbo-scopes":["webhooks:manage"],"x-worbo-live-key":false,"parameters":[{"name":"endpoint","in":"path","required":true,"description":"The ID of the webhook endpoint.","schema":{"type":"integer","examples":[4]}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/DryRun"},{"$ref":"#/components/parameters/WorboVersion"}],"responses":{"200":{"description":"OK","headers":{"Worbo-Version":{"$ref":"#/components/headers/WorboVersion"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/WebhookEndpointSecret"}},"required":["data"]}}}},"401":{"$ref":"#/components/responses/Unauthenticated"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"}}}}},"components":{"securitySchemes":{"apiKey":{"type":"http","scheme":"bearer","description":"The API key of the organization: wk_live_… for live data, wk_test_… for the sandbox."}},"parameters":{"IdempotencyKey":{"name":"Idempotency-Key","in":"header","required":false,"description":"A unique key of the request, such as a UUID: a repeated request with the same key gets the first response, without doing the work again.","schema":{"type":"string","maxLength":255}},"DryRun":{"name":"dry_run","in":"query","required":false,"description":"Runs every check and returns what would happen, without saving anything.","schema":{"type":"boolean"}},"Limit":{"name":"limit","in":"query","required":false,"description":"How many items a page has, between 1 and 100.","schema":{"type":"integer","minimum":1,"maximum":100,"default":25}},"Cursor":{"name":"cursor","in":"query","required":false,"description":"The next_cursor of the previous page.","schema":{"type":"string"}},"WorboVersion":{"name":"Worbo-Version","in":"header","required":false,"description":"The API version, as a date; without it, the version of the key.","schema":{"type":"string","enum":["2026-10-05"],"example":"2026-10-05"}}},"headers":{"WorboVersion":{"description":"The API version used for the request.","schema":{"type":"string","example":"2026-10-05"}}},"responses":{"Unauthenticated":{"description":"The key is missing, not valid, revoked or expired.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"Forbidden":{"description":"The key does not have the scope of the operation, or a test key reads data.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"NotFound":{"description":"The resource does not exist or belongs to another organization.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"Conflict":{"description":"The Idempotency-Key was used for another request, or that request is still running.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"Unprocessable":{"description":"The request is not valid: validation_failed, schema_violation or the code of the rule that stopped it.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"RateLimited":{"description":"Too many requests; wait the seconds in Retry-After.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"schemas":{"AuditLogEntry":{"type":"object","properties":{"id":{"type":"integer","examples":[1201]},"action":{"type":"string","examples":["contact.created"]},"label":{"type":"string","examples":["Contact created"]},"source":{"type":"string","examples":["api"]},"actor":{"type":["object","null"],"additionalProperties":true},"subject":{"type":["object","null"],"additionalProperties":true},"properties":{"type":"object","additionalProperties":true},"created_at":{"type":"string","format":"date-time"}}},"Automation":{"type":"object","properties":{"id":{"type":"integer","examples":[8]},"name":{"type":"string","examples":["Recâștigare"]},"status":{"type":"string","enum":["draft","active","paused"],"examples":["active"]},"trigger":{"type":["string","null"],"examples":["manual"]},"number_id":{"type":["integer","null"],"examples":[3]},"recipe":{"type":["string","null"]},"version_id":{"type":["integer","null"],"examples":[14]},"holdout_percent":{"type":"integer","examples":[0]},"created_at":{"type":["string","null"],"format":"date-time"},"updated_at":{"type":["string","null"],"format":"date-time"}}},"AutomationDetail":{"allOf":[{"$ref":"#/components/schemas/Automation"},{"type":"object","properties":{"definition":{"type":["object","null"],"additionalProperties":true},"report":{"type":"object","additionalProperties":true}}}]},"AutomationRun":{"type":"object","properties":{"id":{"type":"integer","examples":[3301]},"automation_id":{"type":"integer","examples":[8]},"contact_id":{"type":"integer","examples":[123]},"object_id":{"type":["integer","null"]},"status":{"type":"string","enum":["active","waiting","completed","exited","cancelled"],"examples":["active"]},"exit_reason":{"type":["string","null"]},"held_out":{"type":"boolean","examples":[false]},"started_at":{"type":"string","format":"date-time"},"finished_at":{"type":["string","null"],"format":"date-time"},"converted_at":{"type":["string","null"],"format":"date-time"}}},"BatchRequest":{"type":"object","description":"Up to 100 items, each written on its own; the error of one does not stop the others.","properties":{"items":{"type":"array","minItems":1,"maxItems":100,"items":{"type":"object","additionalProperties":true}}},"required":["items"]},"BatchResult":{"type":"object","properties":{"index":{"type":"integer","examples":[0]},"status":{"type":"string","enum":["created","updated","error"],"examples":["created"]},"data":{"type":"object","additionalProperties":true},"error":{"$ref":"#/components/schemas/Problem"}},"required":["index","status"]},"BotState":{"type":"object","properties":{"contact_id":{"type":"integer","examples":[123]},"bot_enabled":{"type":"boolean","examples":[false]}}},"BotSwitch":{"type":"object","properties":{"enabled":{"type":"boolean","examples":[false]}},"required":["enabled"]},"Campaign":{"type":"object","properties":{"id":{"type":"integer","examples":[21]},"name":{"type":"string","examples":["Oferta de toamnă"]},"status":{"type":"string","enum":["draft","scheduled","running","paused","completed","stopped"],"examples":["draft"]},"kind":{"type":"string","enum":["template","free","object"],"examples":["template"]},"text":{"type":["string","null"]},"object_id":{"type":["integer","null"]},"object_roles":{"type":["array","null"],"items":{"type":"string"}},"purpose":{"type":["string","null"],"enum":["marketing","transactional",null]},"number_id":{"type":["integer","null"],"examples":[3]},"template":{"type":["string","null"],"examples":["autumn_offer"]},"variables":{"type":"array","items":{"type":["string","null"]}},"header_text":{"type":["string","null"]},"topic":{"type":["string","null"]},"segment_id":{"type":["integer","null"],"examples":[12]},"location_id":{"type":["integer","null"]},"scheduled_at":{"type":["string","null"],"format":"date-time"},"expires_at":{"type":["string","null"],"format":"date-time"},"wave_by":{"type":"string","enum":["size","location","segment"],"examples":["size"]},"wave_size":{"type":["integer","null"]},"wave_hours":{"type":"integer","examples":[24]},"wave_segments":{"type":["array","null"],"items":{"type":"integer"}},"budget":{"type":["string","null"],"examples":["250.00"]},"total":{"type":["integer","null"]},"processed":{"type":["integer","null"]},"created_at":{"type":["string","null"],"format":"date-time"}}},"CampaignDetail":{"allOf":[{"$ref":"#/components/schemas/Campaign"},{"type":"object","properties":{"report":{"type":"object","additionalProperties":true}}}]},"CampaignEstimate":{"type":"object","properties":{"audience":{"type":"integer","examples":[240]},"contactable":{"type":"integer","examples":[198]},"excluded":{"type":"object","properties":{"whatsapp":{"type":"integer","examples":[12]},"consent":{"type":"integer","examples":[28]},"optin":{"type":"integer","examples":[10]},"marketing":{"type":"integer","examples":[18]},"window":{"type":"integer","examples":[0]},"undeliverable":{"type":"integer","examples":[2]}}},"capped":{"type":"integer","examples":[0]},"other_countries":{"type":"integer","examples":[0]},"number":{"type":["object","null"],"description":"The quality of the number (GREEN, YELLOW or RED) and until when Meta paused its marketing, if it did.","properties":{"quality":{"type":["string","null"],"examples":["GREEN"]},"marketing_paused_until":{"type":["string","null"],"format":"date-time"}}},"united_states":{"type":"integer","description":"For marketing, the recipients in the United States, by the country of the contact: Meta does not deliver marketing templates to US numbers.","examples":[0]},"template":{"type":["object","null"],"additionalProperties":true},"cost":{"type":"object","properties":{"amount":{"type":"number","examples":[10.79]},"free":{"type":"integer","examples":[0]},"rate":{"type":"number","examples":[0.0545]},"currency":{"type":"string","examples":["EUR"]},"country":{"type":"string","examples":["RO"]},"budget_messages":{"type":["integer","null"]}}},"waves":{"type":"object","properties":{"count":{"type":"integer","examples":[1]},"per_day":{"type":"integer","examples":[198]},"last_at":{"type":["string","null"],"format":"date-time"},"sizes":{"type":"array","items":{"type":"object","additionalProperties":true}}}},"limit":{"type":"object","properties":{"daily":{"type":["integer","null"],"examples":[1000]},"days":{"type":["integer","null"],"examples":[1]},"over":{"type":"boolean","examples":[false]}}},"start":{"type":"string","format":"date-time"},"quiet_until":{"type":["string","null"],"format":"date-time"},"ends_before_last_wave":{"type":"boolean","examples":[false]}}},"CampaignWrite":{"type":"object","properties":{"name":{"type":"string","examples":["Oferta de toamnă"]},"kind":{"type":"string","enum":["template","free","object"],"default":"template","description":"free: a free message without a template, only to the contacts with the 24-hour window open on the number. object: a utility template to the people of one object, instead of a segment."},"object_id":{"type":["integer","null"],"description":"With kind object: the object whose people get the notice.","examples":[456]},"object_roles":{"type":["array","null"],"items":{"type":"string"},"description":"With kind object: the roles of the people who get it; none means all.","examples":[["holder"]]},"text":{"type":["string","null"],"maxLength":4096,"description":"The free message, the same for everyone; only with kind free."},"purpose":{"type":["string","null"],"enum":["marketing","transactional",null],"description":"What the free message is: marketing, with its consent and limit, or information."},"number_id":{"type":["integer","null"],"examples":[3]},"template":{"type":["string","null"],"examples":["autumn_offer"]},"variables":{"type":"array","items":{"type":["string","null"]}},"header_text":{"type":["string","null"]},"topic":{"type":["string","null"]},"segment_id":{"type":["integer","null"],"examples":[12]},"location_id":{"type":["integer","null"]},"scheduled_at":{"type":["string","null"],"format":"date-time","examples":["2026-10-20T10:00:00+03:00"]},"expires_at":{"type":["string","null"],"format":"date-time"},"wave_by":{"type":"string","enum":["size","location","segment"],"examples":["size"]},"wave_size":{"type":["integer","null"]},"wave_hours":{"type":"integer","examples":[24]},"wave_segments":{"type":["array","null"],"items":{"type":"integer"}},"budget":{"type":["number","null"]}},"required":["name"]},"Catalog":{"type":"object","properties":{"key":{"type":"string","examples":["fit.classes"]},"name":{"type":"string","examples":["Classes"]},"kind":{"type":"string","enum":["product","service","class","trainer","plan","location","other"],"examples":["class"]},"currency":{"type":["string","null"],"examples":["RON"]},"source":{"type":"string","examples":["fitness"]}}},"CatalogItem":{"type":"object","properties":{"id":{"type":"integer","examples":[310]},"external_id":{"type":["string","null"],"examples":["yoga"]},"sku":{"type":["string","null"]},"name":{"type":"string","examples":["Yoga"]},"price":{"type":["string","null"],"description":"A decimal number, as text.","examples":["50.00"]},"currency":{"type":["string","null"],"examples":["RON"]},"stock":{"type":["integer","null"]},"available":{"type":["boolean","null"],"examples":[true]},"recommendable":{"type":"boolean","description":"False for the items that are not recommended: sensitive, age-restricted or not sold on their own.","examples":[true]},"url":{"type":["string","null"]},"image_url":{"type":["string","null"]},"fields":{"type":"object","additionalProperties":true},"updated_at":{"type":["string","null"],"format":"date-time"}}},"CatalogItemWrite":{"type":"object","properties":{"id":{"type":"integer"},"external_id":{"type":"string","examples":["yoga"]},"name":{"type":"string","examples":["Yoga"]},"sku":{"type":"string"},"price":{"type":"number","examples":[50]},"currency":{"type":"string","examples":["RON"]},"stock":{"type":"integer"},"available":{"type":"boolean","examples":[true]},"recommendable":{"type":"boolean","examples":[true]},"url":{"type":"string"},"image_url":{"type":"string"},"custom":{"type":"object","additionalProperties":true}}},"ConsentRow":{"type":"object","properties":{"id":{"type":"integer","examples":[900]},"purpose":{"type":"string","enum":["channel","transactional","marketing","recommendations"],"examples":["marketing"]},"topic":{"type":["string","null"]},"state":{"type":"string","enum":["granted","revoked"],"examples":["granted"]},"basis":{"type":"string","enum":["consent","contract","soft_opt_in","legitimate_interest"],"examples":["consent"]},"source":{"type":"string","enum":["form","checkout","click_to_chat","keyword","activation_button","preference_center","panel","import","api","meta_signal","suppression"],"examples":["form"]},"proof":{"type":["object","null"],"additionalProperties":true},"occurred_at":{"type":"string","format":"date-time"}}},"ConsentStatus":{"type":"object","properties":{"purposes":{"type":"object","additionalProperties":{"type":["string","null"]},"examples":[{"channel":"granted","transactional":null,"marketing":"granted","recommendations":null}]},"topics":{"type":"object","additionalProperties":true},"meta_blocked":{"type":"boolean","examples":[false]},"blocked":{"type":"boolean","examples":[false]},"allowed":{"type":"object","properties":{"transactional":{"type":"boolean","examples":[true]},"marketing":{"type":"boolean","examples":[true]},"recommendations":{"type":"boolean","examples":[false]}}}}},"ConsentWrite":{"type":"object","properties":{"purposes":{"type":"array","minItems":1,"items":{"type":"string","enum":["channel","transactional","marketing","recommendations"]},"examples":[["channel","marketing"]]},"state":{"type":"string","enum":["granted","revoked"],"examples":["granted"]},"source":{"type":"string","enum":["form","checkout","click_to_chat","api"],"examples":["form"]},"topic":{"type":["string","null"]},"basis":{"type":"string","enum":["consent","soft_opt_in"]},"proof":{"type":"object","additionalProperties":{"type":"string"},"description":"What shows the consent: the text of the form, the page, the IP.","examples":[{"form":"Newsletter, footer","text":"I agree to receive offers on WhatsApp"}]},"occurred_at":{"type":["string","null"],"format":"date-time"}},"required":["purposes","state"]},"Consents":{"type":"object","properties":{"status":{"$ref":"#/components/schemas/ConsentStatus"},"history":{"type":"array","items":{"$ref":"#/components/schemas/ConsentRow"}}}},"ConsentsRecorded":{"type":"object","properties":{"recorded":{"type":"array","items":{"$ref":"#/components/schemas/ConsentRow"}},"status":{"$ref":"#/components/schemas/ConsentStatus"},"history":{"type":"array","items":{"$ref":"#/components/schemas/ConsentRow"}}}},"Contact":{"type":"object","properties":{"id":{"type":"integer","examples":[123]},"identities":{"type":"array","items":{"$ref":"#/components/schemas/ContactIdentity"}},"fields":{"type":"object","additionalProperties":true,"description":"The standard fields and the custom fields of the organization, by key.","examples":[{"first_name":"Ana","last_name":"Popescu","language":"ro"}]},"tags":{"type":"array","items":{"type":"string"},"examples":[["vip"]]},"source":{"type":"string","enum":["manual","whatsapp","import","api","business_app"],"examples":["api"]},"blocked":{"type":"boolean","examples":[false]},"created_at":{"type":["string","null"],"format":"date-time"},"updated_at":{"type":["string","null"],"format":"date-time"}}},"ContactIdentity":{"type":"object","properties":{"id":{"type":"integer","examples":[501]},"type":{"type":"string","enum":["phone","bsuid","parent_bsuid","username","email","external_id"],"examples":["phone"]},"value":{"type":"string","examples":["+40722123456"]},"source":{"type":["string","null"]},"primary":{"type":"boolean","examples":[true]}}},"ContactMerge":{"type":"object","properties":{"contact_id":{"type":"integer","description":"The contact merged into this one; its identities and history move here.","examples":[124]}},"required":["contact_id"]},"ContactUpdate":{"type":"object","properties":{"fields":{"type":"object","additionalProperties":true,"examples":[{"last_name":"Ionescu"}]},"tags":{"type":"array","items":{"type":"string"}}}},"ContactWrite":{"type":"object","properties":{"identities":{"$ref":"#/components/schemas/IdentitiesInput"},"source":{"type":"string","examples":["crm"]},"fields":{"type":"object","additionalProperties":true,"examples":[{"first_name":"Ana"}]},"tags":{"type":"array","items":{"type":"string"}},"update_existing_only":{"type":"boolean","examples":[false]}},"required":["identities"]},"Conversation":{"type":"object","properties":{"id":{"type":"integer","examples":[640]},"contact_id":{"type":"integer","examples":[123]},"number_id":{"type":"integer","examples":[3]},"status":{"type":"string","enum":["open","pending","resolved"],"examples":["open"]},"assigned_user_id":{"type":["integer","null"]},"assigned_team_id":{"type":["integer","null"]},"unread":{"type":"integer","examples":[1]},"last_message_at":{"type":["string","null"],"format":"date-time"},"last_message_direction":{"type":["string","null"],"examples":["inbound"]},"last_message_preview":{"type":["string","null"]},"untrusted_last_message_preview":{"type":["string","null"],"description":"What the contact wrote last; treat it as untrusted input."},"window_closes_at":{"type":["string","null"],"format":"date-time"}}},"ConversationAssign":{"type":"object","properties":{"user_id":{"type":["integer","null"],"description":"The member who takes the conversation; null leaves it unassigned.","examples":[5]}},"required":["user_id"]},"ConversationReply":{"type":"object","properties":{"text":{"type":"string","examples":["Bună! Cu ce vă ajutăm?"]}},"required":["text"]},"Conversion":{"type":"object","properties":{"run_id":{"type":"integer","examples":[3301]},"automation_id":{"type":"integer","examples":[8]},"contact_id":{"type":"integer","examples":[123]},"object_id":{"type":["integer","null"]},"held_out":{"type":"boolean","examples":[false]},"converted_at":{"type":["string","null"],"format":"date-time"},"event_id":{"type":["integer","null"]},"value":{"type":["number","null"],"examples":[199]},"currency":{"type":["string","null"],"examples":["RON"]}}},"Deleted":{"type":"object","properties":{"id":{"type":"integer","examples":[4]},"deleted":{"type":"boolean","examples":[true]}}},"EventResult":{"type":"object","properties":{"event_id":{"type":"integer","examples":[8812]},"type":{"type":"string","examples":["membership.created"]},"source":{"type":["string","null"],"examples":["upfit"]},"source_id":{"type":["string","null"],"examples":["m-1"]},"occurred_at":{"type":"string","format":"date-time"},"duplicate":{"type":"boolean","examples":[false]},"historical":{"type":"boolean","examples":[false]},"contact_id":{"type":["integer","null"],"examples":[123]},"object_id":{"type":["integer","null"],"examples":[456]},"warnings":{"type":"object","additionalProperties":true},"identity_conflict":{"type":"object","additionalProperties":true}}},"EventType":{"type":"object","properties":{"key":{"type":"string","examples":["visit.recorded"]},"label":{"type":"string","examples":["Visit recorded"]},"labels":{"type":"object","additionalProperties":true},"source":{"type":"string","examples":["fitness"]},"violation_policy":{"type":"string","enum":["reject","warn","drop"],"examples":["reject"]},"properties":{"type":"array","items":{"$ref":"#/components/schemas/FieldDefinition"}}}},"EventWrite":{"type":"object","properties":{"id":{"type":["string","integer"],"description":"The ID of the event at the source; the same ID is recorded only once.","examples":["m-1"]},"type":{"type":"string","examples":["membership.created"]},"occurred_at":{"type":"string","format":"date-time","examples":["2026-10-15T09:00:00+03:00"]},"source":{"type":"string","examples":["upfit"]},"contact":{"type":"object","examples":[{"phone":"+40722123456"}]},"object":{"type":"object","properties":{"type":{"type":"string"},"external_id":{"type":"string"},"role":{"type":"string"},"upsert":{"type":"object"}},"examples":[{"type":"fit.membership","external_id":"abn-7781","upsert":{"statuses":{"lifecycle":"active"}}}]},"properties":{"type":"object","additionalProperties":true,"examples":[{"plan":"plan-12"}]},"historical":{"type":"boolean","examples":[false]},"update_existing_only":{"type":"boolean","examples":[false]}},"required":["type"]},"FieldDefinition":{"type":"object","properties":{"key":{"type":"string","examples":["shoe_size"]},"label":{"type":"string","examples":["Shoe size"]},"labels":{"type":"object","additionalProperties":true},"type":{"type":"string","enum":["text","number","money","date","datetime","boolean","single_select","multi_select","phone","email","url","reference","file","location","interval"],"examples":["number"]},"required":{"type":"boolean","examples":[false]},"unique":{"type":"boolean","examples":[false]},"sensitivity":{"type":"string","enum":["normal","personal","special"],"examples":["normal"]},"key_date":{"type":"boolean","examples":[false]},"calculated":{"type":"boolean","examples":[false]},"multiple":{"type":"boolean","examples":[false]},"choices":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"labels":{"type":"object","additionalProperties":true}}}},"default":{"description":"The default value, of the type of the field."},"archived":{"type":"boolean","examples":[false]}}},"FieldDefinitionWrite":{"type":"object","properties":{"object_type":{"type":"string","description":"The key of the object type; without it, the field belongs to the contacts.","examples":["vehicle"]},"labels":{"type":"object","additionalProperties":{"type":"string"},"examples":[{"en":"Plate","ro":"Număr de înmatriculare"}]},"key":{"type":"string","examples":["plate"]},"type":{"type":"string","enum":["text","number","money","date","datetime","boolean","single_select","multi_select","phone","email","url","reference","file","location","interval"],"examples":["text"]},"sensitivity":{"type":"string","enum":["normal","personal","special"]},"is_required":{"type":"boolean"},"is_unique":{"type":"boolean"},"segmentable":{"type":"boolean"},"templatable":{"type":"boolean"},"key_date":{"type":"boolean"},"audited":{"type":"boolean"},"settings":{"type":"object","additionalProperties":true},"default_value":{"description":"The default value, of the type of the field."}},"required":["labels","type"]},"File":{"type":"object","properties":{"id":{"type":["integer","null"],"examples":[77]},"name":{"type":"string","examples":["contract.pdf"]},"mime":{"type":"string","examples":["application/pdf"]},"size":{"type":"integer","examples":[48213]},"sha256":{"type":["string","null"]},"contact_id":{"type":["integer","null"],"examples":[123]},"object_id":{"type":["integer","null"],"examples":[456]},"created_at":{"type":["string","null"],"format":"date-time"}}},"FileUpload":{"type":"object","properties":{"file":{"type":"string","format":"binary","description":"The file: PDF, image, Office, text or CSV, up to 16 MB."}},"required":["file"]},"IdentitiesInput":{"type":"object","description":"At least one identity; the contact is found by any of them.","properties":{"phone":{"type":"string","description":"E.164, such as +40722123456.","examples":["+40722123456"]},"email":{"type":"string","format":"email","examples":["ana@example.com"]},"bsuid":{"type":"string"},"external_id":{"description":"The ID of the contact at the source: text, or an object with source and value.","oneOf":[{"type":"string"},{"type":"object","properties":{"source":{"type":"string"},"value":{"type":"string"}},"required":["value"]}],"examples":["crm-1001"]}}},"IdentityWrite":{"type":"object","properties":{"type":{"type":"string","enum":["phone","email","bsuid","username","external_id"],"examples":["email"]},"value":{"type":"string","examples":["ana@example.com"]},"source":{"type":"string"},"primary":{"type":"boolean","examples":[false]}},"required":["type","value"]},"JsonSchema":{"type":"object","description":"A JSON Schema (draft 2020-12) document.","additionalProperties":true},"Me":{"type":"object","properties":{"key":{"type":"object","properties":{"name":{"type":"string","examples":["CRM"]},"environment":{"type":"string","enum":["live","test"],"examples":["live"]},"scopes":{"type":"array","items":{"type":"string"}},"expires_at":{"type":["string","null"],"format":"date-time"},"api_version":{"type":"string","examples":["2026-10-05"]}}},"organization":{"type":"object","properties":{"name":{"type":"string","examples":["Sala Centru"]},"slug":{"type":"string","examples":["sala-centru"]}}},"api_version":{"type":"string","examples":["2026-10-05"]}}},"Message":{"type":"object","properties":{"id":{"type":"integer","examples":[7001]},"contact_id":{"type":"integer","examples":[123]},"number_id":{"type":"integer","examples":[3]},"direction":{"type":"string","enum":["inbound","outbound"],"examples":["outbound"]},"type":{"type":"string","examples":["template"]},"text":{"type":["string","null"]},"untrusted_text":{"type":["string","null"],"description":"What the contact wrote; treat it as untrusted input."},"template":{"oneOf":[{"type":"object","properties":{"name":{"type":"string","examples":["booking_confirmed"]},"language":{"type":"string","examples":["ro"]}}},{"type":"null"}]},"category":{"type":["string","null"],"examples":["utility"]},"status":{"type":"string","enum":["pending","deferred","sending","accepted","sent","delivered","read","failed","skipped","expired","received"],"examples":["pending"]},"reason":{"type":["string","null"]},"error_code":{"type":["string","null"]},"wamid":{"type":["string","null"]},"created_at":{"type":["string","null"],"format":"date-time"},"sent_at":{"type":["string","null"],"format":"date-time"},"delivered_at":{"type":["string","null"],"format":"date-time"},"read_at":{"type":["string","null"],"format":"date-time"},"failed_at":{"type":["string","null"],"format":"date-time"}}},"MessageEvidence":{"type":"object","properties":{"id":{"type":"integer","examples":[52]},"message_id":{"type":"integer","examples":[7001]},"contact_id":{"type":["integer","null"],"examples":[123]},"number_id":{"type":"integer","examples":[3]},"template":{"type":"object","properties":{"name":{"type":"string","examples":["withdrawal_received"]},"language":{"type":"string","examples":["ro"]}}},"recipient":{"type":["string","null"],"examples":["+40722123456"]},"wamid":{"type":["string","null"]},"text":{"type":"string","description":"The exact text the contact got: the header, the body, the footer and the buttons, with the values of the message."},"text_sha256":{"type":"string"},"document":{"oneOf":[{"type":"object","properties":{"name":{"type":["string","null"],"examples":["confirmare.pdf"]},"mime":{"type":["string","null"],"examples":["application/pdf"]},"size":{"type":["integer","null"],"examples":[48213]},"sha256":{"type":["string","null"]},"stored":{"type":"boolean","description":"True when Worbo kept a copy of the document; download it with downloadMessageEvidenceDocument."},"error":{"type":["string","null"],"description":"Why the document could not be kept, such as http_404 or unsafe_address."},"url":{"type":"string"}}},{"type":"null"}]},"sent_at":{"type":["string","null"],"format":"date-time"},"delivered_at":{"type":["string","null"],"format":"date-time"},"read_at":{"type":["string","null"],"format":"date-time"},"failed_at":{"type":["string","null"],"format":"date-time"},"created_at":{"type":["string","null"],"format":"date-time"}}},"MessageSend":{"type":"object","properties":{"contact_id":{"type":"integer","examples":[123]},"number_id":{"type":["integer","null"]},"template":{"type":"object","properties":{"name":{"type":"string","examples":["booking_confirmed"]},"language":{"type":"string","examples":["ro"]},"variables":{"type":"array","items":{"type":["string","null"]},"description":"The values of the variables; a missing value is filled from the field of the variable. In a library template left unchanged, a missing first name takes the fallback text of the library, for example “Hello from the gym team.”.","examples":[["Ana","3 octombrie, 18:00"]]}},"required":["name"]},"text":{"type":"string","description":"A free text, only while the 24-hour window is open; instead of template."},"flow":{"type":"object","properties":{"key":{"type":"string","description":"The key of a published WhatsApp form of the account of the number.","examples":["nps"]},"body":{"type":"string","description":"The text of the message, above the button that opens the form.","examples":["Ne spui în 10 secunde cum a fost?"]}},"required":["key","body"]}},"required":["contact_id"]},"Number":{"type":"object","properties":{"id":{"type":"integer","examples":[3]},"phone":{"type":["string","null"],"examples":["+40 722 000 000"]},"name":{"type":["string","null"],"examples":["Sala Centru"]},"sandbox":{"type":"boolean","examples":[false]},"quality_rating":{"type":["string","null"],"examples":["GREEN"]},"messaging_limit_tier":{"type":["string","null"],"examples":["TIER_1K"]},"warmup":{"type":"boolean","examples":[false]},"marketing_paused_until":{"type":["string","null"],"format":"date-time"},"disabled":{"type":"boolean","examples":[false]},"disabled_reason":{"type":["string","null"]}}},"Object":{"type":"object","properties":{"id":{"type":"integer","examples":[456]},"type":{"type":"string","examples":["fit.membership"]},"source":{"type":["string","null"]},"external_id":{"type":["string","null"],"examples":["abn-7781"]},"title":{"type":["string","null"],"examples":["Full access 12 luni"]},"fields":{"type":"object","additionalProperties":true,"examples":[{"plan":12,"starts_on":"2026-09-01","ends_on":"2027-08-31"}]},"statuses":{"type":"object","additionalProperties":{"type":"string"},"examples":[{"lifecycle":"active","payment":"ok"}]},"raw_status":{"type":["string","null"]},"relations":{"type":"array","items":{"$ref":"#/components/schemas/ObjectRelation"}},"created_at":{"type":["string","null"],"format":"date-time"},"updated_at":{"type":["string","null"],"format":"date-time"}}},"ObjectRelation":{"type":"object","properties":{"id":{"type":"integer","examples":[77]},"contact_id":{"type":"integer","examples":[123]},"role":{"type":"string","examples":["holder"]},"primary":{"type":"boolean","examples":[true]},"muted":{"type":"boolean","examples":[false]},"valid_from":{"type":["string","null"],"format":"date"},"valid_until":{"type":["string","null"],"format":"date"}}},"ObjectType":{"type":"object","properties":{"key":{"type":"string","examples":["fit.membership"]},"label":{"type":"string","examples":["Membership"]},"labels":{"type":"object","additionalProperties":true},"plural_labels":{"type":["object","null"],"additionalProperties":true},"source":{"type":"string","examples":["fitness"]},"status_axes":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","examples":["lifecycle"]},"labels":{"type":"object","additionalProperties":true},"statuses":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","examples":["active"]},"labels":{"type":"object","additionalProperties":true},"category":{"type":"string","examples":["active"]}}}}}}},"roles":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","examples":["holder"]},"labels":{"type":"object","additionalProperties":true},"multiple":{"type":"boolean","examples":[false]},"primary":{"type":"boolean","examples":[true]}}}},"fields":{"type":"array","items":{"$ref":"#/components/schemas/FieldDefinition"}}}},"ObjectTypeWrite":{"type":"object","properties":{"labels":{"type":"object","additionalProperties":{"type":"string"},"examples":[{"en":"Vehicle","ro":"Vehicul"}]},"plural_labels":{"type":"object","additionalProperties":true},"key":{"type":"string","examples":["vehicle"]},"status_axes":{"type":"array","items":{"type":"object","additionalProperties":true}},"roles":{"type":"array","items":{"type":"object","additionalProperties":true}},"title_field":{"type":"string"},"retention_days":{"type":"integer"}},"required":["labels"]},"ObjectUpdate":{"type":"object","properties":{"source":{"type":"string"},"fields":{"type":"object","additionalProperties":true},"statuses":{"type":"object","additionalProperties":{"type":"string"},"examples":[{"lifecycle":"frozen"}]},"raw_status":{"type":"string"},"raw_status_label":{"type":"string"},"contact":{"type":"object","additionalProperties":true},"role":{"type":"string"}}},"ObjectWrite":{"type":"object","properties":{"external_id":{"type":"string","examples":["abn-7781"]},"source":{"type":"string","examples":["upfit"]},"fields":{"type":"object","additionalProperties":true,"examples":[{"starts_on":"2026-09-01","ends_on":"2027-08-31"}]},"statuses":{"type":"object","additionalProperties":{"type":"string"},"examples":[{"lifecycle":"active"}]},"raw_status":{"type":"string"},"raw_status_label":{"type":"string"},"contact":{"type":"object","description":"The contact linked in role: {\"id\": 123} or {\"identities\": {...}, \"fields\": {...}}.","examples":[{"identities":{"phone":"+40722123456"}}]},"role":{"type":"string","examples":["holder"]},"update_existing_only":{"type":"boolean","examples":[false]}},"required":["external_id"]},"OfferRedeem":{"type":"object","properties":{"location_id":{"type":["integer","null"]},"beneficiary_contact_id":{"type":["integer","null"]},"occurred_at":{"type":["string","null"],"format":"date-time"}}},"Otp":{"type":"object","properties":{"id":{"type":"integer","examples":[880]},"phone":{"type":"string","examples":["+40722123456"]},"purpose":{"type":["string","null"],"examples":["login"]},"verifiable":{"type":"boolean","description":"True when Worbo made the code and checks it."},"expires_at":{"type":"string","format":"date-time"},"message_id":{"type":"integer","examples":[7001]},"status":{"type":"string","enum":["pending","deferred","sending","accepted","sent","delivered","read","failed","skipped","expired","received"],"examples":["pending"]}}},"OtpSend":{"type":"object","properties":{"phone":{"type":"string","description":"The phone that gets the code, in international format.","examples":["+40722123456"]},"code":{"type":"string","pattern":"^[A-Za-z0-9]{4,15}$","description":"The code made by the organization, which checks it itself; without it, Worbo makes the code and checks it.","examples":["482913"]},"number_id":{"type":["integer","null"]},"language":{"type":"string","description":"The language of the message; by default, the language of the contact.","examples":["ro"]},"purpose":{"type":"string","maxLength":64,"description":"What the code is for, kept with it, such as login or document.","examples":["login"]}},"required":["phone"]},"OtpVerification":{"type":"object","properties":{"id":{"type":"integer","examples":[880]},"verified":{"type":"boolean"},"reason":{"type":["string","null"],"enum":["wrong_code","expired","already_used","locked",null],"description":"Why the check failed; null when the code is right."},"attempts_left":{"type":"integer","examples":[4]}}},"OtpVerify":{"type":"object","properties":{"code":{"type":"string","examples":["482913"]}},"required":["code"]},"PeriodResults":{"type":"object","properties":{"from":{"type":"string","format":"date-time","examples":["2026-09-30T21:00:00+00:00"]},"to":{"type":"string","format":"date-time","examples":["2026-10-15T20:59:59+00:00"]},"journeys":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","examples":[8]},"name":{"type":"string","examples":["Recâștigare"]},"conversion":{"type":["string","null"]},"entered":{"type":"integer","examples":[40]},"converted":{"type":"integer","examples":[6]},"control":{"type":["object","null"],"additionalProperties":true},"value":{"type":"number","examples":[1194]},"sent":{"type":"integer","examples":[40]},"clicked":{"type":"integer","examples":[11]},"cost":{"type":"number","examples":[2.18]}}}},"conversions":{"type":"array","items":{"type":"object","additionalProperties":true}},"baseline":{"type":["object","null"],"additionalProperties":true},"cost":{"type":"object","properties":{"amount":{"type":"number","examples":[2.18]},"currency":{"type":"string","examples":["EUR"]}}},"value":{"type":"number","examples":[1194]}}},"PreferenceLink":{"type":"object","properties":{"contact_id":{"type":"integer","examples":[123]},"url":{"type":"string","format":"uri","examples":["https://my.worbo.app/preferences/abc"]},"expires_at":{"type":"string","format":"date-time"}}},"PreferenceLinkWrite":{"type":"object","properties":{"contact_id":{"type":"integer","examples":[123]}},"required":["contact_id"]},"Problem":{"type":"object","description":"An error in the application/problem+json format (RFC 9457), with a stable code.","properties":{"type":{"type":"string","format":"uri","examples":["https://worbo.app/docs/api/errors/validation_failed"]},"title":{"type":"string","examples":["The request is not valid"]},"status":{"type":"integer","examples":[422]},"detail":{"type":"string","examples":["The name field is required."]},"code":{"type":"string","examples":["validation_failed"]},"errors":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}},"examples":[{"name":["The name field is required."]}]}},"required":["type","title","status","code"]},"RecommendationPreview":{"type":"object","properties":{"rule":{"type":"string","examples":["ecom.cross_sell"]},"contact_id":{"type":"integer","examples":[123]},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","examples":[310]},"name":{"type":"string","examples":["Filtre de cafea"]},"price":{"type":["number","null"],"examples":[19.9]},"currency":{"type":["string","null"],"examples":["RON"]},"url":{"type":["string","null"]},"image_url":{"type":["string","null"]},"type":{"type":"string","examples":["co_purchase"]},"score":{"type":"number","examples":[5]},"reason":{"type":"string","examples":["Often bought together with Coffee beans 1kg (5 orders)."]},"details":{"type":"object","additionalProperties":true}}}},"excluded":{"type":"object","description":"How many items each exclusion left out: unavailable, not_recommendable, purchased, filters, recently_recommended."},"empty":{"type":["string","null"],"enum":["cooldown","no_items",null],"description":"Why nothing would go: the contact is in the cooldown of the rule or the rule found no items."},"cooldown_until":{"type":["string","null"],"format":"date-time"},"purpose":{"type":"string","enum":["marketing","recommendations"],"description":"The consent purpose of the message: recommendations for the ones from the history of the contact."},"sendable":{"type":"boolean"},"consent_reason":{"type":["string","null"],"description":"Why the contact cannot get the message now, as in the reasons of the messages; null when they can."}}},"RecommendationPreviewRequest":{"type":"object","properties":{"rule":{"type":"string","examples":["ecom.cross_sell"]},"contact_id":{"type":"integer","examples":[123]}},"required":["rule","contact_id"]},"RecommendationResults":{"type":"object","properties":{"rule":{"type":"string","examples":["ecom.cross_sell"]},"from":{"type":"string","format":"date-time"},"to":{"type":"string","format":"date-time"},"sent":{"type":"integer","examples":[120]},"recipients":{"type":"integer","examples":[118]},"skipped":{"type":"object","description":"The steps that did not send, by reason: no_recommendation, recommendation_cooldown, too_few_recommendations, no_purpose_consent, no_channel_optin."},"clicks":{"type":"integer","examples":[34]},"clickers":{"type":"integer","examples":[29]},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","examples":[310]},"name":{"type":"string","examples":["Filtre de cafea"]},"clicks":{"type":"integer","examples":[12]}}}},"goals":{"type":"array","items":{"type":"string"},"examples":[["order.created"]]},"conversions":{"type":"integer","examples":[9]},"conversion_rate":{"type":["number","null"],"examples":[0.075]},"revenue":{"type":["number","null"],"examples":[1840.5]},"revenue_per_recipient":{"type":["number","null"],"examples":[15.6]},"currency":{"type":["string","null"],"examples":["RON"]},"control":{"type":"object","properties":{"contacts":{"type":"integer","examples":[13]},"conversions":{"type":"integer","examples":[0]},"rate":{"type":["number","null"],"examples":[0]}}},"lift":{"type":["number","null"],"examples":[0.075]},"opt_outs":{"type":"integer","examples":[1]},"cost":{"type":["number","null"],"examples":[18.4]},"cost_per_conversion":{"type":["number","null"],"examples":[2.04]}}},"RecommendationRule":{"type":"object","properties":{"key":{"type":"string","examples":["ecom.cross_sell"]},"name":{"type":"string","examples":["Bought together"]},"catalog":{"type":"string","examples":["ecom.products"]},"types":{"type":"array","description":"The types in their order of priority: bestsellers, co_purchase, same_category, replenishment, back_in_stock, next_class, plan_upgrade.","items":{"type":"object","properties":{"type":{"type":"string","examples":["co_purchase"]},"params":{"type":"object","additionalProperties":true}}}},"max_items":{"type":"integer","examples":[3]},"contact_cooldown_days":{"type":"integer","examples":[14]},"item_cooldown_days":{"type":"integer","examples":[30]},"fill_bestsellers":{"type":"boolean"}}},"RelationWrite":{"type":"object","properties":{"contact_id":{"type":"integer","examples":[123]},"contact":{"type":"object","description":"A contact found or created by its identities, instead of contact_id."},"role":{"type":"string","examples":["beneficiary"]},"primary":{"type":"boolean","examples":[false]},"muted":{"type":"boolean","examples":[false]},"valid_from":{"type":["string","null"],"format":"date"},"valid_until":{"type":["string","null"],"format":"date"}},"required":["role"]},"RunStart":{"type":"object","properties":{"contact_id":{"type":"integer","examples":[123]}},"required":["contact_id"]},"Segment":{"type":"object","properties":{"id":{"type":"integer","examples":[12]},"name":{"type":"string","examples":["Toți membrii"]},"description":{"type":["string","null"]},"definition":{"$ref":"#/components/schemas/SegmentDefinition"},"last_count":{"type":["integer","null"],"examples":[240]},"counted_at":{"type":["string","null"],"format":"date-time"},"created_at":{"type":["string","null"],"format":"date-time"}}},"SegmentCount":{"type":"object","properties":{"count":{"type":"integer","examples":[240]}}},"SegmentCountRequest":{"type":"object","properties":{"definition":{"$ref":"#/components/schemas/SegmentDefinition"}},"required":["definition"]},"SegmentDefinition":{"type":"object","properties":{"match":{"type":"string","enum":["all","any"],"examples":["all"]},"conditions":{"type":"array","items":{"type":"object","additionalProperties":true},"examples":[[{"type":"field","field":"first_name","operator":"not_empty"}]]}},"required":["match","conditions"]},"SegmentDetail":{"allOf":[{"$ref":"#/components/schemas/Segment"},{"type":"object","properties":{"count":{"type":"integer","examples":[240]}}}]},"SegmentWrite":{"type":"object","properties":{"name":{"type":"string","examples":["Toți membrii"]},"description":{"type":"string"},"definition":{"$ref":"#/components/schemas/SegmentDefinition"}},"required":["name","definition"]},"Template":{"type":"object","properties":{"id":{"type":"integer","examples":[31]},"number_id":{"type":["integer","null"],"examples":[3]},"name":{"type":"string","examples":["booking_confirmed"]},"language":{"type":"string","examples":["ro"]},"category":{"type":"string","examples":["utility"]},"status":{"type":"string","examples":["approved"]},"rejected_reason":{"type":["string","null"]},"quality":{"type":["string","null"]},"components":{"type":"array","items":{"type":"object","additionalProperties":true}},"variables":{"type":"array","items":{"type":"object","properties":{"example":{"type":"string","examples":["Ana"]},"field":{"type":["string","null"],"examples":["contact.first_name"]}}}},"source":{"type":["string","null"]},"submitted_at":{"type":["string","null"],"format":"date-time"},"created_at":{"type":["string","null"],"format":"date-time"},"updated_at":{"type":["string","null"],"format":"date-time"}}},"TemplateDraft":{"allOf":[{"$ref":"#/components/schemas/Template"},{"type":"object","properties":{"lint":{"type":"object","description":"The result of the linter: the predicted category and the problems found.","additionalProperties":true}}}]},"TemplateWrite":{"type":"object","properties":{"number_id":{"type":["integer","null"]},"name":{"type":"string","examples":["booking_confirmed"]},"language":{"type":"string","examples":["ro"]},"category":{"type":"string","enum":["utility","marketing"],"examples":["utility"]},"body":{"type":"string","examples":["Bună, {{1}}. Rezervarea ta pentru {{2}} este confirmată."]},"examples":{"type":"array","items":{"type":"string"},"examples":[["Ana","3 octombrie, 18:00"]]},"fields":{"type":"array","items":{"type":["string","null"]},"description":"For each variable, the field that fills it, such as contact.first_name, or null.","examples":[["contact.first_name",null]]},"header_format":{"type":"string"},"header_text":{"type":"string"},"header_example":{"type":"string"},"footer":{"type":"string"},"buttons":{"type":"array","items":{"type":"object","additionalProperties":true}}},"required":["name","language","category","body"]},"Usage":{"type":"object","properties":{"month":{"type":"string","examples":["2026-10"]},"currency":{"type":"string","examples":["EUR"]},"categories":{"type":"object","additionalProperties":true,"examples":[{"marketing":{"messages":120,"billable":118,"estimated_cost":6.42}}]},"estimated_cost":{"type":"number","examples":[6.42]},"plan":{"type":["string","null"],"examples":["growth"]},"billing_state":{"type":"string","examples":["active"]},"limits":{"type":"object","additionalProperties":true}}},"VaultDocument":{"type":"object","properties":{"id":{"type":"integer","examples":[15]},"contact_id":{"type":"integer","examples":[123]},"file_id":{"type":["integer","null"],"examples":[77]},"number_id":{"type":"integer","examples":[3]},"title":{"type":"string","examples":["Rezultatul analizelor"]},"state":{"type":"string","enum":["active","opened","expired","revoked"],"description":"active: not opened yet; opened: opened at least once with the code; expired or revoked: the link opens nothing."},"expires_at":{"type":"string","format":"date-time"},"opened_at":{"type":["string","null"],"format":"date-time"},"opens":{"type":"integer","examples":[1]},"message_id":{"type":["integer","null"],"examples":[7001]},"created_at":{"type":["string","null"],"format":"date-time"},"url":{"type":"string","format":"uri","description":"The link of the document, only in the answer that created it."}}},"VaultWrite":{"type":"object","properties":{"contact_id":{"type":"integer","examples":[123]},"file_id":{"type":"integer","description":"The ID of a file uploaded with uploadFile.","examples":[77]},"title":{"type":"string","maxLength":120,"description":"The title the contact sees, in the message and on the page of the link.","examples":["Rezultatul analizelor"]},"expires_in_days":{"type":"integer","minimum":1,"maximum":30,"default":7,"description":"How many days the link is valid, until the end of the last day."},"number_id":{"type":["integer","null"]}},"required":["contact_id","file_id","title"]},"WebhookDelivery":{"type":"object","properties":{"id":{"type":"integer","examples":[9001]},"endpoint_id":{"type":"integer","examples":[4]},"event":{"type":"object","properties":{"id":{"type":"string","examples":["msg_2mF0"]},"type":{"type":"string","examples":["contact.created"]}}},"status":{"type":"string","enum":["pending","delivered","failed"],"examples":["delivered"]},"attempts":{"type":"integer","examples":[1]},"last_status":{"type":["integer","null"],"examples":[200]},"last_error":{"type":["string","null"]},"next_attempt_at":{"type":["string","null"],"format":"date-time"},"delivered_at":{"type":["string","null"],"format":"date-time"},"created_at":{"type":["string","null"],"format":"date-time"}}},"WebhookEndpoint":{"type":"object","properties":{"id":{"type":"integer","examples":[4]},"url":{"type":"string","format":"uri","examples":["https://crm.example.com/worbo"]},"description":{"type":["string","null"]},"events":{"type":"array","items":{"type":"string"},"examples":[["contact.created","message.received"]]},"payload":{"type":"string","enum":["snapshot","thin"],"examples":["snapshot"]},"enabled":{"type":"boolean","examples":[true]},"disabled_reason":{"type":["string","null"]},"failing_since":{"type":["string","null"],"format":"date-time"},"last_success_at":{"type":["string","null"],"format":"date-time"},"created_at":{"type":["string","null"],"format":"date-time"}}},"WebhookEndpointSecret":{"allOf":[{"$ref":"#/components/schemas/WebhookEndpoint"},{"type":"object","properties":{"secret":{"type":"string","description":"The signing secret; it is shown only now.","examples":["whsec_MfKQ9r8GKYqrTwjUPD8ILPZIo2LaLaSw"]}}}]},"WebhookEndpointWrite":{"type":"object","properties":{"url":{"type":"string","format":"uri","examples":["https://crm.example.com/worbo"]},"description":{"type":"string"},"events":{"type":"array","items":{"type":"string","enum":["*","message.queued","message.sent","message.delivered","message.read","message.failed","message.received","interactive.button_clicked","link.clicked","flow.submitted","contact.created","contact.updated","contact.merged","contact.consent_granted","contact.consent_revoked","object.created","object.updated","object.status_changed","offer.issued","offer.redeemed","offer.expired","order.confirmed","order.cancelled","order.note_added","booking.confirmed","booking.cancelled","membership.pause_requested","automation.run_started","automation.run_completed","automation.goal_reached","automation.webhook","conversation.opened","conversation.assigned","conversation.closed","document.opened","template.status_changed","template.category_changed","template.quality_changed","webhook_endpoint.disabled","webhook.test"]},"examples":[["contact.created","message.received"]]},"payload":{"type":"string","enum":["snapshot","thin"],"examples":["snapshot"]}},"required":["url","events"]}}}}