Saltar para o conteúdo

Para programadores

Liga o teu sistema, ou um assistente de IA, à agenda do negócio

Uma API REST, avisos por webhook e um servidor MCP. Quem marca por aqui cumpre as mesmas regras do site do negócio: horas livres verificadas, antecedência mínima, sinal e aprovação.

Para donos de negócio: para que serve

Não precisas de saber programar. Quem te ajuda a ligar outro sistema, ou um assistente de IA, à agenda usa esta página.

  • Um assistente de IA que marca por ti

    O ChatGPT, o Claude ou outro assistente vê as horas livres e marca, sempre com as regras do teu negócio. Dás-lhe uma chave só com as permissões que quiseres.

  • Ligar outro sistema

    A faturação, uma loja online ou um programa feito à medida veem a agenda e criam marcações sem copiar dados à mão.

  • Receber avisos

    Quando uma marcação ou um cliente muda, a Marcela avisa o endereço que escolheres, para o outro sistema estar sempre em dia.

Quem manda és tu: crias e revogas chaves em Definições › API e webhooks, escolhes o que cada chave pode fazer e, se quiseres, limitas uma chave a uma só loja.

Quem a tem

  • Incluída no plano Premium, com até 300 pedidos por minuto por chave.
  • No plano Profissional acrescenta-se o extra «API, webhooks e MCP» por 12,00 € sem IVA por mês.

Ver preços

Obter uma chave

As chaves criam-se no painel do negócio, por quem tem a permissão (por defeito, o dono).

  1. Entra no painel e abre Definições › API e webhooks.
  2. Escolhe um nome, as permissões da chave e, se quiseres, uma só loja.
  3. Copia a chave quando aparecer: só se vê uma vez. Guarda-a num gestor de palavras-passe. Se a perderes, revoga-a e cria outra.

A chave tem a forma mk_9f2c…. A Marcela só guarda uma impressão digital (SHA-256) dela, por isso ninguém a consegue ler depois.

Permissões de uma chave

  • catalog:readver lojas, serviços e equipa
  • availability:readver horas livres
  • bookings:readler marcações
  • bookings:writemarcar e cancelar
  • customers:readler clientes
  • customers:writecriar clientes
  • classes:readler aulas, instrutores e inscrições
  • classes:writeinscrever, cancelar e trocar o instrutor de uma aula
  • classes:no_creditinscrever sem gastar crédito
  • memberships:readler mensalidades e créditos de aulas
  • log:readler o registo do que as chaves escreveram

Uma chave de uma só loja não pode ter permissões de clientes, porque veria a lista de clientes do negócio inteiro.

Usa a chave só em servidores. Não a ponhas em páginas web nem em apps: a API não responde a pedidos de outros sítios do navegador.

Primeiros pedidos

Todos os pedidos levam o cabeçalho Authorization: Bearer <key>. Primeiro, as horas livres de um serviço (os ids vêm de GET /api/v1/shops e GET /api/v1/catalog):

Endereço base: https://app.hellomarcela.com/api/v1

Horas livres
curl "https://app.hellomarcela.com/api/v1/availability?shop_id=<shop>&service_id=<service>&from=2026-11-02" \
  -H "Authorization: Bearer $KEY"

Depois, marcar. Com Idempotency-Key repetir o pedido não marca duas vezes.

Marcar
curl -X POST "https://app.hellomarcela.com/api/v1/bookings" \
  -H "Authorization: Bearer $KEY" \
  -H "Idempotency-Key: order-123" \
  -H "Content-Type: application/json" \
  -d '{
    "shop_id": "<shop>",
    "start": "2026-11-02T10:30:00Z",
    "services": [{ "service_id": "<service>", "staff_id": "<person>" }],
    "customer": { "name": "Marta", "phone": "912345678" }
  }'

Se o negócio pede sinal, a marcação fica em pending_deposit e a resposta traz o endereço de pagamento para dar ao cliente. Com aprovação manual fica em pending_approval.

Regras dos pedidos

Autenticação
Authorization: Bearer <key> em todos os pedidos. Sem chave, ou com uma chave revogada ou expirada, a resposta é 401.
Datas e horas
Instantes em ISO 8601, em UTC nas respostas; nos pedidos aceita-se Z ou um desvio (+01:00). As datas simples (AAAA-MM-DD) são dias no fuso da loja.
Dinheiro
Em cêntimos, em números inteiros.
Listas
50 resultados por página (no máximo 200, com limit). A resposta traz next_cursor: usa-o em cursor para pedir a página seguinte.
Repetir um pedido
No POST de marcações envia Idempotency-Key (até 200 carateres): o mesmo pedido dá a mesma marcação durante 24 horas, em vez de marcar duas vezes. A mesma chave com outro pedido dá 409. Depois de um erro a chave fica livre.
Limite de pedidos
Por minuto e por chave, conforme o plano. Os cabeçalhos X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset dizem quanto sobra; passado o limite, a resposta é 429 com Retry-After.

