/v1/management/blocksBehavior
Resource selection is exclusive: omit providerId for business-wide blocks only; supply a granted providerId for that provider’s blocks only, excluding business-wide blocks. An effective provider calendar combines both authorized resources. Never treat a denied resource as empty.
from/to are UTC instants forming a positive half-open [from,to) interval of at most 31 elapsed days (31 × 24 hours), not 31 business-local dates. A fall-back calendar month can exceed this limit. Split it into consecutive bounded windows, keeping the exact endpoints and final partial window. Start pagination without a cursor for every new window/resource and exhaust nextCursor within that same pair. Deduplicate blocks that overlap windows by blockId, keeping the latest version. These are live pages, not a consistent synchronization feed. The appointment directory’s 93-elapsed-day limit and date-hours’ 93 inclusive civil dates are separate contracts.
Authentication
ManagementCredential
Credential rules
One server-only owner-issued wbm_ API key can carry both management and integration permissions. Additional permissions require an explicit owner-issued grant. GET /v1/management returns the management discovery view, which may be empty for a booking-only key. For credentials with appointments:read, this discovery view omits whatsapp-templates:read, whatsapp-templates:write, whatsapp-profile:read and whatsapp-profile:write to preserve calendar-client compatibility. Discover these grants through GET /v1/management/messaging-capabilities. Template/profile command authorization still uses the stored grants. Server-only owner-issued Management authority with explicit application permissions. Calling this API does not expand a credential's grants. contacts:read/write/block/sync/fields:read/fields:write are separate approvals for canonical business contacts; fields also require current typed owner grants. contacts:record remains contact recording/recovery only. These grants create no customer phone proof, booking authority, messaging consent or automatic synchronization. Hours/blocks retain their independent resource grants. booking-policy:read/write separately delegate whole-business booking settings, without schedule/provider grants; write requires read. They preserve existing appointments and create no duration-rewrite authority. Provider duration policy additionally requires explicit provider-booking-policy:read/write and exact current providerIds; booking-duration:rewrite is separately approved and does not itself grant policy read/write. Service catalogue requires explicit services:read/write, independent of provider/calendar/schedule resources; write requires read. These operations do not expand an existing credential's grants. Public presentation and reviewed service selection require explicit website-content:read/write; write requires read, independently from services:* and provider resources. Existing provider metadata/activity/assignment additionally requires providers:read/write and a nonempty explicit current providerIds grant; write requires read. This grants no provider creation, deletion, login, invitation or schedule authority. WhatsApp template/profile management requires separate whatsapp-templates:read, whatsapp-templates:write, whatsapp-profile:read and whatsapp-profile:write application scopes. Write requires its matching read scope. These grants require explicit owner approval; Meta OAuth permissions remain separate.
Required application permissions
blocks:read
The credential must also explicitly grant the requested business or provider resource.
Request
providerIdquery · stringOptionalOmit providerId to list business-wide blocks only; this requires the business-schedule resource grant. Supply an explicitly granted provider UUID to list only that provider's blocks, excluding business-wide blocks. For an effective provider calendar, fetch and combine both resource lists only when each resource is granted. Paginate each list independently; never carry a cursor between resources. This endpoint is not availability: use authoritative availability and final booking admission.
Format and constraints
{ "type": "string", "format": "uuid" }fromquery · stringRequiredFormat and constraints
{ "type": "string", "format": "date-time" }toquery · stringRequiredFormat and constraints
{ "type": "string", "format": "date-time" }cursorquery · stringOptionalFormat and constraints
{ "type": "string", "format": "uuid" }
Successful responses
200 · BlockPage
application/json · BlockPage
-
blocksarrayRequiredView nested fields
-
[]objectArray itemView nested fields
-
blockIdstring · uuidRequired -
providerIdanyOf (string | null)RequiredAt least one of these variants must match.
View nested fields
-
anyOf 1string · uuidSchema branch -
anyOf 2nullSchema branch
-
-
versionintegerRequiredminimum:1 -
startAtstring · date-timeRequired -
endAtstring · date-timeRequired -
ownedByIntegrationanyOf (boolean | null)RequiredAt least one of these variants must match.
View nested fields
-
anyOf 1booleanSchema branch -
anyOf 2nullSchema branch
-
-
reasonanyOf (string | null)RequiredAt least one of these variants must match.
View nested fields
-
anyOf 1stringSchema branch -
anyOf 2nullSchema branch
-
-
additionalPropertiesno value allowedSchema rule
-
-
-
nextCursoranyOf (string | null)RequiredAt least one of these variants must match.
View nested fields
-
anyOf 1string · uuidSchema branch -
anyOf 2nullSchema branch
-
-
additionalPropertiesno value allowedSchema rule
Complete schema and nested fields
{
"type": "object",
"properties": {
"blocks": {
"type": "array",
"items": {
"type": "object",
"properties": {
"blockId": {
"type": "string",
"format": "uuid"
},
"providerId": {
"anyOf": [
{
"type": "string",
"format": "uuid"
},
{
"type": "null"
}
]
},
"version": {
"type": "integer",
"minimum": 1
},
"startAt": {
"type": "string",
"format": "date-time"
},
"endAt": {
"type": "string",
"format": "date-time"
},
"ownedByIntegration": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
]
},
"reason": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"blockId",
"providerId",
"version",
"startAt",
"endAt",
"ownedByIntegration",
"reason"
],
"additionalProperties": false
}
},
"nextCursor": {
"anyOf": [
{
"type": "string",
"format": "uuid"
},
{
"type": "null"
}
]
}
},
"required": [
"blocks",
"nextCursor"
],
"additionalProperties": false
} Errors and recovery
Error responses declared in the contract (10)
The preview contract shares generic error definitions across operations. This list is not an exhaustive list of runtime errors.
401 · Structured error.
application/json · Error
-
errorobjectRequiredView nested fields
-
codestringRequired -
requestIdstring · uuidRequired -
retryAfterintegerOptionalminimum:1 -
additionalPropertiesno value allowedSchema rule
-
-
additionalPropertiesno value allowedSchema rule
Complete schema and nested fields
{
"type": "object",
"additionalProperties": false,
"properties": {
"error": {
"type": "object",
"additionalProperties": false,
"properties": {
"code": {
"type": "string"
},
"requestId": {
"type": "string",
"format": "uuid"
},
"retryAfter": {
"type": "integer",
"minimum": 1
}
},
"required": [
"code",
"requestId"
]
}
},
"required": [
"error"
]
} 403 · Structured error.
application/json · Error
-
errorobjectRequiredView nested fields
-
codestringRequired -
requestIdstring · uuidRequired -
retryAfterintegerOptionalminimum:1 -
additionalPropertiesno value allowedSchema rule
-
-
additionalPropertiesno value allowedSchema rule
Complete schema and nested fields
{
"type": "object",
"additionalProperties": false,
"properties": {
"error": {
"type": "object",
"additionalProperties": false,
"properties": {
"code": {
"type": "string"
},
"requestId": {
"type": "string",
"format": "uuid"
},
"retryAfter": {
"type": "integer",
"minimum": 1
}
},
"required": [
"code",
"requestId"
]
}
},
"required": [
"error"
]
} 404 · Structured error.
application/json · Error
-
errorobjectRequiredView nested fields
-
codestringRequired -
requestIdstring · uuidRequired -
retryAfterintegerOptionalminimum:1 -
additionalPropertiesno value allowedSchema rule
-
-
additionalPropertiesno value allowedSchema rule
Complete schema and nested fields
{
"type": "object",
"additionalProperties": false,
"properties": {
"error": {
"type": "object",
"additionalProperties": false,
"properties": {
"code": {
"type": "string"
},
"requestId": {
"type": "string",
"format": "uuid"
},
"retryAfter": {
"type": "integer",
"minimum": 1
}
},
"required": [
"code",
"requestId"
]
}
},
"required": [
"error"
]
} 409 · Structured error.
application/json · Error
-
errorobjectRequiredView nested fields
-
codestringRequired -
requestIdstring · uuidRequired -
retryAfterintegerOptionalminimum:1 -
additionalPropertiesno value allowedSchema rule
-
-
additionalPropertiesno value allowedSchema rule
Complete schema and nested fields
{
"type": "object",
"additionalProperties": false,
"properties": {
"error": {
"type": "object",
"additionalProperties": false,
"properties": {
"code": {
"type": "string"
},
"requestId": {
"type": "string",
"format": "uuid"
},
"retryAfter": {
"type": "integer",
"minimum": 1
}
},
"required": [
"code",
"requestId"
]
}
},
"required": [
"error"
]
} 410 · Structured error.
application/json · Error
-
errorobjectRequiredView nested fields
-
codestringRequired -
requestIdstring · uuidRequired -
retryAfterintegerOptionalminimum:1 -
additionalPropertiesno value allowedSchema rule
-
-
additionalPropertiesno value allowedSchema rule
Complete schema and nested fields
{
"type": "object",
"additionalProperties": false,
"properties": {
"error": {
"type": "object",
"additionalProperties": false,
"properties": {
"code": {
"type": "string"
},
"requestId": {
"type": "string",
"format": "uuid"
},
"retryAfter": {
"type": "integer",
"minimum": 1
}
},
"required": [
"code",
"requestId"
]
}
},
"required": [
"error"
]
} 412 · Structured error.
application/json · Error
-
errorobjectRequiredView nested fields
-
codestringRequired -
requestIdstring · uuidRequired -
retryAfterintegerOptionalminimum:1 -
additionalPropertiesno value allowedSchema rule
-
-
additionalPropertiesno value allowedSchema rule
Complete schema and nested fields
{
"type": "object",
"additionalProperties": false,
"properties": {
"error": {
"type": "object",
"additionalProperties": false,
"properties": {
"code": {
"type": "string"
},
"requestId": {
"type": "string",
"format": "uuid"
},
"retryAfter": {
"type": "integer",
"minimum": 1
}
},
"required": [
"code",
"requestId"
]
}
},
"required": [
"error"
]
} 422 · Structured error.
application/json · Error
-
errorobjectRequiredView nested fields
-
codestringRequired -
requestIdstring · uuidRequired -
retryAfterintegerOptionalminimum:1 -
additionalPropertiesno value allowedSchema rule
-
-
additionalPropertiesno value allowedSchema rule
Complete schema and nested fields
{
"type": "object",
"additionalProperties": false,
"properties": {
"error": {
"type": "object",
"additionalProperties": false,
"properties": {
"code": {
"type": "string"
},
"requestId": {
"type": "string",
"format": "uuid"
},
"retryAfter": {
"type": "integer",
"minimum": 1
}
},
"required": [
"code",
"requestId"
]
}
},
"required": [
"error"
]
} 428 · Structured error.
application/json · Error
-
errorobjectRequiredView nested fields
-
codestringRequired -
requestIdstring · uuidRequired -
retryAfterintegerOptionalminimum:1 -
additionalPropertiesno value allowedSchema rule
-
-
additionalPropertiesno value allowedSchema rule
Complete schema and nested fields
{
"type": "object",
"additionalProperties": false,
"properties": {
"error": {
"type": "object",
"additionalProperties": false,
"properties": {
"code": {
"type": "string"
},
"requestId": {
"type": "string",
"format": "uuid"
},
"retryAfter": {
"type": "integer",
"minimum": 1
}
},
"required": [
"code",
"requestId"
]
}
},
"required": [
"error"
]
} 429 · Rate limit; honor Retry-After.
application/json · Error
-
errorobjectRequiredView nested fields
-
codestringRequired -
requestIdstring · uuidRequired -
retryAfterintegerOptionalminimum:1 -
additionalPropertiesno value allowedSchema rule
-
-
additionalPropertiesno value allowedSchema rule
Complete schema and nested fields
{
"type": "object",
"additionalProperties": false,
"properties": {
"error": {
"type": "object",
"additionalProperties": false,
"properties": {
"code": {
"type": "string"
},
"requestId": {
"type": "string",
"format": "uuid"
},
"retryAfter": {
"type": "integer",
"minimum": 1
}
},
"required": [
"code",
"requestId"
]
}
},
"required": [
"error"
]
} 503 · Outcome may be unknown. Keep operation key and reconcile.
application/json · Error
-
errorobjectRequiredView nested fields
-
codestringRequired -
requestIdstring · uuidRequired -
retryAfterintegerOptionalminimum:1 -
additionalPropertiesno value allowedSchema rule
-
-
additionalPropertiesno value allowedSchema rule
Complete schema and nested fields
{
"type": "object",
"additionalProperties": false,
"properties": {
"error": {
"type": "object",
"additionalProperties": false,
"properties": {
"code": {
"type": "string"
},
"requestId": {
"type": "string",
"format": "uuid"
},
"retryAfter": {
"type": "integer",
"minimum": 1
}
},
"required": [
"code",
"requestId"
]
}
},
"required": [
"error"
]
}