Atalhos de data

Onde o pedido leva uma data (from e to), também se aceita today, tomorrow ou yesterday; um desvio como +14d, -2w ou +1m (dias, semanas e meses a partir de hoje); e um período: this_week, next_week, last_week, this_month, next_month ou last_month. Contam no fuso da loja (no fuso por defeito da plataforma quando a lista cobre mais do que uma loja). Um período dá o primeiro dia em from e o último em to: from=this_week&to=this_week é a semana inteira, de segunda a domingo. Nas listas (marcações, aulas, inscrições) uma data simples, como 2026-11-02, vale o dia todo. Num endereço escreve o sinal mais como %2B. Chegam a 3660 dias de distância de hoje.

Atalhos de data numa pesquisa
curl "https://app.hellomarcela.com/api/v1/availability?shop_id=<shop>&service_id=<service>&from=this_week&to=this_week" \
  -H "Authorization: Bearer $KEY"

# the + of an offset is written %2B in an address
curl "https://app.hellomarcela.com/api/v1/bookings?from=today&to=%2B7d" \
  -H "Authorization: Bearer $KEY"

Erros

Sempre no mesmo formato. O que conta é o code, que não muda; a mensagem é para pessoas.

Exemplo de erro
{
  "error": {
    "code": "slot_taken",
    "message": "That time has just been taken.",
    "details": {}
  }
}

Códigos de erro

  • invalid_request400Pedido inválido; details.field diz qual o campo.
  • unauthenticated401Chave em falta, errada, revogada ou expirada.
  • account_closed403A conta do negócio está fechada.
  • not_in_plan403O plano do negócio não inclui a API.
  • forbidden_scope403A chave não tem a permissão necessária.
  • forbidden_shop403A chave está limitada a outra loja.
  • not_found404Não existe, ou não é deste negócio.
  • method_not_allowed405Método não permitido neste endereço.
  • conflict409O estado atual não permite a operação.
  • idempotency_conflict409A mesma Idempotency-Key foi usada com outro pedido.
  • idempotency_in_progress409Um pedido igual ainda está a ser tratado.
  • slot_unavailable409A hora não está disponível.
  • slot_taken409A hora acabou de ser ocupada.
  • customer_exists409Já existe um cliente com esse telemóvel (details.customer_id).
  • customer_blocked409O negócio não aceita marcações deste cliente.
  • booking_limit409O cliente atingiu o limite de marcações.
  • booking_closed409O negócio não aceita marcações online agora.
  • coupon_refused422O cupão não pode ser usado.
  • out_of_area422Fora da zona de visitas ao domicílio.
  • rate_limited429Limite de pedidos por minuto atingido; vê Retry-After.
  • internal500Erro do nosso lado; tenta de novo.
  • unavailable503Serviço temporariamente indisponível; tenta de novo.

Referência

Gerada a partir da descrição OpenAPI que a própria API serve, por isso nunca fica desatualizada. Os textos desta parte estão em inglês. Abrir a descrição OpenAPI (JSON)

Catálogo

GET/api/v1/shops

The shops the key can use

Permissão: catalog:read

Resposta:200 object

Erros possíveis:401403429

GET/api/v1/catalog

Services that can be booked online in a shop, and the people who do them

Permissão: catalog:read

shop_id is required unless the key is tied to one shop.

Parâmetros

  • shop_idna pesquisastring (uuid) · opcionalThe shop.

Resposta:200 Catalog

Erros possíveis:400401403404429

Horas livres

GET/api/v1/availability

Free start times for one service (or several, comma separated)

Permissão: availability:read

For several services with their own staff, variant or add-ons use POST.

Parâmetros

  • shop_idna pesquisastring (uuid) · opcionalThe shop (required unless the key is tied to one).
  • service_idna pesquisastring · opcionalOne or more service ids, comma separated (booked one after the other).
  • fromna pesquisastring · opcionalFirst day, YYYY-MM-DD in the shop's time zone. Also a date shortcut in the shop's time zone: today, tomorrow, yesterday, an offset such as +14d, -2w or +1m, or this_week, next_week, last_week, this_month, next_month, last_month (from takes the first day, to the last). A plain date YYYY-MM-DD is the whole day.
  • tona pesquisastring · opcionalLast day (inclusive); default: the same day. Also a date shortcut in the shop's time zone: today, tomorrow, yesterday, an offset such as +14d, -2w or +1m, or this_week, next_week, last_week, this_month, next_month, last_month (from takes the first day, to the last). A plain date YYYY-MM-DD is the whole day.
  • staff_idna pesquisastring (uuid) · opcionalA person, for the first service.
  • variant_idna pesquisastring (uuid) · opcionalA variant, for the first service.
  • addon_idna pesquisastring · opcionalAdd-ons of the first service, comma separated.
  • limitna pesquisainteger · opcionalMost slots to return.

Resposta:200 Availability

Erros possíveis:400401403404429

POST/api/v1/availability

Free start times for a list of services

Permissão: availability:read

Corpo do pedido AvailabilityRequest

  • shop_idstring (uuid) · opcional
  • fromstring · obrigatórioAlso a date shortcut in the shop's time zone: today, tomorrow, yesterday, an offset such as +14d, -2w or +1m, or this_week, next_week, last_week, this_month, next_month, last_month (from takes the first day, to the last). A plain date YYYY-MM-DD is the whole day.
  • tostring · opcionalAlso a date shortcut in the shop's time zone: today, tomorrow, yesterday, an offset such as +14d, -2w or +1m, or this_week, next_week, last_week, this_month, next_month, last_month (from takes the first day, to the last). A plain date YYYY-MM-DD is the whole day.
  • servicesServiceRequest[] · obrigatório
  • services[].service_idstring (uuid) · obrigatório
  • services[].staff_idstring (uuid) · opcionalA person; omit for whoever is free.
  • services[].variant_idstring (uuid) · opcionalRequired when the service has variants.
  • services[].addon_idsstring (uuid)[] · opcional
  • limitinteger · opcional

Resposta:200 Availability

Erros possíveis:400401403404429

Marcações

GET/api/v1/bookings

Bookings, oldest start first

Permissão: bookings:read

Parâmetros

  • shop_idna pesquisastring (uuid) · opcionalOnly this shop.
  • fromna pesquisastring · opcionalStarts at or after (date-time with offset). Also a date shortcut in the shop's time zone: today, tomorrow, yesterday, an offset such as +14d, -2w or +1m, or this_week, next_week, last_week, this_month, next_month, last_month (from takes the first day, to the last). A plain date YYYY-MM-DD is the whole day.
  • tona pesquisastring · opcionalStarts before (date-time with offset). Also a date shortcut in the shop's time zone: today, tomorrow, yesterday, an offset such as +14d, -2w or +1m, or this_week, next_week, last_week, this_month, next_month, last_month (from takes the first day, to the last). A plain date YYYY-MM-DD is the whole day.
  • statusna pesquisastring · opcionalComma separated: pending_deposit, pending_approval, confirmed, completed, cancelled, no_show.
  • customer_idna pesquisastring (uuid) · opcionalOnly this customer.
  • limitna pesquisainteger · opcionalPage size.
  • cursorna pesquisastring · opcionalFrom the previous page.

Resposta:200 object

Erros possíveis:400401403429

POST/api/v1/bookings

Make a booking

Permissão: bookings:write

The salon's rules for customers apply (lead time, blocked customers, deposit, approval). If a deposit is due the booking is pending_deposit and the answer carries deposit.pay_url. Send an Idempotency-Key header to make a retry safe.

Parâmetros

  • Idempotency-Keyno cabeçalhostring · opcional

Corpo do pedido BookingRequest

Give customer_id or customer (not both).

  • shop_idstring (uuid) · opcional
  • startstring (date-time) · obrigatório
  • servicesServiceRequest[] · obrigatório
  • services[].service_idstring (uuid) · obrigatório
  • services[].staff_idstring (uuid) · opcionalA person; omit for whoever is free.
  • services[].variant_idstring (uuid) · opcionalRequired when the service has variants.
  • services[].addon_idsstring (uuid)[] · opcional
  • customer_idstring (uuid) · opcional
  • customerCustomerRequest · opcional
  • customer.namestring · opcional
  • customer.phonestring · opcionalE.164, or national (the platform's default country code is added).
  • customer.emailstring (email) · opcional
  • notesstring · opcional
  • coupon_codestring · opcional

Resposta:201 Booking

Erros possíveis:400401403404409422429

GET/api/v1/bookings/{id}

One booking

Permissão: bookings:read

Parâmetros

  • idno endereçostring (uuid) · obrigatório

Resposta:200 Booking

Erros possíveis:401403404429

POST/api/v1/bookings/{id}/cancel

Cancel a booking that is still open

Permissão: bookings:write

Parâmetros

  • idno endereçostring (uuid) · obrigatório

Corpo do pedido (opcional)

  • reasonstring · opcional

Resposta:200 Booking

Erros possíveis:401403404409429

Clientes

GET/api/v1/customers

Customers, oldest first

Permissão: customers:read

(not for keys tied to one shop).

Parâmetros

  • phonena pesquisastring · opcionalExact phone number; numbers without a country code get the platform's default.
  • emailna pesquisastring · opcionalExact email.
  • qna pesquisastring · opcionalPart of the name.
  • limitna pesquisainteger · opcionalPage size.
  • cursorna pesquisastring · opcionalFrom the previous page.

Resposta:200 object

Erros possíveis:400401403429

POST/api/v1/customers

Create a customer

Permissão: customers:write

Answers 409 customer_exists (with details.customer_id) when the phone number is already a customer.

Corpo do pedido CustomerRequest

A name and/or a phone number is required.

  • namestring · opcional
  • phonestring · opcionalE.164, or national (the platform's default country code is added).
  • emailstring (email) · opcional

Resposta:201 Customer

Erros possíveis:400401403409429

GET/api/v1/customers/{id}

One customer

Permissão: customers:read

Parâmetros

  • idno endereçostring (uuid) · obrigatório

Resposta:200 Customer

Erros possíveis:401403404429

Aulas

GET/api/v1/class-types

The kinds of group class the studio teaches

Permissão: classes:read

Answers 403 not_in_plan when the account does not have group classes (or this part of the API is not switched on yet).

Parâmetros

  • limitna pesquisainteger · opcionalPage size.
  • cursorna pesquisastring · opcionalFrom the previous page.

Resposta:200 object

Erros possíveis:400401403429

GET/api/v1/classes

Group classes, earliest first

Permissão: classes:read

Places taken, held (offered to someone on the waiting list) and free are computed at the moment of the request.

Parâmetros

  • shop_idna pesquisastring (uuid) · opcionalOnly this shop (required to choose one when the key is not tied to a shop).
  • fromna pesquisastring · opcionalStarts at or after (date-time with offset). Also a date shortcut in the shop's time zone: today, tomorrow, yesterday, an offset such as +14d, -2w or +1m, or this_week, next_week, last_week, this_month, next_month, last_month (from takes the first day, to the last). A plain date YYYY-MM-DD is the whole day.
  • tona pesquisastring · opcionalStarts before (date-time with offset). Also a date shortcut in the shop's time zone: today, tomorrow, yesterday, an offset such as +14d, -2w or +1m, or this_week, next_week, last_week, this_month, next_month, last_month (from takes the first day, to the last). A plain date YYYY-MM-DD is the whole day.
  • type_idna pesquisastring (uuid) · opcionalOnly this class type.
  • instructor_idna pesquisastring (uuid) · opcionalOnly classes of this instructor.
  • statusna pesquisastring · opcionalComma separated: scheduled, cancelled, completed.
  • limitna pesquisainteger · opcionalPage size.
  • cursorna pesquisastring · opcionalFrom the previous page.

Resposta:200 object

Erros possíveis:400401403404429

GET/api/v1/classes/{id}

One group class

Permissão: classes:read

Parâmetros

  • idno endereçostring (uuid) · obrigatório

Resposta:200 Class

Erros possíveis:401403404429

GET/api/v1/instructors

The people who teach group classes

Permissão: classes:read

Name only: phone and e-mail stay in the salon.

Parâmetros

  • shop_idna pesquisastring (uuid) · opcionalOnly instructors of this shop's timetable.
  • limitna pesquisainteger · opcionalPage size.
  • cursorna pesquisastring · opcionalFrom the previous page.

Resposta:200 object

Erros possíveis:400401403404429

GET/api/v1/enrollments

Who is enrolled in group classes, oldest enrolment first

Permissão: classes:read

Give class_id for the roster of one class, or customer_id for the classes of one customer. The customer shows name and phone, never the e-mail.

Parâmetros

  • shop_idna pesquisastring (uuid) · opcionalOnly this shop.
  • class_idna pesquisastring (uuid) · opcionalOnly this class.
  • customer_idna pesquisastring (uuid) · opcionalOnly this customer.
  • statusna pesquisastring · opcionalComma separated: enrolled, attended, no_show, cancelled, late_cancelled.
  • fromna pesquisastring · opcionalThe class starts at or after (date-time with offset). Also a date shortcut in the shop's time zone: today, tomorrow, yesterday, an offset such as +14d, -2w or +1m, or this_week, next_week, last_week, this_month, next_month, last_month (from takes the first day, to the last). A plain date YYYY-MM-DD is the whole day.
  • tona pesquisastring · opcionalThe class starts before (date-time with offset). Also a date shortcut in the shop's time zone: today, tomorrow, yesterday, an offset such as +14d, -2w or +1m, or this_week, next_week, last_week, this_month, next_month, last_month (from takes the first day, to the last). A plain date YYYY-MM-DD is the whole day.
  • limitna pesquisainteger · opcionalPage size.
  • cursorna pesquisastring · opcionalFrom the previous page.

Resposta:200 object

Erros possíveis:400401403404429

POST/api/v1/enrollments

Enrol a customer in a class

Permissão: classes:write

The same rules as a customer enrolling (booking window, blocked customers) and, unless use_credit is false, a credit of the customer pays for it (use_credit false needs the scope classes:no_credit). Answers 403 not_in_plan until writing classes is switched on and when the account does not have group classes. Conflict reasons (details.reason): full (join the waiting list), seats_full, already_enrolled, no_credit, too_late, too_early, session_closed. Send an Idempotency-Key header to make a retry safe.

Parâmetros

  • Idempotency-Keyno cabeçalhostring · opcional

Corpo do pedido

  • class_idstring (uuid) · obrigatório
  • customer_idstring (uuid) · obrigatório
  • seatsinteger · opcionalPlaces for this customer (default 1).
  • use_creditboolean · opcionalDefault true. False enrols without taking a credit and needs the scope classes:no_credit.

Resposta:201 Enrollment

Erros possíveis:400401403404409429

GET/api/v1/waitlist

The waiting lists of full classes, oldest first

Permissão: classes:read

Give class_id for the queue of one class, or customer_id for the queues of one customer.

Parâmetros

  • shop_idna pesquisastring (uuid) · opcionalOnly this shop.
  • class_idna pesquisastring (uuid) · opcionalOnly this class.
  • customer_idna pesquisastring (uuid) · opcionalOnly this customer.
  • statusna pesquisastring · opcionalComma separated: waiting, offered, accepted, declined, expired, removed.
  • limitna pesquisainteger · opcionalPage size.
  • cursorna pesquisastring · opcionalFrom the previous page.

Resposta:200 object

Erros possíveis:400401403404429

POST/api/v1/waitlist/{id}/cancel

Take a customer off a waiting list

Permissão: classes:write

Nothing changes if the entry is not waiting any more. Answers 403 not_in_plan until writing classes is switched on and when the account does not have group classes.

Parâmetros

  • idno endereçostring (uuid) · obrigatório

Resposta:200 WaitlistEntry

Erros possíveis:401403404429

POST/api/v1/enrollments/{id}/cancel

Cancel an enrolment

Permissão: classes:write

The studio's notice period applies: inside it the enrolment becomes late_cancelled and the credit may not come back (late and credit_restored say what happened; credit_restored is null when the answer repeats an earlier call with the same Idempotency-Key). Conflict reasons: not_enrolled (already cancelled or marked), session_closed (the class already started).

Parâmetros

  • idno endereçostring (uuid) · obrigatório
  • Idempotency-Keyno cabeçalhostring · opcional

Corpo do pedido (opcional)

    Resposta:200 EnrollmentCancelled

    Erros possíveis:401403404409429

    POST/api/v1/classes/{id}/waitlist

    Put a customer on the waiting list of a full class

    Permissão: classes:write

    The customer is told when a place frees up, as when the team adds them in the panel, so notice_consent must be true: send it only if the customer agreed (it is never assumed). Conflict reasons: not_full (the class has places: enrol instead), already_enrolled, already_waiting, waitlist_full, session_closed, too_early.

    Parâmetros

    • idno endereçostring (uuid) · obrigatório

    Corpo do pedido

    • customer_idstring (uuid) · obrigatório
    • notice_consentboolean · obrigatórioTrue only if the customer agreed to be told when a place frees up.

    Resposta:201 WaitlistEntry

    Erros possíveis:400401403404409429

    POST/api/v1/classes/{id}/instructor

    Change the instructor of a class

    Permissão: classes:write

    Only a class that has not ended. The customers enrolled are told unless notify is false.

    Parâmetros

    • idno endereçostring (uuid) · obrigatório

    Corpo do pedido

    • instructor_idstring (uuid) · obrigatório
    • notifyboolean · opcionalDefault true.

    Resposta:200 InstructorChange

    Erros possíveis:400401403404409429

    Mensalidades

    GET/api/v1/membership-plans

    The clubs (memberships) the salon sells

    Permissão: memberships:read

    (not for keys tied to one shop). Answers 403 not_in_plan when the account does not have clubs (or this part of the API is not switched on yet).

    Parâmetros

    • limitna pesquisainteger · opcionalPage size.
    • cursorna pesquisastring · opcionalFrom the previous page.

    Resposta:200 object

    Erros possíveis:400401403429

    GET/api/v1/memberships

    The memberships of the customers, oldest first

    Permissão: memberships:read

    (not for keys tied to one shop).

    Parâmetros

    • shop_idna pesquisastring (uuid) · opcionalOnly memberships started in this shop.
    • plan_idna pesquisastring (uuid) · opcionalOnly this club.
    • customer_idna pesquisastring (uuid) · opcionalOnly this customer.
    • statusna pesquisastring · opcionalComma separated: active, paused, cancelled.
    • limitna pesquisainteger · opcionalPage size.
    • cursorna pesquisastring · opcionalFrom the previous page.

    Resposta:200 object

    Erros possíveis:400401403404429

    GET/api/v1/class-credit-plans

    The class packs and unlimited periods the studio sells

    Permissão: memberships:read

    (not for keys tied to one shop).

    Parâmetros

    • limitna pesquisainteger · opcionalPage size.
    • cursorna pesquisastring · opcionalFrom the previous page.

    Resposta:200 object

    Erros possíveis:400401403429

    GET/api/v1/class-credits

    The class credits sold to customers, oldest sale first

    Permissão: memberships:read

    (not for keys tied to one shop).

    Parâmetros

    • shop_idna pesquisastring (uuid) · opcionalOnly credits sold in this shop.
    • customer_idna pesquisastring (uuid) · opcionalOnly this customer.
    • statusna pesquisastring · opcionalComma separated: active, used, cancelled, expired.
    • limitna pesquisainteger · opcionalPage size.
    • cursorna pesquisastring · opcionalFrom the previous page.

    Resposta:200 object

    Erros possíveis:400401403404429

    Connectors

    GET/api/v1/me

    Whose key this is

    Any valid key. The account, the key (name, scopes, the shop it is tied to, whether it is a test key) and whether the platform offers connectors. A connector calls it to check the key it was given and to name the connection.

    Resposta:200 Me

    Erros possíveis:401403429

    GET/api/v1/hooks

    The notice subscriptions this key made

    Any valid key of the whole account. Only what this key subscribed to; the addresses added by hand in the panel are not listed. Answers 403 not_in_plan until the platform switches connectors on.

    Resposta:200 object

    Erros possíveis:401403429

    POST/api/v1/hooks

    Subscribe an address to notices (webhooks)

    Any valid key of the whole account (a key tied to one shop answers 403 forbidden_shop: the notices are not filtered by shop). The key also needs the read scope of what each event carries: bookings:read for booking.*, customers:read for customer.created, classes:read for class.*, enrollment.* and waitlist.*, memberships:read for membership.* and credit.*; otherwise 403 forbidden_scope with details.event. The notices are the ones of the webhooks in the guide: same JSON as the routes, same signature (X-Webhook-Signature) with the secret in the answer, which is shown only once. The subscription goes away with the key. A test key only tries: 200 with X-Test-Mode and nothing is subscribed. Answers 403 not_in_plan until the platform switches connectors on, 409 conflict (details.reason hook_exists or limit).

    Corpo do pedido HookRequest

    • target_urlstring (uri) · obrigatórioWhere the notices are posted: https, without credentials. The server refuses private addresses when it calls.
    • eventsstring[] · obrigatórioEvent names, for example booking.created or customer.created.
    • descriptionstring · opcionalFree text, at most 200 characters.

    Resposta:201 HookCreated

    Erros possíveis:400401403409429

    DELETE/api/v1/hooks/{id}

    Drop a notice subscription this key made

    Any valid key. Only a subscription of this key (404 otherwise). It works even when connectors are switched off, so a connector can always clean up.

    Parâmetros

    • idno endereçostring (uuid) · obrigatório

    Resposta:200 object

    Erros possíveis:401403404429

    Registo das escritas

    GET/api/v1/write-log

    What the keys wrote, newest first

    Permissão: log:read

    One line for every write a key of this business made through the API or the MCP server (bookings, customers, enrolments, waiting lists, instructors), successful or refused by a rule: when, which key, which operation, on what (kind and id) and the result. Never the body of the call. A key tied to one shop reads only the lines of keys of that shop. Answers 403 not_in_plan until the platform switches the write log on.

    Parâmetros

    • key_idna pesquisastring (uuid) · opcionalOnly the writes of this key.
    • outcomena pesquisastring · opcionalok or refused.
    • resource_typena pesquisastring · opcionalbooking, customer, enrollment, waitlist or class.
    • limitna pesquisainteger · opcionalPage size.
    • cursorna pesquisastring · opcionalFrom the previous page.

    Resposta:200 object

    Erros possíveis:400401403429

    Webhooks

    Em vez de perguntares sempre se algo mudou, a Marcela avisa o teu servidor. Em Definições › API e webhooks regista um endereço https e escolhe os avisos que queres.

    Avisos disponíveis

    • booking.createdMarcação criada: Uma marcação nova, por qualquer canal (também as que esperam sinal ou aprovação).
    • booking.confirmedMarcação confirmada: Uma marcação que esperava sinal ou aprovação passou a confirmada.
    • booking.rescheduledMarcação mudada de hora: A hora (ou o profissional) de uma marcação mudou.
    • booking.cancelledMarcação cancelada: Uma marcação foi cancelada pelo cliente, pela equipa ou por falta de sinal.
    • booking.completedMarcação concluída: A equipa marcou a marcação como feita.
    • booking.no_showCliente faltou: A equipa marcou que o cliente faltou.
    • customer.createdCliente novo: Um cliente novo na ficha do negócio (por marcação, conversa, importação ou à mão).
    • class.cancelledAula cancelada: Uma aula foi cancelada.
    • class.rescheduledAula mudada de hora: A hora de uma aula mudou.
    • class.instructor_changedInstrutor da aula mudou: O instrutor de uma aula mudou.
    • enrollment.createdInscrição numa aula: Um cliente ficou inscrito numa aula, por qualquer canal (também quando entra da lista de espera).
    • enrollment.cancelledInscrição cancelada: Uma inscrição foi cancelada (a tempo ou fora do prazo).
    • enrollment.attendedCliente presente na aula: A equipa marcou que o cliente esteve na aula.
    • enrollment.no_showCliente faltou à aula: A equipa marcou que o cliente faltou à aula.
    • waitlist.joinedEntrou na lista de espera: Um cliente entrou na lista de espera de uma aula cheia.
    • waitlist.offeredVaga oferecida: Ficou um lugar livre e foi oferecido a quem estava na lista de espera.
    • waitlist.leftSaiu da lista de espera: Um cliente saiu da lista de espera, foi retirado ou deixou passar a vaga.
    • membership.createdMensalidade nova: Um cliente começou uma mensalidade (clube).
    • membership.pausedMensalidade em pausa: Uma mensalidade foi posta em pausa.
    • membership.resumedMensalidade retomada: Uma mensalidade em pausa voltou a estar ativa.
    • membership.cancelledMensalidade cancelada: Uma mensalidade foi cancelada.
    • credit.createdCréditos de aulas novos: Foi vendido ou dado um pack ou período de aulas a um cliente.

    O que recebes

    O corpo é um JSON com o aviso e, em data, o mesmo JSON que a API envia nas respostas (a marcação ou o cliente, lidos no momento do envio).

    Um aviso
    POST /your/endpoint HTTP/1.1
    Content-Type: application/json
    X-Webhook-Event: booking.created
    X-Webhook-Id: 7f0c1d52-…
    X-Webhook-Signature: t=1792000000,v1=5257a869…
    
    {
      "id": "7f0c1d52-…",
      "type": "booking.created",
      "created_at": "2026-11-02T09:00:00.000Z",
      "account_id": "…",
      "data": { "id": "…", "status": "confirmed", "starts_at": "…", "customer": { … } }
    }

    Cabeçalhos: X-Webhook-Event (o tipo), X-Webhook-Id (igual em todas as tentativas: usa-o para ignorar repetições) e X-Webhook-Signature.

    Verificar a assinatura

    O segredo (começa por whsec_) aparece uma vez, quando crias o endereço. A assinatura é o HMAC-SHA256 de «t.corpo», com t em segundos. Calcula-a sobre o corpo tal como chegou e recusa avisos antigos.

    Node.js
    import { createHmac, timingSafeEqual } from "node:crypto";
    
    // rawBody: the body exactly as received (a string), not parsed and re-written
    export function verify(rawBody, header, secret, toleranceSeconds = 300) {
      const parts = Object.fromEntries(header.split(",").map((p) => p.split("=")));
      const age = Math.abs(Date.now() / 1000 - Number(parts.t));
      if (!(age <= toleranceSeconds)) return false;
      const expected = createHmac("sha256", secret).update(parts.t + "." + rawBody).digest("hex");
      const a = Buffer.from(expected);
      const b = Buffer.from(parts.v1 ?? "");
      return a.length === b.length && timingSafeEqual(a, b);
    }
    Python
    import hmac, hashlib, time
    
    def verify(raw_body: bytes, header: str, secret: str, tolerance_seconds: int = 300) -> bool:
        parts = dict(p.split("=", 1) for p in header.split(","))
        if abs(time.time() - int(parts["t"])) > tolerance_seconds:
            return False
        signed = parts["t"].encode() + b"." + raw_body
        expected = hmac.new(secret.encode(), signed, hashlib.sha256).hexdigest()
        return hmac.compare_digest(expected, parts.get("v1", ""))

    Entrega e repetições

    Responde com 2xx em menos de 10 segundos. Qualquer outra resposta, ou demora, repete o aviso: espera 30 segundos, a dobrar até 3600, no máximo 8 tentativas. Depois de 10 falhas seguidas o endereço desliga-se sozinho e o painel diz porquê.

    Não há garantia de ordem: usa o updated_at da marcação para saber qual é a mais recente.

    Só chamamos endereços https públicos: endereços privados são recusados e não seguimos redirecionamentos.

    Em «Enviar teste», o painel manda um aviso ping para veres a ligação a funcionar.

    Assistentes de IA (MCP)

    O servidor MCP deixa o ChatGPT, o Claude e outros assistentes ver horas livres e marcar, com a mesma chave e as mesmas regras da API.

    Endereço: https://app.hellomarcela.com/api/mcp

    Nos clientes que aceitam servidores MCP remotos, a configuração é parecida com esta (o cabeçalho leva a tua chave):

    Configuração
    {
      "mcpServers": {
        "salon": {
          "url": "https://app.hellomarcela.com/api/mcp",
          "headers": { "Authorization": "Bearer <your key>" }
        }
      }
    }

    Ferramentas

    • list_shopscatalog:readThe shops (places) of the salon this key can use, with their ids and time zones.
    • list_servicescatalog:readThe services that can be booked online in a shop (id, name, duration, price in cents, variants, add-ons) and the people who do them. Call this first to get the ids.
    • check_availabilityavailability:readFree start times for one or more services between two dates (YYYY-MM-DD, in the shop's time zone). Returns slots with starts_at (UTC) and the person for each service. Always check before booking.
    • create_bookingbookings:writeMake a booking at a start time taken from check_availability. Give customer_id (an existing customer) or customer (name and/or phone; an existing customer with that phone is reused). If the salon asks for a deposit, the booking waits for it and the answer has deposit.pay_url to give the customer. Use the same idempotency_key when retrying.
    • list_bookingsbookings:readBookings, oldest start first. Filter by dates (ISO 8601 with offset), status or customer.
    • get_bookingbookings:readOne booking by id.
    • cancel_bookingbookings:writeCancel a booking that is still open.
    • find_customerscustomers:readCustomers of the salon by exact phone, exact email or part of the name.
    • create_customercustomers:writeCreate a customer (a name and/or a phone number is required). Fails with customer_exists if the phone number is already a customer.
    • list_class_typesclasses:readThe kinds of group class the studio teaches (name, duration, capacity, credits one enrolment costs, usual instructor, room).
    • list_classesclasses:readGroup classes, earliest first, with places taken, held and free, the waiting list size, the instructor and the room. Filter by dates (ISO 8601 with offset), type, instructor or status.
    • get_classclasses:readOne group class by id.
    • list_instructorsclasses:readThe people who teach group classes (name only; no contact details).
    • list_enrollmentsclasses:readWho is enrolled in group classes (the customer's name and phone, status, places, credits charged). Give class_id for the roster of one class, or customer_id for the classes of one customer.
    • list_waitlistclasses:readThe waiting lists of full group classes (position, status, the customer's name and phone). Give class_id for one class, or customer_id for one customer.
    • enroll_customerclasses:writeEnrol an existing customer in a group class (get class_id from list_classes and customer_id from the customers). One credit of the customer pays for it (use_credit false, which needs the key to have classes:no_credit, enrols without one). Fails with conflict and details.reason (full, already_enrolled, no_credit, too_late, too_early, session_closed, seats_full) when the class or the customer cannot take it; when reason is full, join the waiting list instead. Use the same idempotency_key when retrying.
    • cancel_enrollmentclasses:writeCancel an enrolment. Inside the notice period of the studio it is a late cancellation (status late_cancelled) and the credit may not come back; the answer says late and credit_restored. Use the same idempotency_key when retrying.
    • join_waitlistclasses:writePut a customer on the waiting list of a full class. The customer is told when a place frees up, so notice_consent must be true and only if they agreed to it: ask them first, never assume it. Fails with conflict and details.reason not_full when the class still has places (enrol instead).
    • leave_waitlistclasses:writeTake a customer off a waiting list (waitlist_id from list_waitlist or join_waitlist).
    • set_class_instructorclasses:writeChange the instructor of a class that has not ended (instructor_id from list_instructors). The enrolled customers are told unless notify is false.
    • list_write_logslog:readThe write log: what the keys of this business wrote through the API and this server (when, which key, which operation, on what and the result), newest first. Filter by key, result (ok or refused) or kind (booking, customer, enrollment, waitlist, class).
    • list_membership_plansmemberships:readThe clubs (monthly memberships) the salon sells: price per period, sessions included or unlimited, discount.
    • list_membershipsmemberships:readThe memberships of the customers (status, paid until, price per period). Filter by customer, plan, shop or status.
    • list_class_credit_plansmemberships:readThe class packs and unlimited periods the studio sells (classes, validity, price in cents).
    • list_class_creditsmemberships:readThe class credits sold to customers (a pack with credits left, or an unlimited period) and until when they are valid. Filter by customer, shop or status.

    A chave só vê as ferramentas das suas permissões. Um erro dentro de uma ferramenta volta como resultado, para o assistente se corrigir.

    Para experimentar sem assistente, pede a lista de ferramentas:

    Listar as ferramentas
    curl -X POST "https://app.hellomarcela.com/api/mcp" \
      -H "Authorization: Bearer $KEY" \
      -H "Content-Type: application/json" \
      -d '{ "jsonrpc": "2.0", "id": 1, "method": "tools/list" }'

    Precisas de ajuda?

    Fala connosco e dizemos-te como ligar o teu sistema. A resposta chega por email.